Re: Problem with multi-aliases network interfaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2006-04-20 at 00:36 +0200, Samuel Díaz García wrote:
> Is the same case Bruno?
> 
> A wifi iface and ethernet iface with many alises?
> Or is more generic case?
> 
> The question is because I have many servers now with FC5 with 
> multi-aliases ethernet ifaces and have no problem (at least this problem).
> 
> Anyone could confirm this problem and the workaround provided by Bruno?
> 
When I run multiple aliases on a single interface I do the same as
Bruno, but since I want them all enabled at boot I also add other lines
in the ifcfg file.
For each interface I want active at boot it looks similar to the
following:
DEVICE=eth0:1
BOOTPROTO=static
IPADDR=111.222.333.XXX
NETMASK=255.255.255.0
NETWORK=111.222.333.0
ONBOOT=yes

I include the line ONBOOT=yes so it gets activated at boot.

I also have done something even simpler in the past.
Have a script that is called from /etc/rc.d/rc.local that contains lines
such as
  ifconfig eth0:1 111.222.333.XXX
  ifconfig eth0:1 111.222.333.YYY
  ...

where the first 3 octets are the same as on the eth0 device.  This
creates multiple IPs on the same subnet for multi-host appearances.

This is really all that is needed to activate the alias interfaces on
the main interface.


> Bruno Wolff III escribió:
> > On Wed, Apr 19, 2006 at 15:09:51 +0200,
> >   Samuel Díaz García <samueldg@xxxxxxxxxxxx> wrote:
> >> Please help!!!
> > 
> > I have already bugzilla'd this (188321). You can work around the problem
> > by editing the config files for the alias interfaces (e.g. 
> > /etc/sysconfig/network-scripts/ifcfg-eth1:1) and removing all definitions
> > other than IPADDR and NETMASK. For example my eth1:1 file contains:
> > IPADDR=10.0.0.2
> > NETMASK=255.0.0.0
> > 
> >> Samuel Díaz García escribió:
> >>> Distro: FC5
> >>>
> >>> My network devices:
> >>>   eth1: ipw2200 (intel 2915 abg wifi).
> >>>   eth0: tg3 (broadcom gigabit etherner).
> >>>
> >>> I'm using static ip's in all ifaces, and wpa_supplicant over eth1.
> >>>
> >>> The problem is:
> >>>
> >>>   a) only eth1 and eth0 configured with static ip's don't have problems.
> >>>   b) when add more ips over eth0, as eth0:1, eth0:2, etc... with IPs 
> >>> over diferent IP subnetworks, the "network" init script appear to forgot 
> >>> the type of eth0 ifaces and when "service network restart" or when 
> >>> rebooting computer, my eth0 iface (and eth0:1 and so on) are lost.
> >>>
I think the problem here is the phrase "with IPs over diferent IP
subnetworks".  In my experience, it is difficult to do additional
networks on the same interface unless you explicitly add all the needed
values in the configuration line.

A line such as 
ifconfig eth0:1 111.222.333.XXX netmask 255.255.255.0 
will create an alias interface with an appropriate ip address and
netmask, and will also give the network route to that subnet, but  there
are routing issues and other related items that may need to be
addressed.

I could thus have eth0 with an address of 192.168.100.2, a netmask of
255.255.255.0, and a default gateway of 192.168.100.1

If I added aliases :1 and :2 as such
   ifconfig eth0:1 192.168.101.2 netmask 255.255.255.0 
   ifconfig eth0:1 192.168.102.2 netmask 255.255.255.0 
    
I now have access to all three subnets of class C size from this system,
and members of those subnets also can contact my system as long as their
physical network is attached to eth0.

However, unless I do some routing configuration on this system, the net
effect is that I have access to those subnets and they have access to
me, but I do not bridge/route any data between the networks.

I find that putting these lines in a script makes it easier that
creating a separate ifcfg-eth1:1, ifcfg-eth0:2, etc file for each
interface so defined.

The system-config-network tool does a lot of that for you though, so
YMMV. It does allow configuring aliases.

> >>> I think that the problem were system-config-network app (that appears to 
> >>> be some problems with aliases and naming/saving new ifaces data), but 
> >>> manually revised and corrected ifcfg-eth0?? files (after adding them 
> >>> with system-config-network) and rebooting, the network script appears to 
> >>> think that eth0 (tg3 driver) is a wireless device and try to assign the 
> >>> wifi info (and I think is a bit confused the initialization of eth0:1 
> >>> with the iface eth1).
> >>>
> >>> A think anything were broken on last initscripts package update.
> >>>
> >>> More info:
> >>>   a) eth0:? are marked as dependant on eth0, as they go up when eth0 go 
> >>> up.
> >>>   b) I have configured wpa_supplicant over eth1 and eth1 is working fine.
> >>>
> >>> Any patch/help to apply over the last "network" init script?
> >>>
> >>> Thanks
> >>>
> >> -- 
> >>    Samuel Díaz García
> >>     Director Gerente
> >> ArcosCom Wireless, S.L.L.
> >>
> >> CIF: B11828068
> >> c/ Romero Gago, 19
> >> Arcos de la Frontera
> >> 11630 - Cadiz
> >>
> >> http://www.arcoscom.com
> >>
> >> mailto:samueldg@xxxxxxxxxxxx
> >> msn: samueldg@xxxxxxxxxxxx
> >>
> >> Móvil: 651 93 72 48
> >> Tlfn.: 956 70 13 15
> >> Fax:   956 70 34 83
> >>
> >> -- 
> >> fedora-list mailing list
> >> fedora-list@xxxxxxxxxx
> >> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
> > 
> 
> -- 
>     Samuel Díaz García
>      Director Gerente
> ArcosCom Wireless, S.L.L.
> 
> CIF: B11828068
> c/ Romero Gago, 19
> Arcos de la Frontera
> 11630 - Cadiz
> 
> http://www.arcoscom.com
> 
> mailto:samueldg@xxxxxxxxxxxx
> msn: samueldg@xxxxxxxxxxxx
> 
> Móvil: 651 93 72 48
> Tlfn.: 956 70 13 15
> Fax:   956 70 34 83
> 


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux