Thank you Roy. In my use case, the metric is the same on Linux. So for ipv6 link-local scope traffic, since it needs the scope id, the kernel would use the corresponding route of the two? # this one works for device on the same subnet with eth0 ping -c 1 fe80::b27b:25ff:fe0c:109e%eth0 1 packets transmitted, 1 received, 0% packet loss, time 0ms # this one works for devices on the same subnet with eth1 ping -c 1 fe80::250:56ff:fe81:2938%eth1 1 packets transmitted, 1 received, 0% packet loss, time 0ms # For ipv6 global scope traffic to device located on eth1 subnet also works ping -c 1 fd01:12::250:56ff:fe81:2938 1 packets transmitted, 1 received, 0% packet loss, time 0ms So it seems if there are two ipv6 routes (link-local scope), the kernel knows which one to use, even for global scope traffic and same metric? If I use incorrect scope id, it fails, as expected. As you mentioned, ipv6 implementation/design is different from ipv4. Just don’t understand how the kernel knows which one to use. I’ll check the icmpv6 RA message, specifically A flag, M flag, O flag with Wireshark. The paragraph refers to stateless DHCP, my use case is slaac autoconfiguration. Thanks, Marinela From: Roy Marples <roy%marples.name@localhost>
---- On Wed, 21 Feb 2024 20: 34: 24 +0000 Taylor R Campbell wrote --- > > Date: Wed, 21 Feb 2024 15: 45: 46 +0000 > > From: Marinela Selseth Marinela. Selseth@ entrust. com>
> > > > For outbound traffic, the link-local would ---- On Wed, 21 Feb 2024 20:34:24 +0000 Taylor R Campbell wrote ---
> > Date: Wed, 21 Feb 2024 15:45:46 +0000
> > From: Marinela Selseth Marinela.Selseth%entrust.com@localhost>
> >
> > For outbound traffic, the link-local would spell the interface, xxx%eth1.
> > So in this case, the kernel in theory could still pick arbitrary the other route?
>
> If you don't specify a scope id, presumably it is up to the kernel
> which one to use.
On Linux with matching routes it will use the route with the lowest metric.
Roy
|