Kenneth Porter
2021-Oct-17 20:55 UTC
[CentOS] IPv6 routing preference with multiple default gateways
I've got a primary and backup CentOS 7 gateway, each with two interfaces, connected to my LAN and my fiber gateway. The default gateway (the fiber box) is set explicitly in ifcfg-eno2 with IPV6_DEFAULTGW. Using "ip -6 route show" I see two defaults, the static one and the one advertised from my other CentOS7 box via the internal interface (eno1), both with metric 1024 and preference medium. default via 2001:1890:1837:5b00::1 dev eno2 metric 1024 pref medium default via fe80::100 dev eno1 proto ra metric 1024 expires 293sec hoplimit 64 pref medium How do I set the IPv6 router advertisements on the LAN side to advertise a higher metric or lower preference so there's never ambiguity that the fiber box has precedence? I can't find a setting in the man page for radvd to set the metric or preference for the LAN route that's announced. Additionally, I think I need to announce a route on the WAN interface (eno2) of lower precedence than the static route so the fiber box knows that the two CentOS7 boxes are proxies for my LAN, but the two boxes don't try to route to each other? This is for C8 but it's useful for the concepts, like that a lower metric has a higher precedence: <https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/managing-the-default-gateway-setting_configuring-and-managing-networking> Some radvd examples that lack an example of how to set metric or preference. <https://tldp.org/HOWTO/Linux+IPv6-HOWTO/ch22s04.html>
Kenneth Porter
2021-Oct-17 21:10 UTC
[CentOS] IPv6 routing preference with multiple default gateways
Ugh. It looks like I need to read through the neighbor discovery RFC to understand how this works: https://datatracker.ietf.org/doc/html/rfc4861 I did discover that the radvd.conf page includes an entry for AdvDefaultPreference low|medium|high so I can at least set the preference of the backup C7 box to low.