-
Notifications
You must be signed in to change notification settings - Fork 395
T8078: dhcpv6: allow lease renew for pd & parameters #4889
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
Conversation
|
👍 |
0fcf6d3 to
40c84ef
Compare
The renew command will refuse to restart the dhcp6c process for an interface unless it is configured to request an address, but the client may also be running to manage parameters and/or prefix delegations.
40c84ef to
3ae47d8
Compare
|
CI integration 👍 passed! Details
|
| family = kwargs.get('family') | ||
| v = 'v6' if family == 'inet6' else '' | ||
| interface = kwargs.get('interface') | ||
| interface_path = Section.get_config_path(interface) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if Section.get_config_path(interface) should return a list instead, as we mostly work with lists - but this is another discussion.
c-po
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation looks good. Manually tested:
DHCPv6 server:
set interfaces ethernet eth0 vif 666 address '2001:db8::1/64'
set service router-advert interface eth0.666 prefix ::/64
set service dhcpv6-server shared-network-name foo subnet 2001:db8::/64 prefix-delegation start 2001:db8:1000:: prefix-length '56'
set service dhcpv6-server shared-network-name foo subnet 2001:db8::/64 prefix-delegation start 2001:db8:1000:: stop '2001:db8:1fff::'
DHCPv6 client:
set interfaces ethernet eth0 vif 666 dhcpv6-options pd 0 interface dum20 address '1'
set interfaces ethernet eth0 vif 666 dhcpv6-options rapid-commit
set interfaces ethernet eth0 vif 666 ipv6 address autoconf
set interfaces dummy dum20
results in
[email protected]# run show interfaces dummy dum20
dum20: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
link/ether 7e:cd:da:fd:85:6e brd ff:ff:ff:ff:ff:ff
inet6 2001:db8:1fff::1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::7ccd:daff:fefd:856e/64 scope link
valid_lft forever preferred_lft forever
Now renewing the DHCPv6 lease:
[email protected]# run renew dhcpv6 interface eth0.666
Restarting DHCPv6 client on interface eth0.666...
renews the lease on the server
Dec 10 21:18:48 dhcpd[10648]: Release message from fe80::250:56ff:febf:c56d port 546, transaction ID 0x384E2000
Dec 10 21:18:48 dhcpd[10648]: Client 00:04:42:3f:67:73:77:df:c4:80:42:c9:42:af:ff:15:de:0b releases prefix 2001:db8:1fff::/56
Dec 10 21:18:48 dhcpd[10648]: Sending Reply to fe80::250:56ff:febf:c56d port 546
Dec 10 21:18:48 dhcpd[10648]: Solicit message from fe80::250:56ff:febf:c56d port 546, transaction ID 0x5941EF00
Dec 10 21:18:48 dhcpd[10648]: Picking pool prefix 2001:db8:1fff::/56
Dec 10 21:18:48 dhcpd[10648]: Advertise PD: address 2001:db8:1fff::/56 to client with duid 00:04:42:3f:67:73:77:df:c4:80:42:c9:42:af:ff:15:de:0b iaid = 0 valid for 4294967295 seconds
Dec 10 21:18:48 dhcpd[10648]: Sending Advertise to fe80::250:56ff:febf:c56d port 546
Dec 10 21:18:49 dhcpd[10648]: Request message from fe80::250:56ff:febf:c56d port 546, transaction ID 0x38F1D00
Dec 10 21:18:49 dhcpd[10648]: Reply PD: address 2001:db8:1fff::/56 to client with duid 00:04:42:3f:67:73:77:df:c4:80:42:c9:42:af:ff:15:de:0b iaid = 0 valid for 4294967295 seconds
Dec 10 21:18:49 dhcpd[10648]: Sending Reply to fe80::250:56ff:febf:c56d port 546
sever-sever
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow to renew DHCPv6 lease without IPv6 address in cases prefix/deletegation or option parameters only.
The usecase described in the PR and task. Tested by @c-po
The renew command will refuse to restart the dhcp6c process for an interface unless it is configured to request an address, but the client may also be running to manage parameters and/or prefix delegations.
Change summary
Types of changes
Related Task(s)
T8078
Related PR(s)
N/A
How to test / Smoketest result
Before:
After:
Checklist: