[Dnsmasq-discuss] dhclient makes repeated queries to dnsmasq when running on multiple interfaces

Chris Wilson chris+dnsmasq at aptivate.org
Thu Aug 2 19:50:12 BST 2012


Hi all,

I'm forwarding this query here as well, as it's about a poor interaction 
between dhclient and dnsmasq, and there may be a bug in dnsmasq (replying 
to the wrong IP address for DHCP queries). Has anyone seen this before or 
can help me to solve the problem?

Cheers, Chris.

---------- Forwarded message ----------
Date: Thu, 2 Aug 2012 18:55:51 +0200 (CAT)
From: Chris Wilson <chris at aptivate.org>
To: dhcp-bugs at isc.org
Subject: dhclient makes repeated queries when running on multiple interfaces

Dear sirs,

I'm writing to inquire about the status of your bug #19604, as unfortunately 
you do not have a public bug tracker that I can check.

It was mentioned on this Fedora ticket: 
https://bugzilla.redhat.com/show_bug.cgi?id=469258 where David Cantrell wrote 
"Sadly, no, but I will post any updates from ISC here." That was three years 
ago.

This bug appears also to be present in dhclient 3.1.3 
(dhcp3-client-2ubuntu3.3), the version in Ubuntu 10.04 (Lucid) LTS. It's 
noticeable that when I have a laptop connected using both wired and wireless 
interfaces, both configured by DHCP using Network Manager, it send the wireless 
DHCP query out of the wired interface:

16:53:03.995187 44:87:fc:0b:22:08 > 00:00:24:cd:fe:be, ethertype IPv4 (0x0800), 
length 342: 192.168.128.125.68 > 192.168.128.1.67: BOOTP/DHCP, Request from 
74:f0:6d:68:49:de, length 300

Note: 44:87:fc:0b:22:08 and 192.168.128.125 are the addresses of eth0, the 
wired interface, while 74:f0:6d:68:49:de and 192.168.128.170 are the wireless 
interface:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
qlen 1000
     link/ether 44:87:fc:0b:22:08 brd ff:ff:ff:ff:ff:ff
     inet 192.168.128.125/22 brd 192.168.131.255 scope global eth0
     inet6 fe80::4687:fcff:fe0b:2208/64 scope link
        valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
qlen 1000
     link/ether 74:f0:6d:68:49:de brd ff:ff:ff:ff:ff:ff
     inet 192.168.128.170/22 brd 192.168.131.255 scope global wlan0
     inet6 fe80::76f0:6dff:fe68:49de/64 scope link
        valid_lft forever preferred_lft forever

Now dnsmasq finds an existing lease and replies to the address of the owner of 
that lease, instead of the IP address that the request was sent from, but still 
using the interface and destination MAC address that the request was received 
on. I'm not sure if that's a bug, and the reason why dhclient appears to ignore 
the reply?

Aug  2 16:53:03 ipad2 dnsmasq-dhcp[2003]: DHCPREQUEST(br1) 192.168.128.170 
74:f0:6d:68:49:de

Aug  2 16:53:03 ipad2 dnsmasq-dhcp[2003]: DHCPACK(br1) 192.168.128.170 
74:f0:6d:68:49:de classmate

16:53:04.102038 00:00:24:cd:fe:be > 44:87:fc:0b:22:08, ethertype IPv4 (0x0800), 
length 357: 192.168.128.1.67 > 192.168.128.170.68: BOOTP/DHCP, Reply, length 
315

Anyway, it appears that dhclient receives and ignores this reply, and sends 
another request 10-20 seconds later:

16:58:33 send(3, "<30>Aug  2 16:58:33 dhclient: DHCPREQUEST of 192.168.128.170 
on wlan0 to 192.168.128.1 port 67", 94, MSG_NOSIGNAL) = 94

16:58:33 write(2, "DHCPREQUEST of 192.168.128.170 on wlan0 to 192.168.128.1 
port 67", 64) = 64

16:58:33 write(2, "\n", 1)              = 1

16:58:33 sendto(5, 
"\1\1\6\0\356q#5:a\0\0\300\250\200\252\0\0\0\0\0\0\0\0\0\0\0\0t\360mhI\336\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
300, 0, {sa_family=AF_INET, sin_port=htons(67), 
sin_addr=inet_addr("192.168.128.1")}, 16) = 300

16:58:33 gettimeofday({1343919513, 5978}, NULL) = 0

16:58:33 select(7, [5 6], [], [], {9, 994022}) = 1 (in [5], left {9, 961011})

16:58:33 gettimeofday({1343919513, 39657}, NULL) = 0

16:58:33 recvfrom(5, 
"\2\1\6\0\356q#5:a\200\0\300\250\200\252\300\250\200\252\300\250\200\1\0\0\0\0t\360mhI\336\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0pxelinux.0\0\0\0\0\0\0\0\0\0\0"..., 
1540, 0, {sa_family=AF_INET, sin_port=htons(67), 
sin_addr=inet_addr("192.168.128.1")}, [16]) = 315

16:58:33 gettimeofday({1343919513, 40633}, NULL) = 0

16:58:33 select(7, [5 6], [], [], {9, 959367}) = 0 (Timeout)

16:58:43 gettimeofday({1343919523, 10553}, NULL) = 0

16:58:43 time(NULL)                     = 1343919523

16:58:43 send(3, "<30>Aug  2 16:58:43 dhclient: DHCPREQUEST of 192.168.128.170 
on wlan0 to 192.168.128.1 port 67", 94, MSG_NOSIGNAL) = 94

16:58:43 write(2, "DHCPREQUEST of 192.168.128.170 on wlan0 to 192.168.128.1 
port 67", 64) = 64

16:58:43 write(2, "\n", 1)              = 1

16:58:43 sendto(5, 
"\1\1\6\0\356q#5:k\0\0\300\250\200\252\0\0\0\0\0\0\0\0\0\0\0\0t\360mhI\336\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
300, 0, {sa_family=AF_INET, sin_port=htons(67), 
sin_addr=inet_addr("192.168.128.1")}, 16) = 300

Is there anything you need to help debug this problem further?

Cheers, Chris.
-- 
Aptivate | http://www.aptivate.org | Phone: +44 1223 967 838
Future Business, Cam City FC, Milton Rd, Cambridge, CB4 1UY, UK

Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.




More information about the Dnsmasq-discuss mailing list