2nd IP address on an interface

Robert Moskowitz rgm at htt-consult.com
Thu Aug 28 20:16:55 UTC 2014


This is on a F20 arm system.  It SHOULD follow F20 rules...

first: cat /etc/udev/rules.d/70-persistent-net.rules

# Added by 'write_udev' for detected device 'eth0'.
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="02:67:15:00:01:78", NAME="eth0"

First IP address is:

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"
BOOTPROTO=none
ONBOOT="yes"
TYPE="Ethernet"
NAME="System eth0"
MACADDR=02:67:15:00:01:63
MTU=1500
DNS1=208.83.67.188
GATEWAY="208.83.67.161"
IPADDR="208.83.67.163"
NETMASK="255.255.255.240"
HOSTNAME="miredo.htt-consult.com"
IPV6INIT="yes"
DNS2=2607:f4b8:3:3:9254:5400:0:188

this works fine.  But now for the second IP address I add:

# cat /etc/sysconfig/network-scripts/ifcfg-eth0:0
DEVICE="eth0:0"
BOOTPROTO=none
ONBOOT="yes"
TYPE="Ethernet"
NAME="System eth0"
MTU=1500
GATEWAY="208.83.67.161"
IPADDR="208.83.67.164"
NETMASK="255.255.255.240"

But no second IP address is shown:

]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
         inet 208.83.67.163  netmask 255.255.255.240  broadcast 
208.83.67.175
         inet6 fe80::67:15ff:fe00:163  prefixlen 64  scopeid 0x20<link>
         ether 02:67:15:00:01:63  txqueuelen 1000  (Ethernet)
         RX packets 21  bytes 2556 (2.4 KiB)
         RX errors 0  dropped 12  overruns 0  frame 0
         TX packets 147  bytes 11726 (11.4 KiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
         device interrupt 87  base 0x6000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
         inet 127.0.0.1  netmask 255.0.0.0
         inet6 ::1  prefixlen 128  scopeid 0x10<host>
         loop  txqueuelen 0  (Local Loopback)
         RX packets 90  bytes 8076 (7.8 KiB)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 90  bytes 8076 (7.8 KiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

So what is missing?  Do I need a 70-persistent-net.rules for eth0:0 ??

Or something else?




More information about the users mailing list