3

I tried to add a second LAN addresses in CentOS 6.3 on a brand new install and it's not working. I installed a new copy of CentOS 5.7 and tried the same and it worked right away.

Now I'm just trying to setup the alias on the same subnet and it's not working. what am i doing wrong, is this not possible on CentOS 6.3?

second ip address on the same interface but on a different subnet

CentOS 5.7 it works:

DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.0.255
HWADDR=00:0C:29:01:6F:89
IPADDR=192.168.0.167
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes

DEVICE=eth0:0
BOOTPROTO=static
BROADCAST=192.168.0.255
HWADDR=00:0C:29:01:6F:89
IPADDR=192.168.0.166
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes

On CentOS 6.3: does not work

DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.0.255
HWADDR=00:0C:29:1E:DE:86
IPADDR=192.168.0.242
NETMASK=255.255.255.0
NETWORK=192.168.0.0
GATEWAY=192.168.0.1
ONBOOT=yes
DNS1=205.134.232.138
DNS2=4.4.4.4


DEVICE=eth0:0
BOOTPROTO=static
BROADCAST=192.168.0.255
HWADDR=00:0C:29:1E:DE:86
IPADDR=192.168.0.240
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes

# /etc/init.d/network restart
Shutting down interface eth0:  Device state: 3 (disconnected)
[  OK  ]
Shutting down loopback interface:  [  OK  ]
Bringing up loopback interface:  [  OK  
Bringing up interface eth0:  Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/3
[  OK  ]

# ping 192.168.0.240
PING 192.168.0.240 (192.168.0.240) 56(84) bytes of data.
From 192.168.0.242 icmp_seq=2 Destination Host Unreachable

Appreciate any advice, thanks

Update: Perhaps this is relevant? On CentOS 5.7: # dmesg |grep eth eth0: registered as PCnet/PCI II 79C970A eth0: link up eth0: link up

On 6.3: # dmesg | grep eth e1000 0000:02:00.0: eth0: (PCI:66MHz:32-bit) 00:0c:29:1e:de:86 e1000 0000:02:00.0: eth0: Intel(R) PRO/1000 Network Connection e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None 8021q: adding VLAN 0 to HW filter on device eth0 eth0: no IPv6 routers present

user16081-JoeT
  • 1,948
  • 11
  • 18

1 Answers1

6

It looks like NetworkManager is interfering with your settings.

Add the following to your interface configuration file for both the eth0 and eth0:0 devices to disable NetworkManager for this NIC.

NM_CONTROLLED=no

If you would prefer to keep NetworkManager involved, here's a guide with an example script.

Kenny Rasschaert
  • 9,045
  • 3
  • 42
  • 58
  • UPDATE: After reboot the eth0 addresses weren't coming up, so to resolve it I did this: 'chkconfig NetworkManager off' & 'chkconfig network on' – user16081-JoeT Sep 02 '12 at 12:38
  • Yeah, we uninstall NetworkManager on all our server boxes too. The developers are trying to make it a viable tool for servers, but I don't like where it's at right now. – Kenny Rasschaert Sep 02 '12 at 13:55