Using DHCP with Multi-Homed NICs

dhcpdhcp-servermac addressmulti-homednic

I am trying to steer away from our current manual addressing system and embrace the decades-old wonder of DHCP. In our domain and even at my home network DHCP is great – I can use address reservations to handle the need for static IP. However, in our production datacenter, many of our hosts have multi-homed NICs, so it is one MAC address with multiple IP's.

  1. Is it possible to configure this as a reservation in DHCP? (ie, multiple reservations for one MAC address?)
  2. If not (1), if it is easy to install as many NICs as IPs in the hosts that are currently multi-homed (they are all VM's), is it advisable to do this and then use DHCP address reservation?

The consensus seems to be: always use DHCP, so I am trying to get us there.

Best Answer

DHCP servers don't allow you to have multiple IP when annoucing a single MAC address. You have to user identifiers, but not every clients and servers can use them.
The usual trick is to annouce different MAC when you do the DHCP request, but with a virtual machine it is simplier to add another NIC. It is very easy to add NICs, and this is common practice.

If you want to use identifiers, in your dhclient.conf file:

interface "eth0:1" {
    send dhcp-client-identifier "xxxx-eth0:1";
}

interface "eth0:2" {
    send dhcp-client-identifier "xxxx-eth0:2";
}

Obviously, this don't work with Windows. Maybe there is another method for this OS.