trendy:
This is the correct way to send a DHCPOFFER. Remember that the host still doesn't have an IP address, so sending to 255.255.255.255 is correct. The host MAC address is used as "Client-Ethernet-Address" to identify the correct host that this OFFER is destined to. Other hosts are just renewing their lease, so they send a unicast REQUEST and server responds with ACK.
There seems to be a subtlety to DHCP offers that your response misses... and I think this is at the very core of the issue that I am experiencing. Some of my devices send their REQUEST in a way that solicits a unicast OFFER. Others send a REQUEST that solicits a broadcast OFFER. At least, that's how I read this, from stackexchange: https://networkengineering.stackexchange.com/a/16954
Anyway, as per plan, I went back to factory settings on my 'spare' unit, and confirmed that there is no issue for HDHomerun and Squeezebox devices IP address allocation by DHCP 'out of the box'.
Next, because I already had my suspicions, I installed MWAN3
opkg update && opkg install mwan3
reboot
After reboot, the HDHomerun and Squeezebox devices could not get IP addresses, and everything else could.
I went back to the issue report I found in github and asked there. I turns out the solution had been staring me in the face - a small change to mwan3 config (set local_source to none ) and this changes the iptables rules, allowing the DHCPOFFER broadcasts out.
opened 03:33PM - 04 Sep 17 UTC
closed 07:50PM - 30 Nov 18 UTC
Package: mwan3
Rev: commit faa86fe.
Some devices can't get IP address via DH… CP if routable loopback (self) is enabled.
```
Mon Sep 4 15:32:50 2017 daemon.info dnsmasq-dhcp[3358]: DHCPDISCOVER(br-lan) 192.168.90.115 xx:xx:xx:xx:xx:xx
Mon Sep 4 15:32:50 2017 daemon.info dnsmasq-dhcp[3358]: DHCPOFFER(br-lan) 192.168.90.115 xx:xx:xx:xx:xx:xx
Mon Sep 4 15:32:53 2017 daemon.info dnsmasq-dhcp[3358]: DHCPDISCOVER(br-lan) 192.168.90.115 xx:xx:xx:xx:xx:xx
Mon Sep 4 15:32:53 2017 daemon.info dnsmasq-dhcp[3358]: DHCPOFFER(br-lan) 192.168.90.115 xx:xx:xx:xx:xx:xx
Mon Sep 4 15:32:56 2017 daemon.info dnsmasq-dhcp[3358]: DHCPDISCOVER(br-lan) 192.168.90.115 xx:xx:xx:xx:xx:xx
Mon Sep 4 15:32:56 2017 daemon.info dnsmasq-dhcp[3358]: DHCPOFFER(br-lan) 192.168.90.115 xx:xx:xx:xx:xx:xx
...
root@LEDE:~# tcpdump -ni lo port 67 or port 68
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 262144 bytes
15:33:32.357936 IP 192.168.90.254.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300
15:33:38.377812 IP 192.168.90.254.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300
15:33:44.397690 IP 192.168.90.254.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 300
root@LEDE:~# tcpdump -ni br-lan port 67 or port 68
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br-lan, link-type EN10MB (Ethernet), capture size 262144 bytes
15:34:23.525396 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from xx:xx:xx:xx:xx:xx, length 300
15:34:23.528252 IP 192.168.90.254.67 > 192.168.90.115.68: BOOTP/DHCP, Reply, length 300
15:34:26.535329 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from xx:xx:xx:xx:xx:xx, length 300
15:34:29.545253 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from xx:xx:xx:xx:xx:xx, length 300
15:34:29.547881 IP 192.168.90.254.67 > 192.168.90.115.68: BOOTP/DHCP, Reply, length 300
```
DHCP negotiation succeeds by removing the IP address from 'lo'.
```
root@LEDE:~# ip addr del 192.168.90.254/32 dev lo
Mon Sep 4 15:36:00 2017 daemon.info dnsmasq-dhcp[3358]: DHCPDISCOVER(br-lan) 192.168.90.115 xx:xx:xx:xx:xx:xx
Mon Sep 4 15:36:00 2017 daemon.info dnsmasq-dhcp[3358]: DHCPOFFER(br-lan) 192.168.90.115 xx:xx:xx:xx:xx:xx
Mon Sep 4 15:36:03 2017 daemon.info dnsmasq-dhcp[3358]: DHCPDISCOVER(br-lan) 192.168.90.115 xx:xx:xx:xx:xx:xx
Mon Sep 4 15:36:03 2017 daemon.info dnsmasq-dhcp[3358]: DHCPOFFER(br-lan) 192.168.90.115 xx:xx:xx:xx:xx:xx
Mon Sep 4 15:36:03 2017 daemon.info dnsmasq-dhcp[3358]: DHCPREQUEST(br-lan) 192.168.90.115 xx:xx:xx:xx:xx:xx
Mon Sep 4 15:36:03 2017 daemon.info dnsmasq-dhcp[3358]: DHCPACK(br-lan) 192.168.90.115 xx:xx:xx:xx:xx:xx
```
Adding back the IP address the issue comes back.
```
ip addr add 192.168.90.254/32 dev lo
```
MWAN3 config.
```
config globals 'globals'
option initial_source 'none'
option mmx_mask '0xff00'
option local_source 'lan'
config interface 'wan'
option enabled '1'
list track_ip '8.8.4.4'
list track_ip '208.67.222.222'
option reliability '2'
option count '1'
option timeout '2'
option down '2'
option up '5'
option family 'ipv4'
option flush_conntrack 'always'
option failure_interval '5'
option recovery_interval '5'
option initial_state 'online'
option track_method 'ping'
option size '24'
option interval '10'
config interface 'wwan'
option enabled '1'
list track_ip '8.8.8.8'
list track_ip '208.67.220.220'
option reliability '1'
option count '1'
option timeout '3'
option down '3'
option up '8'
option family 'ipv4'
option flush_conntrack 'always'
option failure_interval '5'
option recovery_interval '5'
option initial_state 'online'
option track_method 'ping'
option size '24'
option interval '10'
config member 'wan_m1_w3'
option interface 'wan'
option metric '1'
option weight '3'
config member 'wan_m2_w3'
option interface 'wan'
option metric '2'
option weight '3'
config member 'wwan_m1_w2'
option interface 'wwan'
option metric '1'
option weight '2'
config member 'wwan_m2_w2'
option interface 'wwan'
option metric '2'
option weight '2'
config policy 'wan_only'
list use_member 'wan_m1_w3'
config policy 'wwan_only'
list use_member 'wwan_m1_w2'
config policy 'balanced'
list use_member 'wan_m1_w3'
list use_member 'wwan_m1_w2'
config policy 'wan_wwan'
list use_member 'wan_m1_w3'
list use_member 'wwan_m2_w2'
option last_resort 'default'
config policy 'wwan_wan'
list use_member 'wan_m2_w3'
list use_member 'wwan_m1_w2'
option last_resort 'default'
config rule 'default_rule'
option dest_ip '0.0.0.0/0'
option use_policy 'wan_wwan'
```
Am I doing something wrong?
TIA.
Thanks again to everyone for their assistance troubleshooting this issue for me. Really appreciated.
4 Likes