I'm trying to get my Linux system to automatically configure an IP address on an interface using stateless auto configuration (slaac). Stateful autoconfiguration using DHCPv6 works just fine.
I start by adding a vlan interface for the appropriate network:
ip link add link eth0 name vlan10 type vlan id 10This gets me:
$ ip addr show vlan10 822: vlan10@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 2c:f0:5d:c9:12:a9 brd ff:ff:ff:ff:ff:ffNext, I enable the
accept_rasysctl for this interface:# sysctl -w net.ipv6.conf.vlan10.accept_ra=2 net.ipv6.conf.vlan10.accept_ra = 2I add a link local address to the interface using a randomly generated address:
ip addr add fe80::b04f:6d05:d302:266d/64 dev vlan10 scope linkSo that I have:
827: vlan10@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 2c:f0:5d:c9:12:a9 brd ff:ff:ff:ff:ff:ff inet6 fe80::b04f:6d05:d302:266d/64 scope link valid_lft forever preferred_lft forever
At this point, the interface is up, it has a valid link local address, and I'm able to ping the IPv6 router using its link local address:
# ping -c2 fe80::7a8a:20ff:febb:5db%vlan10
PING fe80::7a8a:20ff:febb:5db%vlan10(fe80::7a8a:20ff:febb:5db%vlan10) 56 data bytes
64 bytes from fe80::7a8a:20ff:febb:5db%vlan10: icmp_seq=1 ttl=64 time=0.395 ms
64 bytes from fe80::7a8a:20ff:febb:5db%vlan10: icmp_seq=2 ttl=64 time=0.336 ms
--- fe80::7a8a:20ff:febb:5db%vlan10 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1062ms
rtt min/avg/max/mdev = 0.336/0.365/0.395/0.029 ms
I have the router configured to send router advertisements. I can confirm this is working because the Linux system has already picked up the correct IPv6 default route:
# ip -6 route | grep vlan10
2001:470:1234:1234::/110 dev vlan10 proto kernel metric 256 expires 2591803sec pref medium
fe80::/64 dev vlan10 proto kernel metric 256 pref medium
default via fe80::7a8a:20ff:febb:5db dev vlan10 proto ra metric 1024 expires 1603sec hoplimit 64 pref medium
However, the system does not acquire an IPv6 address for the vlan10 interface.
The corresponding link on the router looks like:
# ip addr show switch0.10
14: switch0.10@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 78:8a:20:bb:05:db brd ff:ff:ff:ff:ff:ff
inet6 2001:470:1234:1234::1/110 scope global
valid_lft forever preferred_lft forever
inet6 fe80::7a8a:20ff:febb:5db/64 scope link
valid_lft forever preferred_lft forever
And /etc/radvd.conf looks like:
interface switch0.10 {
IgnoreIfMissing on;
AdvOtherConfigFlag off;
AdvRetransTimer 0;
MinRtrAdvInterval 198;
AdvManagedFlag off;
MaxRtrAdvInterval 600;
AdvLinkMTU 0;
AdvReachableTime 0;
AdvDefaultPreference medium;
AdvDefaultLifetime 1800;
AdvSendAdvert on;
AdvCurHopLimit 64;
prefix 2001:470:1234:1234::/110 {
AdvAutonomous on;
AdvValidLifetime 2592000;
AdvPreferredLifetime 604800;
AdvOnLink on;
};
};
What is preventing my system from automatically configuring an IPv6 address on this interface?