Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3935 - DHCPv6 not working after OpenWrt update #8933

Closed
openwrt-bot opened this issue Jul 16, 2021 · 3 comments
Closed

FS#3935 - DHCPv6 not working after OpenWrt update #8933

openwrt-bot opened this issue Jul 16, 2021 · 3 comments
Labels

Comments

@openwrt-bot
Copy link

openwrt-bot commented Jul 16, 2021

vampik:

I have updated OpenWrt on my router (x86-64 device) from very old openwrt-snapshot-r5986-3f7908d697 (built on 2018-02-01) to the new openwrt-snapshot-r16962-a603e82dd3 (built on 2021-06-17).

Before update: DHCPv6-enabled devices (Windows PCs and a network printer) got 2 IPv6 addresses each: one from SLAAC and another one from DHCPv6.

After update: DHCPv6-enabled devices (Windows PCs and a network printer) get only 1 IPv6 address from SLAAC. No DHCPv6 leases.

my dhcp configuration:
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.dhcpv6='server'
dhcp.lan.ra='server'
dhcp.lan.limit='100'
dhcp.lan.leasetime='2h'
dhcp.lan.ra_management='1'

According to network dump, router advertisement does have managed flag, devices send dhcp6 solicit messages and receive dhcp6 advertise responses, but for some reason they don't use the advertised address.

Before update everything was working fine. Unfortunately I cannot downgrade firmware to check the dump on old firmware version.

15:21:47.108951 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 8) :: > ff02::2: [icmp6 sum ok] ICMP6, router solicitation, length 8
15:21:47.109365 IP6 (flowlabel 0x9fb20, hlim 255, next-header ICMPv6 (58) payload length: 96) fe80::5054:ff:fec2:281e > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 96
hop limit 64, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0ms, retrans timer 0ms
source link-address option (1), length 8 (1): 52:54:00:c2:28:1e
mtu option (5), length 8 (1): 1280
prefix info option (3), length 32 (4): 2001:[redacted]::/64, Flags [onlink, auto], valid time infinity, pref. time infinity
rdnss option (25), length 24 (3): lifetime 1800s, addr: 2001:[redacted]::1
advertisement interval option (7), length 8 (1): 600000ms
15:21:47.674421 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 8) :: > ff02::2: [icmp6 sum ok] ICMP6, router solicitation, length 8
15:21:47.674754 IP6 (flowlabel 0x9fb20, hlim 255, next-header ICMPv6 (58) payload length: 96) fe80::5054:ff:fec2:281e > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 96
hop limit 64, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0ms, retrans timer 0ms
source link-address option (1), length 8 (1): 52:54:00:c2:28:1e
mtu option (5), length 8 (1): 1280
prefix info option (3), length 32 (4): 2001:[redacted]::/64, Flags [onlink, auto], valid time infinity, pref. time infinity
rdnss option (25), length 24 (3): lifetime 1800s, addr: 2001:[redacted]::1
advertisement interval option (7), length 8 (1): 600000ms
15:21:48.075517 IP6 (hlim 1, next-header UDP (17) payload length: 107) fe80::ee8e:b5ff:fe23:8f4.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=d5ddb0 (elapsed-time 0) (client-ID hwaddr type 1 ec8eb52308f4) (IA_NA IAID:2 T1:14400 T2:21600 (IA_ADDR :: pltime:28800 vltime:36000)) (option-request status-code server-unicast DNS-server DNS-search-list Client-FQDN preference) (Client-FQDN))
15:21:48.075709 IP6 (flowlabel 0x77edf, hlim 64, next-header UDP (17) payload length: 112) fe80::5054:ff:fec2:281e.547 > fe80::ee8e:b5ff:fe23:8f4.546: [bad udp cksum 0x215e -> 0xdf33!] dhcp6 advertise (xid=d5ddb0 (server-ID hwaddr type 1 525400c2281e) (client-ID hwaddr type 1 ec8eb52308f4) (opt_82) (DNS-server 2001:[redacted]::1) (IA_NA IAID:2 T1:21600 T2:34560 (IA_ADDR 2001:[redacted]::3e7 pltime:43200 vltime:7200)))
15:21:49.178114 IP6 (hlim 1, next-header UDP (17) payload length: 107) fe80::ee8e:b5ff:fe23:8f4.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=d5ddb0 (elapsed-time 101) (client-ID hwaddr type 1 ec8eb52308f4) (IA_NA IAID:2 T1:14400 T2:21600 (IA_ADDR :: pltime:28800 vltime:36000)) (option-request status-code server-unicast DNS-server DNS-search-list Client-FQDN preference) (Client-FQDN))
15:21:49.178321 IP6 (flowlabel 0x77edf, hlim 64, next-header UDP (17) payload length: 112) fe80::5054:ff:fec2:281e.547 > fe80::ee8e:b5ff:fe23:8f4.546: [bad udp cksum 0x215e -> 0xdf33!] dhcp6 advertise (xid=d5ddb0 (server-ID hwaddr type 1 525400c2281e) (client-ID hwaddr type 1 ec8eb52308f4) (opt_82) (DNS-server 2001:[redacted]::1) (IA_NA IAID:2 T1:21600 T2:34560 (IA_ADDR 2001:[redacted]::3e7 pltime:43200 vltime:7200)))
15:21:51.283123 IP6 (hlim 1, next-header UDP (17) payload length: 107) fe80::ee8e:b5ff:fe23:8f4.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=d5ddb0 (elapsed-time 307) (client-ID hwaddr type 1 ec8eb52308f4) (IA_NA IAID:2 T1:14400 T2:21600 (IA_ADDR :: pltime:28800 vltime:36000)) (option-request status-code server-unicast DNS-server DNS-search-list Client-FQDN preference) (Client-FQDN))
15:21:51.283292 IP6 (flowlabel 0x77edf, hlim 64, next-header UDP (17) payload length: 112) fe80::5054:ff:fec2:281e.547 > fe80::ee8e:b5ff:fe23:8f4.546: [bad udp cksum 0x215e -> 0xdf33!] dhcp6 advertise (xid=d5ddb0 (server-ID hwaddr type 1 525400c2281e) (client-ID hwaddr type 1 ec8eb52308f4) (opt_82) (DNS-server 2001:[redacted]::1) (IA_NA IAID:2 T1:21600 T2:34560 (IA_ADDR 2001:[redacted]::3e7 pltime:43200 vltime:7200)))
15:21:55.593427 IP6 (hlim 1, next-header UDP (17) payload length: 107) fe80::ee8e:b5ff:fe23:8f4.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=d5ddb0 (elapsed-time 735) (client-ID hwaddr type 1 ec8eb52308f4) (IA_NA IAID:2 T1:14400 T2:21600 (IA_ADDR :: pltime:28800 vltime:36000)) (option-request status-code server-unicast DNS-server DNS-search-list Client-FQDN preference) (Client-FQDN))
15:21:55.593717 IP6 (flowlabel 0x77edf, hlim 64, next-header UDP (17) payload length: 112) fe80::5054:ff:fec2:281e.547 > fe80::ee8e:b5ff:fe23:8f4.546: [bad udp cksum 0x215e -> 0xdf33!] dhcp6 advertise (xid=d5ddb0 (server-ID hwaddr type 1 525400c2281e) (client-ID hwaddr type 1 ec8eb52308f4) (opt_82) (DNS-server 2001:[redacted]::1) (IA_NA IAID:2 T1:21600 T2:34560 (IA_ADDR 2001:[redacted]::3e7 pltime:43200 vltime:7200)))
15:22:04.214223 IP6 (hlim 1, next-header UDP (17) payload length: 107) fe80::ee8e:b5ff:fe23:8f4.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=d5ddb0 (elapsed-time 1588) (client-ID hwaddr type 1 ec8eb52308f4) (IA_NA IAID:2 T1:14400 T2:21600 (IA_ADDR :: pltime:28800 vltime:36000)) (option-request status-code server-unicast DNS-server DNS-search-list Client-FQDN preference) (Client-FQDN))
15:22:04.214412 IP6 (flowlabel 0x77edf, hlim 64, next-header UDP (17) payload length: 112) fe80::5054:ff:fec2:281e.547 > fe80::ee8e:b5ff:fe23:8f4.546: [bad udp cksum 0x215e -> 0xdf33!] dhcp6 advertise (xid=d5ddb0 (server-ID hwaddr type 1 525400c2281e) (client-ID hwaddr type 1 ec8eb52308f4) (opt_82) (DNS-server 2001:[redacted]::1) (IA_NA IAID:2 T1:21600 T2:34560 (IA_ADDR 2001:[redacted]::3e7 pltime:43200 vltime:7200)))
15:22:21.155065 IP6 (hlim 1, next-header UDP (17) payload length: 107) fe80::ee8e:b5ff:fe23:8f4.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=d5ddb0 (elapsed-time 3278) (client-ID hwaddr type 1 ec8eb52308f4) (IA_NA IAID:2 T1:14400 T2:21600 (IA_ADDR :: pltime:28800 vltime:36000)) (option-request status-code server-unicast DNS-server DNS-search-list Client-FQDN preference) (Client-FQDN))
15:22:21.155231 IP6 (flowlabel 0x77edf, hlim 64, next-header UDP (17) payload length: 112) fe80::5054:ff:fec2:281e.547 > fe80::ee8e:b5ff:fe23:8f4.546: [bad udp cksum 0x215e -> 0xdf33!] dhcp6 advertise (xid=d5ddb0 (server-ID hwaddr type 1 525400c2281e) (client-ID hwaddr type 1 ec8eb52308f4) (opt_82) (DNS-server 2001:[redacted]::1) (IA_NA IAID:2 T1:21600 T2:34560 (IA_ADDR 2001:[redacted]::3e7 pltime:43200 vltime:7200)))

@openwrt-bot
Copy link
Author

openwrt-bot commented Jul 16, 2021

vampik:

It seems that devices don't accept the advertisement because of this:

pltime:43200 vltime:7200

Preffered lifetime (43200 = 12h) is larger than valid lifetime (7200 = 2h).

@openwrt-bot
Copy link
Author

openwrt-bot commented Jul 16, 2021

jow-:

Try increasing the lease time to 12h and see if it works then. Reportedly it does. I suspect some regression introduced by https://git.openwrt.org/?p=project/odhcpd.git;a=commitdiff;h=3bda90079ec5574ef469e2a7804808302f17769d;hp=b75bcad7bd5fd03f64011a532b9960d78e4aac22 (solely judging by the magic 12h value)

@openwrt-bot
Copy link
Author

openwrt-bot commented Jul 16, 2021

vampik:

You're right. This is definitely caused by this commit.

After setting dhcp.lan.preferred_lifetime everything works fine.

dhcp.lan.leasetime='2h'
dhcp.lan.preferred_lifetime='2h'

17:30:10.742693 IP6 (hlim 1, next-header UDP (17) payload length: 107) fe80::ee8e:b5ff:fe23:8f4.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=5753f4 (elapsed-time 103) (client-ID hwaddr type 1 ec8eb52308f4) (IA_NA IAID:2 T1:14400 T2:21600 (IA_ADDR :: pltime:28800 vltime:36000)) (option-request status-code server-unicast DNS-server DNS-search-list Client-FQDN preference) (Client-FQDN))
17:30:10.742962 IP6 (flowlabel 0x77edf, hlim 64, next-header UDP (17) payload length: 112) fe80::5054:ff:fec2:281e.547 > fe80::ee8e:b5ff:fe23:8f4.546: [bad udp cksum 0x215e -> 0xacdf!] dhcp6 advertise (xid=5753f4 (server-ID hwaddr type 1 525400c2281e) (client-ID hwaddr type 1 ec8eb52308f4) (opt_82) (DNS-server 2001:[redacted]::1) (IA_NA IAID:2 T1:3600 T2:5760 (IA_ADDR 2001:[redacted]::3e7 pltime:7200 vltime:7200)))
17:30:10.743531 IP6 (hlim 1, next-header UDP (17) payload length: 119) fe80::ee8e:b5ff:fe23:8f4.546 > ff02::1:2.547: [udp sum ok] dhcp6 request (xid=fc1ba7 (elapsed-time 0) (client-ID hwaddr type 1 ec8eb52308f4) (server-ID hwaddr type 1 525400c2281e) (IA_NA IAID:2 T1:3600 T2:5760 (IA_ADDR 2001:[redacted]::3e7 pltime:7200 vltime:7200)) (option-request status-code server-unicast DNS-server DNS-search-list Client-FQDN) (Client-FQDN))
17:30:10.743833 IP6 (flowlabel 0x77edf, hlim 64, next-header UDP (17) payload length: 112) fe80::5054:ff:fec2:281e.547 > fe80::ee8e:b5ff:fe23:8f4.546: [bad udp cksum 0x215e -> 0xdf87!] dhcp6 reply (xid=fc1ba7 (server-ID hwaddr type 1 525400c2281e) (client-ID hwaddr type 1 ec8eb52308f4) (opt_82) (DNS-server 2001:[redacted]::1) (IA_NA IAID:2 T1:3600 T2:5760 (IA_ADDR 2001:[redacted]::3e7 pltime:7200 vltime:7200)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant