Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.


Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.


Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.


Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Networking

Configuring multi-IP network interfaces

Submitted by on December 2, 2005 – 12:18 pm One Comment

This article explains how to configure a network interface to support virtual IP addresses. This is useful in a cluster environment or in any high-availability service cnfiguration, when you need to ensure that at least one IP address is always responsive regardless of its physical destination.

1. To make a machine support a virtua IP address:

ifconfig hme0:1 up

The first parameter (hme0) is the physical name of the primary network interface (NI). The NI name is followed by’:#’, where “#” is th number of the virtual interface you are creating. The second parameter is the new virtual IP address, followed by the netmask and the broadcast address. The last parameter is “up” to bring the new virtual NI online.

2. To bring this virtual NIC down without deleting it:

ifconfig hme0:1 down

3. To bring this virtual NI up again:

$ ifconfig hme0:1 up

4. To delete this virtual NI:

$ ifconfig hme0:1 0 down

Note: Assigning 0 as IP address, deletes it.

Here’s a practical example of creating a virtual NI:

1) Take a look at the available NIs

ifconfig -a

lo0: flags=2001000849 mtu 8232 index 1
        inet netmask ff000000
eri0: flags=1000843 mtu 1500 index 2
        inet netmask ffffff00 broadcast
        ether 0:3:ba:44:9d:22

2) The primary NI in this case is eri0 and we will use it to create out virtual NI.

ifconfig eri0:1 up

3) Let’s take another look at our network interfaces

ifconfig -a

Print Friendly, PDF & Email

One Comment »

Leave a Reply

%d bloggers like this: