"ip route show dev enp0s9" does not show all routes for enp0s9
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
NOTE: Originally reported in iproute2 (https:/
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:
nexthop via fe80::200:
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.
-----
In case you have trouble creating the condition that reproduces this bug, a simple static networkd configuration will do the job...
Configure systemd-networkd
E.g. assume your interface is called enp0s9 and you already have add a config file in /etc/system/
$ cat /etc/systemd/
[Network]
Address=
[Route]
Gateway=
GatewayOnLink=true
[Route]
Gateway=
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
NOTE: You can also create the same scenario by having systemd-networkd accept RAs from multiple routers, but that requires more setup.
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: linux-image-
ProcVersionSign
Uname: Linux 6.8.0-36-generic x86_64
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/seq: matt 2599 F.... pipewire
/dev/snd/
CRDA: N/A
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Fri Jun 28 12:43:28 2024
InstallationDate: Installed on 2024-06-24 (4 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240424)
Lsusb:
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Lsusb-t:
/: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=
|__ Port 001: Dev 002, If 0, Class=Human Interface Device, Driver=usbhid, 12M
/: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=
MachineType: innotek GmbH VirtualBox
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm-
XDG_RUNTIME_
ProcFB: 0 vmwgfxdrmfb
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 20240318.
RfKill:
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/01/2006
dmi.bios.vendor: innotek GmbH
dmi.bios.version: VirtualBox
dmi.board.name: VirtualBox
dmi.board.vendor: Oracle Corporation
dmi.board.version: 1.2
dmi.chassis.type: 1
dmi.chassis.vendor: Oracle Corporation
dmi.modalias: dmi:bvninnotekG
dmi.product.family: Virtual Machine
dmi.product.name: VirtualBox
dmi.product.
dmi.sys.vendor: innotek GmbH
Subsequent upstream discussion aims this back at iproute2 filtering logic:
https://<email address hidden>/