netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "ip route show dev enp0s9" does not show all routes for enp0s9
@ 2024-06-28  0:01 Muggeridge, Matt
  2024-06-28  2:36 ` Stephen Hemminger
  0 siblings, 1 reply; 9+ messages in thread
From: Muggeridge, Matt @ 2024-06-28  0:01 UTC (permalink / raw)
  To: netdev@vger.kernel.org

Hi,

This looks like a problem in "iproute2".  This was observed on a fresh install of Ubuntu 24.04, with Linux 6.8.0-36-generic.

NOTE: I first raised this in https://bugs.launchpad.net/ubuntu/+source/iproute2/+bug/2070412, then later found https://github.com/iproute2/iproute2/blob/main/README.devel.

* PROBLEM
Compare the outputs:

$ ip -6 route show dev enp0s9
2001:2:0:1000::/64 proto ra metric 1024 expires 65518sec pref medium
fe80::/64 proto kernel metric 256 pref medium

$ ip -6 route
2001:2:0:1000::/64 dev enp0s9 proto ra metric 1024 expires 65525sec pref medium
fe80::/64 dev enp0s3 proto kernel metric 256 pref medium
fe80::/64 dev enp0s9 proto kernel metric 256 pref medium
default proto ra metric 1024 expires 589sec pref medium
 nexthop via fe80::200:10ff:fe10:1060 dev enp0s9 weight 1
 nexthop via fe80::200:10ff:fe10:1061 dev enp0s9 weight 1

The default route is associated with enp0s9, yet the first command above does not show it.

FWIW, the two default route entries were created by two separate routers on the network, each sending their RA.

* REPRODUCER
Statically Configure systemd-networkd with two route entries, similar to the following:

$ networkctl cat 10-enp0s9.network
# /etc/systemd/network/10-enp0s9.network
[Match]
Name=enp0s9

[Link]
RequiredForOnline=no

[Network]
Description="Internal Network: Private VM-to-VM IPv6 interface"
DHCP=no
LLDP=no
EmitLLDP=no


# /etc/systemd/network/10-enp0s9.network.d/address.conf
[Network]
Address=2001:2:0:1000:a00:27ff:fe5f:f72d/64


# /etc/systemd/network/10-enp0s9.network.d/route-1060.conf
[Route]
Gateway=fe80::200:10ff:fe10:1060
GatewayOnLink=true


# /etc/systemd/network/10-enp0s9.network.d/route-1061.conf
[Route]
Gateway=fe80::200:10ff:fe10:1061
GatewayOnLink=true



Now reload and reconfigure the interface and you will see two routes.

$ networkctl reload
$ networkctl reconfigure enp0s9
$ ip -6 r
$ ip -6 r show dev enp0s9 # the routes are not shown

Matt.


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: "ip route show dev enp0s9" does not show all routes for enp0s9
@ 2024-07-03  4:00 Muggeridge, Matt
  2024-07-03  5:50 ` Stephen Hemminger
  0 siblings, 1 reply; 9+ messages in thread
From: Muggeridge, Matt @ 2024-07-03  4:00 UTC (permalink / raw)
  To: netdev@vger.kernel.org

> On Sun, Jun 30, 2024 at 09:23:08AM -0700, Stephen Hemminger wrote:
> >  Good catch, original code did not handle multipath in filtering.
> >  
> >  Suggest moving the loop into helper function for clarity
> 
> Thanks, looks good. Do you want to submit it?
> 
> You can add:
> 
> Reviewed-by: Ido Schimmel mailto:idosch@nvidia.com

Just wondering which repo this will find its way into.  I sleuthed
your repos and the iproute2 repo but could not find it.

Thanks,
Matt.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-07-03 19:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-28  0:01 "ip route show dev enp0s9" does not show all routes for enp0s9 Muggeridge, Matt
2024-06-28  2:36 ` Stephen Hemminger
2024-06-28  2:54   ` Muggeridge, Matt
2024-06-30 10:39     ` Ido Schimmel
2024-06-30 16:23       ` Stephen Hemminger
2024-07-01  7:17         ` Ido Schimmel
  -- strict thread matches above, loose matches on Subject: below --
2024-07-03  4:00 Muggeridge, Matt
2024-07-03  5:50 ` Stephen Hemminger
2024-07-03 19:46   ` Muggeridge, Matt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).