Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
By the very nature of DHCP, you won't be able to do this. I'm surprised that it's actually working as-is because MAC addresses are supposed to be globally unique (or you'd be able to reach one interface and not the other). I'm curious what terminals you have... –  Nathan C Oct 30 '13 at 11:07
2  
@NathanC Solaris boxes (used to)?, by default, set the Ethernet MAC address on all interfaces to the same value. #ripleys –  MikeyB Oct 30 '13 at 12:13
    
Those terminals are Genexis ftth gateways. I had no idea why it does not create new mac address while I'm creating new vlan. Any ideas how I can proceed? –  Timo Ylikännö Oct 30 '13 at 13:08
    
Sorry, VLAN - yes. THIs should be possible by using two DHCP servers - one on each VLAN. –  TomTom Oct 30 '13 at 18:38
    
One DHCP server is enough indeed. –  Veniamin Oct 31 '13 at 14:05

1 Answer 1

up vote 1 down vote accepted

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;
       }
}
share|improve this answer
    
Thank you for pointing me right way. To make sure that subnets really are isolated I use tagged vlan. This should isolate networks and now everything works as excepted. –  Timo Ylikännö Nov 11 '13 at 11:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.