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

Sandeep K M sandeep.matada at gmail.com
Wed Jan 9 10:12:25 GMT 2019


Hi,

Its a very simple topology, I have tried to recreate the entire setup on a
different test bed. I still see the same issue:

root at Ubuntu4242:~# tail -f /tmp/dnsmasq
Jan  9 01:57:20 dnsmasq-dhcp[2695]: DHCPSOLICIT(eth1)
00:01:00:01:23:c8:76:d7:00:50:56:bd:57:ed
Jan  9 01:57:20 dnsmasq-dhcp[2695]: DHCPADVERTISE(eth1) 2020::18
00:01:00:01:23:c8:76:d7:00:50:56:bd:57:ed
Jan  9 01:58:32 dnsmasq-dhcp[2695]: DHCPSOLICIT(eth1)
00:01:00:01:23:c8:76:d7:00:50:56:bd:57:ed
Jan  9 01:58:32 dnsmasq-dhcp[2695]: DHCPADVERTISE(eth1) 2020::18
00:01:00:01:23:c8:76:d7:00:50:56:bd:57:ed

Attaching the full setup configuration with topology. Any help will be much
appreciated.

If anyone has any working configuration of dhcpv6 dnsmasq setup with a
relay agent, please let me know.

Mine is a simple setup with a host-h1 (ubuntu) acting as a client,
switch-sw1 acting as a relay agent and host-h2 (ubuntu) acting as a dnsmasq
server. With these if anyone provide me a working config that will be of
great help.

Thanks
-Sandeep

On Mon, Jan 7, 2019 at 7:17 PM Geert Stappers <stappers at hendrikx-itc.nl>
wrote:

> On Mon, Jan 07, 2019 at 01:09:11PM +0530, Sandeep K M wrote:
> > On Fri, Jan 4, 2019 at 7:32 PM Geert Stappers wrote:
> > > On Fri, Jan 04, 2019 at 05:34:03PM +0530, Sandeep K M wrote:
> > >
> > > > Please let me know if any other information is needed.
> > >
> > > Not yet mentioned in this thread is working connectity between "server"
> > > and "client".  This will require temporary manual configuration
> > > of an IPv6 address at client. Let say it is 2020::2/120.
> > > Then verify with more than "ping". Example given:  `ssh 1040::2`
> > >
> > > It shall reveal how well router ( with the odd name 'Switch' ) is
> > > configured for routing between 1040::/120 and 2020::/120.
> > > Also if the ssh deamon is able to send packets out on the right
> > > interface.
> > >
> > > I do know that it might seem a detour. And we also known that
> > > original poster is already stuck with current setup. So the "detour"
> > > could be a step forward.   Good luck.
> > >
> > >
> > Hi,
> >
> > As you suggested I added the IPv6 address 2020::2/120 manually to my
> client
> >
> > # ip -6 addr add 2020::2/120 dev eth1
> >
> > when I pinged the server it failed :
> >
> > root at Ubuntu3481:~# ping6 -I 2020::2 1040::2
> > PING 1040::2(1040::2) from 2020::2 : 56 data bytes
> > ping: sendmsg: Network is unreachableping: sendmsg: Network is unreachale
> >
> > Then I added a default route:
> >
> >
> > root at Ubuntu3481:~# ip -6 route add default via 2020::1
> > root at Ubuntu3481:~# ip -6 route
> > 2020::/120 dev eth1  proto kernel  metric 256
> > fe80::/64 dev eth0  proto kernel  metric 256
> > fe80::/64 dev eth1  proto kernel  metric 256
> > default via 2020::1 dev eth1  metric 1024
> >
> > I see the ping is working fine now:
> >
> > root at Ubuntu3481:~# ping6 -I 2020::2 1040::2
> > PING 1040::2(1040::2) from 2020::2 : 56 data bytes
> > 64 bytes from 1040::2: icmp_seq=1 ttl=63 time=0.278 ms
> > 64 bytes from 1040::2: icmp_seq=2 ttl=63 time=0.178 ms
> > 64 bytes from 1040::2: icmp_seq=3 ttl=63 time=0.172 ms
>
> So ICMP packets can roundtrip across the router.
> If other packets can, is still unknown.
> (As in '> > Then verify with more than "ping". Example given:  `ssh
> 1040::2`')
>
>
> Idea is finding out if the original problem could be caused
> by incomplete routing rules.
>
>
>
> > But when I remove the manually configured IPv6 address and try to get a
> new
> > IPv6 using "dhclient -6 eth1" again it fails. I see the same log lines in
> > dnsmasq log:
> >
> > Jan  7 07:19:54 dnsmasq-dhcp[3815]: DHCPSOLICIT(m1s1p7)
> 00:01:00:01:23:c5:ba:1b:00:50:56:96:d1:7c
> > Jan  7 07:19:54 dnsmasq-dhcp[3815]: DHCPADVERTISE(m1s1p7) 2020::19
> 00:01:00:01:23:c5:ba:1b:00:50:56:96:d1:7c
> > Jan  7 07:19:55 dnsmasq-dhcp[3815]: DHCPSOLICIT(m1s1p7)
> 00:01:00:01:23:c5:ba:1b:00:50:56:96:d1:7c
> > Jan  7 07:19:55 dnsmasq-dhcp[3815]: DHCPADVERTISE(m1s1p7) 2020::19
> 00:01:00:01:23:c5:ba:1b:00:50:56:96:d1:7c
> >
> > When we have enable-ra configured wont dnsmasq advertise the gateway
> IP's ?
> > Do we need to enable RA even in the switch where relay agent is running ?
> > can we configure default gateway to the clients via dhcpv6 options
> similar
> > to IPv4 ?
> >
> >
> > PS: If I replace dnsmasq server with ISC DHCP server everything works
> fine.
>
> And the essential configuration items of the working setup
> are correctly transposed to the non-working setup?
>
>
> Regards
> Geert Stappers
> Curious about why the DHCPADVERTISE packets aren't seen with a network
> sniffer.
>
> _______________________________________________
> 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/20190109/294f06e3/attachment-0001.html>
-------------- next part --------------
Topology
--------
+----------+---------------+
| dnsmasq server (Ubuntu)  | 
+--------------------------+ 
           | eth1 (1040::2/120)
	   | (IP route: 2020::/120 via 1040::1 dev eth1  metric 1024)
	   |
           | 
           | 1/1/18 (1040::1/120)
+----------+------------+
|        Switch         |
|     Relay Agent       |
+-----------------------+ 
           |1/1/17 (2020::1/120)  
	   |
           |      
           |eth1      
+----------+-----------+
|     Client (Ubuntu)  |
+----------------------+


Relay agent switch configuration:
----------------------------------

8320# sh running-config
Current configuration:
!
!Version ArubaOS-CX TL.10.02.0000-8074-gf8dcc40
session-timeout 0
!
!
!
ssh server vrf mgmt
!
!
!
!
!
vlan 1
interface mgmt
    no shutdown
    ip dhcp
interface 1/1/17
    no shutdown
    ipv6 address 2020::1/120
    ipv6 helper-address unicast 1040::2
interface 1/1/18
    no shutdown
    ipv6 address 1040::1/120
dhcpv6-relay

root at 8320:~# ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: bridge-vrf: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9198 state UP qlen 1000
    inet6 fe80::2c8e:86ff:feb7:8b5b/64 scope link
       valid_lft forever preferred_lft forever
3: tap-br0 at tap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9198 state UP qlen 1000
    inet6 fe80::5cd5:fdff:feb1:35b0/64 scope link
       valid_lft forever preferred_lft forever
4: tap0 at tap-br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9198 state UP qlen 1000
    inet6 fe80::1/64 scope link
       valid_lft forever preferred_lft forever
    inet6 fe80::8ce5:acff:fea9:ad4c/64 scope link
       valid_lft forever preferred_lft forever
19: m1s1p18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UNKNOWN qlen 1000
    inet6 1040::1/120 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::d067:2600:12e2:20e4/64 scope link
       valid_lft forever preferred_lft forever
50: m1s1p17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UNKNOWN qlen 1000
    inet6 2020::1/120 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::d067:2600:11e2:20e4/64 scope link
       valid_lft forever preferred_lft forever
root at 8320:~# ip -6 route
1040::/120 dev m1s1p18  proto kernel  metric 256  pref medium
2020::/120 dev m1s1p17  proto kernel  metric 256  pref medium
fe80::/64 dev bridge-vrf  proto kernel  metric 256  pref medium
fe80::/64 dev tap0  proto kernel  metric 256  pref medium
fe80::/64 dev tap-br0  proto kernel  metric 256  pref medium
fe80::/64 dev m1s1p17  proto kernel  metric 256  pref medium
fe80::/64 dev m1s1p18  proto kernel  metric 256  pref medium



Server configuration:
---------------------

root at Ubuntu4242:~# ps -ef | grep dnsmasq
dnsmasq   2626     1  0 01:06 ?        00:00:00 /usr/sbin/dnsmasq -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -r /var/run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new
root      2695     1  0 01:08 ?        00:00:00 dnsmasq -i eth1 --port=0 --user=root --log-facility=/tmp/dnsmasq --dhcp-range=2020::10,2020::20,60m
root      2857  2283  0 01:33 pts/1    00:00:00 grep dnsmasq
root at Ubuntu4242:~# ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 fe80::250:56ff:fe01:2a2a/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 1040::2/120 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:febd:5165/64 scope link
       valid_lft forever preferred_lft forever
root at Ubuntu4242:~# ip -6 route
1040::/120 dev eth1  proto kernel  metric 256
2020::/120 via 1040::1 dev eth1  metric 1024
fe80::/64 dev eth1  proto kernel  metric 256
fe80::/64 dev eth0  proto kernel  metric 256


Client
------

root at Ubuntu4241:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:56:01:2a:29
          inet addr:10.93.42.41  Bcast:10.93.255.255  Mask:255.255.0.0
          inet6 addr: fe80::250:56ff:fe01:2a29/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:43432 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3416 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:12526626 (12.5 MB)  TX bytes:287524 (287.5 KB)

eth1      Link encap:Ethernet  HWaddr 00:50:56:bd:57:ed
          inet6 addr: fe80::250:56ff:febd:57ed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:240 (240.0 B)  TX bytes:1388 (1.3 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:18 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1286 (1.2 KB)  TX bytes:1286 (1.2 KB)

root at Ubuntu4241:~# ip -6 route
fe80::/64 dev eth1  proto kernel  metric 256
fe80::/64 dev eth0  proto kernel  metric 256


More information about the Dnsmasq-discuss mailing list