renewal for DHCPv6-PD multiple prefixes with different lifetimes
Guy Yur
Sat Oct 01 12:36:48 2016Hi, dhcpcd renews the DHCPv6-PD prefixes only once when more than one prefix is configured in dhcp6s and one of them has infinity lifetime and the other has lifetime in seconds. dhcp6s sends a reply to a "dhcp6 request" with T1 and T2 set to pltime * .5 and pltime * .8. state->renew and state->rebind will be set to them and a renew request will be sent when the time comes. dhcp6s sends a reply to a "dhcp6 renew" with T1 and T2 set to 0. In such a case and when vltime of one of the prefixes is infinity, dhcpcd will set renew and rebind to infinity and the renew request will not be sent. Losing the prefix with non-infinity lifetime when it expires. Should state->renew and state->rebind be set to infinity based on lowpl instead of expire? (attached patch to trunk 89496bbb79) I set up a test environment with two hosts, one running dhcp6s to simulate an ISP and the other running dhcpcd to simulate a router. dhcp6s prefixes: prefix 2d04:1235:eb::/56 infinity; prefix 2d04:1235:ec::/56 240; tcpdump capture: 21:49:05.217993 IP6 (hlim 1, next-header UDP (17) payload length: 198) fe80::a00:27ff:fe58:227c.546 > ff02::1:2.547: [udp sum ok] dhcp6 request (xid=4cfa72 (client-ID hwaddr type 6 aabbccddeeff) (server-ID hwaddr/time type 1 time 526243654 080027dccb47) (elapsed-time 0) (vendor-class) (IA_PD IAID:1 T1:0 T2:0 (IA_PD-prefix ::/56 pltime:0 vltime:0) (IA_PD-prefix 2d04:1235:eb::/56 pltime:4294967295 vltime:4294967295)) (reconfigure-accept) (option-request DNS-server DNS-search-list Client-FQDN opt_82 opt_83)) 21:49:05.222281 IP6 (hlim 64, next-header UDP (17) payload length: 138) fe80::a00:27ff:fedc:cb47.25569 > fe80::a00:27ff:fe58:227c.546: [udp sum ok] dhcp6 reply (xid=4cfa72 (client-ID hwaddr type 6 aabbccddeeff) (server-ID hwaddr/time type 1 time 526243654 080027dccb47) (DNS-server 2d04:1234::88) (IA_PD IAID:1 T1:120 T2:192 (IA_PD-prefix 2d04:1235:eb::/56 pltime:4294967295 vltime:4294967295) (IA_PD-prefix 2d04:1235:ec::/56 pltime:240 vltime:240))) 21:51:05.270233 IP6 (hlim 1, next-header UDP (17) payload length: 227) fe80::a00:27ff:fe58:227c.546 > ff02::1:2.547: [udp sum ok] dhcp6 renew (xid=e52ded (client-ID hwaddr type 6 aabbccddeeff) (server-ID hwaddr/time type 1 time 526243654 080027dccb47) (elapsed-time 0) (vendor-class) (IA_PD IAID:1 T1:0 T2:0 (IA_PD-prefix ::/56 pltime:0 vltime:0) (IA_PD-prefix 2d04:1235:eb::/56 pltime:4294967295 vltime:4294967295) (IA_PD-prefix 2d04:1235:ec::/56 pltime:240 vltime:240)) (reconfigure-accept) (option-request DNS-server DNS-search-list Client-FQDN opt_82 opt_83)) 21:51:05.273052 IP6 (hlim 64, next-header UDP (17) payload length: 167) fe80::a00:27ff:fedc:cb47.25569 > fe80::a00:27ff:fe58:227c.546: [udp sum ok] dhcp6 reply (xid=e52ded (client-ID hwaddr type 6 aabbccddeeff) (server-ID hwaddr/time type 1 time 526243654 080027dccb47) (DNS-server 2d04:1234::88) (IA_PD IAID:1 T1:0 T2:0 (IA_PD-prefix ::/56 pltime:0 vltime:0) (IA_PD-prefix 2d04:1235:eb::/56 pltime:4294967295 vltime:4294967295) (IA_PD-prefix 2d04:1235:ec::/56 pltime:240 vltime:240))) Thanks, Guy
Attachment:
dhcpcd_renew_rebind_lifetime.patch
Description: Binary data
| Re: renewal for DHCPv6-PD multiple prefixes with different lifetimes | Roy Marples |