-
Couldn't load subscription status.
- Fork 831
Description
The IPAM system appears to be top down in nature - in that the interface assigns the addresses returned by the IPAM plugin. However the interfaces created don't set the interface IPv6 autoconfiguration to off - which can result in the interface picking up a bottom up SLAAC address in addition to the IPAM allocated one if it is on a network where other devices and interfaces are using SLAAC.
With a CNI config of:
{
"cniVersion": "0.3.0",
"name": "mynet",
"type": "ipvlan",
"master": "ens3",
"ipam": {
"type": "host-local",
"ranges": [
[
{
"subnet": "2a02:1348:178:7112:24:19ff:fee1:c44a/64"
}
]
]
}
}
on kubernetes I get:
ubuntu@srv-xp1mv:~$ sudo nsenter -t 19235 -n
root@srv-xp1mv:~# ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default
link/ether 02:24:19:e1:c4:4a brd ff:ff:ff:ff:ff:ff
inet6 2a02:1348:178:7112:224:1900:1e1:c44a/64 scope global dynamic mngtmpaddr
valid_lft 3448sec preferred_lft 3448sec
inet6 2a02:1348:178:7112:24:19ff:fee1:c44f/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::224:1900:1e1:c44a/64 scope link
valid_lft forever preferred_lft forever
Interfaces with IPAM IPv6 addressing should probably set /proc/sys/net/ipv6/conf/<int>/autoconf and /proc/sys/net/ipv6/conf/<int>/accept_ra appropriately.
(Perhaps accept_ra is switched off if there are routes specified, and switched on if not, similarly autoconf is switched off if there are ranges specified, and switched on if not).