DHCP Giving Out IP For Wrong Subnet

Asai asai at globalchangemusic.org
Mon Dec 16 19:35:14 UTC 2013


> There’s your problem. Don’t use interface aliases (multiple VLANs on one physical interface) with a DHCP server — it gets confused. The DHCP server somewhat bypasses the operating system IP stack for local clients.
>
> Instead, you should connect all of these VLANs to a switch or router and then use a DHCP relay, per VLAN, to relay these requests to the single address of the DHCP server.
>
Some problems have come up in deploying a DHCP server.  I want to test 
by serving DHCP to one VLAN.  So I set up a subnet for 192.168.50.0/24.  
DHCP server tells me I need to have the 192.168.1.0/24 subnet 
configured, "Not configured to listen on any interfaces!" Server address 
is 192.168.1.92.  So I do that.  Server starts.  I turn on DHCP relay on 
the router for eth3.50, and disable dhcp on router for 3.50 interface.  
Although router forwards DHCP request on eth3.50. Router still tries to 
serve addresses for 192.168.1.0/24 network, which competes with new DHCP 
server.  New DHCP server is also reporting the following when client 
requests an address:

Dec 16 11:38:45 identity dhcpd: DHCPREQUEST for 192.168.50.104 from 
10:dd:b1:9d:4b:9a via 192.168.50.1
Dec 16 11:38:45 identity dhcpd: DHCPACK on 192.168.50.104 to 
10:dd:b1:9d:4b:9a via 192.168.50.1
Dec 16 11:38:45 identity dhcpd: DHCPDISCOVER from 10:dd:b1:9d:4b:9a via 
192.168.50.1
Dec 16 11:38:45 identity dhcpd: DHCPOFFER on 192.168.50.104 to 
10:dd:b1:9d:4b:9a via 192.168.50.1
Dec 16 11:38:47 identity dhcpd: DHCPREQUEST for 192.168.1.195 
(192.168.1.1) from 10:dd:b1:9d:4b:9a via 192.168.50.1: wrong network.
Dec 16 11:38:47 identity dhcpd: DHCPNAK on 192.168.1.195 to 
10:dd:b1:9d:4b:9a via 192.168.50.1

Eventually the client can't receive any IP address at all.  What am I 
missing here?

Config below:


server-identifier 127.0.0.1;

authoritative;

ddns-update-style interim;

update-static-leases on;

ddns-updates on;

ddns-ttl 1800;


ignore client-updates;

key rndc-key {
         secret xxxxxxxxx;
         algorithm hmac-md5;
         }

zone gcmm. {
     primary 127.0.0.1;
     key rndc-key;
     }

zone 50.168.192.in-addr.arpa. {
     primary 127.0.0.1;
     key rndc-key;
     }

zone admin. {
     primary 127.0.0.1;
     key rndc-key;
     }
# UNIFY
shared-network UNIFY {
     option dhcp-server-identifier 192.168.1.92;
     option domain-name-servers 192.168.1.92;
     # GCMM
     subnet 192.168.50.0 netmask 255.255.255.0 {
         range 192.168.50.100 192.168.50.199;
         }
     }
# ADMIN POOL
subnet 192.168.0.0 netmask 255.255.0.0 {
     }


More information about the dhcp-users mailing list