Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
At first glance nothing, have you tried a service network restart? –  NickW Feb 28 '13 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 '13 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 '13 at 16:02
    
Please append the output of ip addr show. –  Henry S. Feb 28 '13 at 20:25
add comment

2 Answers 2

up vote 0 down vote accepted

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.

share|improve this answer
    
This seemed to work. I am not seeing both interfaces. –  Sean Feb 28 '13 at 20:27
add comment

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.

share|improve this answer
    
I have the intefaces set to the name of the file. I will add the files to the question. –  Sean Feb 28 '13 at 15:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.