Discussion:
[Dnsmasq-discuss] bug:DHCP Relay not responding with DHCP OFFER.
Jason Kary
2017-04-27 21:02:20 UTC
Permalink
Hi Folks,

I have a basic setup for DHCP relay across VLANS in DNSMASQ.

My configuration file looks like:

bogus-priv
interface=ens160
log-dhcp
dhcp-range=10.168.102.100,10.168.102.150,255.255.255.0,12h

The client and server are running on a VMs in separate VLANS. DHCP requests appear to be coming across:

***@DHCP-UBUNTU-SERVER:~# tcpdump -i ens160 port 67 or port 68 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens160, link-type EN10MB (Ethernet), capture size 262144 bytes
03:58:40.966944 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP, Request from 00:0c:29:65:e0:ea, length 322
03:58:46.487767 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP, Request from 00:0c:29:65:e0:ea, length 322
03:58:54.424895 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP, Request from 00:0c:29:65:e0:ea, length 322
03:59:07.795712 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP, Request from 00:0c:29:65:e0:ea, length 322
03:59:19.196022 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP, Request from 00:0c:29:65:e0:ea, length 322

***@DHCP-UBUNTU-SERVER:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
***@DHCP-UBUNTU-SERVER:~#

The syslog log indicates the DCHP OFFERS are ‘supposed’ to be going out however nothing is seen on the wire.

Apr 27 04:03:26 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 available DHCP range: 10.168.102.100 -- 10.168.102.150
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 DHCPDISCOVER(ens160) 00:0c:29:65:e0:ea
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 tags: ens160
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 DHCPOFFER(ens160) 10.168.102.128 00:0c:29:65:e0:ea
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 requested options: 1:netmask, 28:broadcast, 2:time-offset, 121:classless-static-route,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 requested options: 15:domain-name, 6:dns-server, 12:hostname,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 requested options: 40:nis-domain, 41:nis-server, 42:ntp-server,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 requested options: 26:mtu, 119:domain-search, 3:router, 121:classless-static-route,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 requested options: 249, 33:static-route, 252, 42:ntp-server
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 next server: 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 sent size: 1 option: 53 message-type 2
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 sent size: 4 option: 54 server-identifier 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 sent size: 4 option: 51 lease-time 12h
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 sent size: 4 option: 58 T1 6h
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 sent size: 4 option: 59 T2 10h30m
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 sent size: 4 option: 1 netmask 255.255.255.0
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 sent size: 4 option: 28 broadcast 10.168.102.255
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 sent size: 4 option: 3 router 10.168.102.1
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 sent size: 4 option: 6 dns-server 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 sent size: 20 option: 82 agent-id 01:0a:01:08:00:06:00:4c:4f:2a:00:2f:02:06


I’ve been trying to trace this issue and it is like the sendmsg system call is not working properly. I believe routing is setup properly on the DHCP server.

***@DHCP-UBUNTU-SERVER:~# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 172.31.13.1 0.0.0.0 UG 0 0 0 ens192
10.168.101.0 0.0.0.0 255.255.255.0 U 0 0 0 ens160
10.168.102.0 0.0.0.0 255.255.255.0 U 0 0 0 ens160
172.31.13.0 0.0.0.0 255.255.255.0 U 0 0 0 ens192
***@DHCP-UBUNTU-SERVER:~#

Can anyone seen something obvious that I am doing wrong?

Take Care
Jason
Simon Kelley
2017-04-28 21:36:02 UTC
Permalink
Post by Jason Kary
Hi Folks,
I have a basic setup for DHCP relay across VLANS in DNSMASQ.
bogus-priv
interface=ens160
log-dhcp
dhcp-range=10.168.102.100,10.168.102.150,255.255.255.0,12h
The client and server are running on a VMs in separate VLANS. DHCP
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens160, link-type EN10MB (Ethernet), capture size 262144 bytes
03:58:40.966944 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:58:46.487767 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:58:54.424895 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:59:07.795712 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:59:19.196022 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
The syslog log indicates the DCHP OFFERS are ‘supposed’ to be going out
however nothing is seen on the wire.
Apr 27 04:03:26 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
available DHCP range: 10.168.102.100 -- 10.168.102.150
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
DHCPDISCOVER(ens160) 00:0c:29:65:e0:ea
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 tags: ens160
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
DHCPOFFER(ens160) 10.168.102.128 00:0c:29:65:e0:ea
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 1:netmask, 28:broadcast, 2:time-offset,
121:classless-static-route,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 15:domain-name, 6:dns-server, 12:hostname,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 40:nis-domain, 41:nis-server, 42:ntp-server,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 26:mtu, 119:domain-search, 3:router,
121:classless-static-route,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 249, 33:static-route, 252, 42:ntp-server
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
next server: 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 1 option: 53 message-type 2
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 54 server-identifier 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 51 lease-time 12h
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 58 T1 6h
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 59 T2 10h30m
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 1 netmask 255.255.255.0
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 28 broadcast 10.168.102.255
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 3 router 10.168.102.1
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 6 dns-server 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 20 option: 82 agent-id
01:0a:01:08:00:06:00:4c:4f:2a:00:2f:02:06…
I’ve been trying to trace this issue and it is like the sendmsg system
call is not working properly. I believe routing is setup properly on
the DHCP server.
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window
irtt Iface
0.0.0.0 172.31.13.1 0.0.0.0 UG 0 0
0 ens192
10.168.101.0 0.0.0.0 255.255.255.0 U 0 0
0 ens160
10.168.102.0 0.0.0.0 255.255.255.0 U 0 0
0 ens160
172.31.13.0 0.0.0.0 255.255.255.0 U 0 0
0 ens192
Can anyone seen something obvious that I am doing wrong?
What's the interface/vlan configuration?
Where is the DHCP relay running and how is it configured?

Cheers,

Simon.
Jason Kary
2017-04-30 23:27:12 UTC
Permalink
Hello,

The VLAN setup is pretty basic:


interface Vlan1001
no shutdown
mtu 9216
no ip redirects
ip address 10.168.101.1/24

interface Vlan1002
no shutdown
mtu 9216
no ip redirects
ip address 10.168.102.1/24
ip dhcp relay address 10.168.101.20
ip dhcp relay source-interface Vlan1002

Single host running ESXi connected to single router.

Take Care
Jason
Post by Simon Kelley
Post by Jason Kary
Hi Folks,
I have a basic setup for DHCP relay across VLANS in DNSMASQ.
bogus-priv
interface=ens160
log-dhcp
dhcp-range=10.168.102.100,10.168.102.150,255.255.255.0,12h
The client and server are running on a VMs in separate VLANS. DHCP
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens160, link-type EN10MB (Ethernet), capture size 262144 bytes
03:58:40.966944 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:58:46.487767 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:58:54.424895 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:59:07.795712 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:59:19.196022 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
The syslog log indicates the DCHP OFFERS are ‘supposed’ to be going out
however nothing is seen on the wire.
Apr 27 04:03:26 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
available DHCP range: 10.168.102.100 -- 10.168.102.150
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
DHCPDISCOVER(ens160) 00:0c:29:65:e0:ea
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 tags: ens160
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
DHCPOFFER(ens160) 10.168.102.128 00:0c:29:65:e0:ea
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 1:netmask, 28:broadcast, 2:time-offset,
121:classless-static-route,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 15:domain-name, 6:dns-server, 12:hostname,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 40:nis-domain, 41:nis-server, 42:ntp-server,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 26:mtu, 119:domain-search, 3:router,
121:classless-static-route,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 249, 33:static-route, 252, 42:ntp-server
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
next server: 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 1 option: 53 message-type 2
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 54 server-identifier 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 51 lease-time 12h
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 58 T1 6h
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 59 T2 10h30m
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 1 netmask 255.255.255.0
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 28 broadcast 10.168.102.255
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 3 router 10.168.102.1
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 6 dns-server 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 20 option: 82 agent-id
01:0a:01:08:00:06:00:4c:4f:2a:00:2f:02:06…
I’ve been trying to trace this issue and it is like the sendmsg system
call is not working properly. I believe routing is setup properly on
the DHCP server.
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window
irtt Iface
0.0.0.0 172.31.13.1 0.0.0.0 UG 0 0
0 ens192
10.168.101.0 0.0.0.0 255.255.255.0 U 0 0
0 ens160
10.168.102.0 0.0.0.0 255.255.255.0 U 0 0
0 ens160
172.31.13.0 0.0.0.0 255.255.255.0 U 0 0
0 ens192
Can anyone seen something obvious that I am doing wrong?
What's the interface/vlan configuration?
Where is the DHCP relay running and how is it configured?
Cheers,
Simon.
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss <http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss>
Dan Sneddon
2017-05-01 18:35:24 UTC
Permalink
Your routing table is wrong. You have both 10.168.101.0/24 and
10.168.102.0/24 both set up as local subnets (see the 0.0.0.0 gateway).
The remote subnet should be routed through the local router, so your
route would appear something like this:

10.168.101.0 0.0.0.0 255.255.255.0 U 0 0 0 ens160
10.168.102.0 10.168.101.1 255.255.255.0 U 0 0 0 ens160
--
Dan Sneddon | Senior Principal Software Engineer
Post by Jason Kary
Hi Folks,
I have a basic setup for DHCP relay across VLANS in DNSMASQ.
bogus-priv
interface=ens160
log-dhcp
dhcp-range=10.168.102.100,10.168.102.150,255.255.255.0,12h
The client and server are running on a VMs in separate VLANS. DHCP
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens160, link-type EN10MB (Ethernet), capture size 262144 bytes
03:58:40.966944 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:58:46.487767 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:58:54.424895 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:59:07.795712 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:59:19.196022 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
The syslog log indicates the DCHP OFFERS are ‘supposed’ to be going out
however nothing is seen on the wire.
Apr 27 04:03:26 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
available DHCP range: 10.168.102.100 -- 10.168.102.150
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
DHCPDISCOVER(ens160) 00:0c:29:65:e0:ea
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 tags: ens160
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
DHCPOFFER(ens160) 10.168.102.128 00:0c:29:65:e0:ea
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 1:netmask, 28:broadcast, 2:time-offset,
121:classless-static-route,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 15:domain-name, 6:dns-server, 12:hostname,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 40:nis-domain, 41:nis-server, 42:ntp-server,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 26:mtu, 119:domain-search, 3:router,
121:classless-static-route,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 249, 33:static-route, 252, 42:ntp-server
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
next server: 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 1 option: 53 message-type 2
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 54 server-identifier 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 51 lease-time 12h
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 58 T1 6h
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 59 T2 10h30m
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 1 netmask 255.255.255.0
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 28 broadcast 10.168.102.255
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 3 router 10.168.102.1
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 6 dns-server 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 20 option: 82 agent-id
01:0a:01:08:00:06:00:4c:4f:2a:00:2f:02:06…
I’ve been trying to trace this issue and it is like the sendmsg system
call is not working properly. I believe routing is setup properly on
the DHCP server.
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window
irtt Iface
0.0.0.0 172.31.13.1 0.0.0.0 UG 0 0
0 ens192
10.168.101.0 0.0.0.0 255.255.255.0 U 0 0
0 ens160
10.168.102.0 0.0.0.0 255.255.255.0 U 0 0
0 ens160
172.31.13.0 0.0.0.0 255.255.255.0 U 0 0
0 ens192
Can anyone seen something obvious that I am doing wrong?
Take Care
Jason
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Jason Kary
2017-05-01 20:31:17 UTC
Permalink
Hi Dan,

Thank you for the update. This appears to have resolved my issue.

Take Care
Jason
Post by Dan Sneddon
Your routing table is wrong. You have both 10.168.101.0/24 and
10.168.102.0/24 both set up as local subnets (see the 0.0.0.0 gateway).
The remote subnet should be routed through the local router, so your
10.168.101.0 0.0.0.0 255.255.255.0 U 0 0 0 ens160
10.168.102.0 10.168.101.1 255.255.255.0 U 0 0 0 ens160
--
Dan Sneddon | Senior Principal Software Engineer
Post by Jason Kary
Hi Folks,
I have a basic setup for DHCP relay across VLANS in DNSMASQ.
bogus-priv
interface=ens160
log-dhcp
dhcp-range=10.168.102.100,10.168.102.150,255.255.255.0,12h
The client and server are running on a VMs in separate VLANS. DHCP
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens160, link-type EN10MB (Ethernet), capture size 262144 bytes
03:58:40.966944 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:58:46.487767 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:58:54.424895 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:59:07.795712 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
03:59:19.196022 IP 10.168.102.1.67 > 10.168.101.20.67: BOOTP/DHCP,
Request from 00:0c:29:65:e0:ea, length 322
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
The syslog log indicates the DCHP OFFERS are ‘supposed’ to be going out
however nothing is seen on the wire.
Apr 27 04:03:26 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
available DHCP range: 10.168.102.100 -- 10.168.102.150
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
DHCPDISCOVER(ens160) 00:0c:29:65:e0:ea
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364 tags: ens160
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
DHCPOFFER(ens160) 10.168.102.128 00:0c:29:65:e0:ea
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 1:netmask, 28:broadcast, 2:time-offset,
121:classless-static-route,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 15:domain-name, 6:dns-server, 12:hostname,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 40:nis-domain, 41:nis-server, 42:ntp-server,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 26:mtu, 119:domain-search, 3:router,
121:classless-static-route,
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
requested options: 249, 33:static-route, 252, 42:ntp-server
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
next server: 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 1 option: 53 message-type 2
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 54 server-identifier 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 51 lease-time 12h
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 58 T1 6h
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 59 T2 10h30m
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 1 netmask 255.255.255.0
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 28 broadcast 10.168.102.255
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 3 router 10.168.102.1
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 4 option: 6 dns-server 10.168.101.20
Apr 27 04:03:29 DHCP-UBUNTU-SERVER dnsmasq-dhcp[17767]: 1121794364
sent size: 20 option: 82 agent-id
01:0a:01:08:00:06:00:4c:4f:2a:00:2f:02:06…
I’ve been trying to trace this issue and it is like the sendmsg system
call is not working properly. I believe routing is setup properly on
the DHCP server.
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window
irtt Iface
0.0.0.0 172.31.13.1 0.0.0.0 UG 0 0
0 ens192
10.168.101.0 0.0.0.0 255.255.255.0 U 0 0
0 ens160
10.168.102.0 0.0.0.0 255.255.255.0 U 0 0
0 ens160
172.31.13.0 0.0.0.0 255.255.255.0 U 0 0
0 ens192
Can anyone seen something obvious that I am doing wrong?
Take Care
Jason
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Loading...