Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel route disappears if it has a proto kernel type #17425

Open
2 tasks done
skyblueted opened this issue Nov 13, 2024 · 1 comment
Open
2 tasks done

Kernel route disappears if it has a proto kernel type #17425

skyblueted opened this issue Nov 13, 2024 · 1 comment
Labels
triage Needs further investigation

Comments

@skyblueted
Copy link

skyblueted commented Nov 13, 2024

Description

In the past, on bare-metal systems, the output of the ip route command and show ip route kernel were consistent.
However, recently, when we attempted to apply the same configuration on KVM, we found that the kernel routes no longer appear in the vtysh command output.

  • Bare-metal:

root@bm-01:~# ip r
default proto bgp metric 20
nexthop via 169.254.0.1 dev ens3f0 weight 1 onlink
nexthop via 169.254.0.1 dev eno5 weight 1 onlink
172.18.71.0/24 via 172.18.71.x dev cilium_host src 172.18.71.x
172.18.71.x dev cilium_host scope link

root@bm-01:~# vtysh -c 'show ip route kernel'
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
f - OpenFabric,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
K>* 172.18.71.0/24 [0/0] via 172.18.71.x, cilium_host, src 172.18.71.x, 02w6d03h
K * 172.18.71.x/32 [0/0] is directly connected, cilium_host, 02w6d03h

  • KVM:

root@kvm-01:~# ip r
default via 169.254.0.1 dev ens4 proto bgp metric 20 onlink
100.111.12.201 via 169.254.0.1 dev ens4 proto bgp metric 20 onlink
172.18.4.0/24 via 172.18.4.x dev cilium_host proto kernel src 172.18.4.x
172.18.4.x dev cilium_host proto kernel scope link

root@kvm-01:#
root@kvm-01:
# vtysh -c 'show ip route kernel'
root@kvm-01:~#

Additional information: cilium_host is created by Cilium, which is a Kubernetes CNI (Container Network Interface) plugin that also handles IP Address Management (IPAM) functionality

Version

OS/kernel: Ubuntu 22.04/6.2.0-39-generic
FRR version: 10.1.1, 9.0.2

How to reproduce

  • Create KVM
  • Install FRR in KVM
  • Compare the results of the ip route command with the output of vtysh -c 'show ip route kernel'

Expected behavior

The kernel route results should be consistent between the ip route command and the show ip route kernel command

Actual behavior

The kernel routes are missing from the vtysh command output

Additional context

No response

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@skyblueted skyblueted added the triage Needs further investigation label Nov 13, 2024
@skyblueted skyblueted changed the title Kernel routes are missing on KVM when using vtysh Kernel route disappears when there is a "proto kernel" type route Nov 14, 2024
@skyblueted
Copy link
Author

skyblueted commented Nov 14, 2024

Today, we identified the root cause of the issue, which appears to be that FRR is unable to read routes with the proto kernel type.

Below is the method we used to reproduce the issue on a bare-metal system:

  1. Add a kernel route with proto kernel type:
    root@bm-01:# ip route add 1.1.1.1 dev dummy0 scope link proto kernel

  2. Run the 'ip route' command to ensure the new kernel route for 1.1.1.1 exists
    root@bm-01:# ip route

default proto bgp metric 20
nexthop via 169.254.0.1 dev eno5 weight 1 onlink
nexthop via 169.254.0.1 dev ens3f0 weight 1 onlink
1.1.1.1 dev dummy0 proto kernel scope link
100.111.12.2 nhid 209257 via inet6 fe80::5054:ff:fe3a:906e dev br2 proto bgp metric 20
100.111.16.9 nhid 209257 via inet6 fe80::5054:ff:fe3a:906e dev br2 proto bgp metric 20
100.111.16.100 nhid 209255 dev vm proto bgp metric 20
172.18.68.0/24 via 172.18.68.61 dev cilium_host src 172.18.68.61
172.18.68.61 dev cilium_host scope link

  1. Run the 'vtysh -c "show ip route kernel"' command to ensure the new kernel route for 1.1.1.1 exists
    root@bm-01:# vtysh -c 'show ip route kernel'

Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
f - OpenFabric,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
K>* 172.18.68.0/24 [0/0] via 172.18.68.61, cilium_host, src 172.18.68.61, 04w5d19h
K * 172.18.68.61/32 [0/0] is directly connected, cilium_host, 04w5d19h

However, FRR is unable to properly access the kernel route for 1.1.1.1

@skyblueted skyblueted changed the title Kernel route disappears when there is a "proto kernel" type route Kernel route disappears if it has a proto kernel type Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs further investigation
Projects
None yet
Development

No branches or pull requests

1 participant