[Dnsmasq-discuss] DHCP Relay across VLANs

Ray Ramadorai ray at ramadorai.net
Fri Sep 15 01:26:11 BST 2017


I recently was trying to transition from OpenWRT to LEDE and ran into a
problem with DHCP relay not working correctly after the transition.  I have
taken debug about as far as I can and am looking for some help going
forward.  

 

Some details on network and configuration:

 

Network A (VLAN82) 192.168.42.0/24

                Host: DHCP Server 192.168.42.4 

                Host: Relay 192.168.42.41 on interface (eth0.82)

 

Network B (VLAN85) 192.168.85.0/24

                Host: DHCP Client MAC:  (00:0c:29:ed:03:a5)

                Host: Relay 192.168.85.2 on interface (eth0.85)

 

dnsmasq.conf on the Relay host:

 

dhcp-authoritative

domain-needed

localise-queries

read-ethers

bogus-priv

expand-hosts

local-service

domain=lan

server=/lan/

dhcp-leasefile=/tmp/dhcp.leases

resolv-file=/tmp/resolv.conf.auto

stop-dns-rebind

rebind-localhost-ok

dhcp-broadcast=tag:needs-broadcast

addn-hosts=/tmp/hosts

conf-dir=/tmp/dnsmasq.d

user=dnsmasq

group=dnsmasq

dhcp-relay=192.168.85.2,192.168.42.4

 

The platform is a set of virtual machines running on x86 hardware.  

 

Software versions working case:

Kernel:  Linux Openwrt 3.18.23 #1 SMP Sun Jan 31 15:32:38 CET 2016 x86_64
GNU/Linux

DNSMasq:  Dnsmasq version 2.73  Copyright (c) 2000-2015 Simon Kelley

Compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6
no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC loop-detect inotify

 

Software versions NOT working case:

Kernel:  Linux LEDE 4.4.71 #0 SMP Wed Jun 7 19:24:41 2017 x86_64 GNU/Linux

Dnsmasq version 2.77  Copyright (c) 2000-2016 Simon Kelley

Compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6
no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect
inotify

 

In the working case the normal 4 packet DHCP handshake occurs as expected
and the relay passes the packets between the DHCP server and the client.  

 

In the failing case the client request packet gets from the client to the
relay and then on to the dhcp server via the relay.  The response from the
dhcp server makes it back to the relay, but then the corresponding packet
from the relay to the client never gets sent.  Though I see the packet come
back from the server it is not clear that DNSMasq sees the packet.  I can
attach TCP dumps as needed.   Any help in further debug steps to determine
if dnsmasq is not seeing the response from the DHCP server or is not sending
the packet and why would be very helpful.  

 

I also came across this bug that looks similar but I am not sure has been
reported upstream:

 

https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1686192

 

 

Thanks

 

Ray Ramadorai

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20170914/077a198e/attachment.html>


More information about the Dnsmasq-discuss mailing list