Making changes to default IPv6 route persistent in CentOS 7
Solution 1:
When Red Hat's networking scripts set multiple IPv6 addresses configured in /etc/sysconfig/network-scripts/ifcfg-*
, for whatever reason, they are applied in reverse order, so that the last address listed in IPV6ADDR_SECONDARIES
becomes the address used by default for outgoing connections. Reversing the order in which IPv6 addresses are listed is generally sufficient to fix the problem.
To answer the only vaguely related bounty question: IPv6 static routes can be set by adding them to a corresponding /etc/sysconfig/network-scripts/route6-*
. The format of this file is the same as the ip route add
command with that bit omitted, e.g.:
default via 2001:db8:dead:beef:: dev eno1
2001:db8:deca:fbad::/64 via 2001:db8:dead:beef::8bad:f00d dev eno1