Open jorti opened 2 years ago
Try setting preferred_lifetime
to match leasetime
.
Try setting
preferred_lifetime
to matchleasetime
.
That worked. Thanks.
However, the documented behaviour of ra_useleasetime
says:
If set, the configured DHCPv4 leasetime is also used as limit and preferred lifetime of the IPv6 prefix.
So either the documentation has to be updated or ra_useleasetime
should also set the preferred lifetime.
There was some discussion of the behavior inconsistencies here in the commit:
https://github.com/openwrt/odhcpd/commit/3bda90079ec5574ef469e2a7804808302f17769d
It seems setting the preferred_lifetime
to 0m
is ignored in openwrt 23.05 (OpenWrt 23.05.3 (r23809-234f1a2efa):
config dhcp 'wan_static'
option interface 'wan_static'
option start '100'
option limit '150'
option leasetime '12h'
option ra 'server'
option dns_service '0'
option preferred_lifetime '0m'
option dynamicdhcp '0'
root@docker:~# ip -6 addr show enp6s18
2: enp6s18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
inet6 2a03:4000:20:XXXX::3/64 scope global dynamic mngtmpaddr
valid_lft forever preferred_lft forever
IPv6 uses Address_scopes and the longest preferred_lifetime
available to determine the IPv6 prefix/address for new outgoing connections.
A wrong preferred_lifetime
will cause the selection of the wrong IPv6 prefix/address for outgoing connections.
A preferred_lifetime
of 0
and a valid_lifetime
of infinite
is the special case in which incoming connections are allowed via an IPv6 prefix/address but new outgoing connections never use this IPv6 prefix/address.
Hi,
After upgrading to OpenWrt 22.03, I've noticed a weird thing. My Linux clients are logging these error messages:
I have a DHCP configuration like shown below. I'm using a life time of 30min for the DHCP leases and the option
ra_useleasetime
should make theleasetime
to be also used as limit and preferred lifetime of the IPv6 prefix.However, I'm getting invalid preferred lifetimes for the advertised prefixes:
The preferred life time has to be always equal or less than the valid life time and the documented behaviour of
ra_useleasetime
is not honored, so this looks like a bug.