"ip route show dev enp0s9" does not show all routes for enp0s9

Bug #2070412 reported by Matt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
iproute2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Compare the outputs below:

$ 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.

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: iproute2 6.1.0-1ubuntu6
ProcVersionSignature: Ubuntu 6.8.0-35.35-generic 6.8.4
Uname: Linux 6.8.0-35-generic x86_64
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Wed Jun 26 11:51:48 2024
InstallationDate: Installed on 2024-06-24 (2 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240424)
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: iproute2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Matt (livefreeandroam) wrote :
Revision history for this message
Matt (livefreeandroam) wrote :

In case you have trouble creating the condition that reproduces this bug, there are two ways (that I know of) that will create two default routes on an interface:

1) Configure two IPv6 routers on the same network and have each send their own RAs with the same GA-prefix.

This will cause the host to configure an IPv6 SLAAC address and create the two default routes.

2) Configure systemd-networkd

E.g. assume your interface is called enp0s9 and you already have add a config file in /etc/system/network/10-enp0s9.network. Now add an override.conf as follows:

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

[Route]
Gateway=fe80::200:10ff:fe10:1060
GatewayOnLink=true

[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

Revision history for this message
Matt (livefreeandroam) wrote :

Fixed by netdev team. See:

https://marc.info/?l=linux-netdev&m=171976458316116&w=2

Cross reference to linux, since at one time it was thought to be a bug in the kernel: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2071406

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.