[Dnsmasq-discuss] dnsmasq 2.78 is failing to respond to dhcpv6 requests forwarded via relay agent

Sandeep K M sandeep.matada at gmail.com
Fri Jan 4 06:25:49 GMT 2019


Hi Simon,

Thanks a lot for your prompt reply.

Attached are the packet captures:

1. Packets exchanged between client and relay (client-relay.pcap)
2.  Packets exchanged between relay and server (relay-server.pcap)
3. strace of dnsmasq (dnsmasq.trace)

Please let me know if any other information is required.

I am not an expert in reading pcap's or strace but I do see in the attached
strace i.e. dnsmasq.trace file that ""DHCPADVERTISE" message is being
written to the same interface from which it received the "DHCPSOLICIT"
packet. But still it is fails to go out of that interface.

06:04:09.371741 write(2, "DHCPADVERTISE(m1s1p7) 2020::14
00:01:00:01:23:c1:b0:e2:00:50:56:bd:09:fb ", 73) = 73

Any help on this would be greatly appreciated. Also is there any example
configuration of dnsmasq dhcpv6 working with relay ? Any reference would be
of great help.

Thanks
-Sandeep

On Fri, Jan 4, 2019 at 3:21 AM Simon Kelley <simon at thekelleys.org.uk> wrote:

> It would be useful to get full packet dumps rather than just tcpdump
> output.
>
> It would also be useful to run dnsmasq under strace and see what
> syscalls it's making: that would tell use where the reply might be going.
>
>
> Cheers,
>
> Simon.
>
>
>
>
> On 03/01/2019 07:41, Sandeep K M wrote:
> > Hi All,
> >
> >
> >
> > I have a simple setup with a relay agent as shown below:
> >
> >
> > +----------+-------------+
> > |    dnsmasq server |
> >
> > |         (ubuntu)         |
> >
> > +-------------------------+
> >                 | m1s1p7 (1040::2/120)
> >                 | (IP route : 2020::/120 via 1040::1 dev m1s1p7  proto
> > static  metric 512  pref medium)
> >                 |
> >                 |
> >                 | 1/1/2 (1040::1/120)
> > +----------+------------+
> > |        Switch            |
> > |     (Relay Agent )  |
> > +-----------------------+
> >                 | 1/1/1 (2020::1/120)
> >                 |
> >                 |
> >                 | eth1
> > +----------+--------------+
> > |     Client (Ubuntu)  |
> > +--------------------------+
> >
> >
> > It is exactly the same as explained in the video :
> > https://www.youtube.com/watch?v=2Lt1aXpCzvQ
> >
> >
> > Whenever the client is requesting an IPv6 address dnsmasq is failing to
> > respond with “DHCPADVERTISE” message. The “DHCPADVERTISE” has not been
> > sent via the interface. The tcpdump clearly shows that “DHCPADVERTISE”
> > message has not gone through the interface (m1s1p7), its only showing
> > the “DHCPSOLICIT” message which has been received:
> >
> >
> >
> > /root at 8320:~# tcpdump -i *m1s1p7* udp port 547 or 546 -vvv -n/
> >
> > //
> >
> > /tcpdump: listening on m1s1p7, link-type EN10MB (Ethernet), capture size
> > 262144 bytes/
> >
> > //
> >
> > / /
> >
> > //
> >
> > /06:32:37.214798 IP6 (hlim 64, next-header UDP (17) payload length: 110)
> > 2020::1.547 > 1040::2.547: [udp sum ok] dhcp6 relay-fwd
> > (linkaddr=2020::1 peeraddr=fe80::250:56ff:febd:7c93 (relay-message
> > (*dhcp6 solicit* (xid=1894f2 (client-ID hwaddr/time type 1 time
> > 599811159 005056bd7c93) (option-request DNS-server DNS-search-list
> > Client-FQDN SNTP-servers) (elapsed-time 0) (IA_NA IAID:1455258771
> > T1:3600 T2:5400))) (interface-ID 00000024...))/
> >
> >
> >
> > But the dnsmasq logs shows that it is trying to send the “DHCPADVERTISE”
> > message but for some reason it’s not been sent via the interface
> *m1s1p7. *
> >
> > * *
> >
> > **
> >
> > /root at 8320:~# tail -f /var/log/dnsmasq_swns/dnsmasq6.log/
> >
> > //
> >
> > /Jan  3 06:11:20 dnsmasq[4151]: started, version 2.78 DNS disabled/
> >
> > //
> >
> > /Jan  3 06:11:20 dnsmasq[4151]: compile time options: IPv6 GNU-getopt
> > no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth
> > no-DNSSEC loop-detect inotify/
> >
> > /Jan  3 06:11:20 dnsmasq-dhcp[4151]: DHCPv6, IP range 2020::10 --
> > 2020::20, lease time 1h/
> >
> > /Jan  3 06:12:38 dnsmasq-dhcp[4151]: DHCPSOLICIT(m1s1p7)
> > 00:01:00:01:23:c0:64:57:00:50:56:bd:7c:93/
> >
> > //
> >
> > /Jan  3 06:12:38 dnsmasq-dhcp[4151]: DHCPADVERTISE(m1s1p7) 2020::12
> > 00:01:00:01:23:c0:64:57:00:50:56:bd:7c:93/
> >
> >
> >
> > *Does anyone has any clue on what is going on here ? Am I missing
> > something ? Here is my dnsmasq config file contents:*
> >
> >
> >
> > /root at 8320:~# cat /var/run/dnsmasq_swns/dnsmasq6.conf/
> >
> > //
> >
> > /enable-ra/
> >
> > //
> >
> > /log-dhcp/
> >
> > //
> >
> > /log-queries/
> >
> > //
> >
> > /log-facility=/var/log/dnsmasq_swns/dnsmasq6.log/
> >
> > //
> >
> > /port=0/
> >
> > //
> >
> > /dhcp-script=/usr/bin/dhcp_server_leases/
> >
> > //
> >
> > /leasefile-ro/
> >
> > //
> >
> > /dhcp-lease-max=64000/
> >
> > //
> >
> > /dhcp-range=set:default+test,2020::10,2020::20,120/
> >
> >
> >
> > Thanks
> >
> > -Sandeep
> >
> >
> >
> > _______________________________________________
> > Dnsmasq-discuss mailing list
> > Dnsmasq-discuss at lists.thekelleys.org.uk
> > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> >
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20190104/c147d102/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: client-relay.pcap
Type: application/octet-stream
Size: 426 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20190104/c147d102/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: relay-server.pcap
Type: application/octet-stream
Size: 564 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20190104/c147d102/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dnsmasq.trace
Type: application/octet-stream
Size: 17280 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20190104/c147d102/attachment-0005.obj>


More information about the Dnsmasq-discuss mailing list