dhcrelay doubling DHCPREQUEST unicasts

Michal Kratky kratky at fzu.cz
Tue Apr 3 16:40:32 UTC 2012


Hi,

we have a linux router like this:

eth0.200 at eth0: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
     link/ether 00:0f:20:7a:e7:8a brd ff:ff:ff:ff:ff:ff
     inet 147.231.26.77/23 brd 147.231.27.255 scope global eth0.200

eth0.5 at eth0: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
     link/ether 00:0f:20:7a:e7:8a brd ff:ff:ff:ff:ff:ff
     inet 10.26.5.31/24 brd 10.26.5.255 scope global eth0.5

Note that we are using just one physical interface and route between two
VLANs. There is a DHCP server in the VLAN 200 and many Windows in the
private network VLAN 5. All the Windows stations have fixed IP adresses
bound to their MAC addresses. There is a dhcrelay running on the router
which relays to the DHCP server.

At the startup Windows broadcasts DHCPDISCOVER, dhcrelay relays and it
works fine. But one hour later Windows station sends DHCPREQUEST by
unicast to the DHCP server. This request passes through the router,
reaches DHCP server and the server replies DHCPACK. Still fine.
But dhcrelay somehow catches the DHCPREQUEST and relays it to the DHCP
server ones more. Even worse it uses source address in the VLAN 200
instead VLAN 5. It makes the server to reply DHCPNAK because of "wrong
network". Thus the DHCP server receives one DHCPREQUEST twice, answer
one ACK and one NAK and the station receives both replies. Windows
somehow can cope with it and they stay alive, but I am not at
ease. Please how to stop this strange behaviour?

Thanks



More information about the dhcp-users mailing list