ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:25:90:60:1B:FC
inet addr:10.0.47.42 Bcast:10.255.255.255 Mask:255.255.255.248
inet6 addr: fe80::225:90ff:fe60:1bfc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4300 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:416886 (407.1 KiB) TX bytes:812 (812.0 b)
Memory:fbce0000-fbd00000
eth1 Link encap:Ethernet HWaddr 00:25:90:60:1B:FD
inet addr:72.9.239.194 Bcast:72.255.255.255 Mask:255.255.255.248
inet6 addr: fe80::225:90ff:fe60:1bfd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:82334 errors:0 dropped:0 overruns:0 frame:0
TX packets:53868 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:85116034 (81.1 MiB) TX bytes:22357038 (21.3 MiB)
Memory:fbde0000-fbe00000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5356 errors:0 dropped:0 overruns:0 frame:0
TX packets:5356 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:674981 (659.1 KiB) TX bytes:674981 (659.1 KiB)
Adresses assigned to server should be 5 usable:
72.9.239.194
72.9.239.195
72.9.239.196
72.9.239.197
72.9.239.198
Unfortunately when I do ping server answers only on: 72.9.239.194
OS=centOS 6/64bit
What could be wrong ?
You need to configure those IPs on that interface.
You can also use the
ifcfg-eth1:n
files in/etc/sysconfig/network-scripts
to make this configuration last across reboots.See Red Hat's documentation for more information.
From that output.. you only have 1 IP on the interface. You have been assigned that block but you have to alias the other IPs to that interface.
You can see if you have them aliased via
quick and old way is using ifconfig to add aliases
Same command for the other IPs.
Even if your IPs are set up properly, the server may still answer on 72.9.239.194 because that's the primary IP on that interface. And, just to really wreck your head, if the server's default route is via, say, 72.9.239.193 and you send a ping to eth0 (10.0.47.42) from a device in another subnet - let's say 10.11.0.0/24 - there's a good chance that the server will respond to that packet from 72.9.239.194! This last assumes you don't have a more specfic route to 10.11.0.0/24 via a gateway on 10.0.47.0/24.
Don't read too much into the address that responds to your pings - as long as the device responds and the replies are from an address that's configured on it, you're golden.
You need to create one file per secondary IP in your /etc/sysconfig/network-scripts/ folder. Each interface is represented by a file corresponding to ifcfg-eth where represents the unique interface number for that card (e.g. the first interface card is represented by ifcfg-eth0).
To create an alias for that interface, you need to create a file in the format of ifcfg-eth0: where represents the alias number (e.g. the 2nd ip for the first card would be ifcfg-eth0:1).
So in your case you currently should have a file named ifcfg-eth1 (containing the configuration for IP 72.9.239.194) and so you need to create 4 files named ifcfg-eth1:1, ifcfg-eth1:2, ifcfg-eth1:3 and ifcfg-eth1:4 with the following content:
(just change the DEVICE name and IPADDR on each file correspondingly - everything else remains the same on all 4 files).
Also on your file ifcfg-eth1 your BROADCAST address seems to be false. The correct one should be 72.9.239.255.
Create the 4 files, and issue a /etc/init.d/network restart or simply restart your whole server for the IP address aliases to load up.