Hello, I have to add a second IP address to one server running CentOS 6.4. I used the method of copying ifcfg-eth0 to ifcfg-eth0:1 and modify the necessary data.
The original file looks like this:
[root@nncsrv2 network-scripts]# vim ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=f2954b4d-0714-4678-ada6-424066e9ab26
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=172.18.4.44
PREFIX=24
GATEWAY=172.18.4.1
DNS1=10.70.44.30
DNS2=10.73.33.62
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
HWADDR=D8:9D:67:2A
B:10
LAST_CONNECT=1389637604
~
and I modified ifcfg-eth0:1 file to this:
[root@nncsrv2 network-scripts]# vim ifcfg-eth0:1
DEVICE=eth0:1
TYPE=Ethernet
UUID=f2954b4d-0714-4678-ada6-424066e9ab26
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=172.18.4.45
PREFIX=24
GATEWAY=172.18.4.1
DNS1=10.70.44.30
DNS2=10.73.33.62
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0:1"
HWADDR=D8:9D:67:2A
B:10
LAST_CONNECT=1389637604
~
After restartitg the networking service, the problem is that the IP dynamically assigned to the interface is just the new one (172.18.4.45). From other server I can ping 172.18.4.45 but not the original 172.18.4.44. I need both IP running.
Any help, please?
Thanks.