Failover IP Configuration on /etc/network/interfaces Print

  • 6

 

Failover IP Configuration on /etc/network/interfaces

To assign a failover IP to a Linux virtual machine, you must correctly modify the /etc/network/interfaces network configuration file.

Here is a sample working configuration:

auto eth0
iface eth0 inet static
    address 5.6.77.8
    netmask 255.255.255.255
    broadcast 5.6.77.8
    post-up route add 123.4.5.254 dev eth0
    post-up route add default gw 123.4.5.254
    post-down route del default gw 123.4.5.254
    post-down route del 123.4.5.254 dev eth0

 

Parameter details

  • 5.6.77.8: failover IP assigned to the virtual machine
  • 123.4.5.254: default gateway, typically the host IP ending in .254

 

Important

Make sure to set the assigned MAC address directly on the virtual machine via the VSPHERE panel. Otherwise, the network will not function correctly.

 


Was this answer helpful?

« Back