Hi,
when I am adding node and setting IPv6 to the node this sometimes fails with:
RTNETLINK answers: File exists for the adding of default route.
I suspect this is due to how the default IPv6 route is added and the fact that I have some routers in the environment sending periodic RA messages.
What I think happens is that if RA comes in before set_IPv6 happens there is already a default route from RA in the namespace, causing adding new default failure (results in script breaking out with the file exist message).
Below is what it looks like in my environment after some time when successfully created. You can see two default RA routes with the one, I guess, created by NSCmds set_ipv6:
[root@trex-dp8-dpm-3 v3.04]# ip -6 r show
fd00:1:2001::194 dev trex-a-0-2-L proto kernel metric 256 pref medium
fd00:1:2001::/64 dev trex-a-0-2-L proto kernel metric 256 expires 2591984sec pref medium
fe80::/64 dev trex-a-0-2-L proto kernel metric 256 pref medium
default via fe80::8a7e:25ff:fed4:1b0b dev trex-a-0-2-L proto ra metric 1024 expires 1728sec hoplimit 64 pref medium
default via fe80::8a7e:25ff:fed4:a0b dev trex-a-0-2-L proto ra metric 1024 expires 1784sec hoplimit 64 pref medium
default dev trex-a-0-2-L metric 1024 pref medium
Not sure were you do this namespace config in the code, but I guess you use something like:
ip -6 route add ...
If you use ip -6 route append instead I think it would work even if RA default is there already.
BR//Håkan