0

I can't seem to get IP binding to work properly. I have two files: ifcfg-eth0 and ifcfg-eth0:1 (tried 0:0, 0:2 and still not working).

eth0 is supposed to be for IP 192.168.1.3 and eth0:1 is for 192.168.1.4.

After I create the files, I restarted networking. When I use ifconfig, it only shows eth0. If I try to ifup eth0:1, ifconig still only shows eth0 but with the eth0:1 IP.

Shouldn't it show both eth0 and eth0:1?

What am I doing wrong?

Here are the files: ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none    
ONBOOT=yes
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=192.168.1.3
USERCTL=no
IPV6INIT=no
PEERDNS=yes
GATEWAY=192.168.1.1

ifcfg-eth0:1

DEVICE=eth0:1
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=192.168.1.4
USERCTL=no
IPV6INIT=no
PEERDNS=yes
GATEWAY=192.168.1.1

I did not include the hardware address.

4
  • At first glance nothing, have you tried a service network restart?
    – NickW
    Feb 28, 2013 at 15:59
  • Yes, I have used that and restart the whole machine. Each time it just seems to load eth0. If I manually push eth0:1, it just replaces the IP shown in eth0 using ifconfig (doesn't modify the actual file).
    – Sean
    Feb 28, 2013 at 16:00
  • That is odd, I've had the exact same problem, but only when I had identical names in the files..
    – NickW
    Feb 28, 2013 at 16:02
  • Please append the output of ip addr show.
    – Henry S.
    Feb 28, 2013 at 20:25

2 Answers 2

0

The network manager could be preventing this from coming up properly.

In each config file can you add the following line:

NM_CONTROLLED=no

I have seen a few instances where this has caused trouble in the past.

1
  • This seemed to work. I am not seeing both interfaces.
    – Sean
    Feb 28, 2013 at 20:27
0

You need to specify, at the top of the ifcfg-ethX file, the name of the interface. You probably just copied the eth0 file, and left the eth0 "name" at the top.

1
  • I have the intefaces set to the name of the file. I will add the files to the question.
    – Sean
    Feb 28, 2013 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .