Systems can have Virtual IP (VIP) addresses
that are not permanently assigned to a single, specific physical
interface. The system will accept to a packet addressed to its VIP
(or VIPs) regardless of the physical interface on which it was received.
This allows a system to have a "system IP" address that is available
as long as one interface stays usable.
To configure VIPs, associate the VIP address with a secondary
loopback interface (lo0:n, where n is 1 or greater, such as lo0:1).
The VIP address does not have to be in the same subnet (or network)
of the addresses used for the physical interfaces.
In the example below, the system has two LAN interfaces. One
is attached to the 15.n.n.n network and has the address 15.1.1.1.
The second LAN is attached to the 16.n.n.n network and has the address
16.1.1.1. The VIP address is 17.1.1.1.
Note that the infrastructure of the network (routers, switches)
must allow IP packets with the address 17.1.1.1 to be properly routed
to this system's interfaces on the 15.n.n.n and 16.n.n.n networks
for this configuration to be useful.
/etc/rc.config.d/netconf file statements for the above VIP:
INTERFACE_NAME[2]=lo0:1 IP_ADDRESS[2]=15.1.1.1 : : |
ifconfig command for the above VIP:
ifconfig lo0:1 inet 15.1.1.1 |
Note that you cannot assign VIPs to the primary loopback interface,
lo0:0, or lo0.