DHCP Giving Out IP For Wrong Subnet

Asai asai at globalchangemusic.org
Mon Dec 16 15:20:23 UTC 2013


Greetings,

We've been running into this problem where we have the DHCP server 
giving out a wrong IP address for a device which is running on a 
different subnet.  These subnets are on VLANs.  For example, below are 
configured two shared networks:  The first, ADMIN-POOL, is on eth3.  It 
is the physical interface.  Below that is the shared network GENERAL, 
which is on eth3.50 and is a virtual interface on eth3.

shared-network ADMIN-POOL {
         authoritative;
         subnet 192.168.1.0 netmask 255.255.255.0 {
                 option domain-name-servers 192.168.1.92;
                 default-lease-time 86400;
                 max-lease-time 86400;
                 range 192.168.1.100 192.168.1.199;
         }
}

shared-network GENERAL {
         authoritative;
         subnet 192.168.50.0 netmask 255.255.255.0 {
                 option domain-name-servers 192.168.1.92;
                 option routers 192.168.50.1;
                 default-lease-time 86400;
                 max-lease-time 86400;
                 range 192.168.50.100 192.168.50.199;
         }
}


What's indicative on the problem can be seen here in this log.

Dec 14 09:36:06 lanaforge dhcpd: DHCPREQUEST for 192.168.50.104 from 
10:dd:b1:9d:4b:9a  via eth3.50
Dec 14 09:36:06 lanaforge dhcpd: DHCPACK on 192.168.50.104 to 
10:dd:b1:9d:4b:9a  via eth3.50
Dec 14 09:36:06 lanaforge dhcpd: DHCPREQUEST for 192.168.50.104 from 
10:dd:b1:9d:4b:9a  via eth3: wrong network.
Dec 14 09:36:06 lanaforge dhcpd: DHCPNAK on 192.168.50.104 to 
10:dd:b1:9d:4b:9a via eth3
Dec 14 09:36:06 lanaforge dhcpd: DHCPDISCOVER from 10:dd:b1:9d:4b:9a 
via eth3.50
Dec 14 09:36:06 lanaforge dhcpd: DHCPOFFER on 192.168.50.104 to 
10:dd:b1:9d:4b:9a  via eth3.50
Dec 14 09:36:06 lanaforge dhcpd: DHCPDISCOVER from 10:dd:b1:9d:4b:9a 
via eth3
Dec 14 09:36:07 lanaforge dhcpd: DHCPOFFER on 192.168.1.195 to 
10:dd:b1:9d:4b:9a  via eth3
Dec 14 09:36:07 lanaforge dhcpd: DHCPREQUEST for 192.168.50.104 
(192.168.50.1) from 10:dd:b1:9d:4b:9a via eth3.50
Dec 14 09:36:07 lanaforge dhcpd: DHCPACK on 192.168.50.104 to 
10:dd:b1:9d:4b:9a  via eth3.50
Dec 14 09:36:07 lanaforge dhcpd: DHCPREQUEST for 192.168.50.104 
(192.168.50.1) from 10:dd:b1:9d:4b:9a  via eth3: wrong network.
Dec 14 09:36:07 lanaforge dhcpd: DHCPNAK on 192.168.50.104 to 
10:dd:b1:9d:4b:9a via eth3

As can be seen above, the DHCP server is offering IP addresses for the 
same MAC on two different subnets.  One via eth3, the other via eth3.50. 
  In this case, the client is a member of VLAN 50 which is connected to 
virtual interface eth3.50 which has an IP block of 192.168.50.0/24.

In this case, the client received the correct IP address for its subnet. 
  However, there are frequently cases where clients will receive an IP 
address which is in the wrong subnet.  Suddenly, and for no apparent 
reason, clients in a different subnet / vlan will receive an IP address 
in the 192.168.1.0/24 range.  Once this has been done, the client cannot 
regain the correct IP address by a DHCP renewal request since the DHCP 
server will offer both IP addresses (as seen above) and determine that 
the latest IP acknowledged by the client (the wrong one) is the correct 
one, even though the client is on a different virtual interface and 
subnet.  In order to fix this, the client must be statically configured 
in the correct subnet to regain connectivity to the network, after which 
time we return the client to DHCP, until such time as this happens again.

Does anybody have any ideas of how to remedy this problem?  Thanks.



-- 
--Asai



More information about the dhcp-users mailing list