On 2023-04-19 10:08, Nohk Two wrote:
Multiple routers ! Interesting topic.
How the device handling the default gateway ?
For example, if my device got a IPv6-address-A and gateway-A from the router-A. It also got another IPv6-address-B and gateway-B from the router-B.
When my device try to connect to an internet site, it can choose IPV6-address-A or IPv6-address-B. Assume it chose the IPV6-address-A this time, then how the kernel knows it should go through the gateway-A and not the gateway-B ?
There's a preference field in the router advertisement and a setting in the router for priority. The device will go with the highest priority router. Should that router fail, then another will be used. I suspect this would be more useful in networks where routing protocols are used to determine best route, as then the same prefix would be used. If you simply had 2 ISPs, with different prefixes, then that might cause some issues if a router failed in the middle of a connection.