Assign two static IP addresses to one mac address

Can Isc-dhcp-server give two static ip addresses to one mac address?

I have several Genexis terminals in my network. Each terminal have two interfaces, one for public traffic and one for a management traffic. Both interfaces have same mac address. DHCP server can detect interfaces via dhcp option field and dhcp class declarations.

Every terminal have to have static ip address instead of dynamic address. With dynamic address and dynamic pools this would be an easy task.

Or is there any dhcp server that can do this?


Regardless of whether you use DHCP or not, you'd better not putting two interfaces with identical MACs and different IPs into the same link (broadcast domain). Unless You are able to predict exactly all results.

If you have two isolated subnets, your DHCP config is straightforward: just put host entries into corresponding subnet declarations. But remember that hostname should be globally unique.

This approach works fine at least with isc-dhcpd-V3.0.5-RedHat.

If you have a managed switch you can use port-based VLANs to create isolated subnets.

As well as a network card with VLAN support allows you to map this subnets to sub-interfaces. Otherwise use two cards.

Extracts from working config:

On client (addresses got dynamically):

eth0      Link encap:Ethernet  HWaddr 00:25:90:35:E4:40
          inet addr:10.10.17.34  Bcast:10.10.255.255  Mask:255.255.0.0
          ... 

eth0.100    Link encap:Ethernet  HWaddr 00:25:90:35:E4:40
          inet addr:192.168.100.34  Bcast:192.168.100.255  Mask:255.255.255.0
          ...

On server:

eth0      Link encap:Ethernet  HWaddr 00:04:23:B9:FF:FC
          inet addr:10.10.17.7  Bcast:10.10.255.255  Mask:255.255.0.0

eth0.100  Link encap:Ethernet  HWaddr 00:04:23:B9:FF:FC
          inet addr:192.168.100.7  Bcast:192.168.100.255  Mask:255.255.255.0

dhcpd.conf:

subnet 10.10.0.0 netmask 255.255.0.0 {
        option subnet-mask              255.255.0.0;

        ...
        host nms2 {
                hardware ethernet 00:25:90:35:e4:40;
                fixed-address 10.10.17.34;
        }
}


subnet 192.168.100.0 netmask 255.255.255.0 {
       option subnet-mask 255.255.255.0;
       ...
       host nms2-san {
           hardware ethernet 00:25:90:35:e4:40;
           fixed-address 192.168.100.34;
       }
}