[Dnsmasq-discuss] Problem with VM and dnsmasq
mario
jjskoli at gmail.com
Wed Oct 7 14:41:15 BST 2015
Hello, my first post.
I use as a gateway a Debian Jessie pc with dnsmasq providing both DHCP
and DNS.
Normally, it works flawlessly, but there may be one bug. On one of my
pcs (Ubuntu 14.04)
I run a VirtualBox instance with an Arch Linux VM for which I have
chosen a Bridged
Adapter mode. When the host is on Ethernet the VM gets an IP address
from dnsmasq
unfailingly. But when the host in on wifi, and the VM still in bridged
adapter mode, the VM
cannot seem to obtain an IP address.
The funny thing is,I see the DHCP request enter the gateway (via
tcpdump), and in
the file `/var/log/daemon.log` I see the recording of a DHCP offer. But
the packet with the
DHCP offer never leaves the gateway: dnsmasq says it has made an offer,
the offer never
leaves the gateway, never mind reaching the client.
Please notice: dnsmasq works perfectly for all other clients, wired or
wifi. It fails only with the
VM, and then only when the host is on wifi.
In the attached files I provide: 1) the dnsmasq.conf file; 2) tcpdump
capture and daemon.log on the
gateway when the host is connected via ethernet; 3) tcpdump capture and
daemon.log when the
host is connected via wifi. The third file shows that dnsmasq IS reached
by the BOOTP/DHCP request
just like in the ethernet case, but tcpdump does NOT show an outgoing
Reply. Firewall configuration
and sysctl.conf have not changed in the meantime.
I also provide, in the following files called packet_eth and
packet_wlan, the whole BOOTP/DHCP packet,
for the case of a connection via ethernet, and then via wifi. The reason
is that I am not sure the
fault in this behavior lies entirely (or exclusively?) with dnsmasq: it
might lie with Arch Linux dhcpcd
package, or perhaps with VirtualBox.
I would be glad of any feedback, I hope I have provided enough info to
allow diagnosing the problem.
Cheers,
Mario
-------------- next part --------------
ddomain-needed
bogus-priv
no-dhcp-interface=tun0
interface=brlan,tun0
server=/z.lan/192.168.11.1
local=/jjskoli.lan/
#server= 194.243.154.62
#server=212.216.172.222
server=8.8.8.8
server=8.8.4.4
expand-hosts
domain=jjskoli.lan
dhcp-range=192.168.73.32,192.168.73.95,12h
dhcp-host=00:26:c6:09:cb:3e, 192.168.73.49
dhcp-host=4C:E6:76:C4:54:24,dd-wrt1,192.168.73.129,12h
dhcp-host=00:1E:0B:09:EC:AD,hp-printer,192.168.73.10,12h
dhcp-option=119,jjskoli.lan,Z.lan
dhcp-host=20:0C:C8:48:90:BF,ignore
-------------- next part --------------
# tcpdump -n -i brlan port 67 and port 68
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on brlan, link-type EN10MB (Ethernet), capture size 262144 bytes
14:48:57.651936 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 08:00:27:03:6a:3e, length 349
14:48:57.652311 IP 192.168.73.1.67 > 192.168.73.95.68: BOOTP/DHCP, Reply, length 320
14:48:57.653263 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 08:00:27:03:6a:3e, length 359
14:48:57.682266 IP 192.168.73.1.67 > 192.168.73.95.68: BOOTP/DHCP, Reply, length 327
#tail -f /var/log/daemon.log
Oct 7 14:48:57 router73 dnsmasq-dhcp[2042]: DHCPDISCOVER(brlan) 08:00:27:03:6a:3e
Oct 7 14:48:57 router73 dnsmasq-dhcp[2042]: DHCPOFFER(brlan) 192.168.73.95 08:00:27:03:6a:3e
Oct 7 14:48:57 router73 dnsmasq-dhcp[2042]: DHCPDISCOVER(brlan) 08:00:27:03:6a:3e
Oct 7 14:48:57 router73 dnsmasq-dhcp[2042]: DHCPOFFER(brlan) 192.168.73.95 08:00:27:03:6a:3e
Oct 7 14:48:57 router73 dnsmasq-dhcp[2042]: DHCPREQUEST(brlan) 192.168.73.95 08:00:27:03:6a:3e
Oct 7 14:48:57 router73 dnsmasq-dhcp[2042]: DHCPACK(brlan) 192.168.73.95 08:00:27:03:6a:3e jiggs
Oct 7 14:48:57 router73 dnsmasq-dhcp[2042]: DHCPREQUEST(brlan) 192.168.73.95 08:00:27:03:6a:3e
Oct 7 14:48:57 router73 dnsmasq-dhcp[2042]: DHCPACK(brlan) 192.168.73.95 08:00:27:03:6a:3e jiggs
-------------- next part --------------
# tcpdump -n -i brlan port 67 and port 68
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on brlan, link-type EN10MB (Ethernet), capture size 262144 bytes
15:00:47.690662 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 08:00:27:03:6a:3e, length 353
15:00:52.455525 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 08:00:27:03:6a:3e, length 353
15:00:52.732786 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 08:00:27:03:6a:3e, length 349
15:00:56.578196 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 08:00:27:03:6a:3e, length 349
15:01:04.200865 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 08:00:27:03:6a:3e, length 349
# tail -f /var/log/daemon.log
Oct 7 15:00:47 router73 dnsmasq-dhcp[2042]: DHCPREQUEST(brlan) 192.168.73.95 08:00:27:03:6a:3e
Oct 7 15:00:47 router73 dnsmasq-dhcp[2042]: DHCPACK(brlan) 192.168.73.95 08:00:27:03:6a:3e jiggs
Oct 7 15:00:47 router73 dnsmasq-dhcp[2042]: DHCPREQUEST(brlan) 192.168.73.95 08:00:27:03:6a:3e
Oct 7 15:00:47 router73 dnsmasq-dhcp[2042]: DHCPACK(brlan) 192.168.73.95 08:00:27:03:6a:3e jiggs
Oct 7 15:00:52 router73 dnsmasq-dhcp[2042]: DHCPREQUEST(brlan) 192.168.73.95 08:00:27:03:6a:3e
Oct 7 15:00:52 router73 dnsmasq-dhcp[2042]: DHCPACK(brlan) 192.168.73.95 08:00:27:03:6a:3e jiggs
Oct 7 15:00:52 router73 dnsmasq-dhcp[2042]: DHCPREQUEST(brlan) 192.168.73.95 08:00:27:03:6a:3e
Oct 7 15:00:52 router73 dnsmasq-dhcp[2042]: DHCPACK(brlan) 192.168.73.95 08:00:27:03:6a:3e jiggs
Oct 7 15:00:52 router73 dnsmasq-dhcp[2042]: DHCPDISCOVER(brlan) 08:00:27:03:6a:3e
Oct 7 15:00:52 router73 dnsmasq-dhcp[2042]: DHCPOFFER(brlan) 192.168.73.95 08:00:27:03:6a:3e
Oct 7 15:00:52 router73 dnsmasq-dhcp[2042]: DHCPDISCOVER(brlan) 08:00:27:03:6a:3e
Oct 7 15:00:52 router73 dnsmasq-dhcp[2042]: DHCPOFFER(brlan) 192.168.73.95 08:00:27:03:6a:3e
Oct 7 15:00:54 router73 dnsmasq-dhcp[2042]: DHCPDISCOVER(brlan) 20:0c:c8:48:90:bf ignored
Oct 7 15:00:54 router73 dnsmasq-dhcp[2042]: DHCPDISCOVER(brlan) 20:0c:c8:48:90:bf ignored
Oct 7 15:00:56 router73 dnsmasq-dhcp[2042]: DHCPDISCOVER(brlan) 08:00:27:03:6a:3e
Oct 7 15:00:56 router73 dnsmasq-dhcp[2042]: DHCPOFFER(brlan) 192.168.73.95 08:00:27:03:6a:3e
Oct 7 15:00:56 router73 dnsmasq-dhcp[2042]: DHCPDISCOVER(brlan) 08:00:27:03:6a:3e
Oct 7 15:00:56 router73 dnsmasq-dhcp[2042]: DHCPOFFER(brlan) 192.168.73.95 08:00:27:03:6a:3e
Oct 7 15:01:04 router73 dnsmasq-dhcp[2042]: DHCPDISCOVER(brlan) 08:00:27:03:6a:3e
Oct 7 15:01:04 router73 dnsmasq-dhcp[2042]: DHCPOFFER(brlan) 192.168.73.95 08:00:27:03:6a:3e
Oct 7 15:01:04 router73 dnsmasq-dhcp[2042]: DHCPDISCOVER(brlan) 08:00:27:03:6a:3e
Oct 7 15:01:04 router73 dnsmasq-dhcp[2042]: DHCPOFFER(brlan) 192.168.73.95 08:00:27:03:6a:3e
-------------- next part --------------
# tcpdump -nnvvXSs 1514 -i brlan host 0.0.0.0
tcpdump: listening on brlan, link-type EN10MB (Ethernet), capture size 1514 bytes
15:21:24.173278 IP (tos 0x0, ttl 64, id 21164, offset 0, flags [none], proto UDP (17), length 377)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:03:6a:3e, length 349, xid 0x8a4caf6c
Client-Ethernet-Address 08:00:27:03:6a:3e
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Client-ID Option 61, length 19: hardware-type 255, 27:03:6a:3e:00:01:00:01:1d:42:7d:77:08:00:27:d4:1b:c7
SLP-NA Option 80, length 0""
MSZ Option 57, length 2: 1500
Vendor-Class Option 60, length 49: "dhcpcd-6.9.3:Linux-4.2.2-1-ARCH:i686:GenuineIntel"
Hostname Option 12, length 5: "jiggs"
T145 Option 145, length 1: 1
Parameter-Request Option 55, length 15:
Subnet-Mask, Classless-Static-Route, Static-Route, Default-Gateway
Domain-Name-Server, Hostname, Domain-Name, MTU
BR, NTP, Lease-Time, Server-ID
RN, RB, Option 119
0x0000: 4500 0179 52ac 0000 4011 26c9 0000 0000 E..yR... at .&.....
0x0010: ffff ffff 0044 0043 0165 8eb3 0101 0600 .....D.C.e......
0x0020: 8a4c af6c 0000 0000 0000 0000 0000 0000 .L.l............
0x0030: 0000 0000 0000 0000 0800 2703 6a3e 0000 ..........'.j>..
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0100: 0000 0000 0000 0000 6382 5363 3501 013d ........c.Sc5..=
0x0110: 13ff 2703 6a3e 0001 0001 1d42 7d77 0800 ..'.j>.....B}w..
0x0120: 27d4 1bc7 5000 3902 05dc 3c31 6468 6370 '...P.9...<1dhcp
0x0130: 6364 2d36 2e39 2e33 3a4c 696e 7578 2d34 cd-6.9.3:Linux-4
0x0140: 2e32 2e32 2d31 2d41 5243 483a 6936 3836 .2.2-1-ARCH:i686
0x0150: 3a47 656e 7569 6e65 496e 7465 6c0c 056a :GenuineIntel..j
0x0160: 6967 6773 9101 0137 0f01 7921 0306 0c0f iggs...7..y!....
0x0170: 1a1c 2a33 363a 3b77 ff ..*36:;w.
-------------- next part --------------
# tcpdump -nnvvXSs 1514 -i brlan host 0.0.0.0
tcpdump: listening on brlan, link-type EN10MB (Ethernet), capture size 1514 bytes
15:16:34.376618 IP (tos 0x0, ttl 64, id 51766, offset 0, flags [none], proto UDP (17), length 377)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:03:6a:3e, length 349, xid 0x2b8de2e8, Flags [Broadcast] (0x8000)
Client-Ethernet-Address 08:00:27:03:6a:3e
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Client-ID Option 61, length 19: hardware-type 255, 27:03:6a:3e:00:01:00:01:1d:42:7d:77:08:00:27:d4:1b:c7
SLP-NA Option 80, length 0""
MSZ Option 57, length 2: 1500
Vendor-Class Option 60, length 49: "dhcpcd-6.9.3:Linux-4.2.2-1-ARCH:i686:GenuineIntel"
Hostname Option 12, length 5: "jiggs"
T145 Option 145, length 1: 1
Parameter-Request Option 55, length 15:
Subnet-Mask, Classless-Static-Route, Static-Route, Default-Gateway
Domain-Name-Server, Hostname, Domain-Name, MTU
BR, NTP, Lease-Time, Server-ID
RN, RB, Option 119
0x0000: 4500 0179 ca36 0000 4011 af3e 0000 0000 E..y.6.. at ..>....
0x0010: ffff ffff 0044 0043 0165 39f6 0101 0600 .....D.C.e9.....
0x0020: 2b8d e2e8 0000 8000 0000 0000 0000 0000 +...............
0x0030: 0000 0000 0000 0000 0800 2703 6a3e 0000 ..........'.j>..
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0100: 0000 0000 0000 0000 6382 5363 3501 013d ........c.Sc5..=
0x0110: 13ff 2703 6a3e 0001 0001 1d42 7d77 0800 ..'.j>.....B}w..
0x0120: 27d4 1bc7 5000 3902 05dc 3c31 6468 6370 '...P.9...<1dhcp
0x0130: 6364 2d36 2e39 2e33 3a4c 696e 7578 2d34 cd-6.9.3:Linux-4
0x0140: 2e32 2e32 2d31 2d41 5243 483a 6936 3836 .2.2-1-ARCH:i686
0x0150: 3a47 656e 7569 6e65 496e 7465 6c0c 056a :GenuineIntel..j
0x0160: 6967 6773 9101 0137 0f01 7921 0306 0c0f iggs...7..y!....
0x0170: 1a1c 2a33 363a 3b77 ff ..*36:;w.
More information about the Dnsmasq-discuss
mailing list