Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:25:90:60:1B:FC  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::225:90ff:fe60:1bfc/64 Scope:Link
          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)

eth1      Link encap:Ethernet  HWaddr 00:25:90:60:1B:FD  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::225:90ff:fe60:1bfd/64 Scope:Link
          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)

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          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:

Unfortunately when I do ping server answers only on:

OS=centOS 6/64bit

What could be wrong ?

share|improve this question
How did you assign the other addresses? – uSlackr Sep 26 '11 at 20:35
It doesn't look like those interfaces are configured. What are the results of an ifconfig -a? – kce Sep 26 '11 at 20:35
I added full ifconfig -a in the post – chubbyk Sep 26 '11 at 20:41
Please note that ifconfig is deprecated. Stop using it. In the example above, all 5 addresses may be assigned to eth1, yet ifconfig won't show them. ip will. – MikeyB Oct 18 '11 at 17:49
up vote 13 down vote accepted

You need to configure those IPs on that interface.

ip addr add dev eth1
ip addr add dev eth1
ip addr add dev eth1
ip addr add dev eth1

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.

share|improve this answer

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

ip address show

quick and old way is using ifconfig to add aliases

ifconfig eth1:1 netmask

Same command for the other IPs.

share|improve this answer
I think your netmask should be – dmourati Sep 26 '11 at 20:43
If I use the command you mentioned .. will it stay there after reboot ? – chubbyk Sep 26 '11 at 20:51

Even if your IPs are set up properly, the server may still answer on 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, and you send a ping to eth0 ( from a device in another subnet - let's say - there's a good chance that the server will respond to that packet from! This last assumes you don't have a more specfic route to via a gateway on

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.

share|improve this answer

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 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

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.

share|improve this answer

Your Answer


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.