When I modify / restart (after a configuration change) the LAN
interface (br-lan) in Luci the 'LAN' routes on some of my clients disappear (I think during the next DHCP renew) and they are not automatically restored. I either have to add the routes by hand or reboot the computer(s) (which sometimes does not work as well). Once the routes are removed even a manual DHCP renew does not restore them.
The result of ip route
on my desktop before the routes are removed:
default via 10.170.0.1 dev enp0s31f6 proto dhcp src 10.170.0.165 metric 203
10.170.0.0/16 dev enp0s31f6 proto dhcp scope link src 10.170.0.165 metric 203
Note: After this happens, I suspect during the next DHCP-renew, the above routes are gone.
The result of ip addr
on my desktop before the routes are removed, but it is still the same after:
3: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 4c:cc:6a:05:56:cc brd ff:ff:ff:ff:ff:ff
inet 10.170.0.165/16 brd 10.170.200.255 scope global noprefixroute enp0s31f6
valid_lft forever preferred_lft forever
I suspect that this happens after the following DHCP request I captured using tcpdump
(changed hostnames for privacy reasons):
15:45:57.161373 IP (tos 0x0, ttl 64, id 23833, offset 0, flags [DF], proto UDP (17), length 363)
desktop.lan.68 > router.lan.67: [udp sum ok] BOOTP/DHCP, Request from b8:27:eb:27:69:6c (oui Unknown), length 335, xid 0x569ee1b8, secs 1119, Flags [none] (0x0000)
Client-IP desktop.lan
Client-Ethernet-Address b8:27:eb:27:69:6c (oui Unknown)
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Request
Client-ID Option 61, length 7: ether b8:27:eb:27:69:6c
MSZ Option 57, length 2: 1472
Vendor-Class Option 60, length 46: "dhcpcd-6.11.5:Linux-4.14.76-v7+:armv7l:BCM2835"
Hostname Option 12, length 8: "desktop"
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
END Option 255, length 0
15:45:57.166027 IP (tos 0xc0, ttl 64, id 37747, offset 0, flags [none], proto UDP (17), length 335)
router.lan.67 > desktop.lan.68: [bad udp cksum 0x16b0 -> 0xc236!] BOOTP/DHCP, Reply, length 307, xid 0x569ee1b8, secs 1119, Flags [none] (0x0000)
Client-IP desktop.lan
Your-IP desktop.lan
Server-IP router.lan
Client-Ethernet-Address b8:27:eb:27:69:6c (oui Unknown)
sname "router"[|bootp]
The relevant part of the /etc/config/dhcp
configuration:
config dnsmasq
option domainneeded '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
option localservice '1'
option enable_tftp '1'
option tftp_root '/mnt/tftproot'
option nonwildcard '0'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option dhcpv6 'server'
option ra 'server'
option ra_management '1'
list dhcp_option '6,10.170.0.1'
list dhcp_option '3,10.170.0.1'
option leasetime '5m'
The relevant part of the /etc/config/network
configuration:
config interface 'lan'
option type 'bridge'
option proto 'static'
option ip6assign '60'
option igmp_snooping '1'
option stp '1'
option ipaddr '10.170.0.1'
option netmask '255.255.0.0'
option ifname 'eth0.1'
The relevant part of the /etc/config/firewall
:
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option network 'lan'
option forward 'REJECT'
config forwarding
option dest 'wan'
option src 'lan'
Custom additions to /etc/dnsmasq.conf
:
# Polycom provisioning
dhcp-option=66,"10.170.0.1"
# Computer provisioning
dhcp-boot=pxelinux.0,router,10.170.0.1
# Restrict listener
listen-address=127.0.0.1,10.170.0.1,10.180.0.1
bind-interfaces
I used the above for years without issues with one important difference, I recently migrated my network from the 192.168.170.0/24 subnet to the 10.170.0.0/16 subnet.
Any idea why this is happening (only after I modified / restarted the LAN
interface on the router)?