01.02.2020 20:34, Per Jessen пишет:
Andrei Borzenkov wrote:
01.02.2020 20:26, Per Jessen пишет:
Per Jessen wrote:
We use dhcpv6 too, I have never seen any such /128 addresses assigned.
I saw some mention of the radvd 'AdvOnLink' option - it is on by default, but when I switched it off and rebooted a machine, I _did_ see such a /128 prefix. There is some relation, I'm just not sure what it is.
I made this experiment -
modify radvd.conf, in the prefix definition, "AdvLinkOn = off".
rebooted a VM
It came up with a /128 address assigned:
2: eth0:
mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 7a:11:a2:11:4b:30 brd ff:ff:ff:ff:ff:ff inet 192.168.4.150/21 brd 192.168.7.255 scope global eth0 valid_lft forever preferred_lft forever inet6 2a03:7520:4c68:1:ff99::45e9/128 scope global dynamic valid_lft 82917sec preferred_lft 39717sec modify radvd.conf, in the prefix definition, "AdvLinkOn = on".
After a little while, maybe some minutes -
2: eth0:
mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 7a:11:a2:11:4b:30 brd ff:ff:ff:ff:ff:ff inet 192.168.4.150/21 brd 192.168.7.255 scope global eth0 valid_lft forever preferred_lft forever inet6 2a03:7520:4c68:1:ff99::45e9/64 scope global noprefixroute dynamic valid_lft 84605sec preferred_lft 41405sec And client is using to manage network what exactly?
wicked.
Yes, wicked will apply prefix to address received via DHCPv6 if it finds advertised onlink prefix that matches address. It will actually select the longest prefix. It is up to client to follow RFC requirement. wicked is probably non-compliant, but end-effect is the same (network route is added to interface based on prefix), so it is more or less cosmetic except for one possible problem. IPv6 does not use address prefix to decide whether address is on link or not. IPv6 host only considers prefixes marked with on-link flag. Which means it is entirely valid to have *no* IPv6 address that belongs to "local network" and still send packets directly if destination prefix is marked as on-link. Cf. RFC5942: 1. The assignment of an IPv6 address -- whether through IPv6 stateless address autoconfiguration [RFC4862], DHCPv6 [RFC3315], or manual configuration -- MUST NOT implicitly cause a prefix derived from that address to be treated as on-link and added to the Prefix List. My understanding is that Linux translates on-link prefixes into "network route" on corresponding device. Like 2a00:xxx::/64 dev wlan0 proto ra metric 600 pref medium If you configure ip6 address that has non-trivial prefix, kernel will automatically add corresponding route unless "noprefixroute" flag is supplied. So what wicked does, it searches matching prefix and configures IPv6 address without "noprefixroute" flag, otherwise it is using 128 prefix. But if IP address does not match any local prefix, it means no network route will be created. Conceptually what should be done is configure routes and addresses separately. It does not matter as long as RA are handled by kernel. But if you turn off accept_ra, I suspect routes will be missing. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org