Linux – How to configure multiple addresses on a single interface using Fedora 16

fedoraiplinuxnetworking

I upgraded from Fedora 14 to 16, recently. I had two static IP v4 addresses configured on my ethernet interface by creating two files in /etc/sysconfig/network-scripts:

  ifcfg-eth0      -> first address
  ifcfg-eth0:1    -> second address

After the upgrade, this resulted in an error message during the boot process and in only the second address being successfully configured on the interface. So, what is the correct way to configure multiple addresses on a single interface on Fedora 16? I could not find anything on this subject in the documentation so far.

Best Answer

The command to configure virtual addresses on your interface in fc16 is:

# ip addr add 192.168.1.10/24 dev eth0

Replace the IP address and device name with apropriate values for your system. Be sure to use CIDR notation, or the system will default to /32

To see the result of the command use:

# ip addr list

To remove an address:

# ip addr del 192.168.1.10/24 dev eth0