On 2023/4/19 22:19, James Knott wrote:
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 It's true. I just found that there is a "pref medium" showed in the command `ip -6 route show`
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.
In my case, I have 2 routers but the same ISP and same modem. My ISP allows limited multiple PPPoE sessions per account. I just enabled the IPv6 in a router (router-A) and leave another router (router-B) IPV4-only. If I could understand this default gateway problem, I could decide to enable the second router's IPv6 or not. I had, for short experiment, enabled the IPv6 on the second router but disable all configuration mechanisms to its LAN to avoid messing up my network. And I found the routers' IPv6 prefixes are different on these two routers. I'm not sure whether I understand your words correctly. Is that bad idea for my case that to enable the IPv6 on both routers ? Because they have different IPv6 prefixes. But they are the same ISP. I thought that IPv6-address-A must go through router-A to reach the internet and IPv6-address-B must go through router-B to reach the internet. Maybe I'm wrong.