network interfaces & aliases question/issue

Jim Cromie jim.cromie at gmail.com
Thu Dec 9 17:04:23 UTC 2010


using sysconfig-network, Ive added an alias to my eth0 to add a fixed IP

[jimc at groucho network-scripts]$ egrep -E 'DEV|BOOT|IPADD' ifcfg-eth0*
ifcfg-eth0:DEVICE=eth0
ifcfg-eth0:BOOTPROTO=dhcp
ifcfg-eth0:ONBOOT=yes
ifcfg-eth0:1:DEVICE=eth0:1
ifcfg-eth0:1:BOOTPROTO=none
ifcfg-eth0:1:IPADDR=192.168.20.2

but it seems I can only have one of them working:
(Ive since renamed eth0:1 to eth0_static, thinking there was a problem with
':' in filename)

[jimc at groucho network-scripts]$ sudo ifup eth0
Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/5
state: activated
Connection activated

[jimc at groucho network-scripts]$ ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UNKNOWN qlen 1000
    link/ether 00:24:e8:2a:22:19 brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.101/24 brd 192.168.10.255 scope global eth0
    inet6 fe80::224:e8ff:fe2a:2219/64 scope link
       valid_lft forever preferred_lft forever

[jimc at groucho network-scripts]$ sudo ifup eth0_static
Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/6

[jimc at groucho network-scripts]$ ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UNKNOWN qlen 1000
    link/ether 00:24:e8:2a:22:19 brd ff:ff:ff:ff:ff:ff
    inet 192.168.20.2/24 brd 192.168.20.255 scope global eth0
    inet6 fe80::224:e8ff:fe2a:2219/64 scope link
       valid_lft forever preferred_lft forever

I expected 2 inet lines above.

And its not just NetoworkManager messing up.
Ive taken both interfaces (main, alias) from NM's control,
and I get the same *last-upped-interface-wins* behavior

[jimc at groucho network-scripts]$ ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UNKNOWN qlen 1000
    link/ether 00:24:e8:2a:22:19 brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.101/24 brd 192.168.10.255 scope global eth0
    inet6 fe80::224:e8ff:fe2a:2219/64 scope link
       valid_lft forever preferred_lft forever

[jimc at groucho network-scripts]$ ifup eth0_static
Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/9
[jimc at groucho network-scripts]$ ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UNKNOWN qlen 1000
    link/ether 00:24:e8:2a:22:19 brd ff:ff:ff:ff:ff:ff
    inet 192.168.20.2/24 brd 192.168.20.255 scope global eth0
    inet6 fe80::224:e8ff:fe2a:2219/64 scope link
       valid_lft forever preferred_lft forever

[jimc at groucho network-scripts]$ ifup eth0
Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/10
state: activated
Connection activated
[jimc at groucho network-scripts]$ ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UNKNOWN qlen 1000
    link/ether 00:24:e8:2a:22:19 brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.101/24 brd 192.168.10.255 scope global eth0
    inet6 fe80::224:e8ff:fe2a:2219/64 scope link
       valid_lft forever preferred_lft forever


btw, is one addressee better than the other ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20101209/a9db6b32/attachment-0001.html 


More information about the users mailing list