Closed ghmj2417 closed 2 weeks ago
Please write the full configs, because I can't reproduce this issue.
Here it is
frr version 9.1.1
frr defaults traditional
hostname host-A-A-A-25
log stdout informational
no ip forwarding
no ipv6 forwarding
service integrated-vtysh-config
!
router bgp XYZ
bgp router-id A.A.A.25
no bgp ebgp-requires-policy
timers bgp 5 15
neighbor X.X.X.1 remote-as ABC
neighbor X.X.X.1 bfd
neighbor Y.Y.Y.1 remote-as ABC
neighbor Y.Y.Y.1 bfd
!
address-family ipv4 unicast
redistribute kernel route-map redistribute-kernel
neighbor X.X.X.1 soft-reconfiguration inbound
neighbor X.X.X.1 route-map from-router-local in
neighbor Y.Y.Y.1 soft-reconfiguration inbound
neighbor Y.Y.Y.1 route-map from-router-tunnel in
exit-address-family
exit
!
access-list redistribute-kernel seq 10 permit A.A.A.25/32
!
route-map from-router-local permit 10
set table 200
exit
!
route-map redistribute-kernel permit 10
match ip address redistribute-kernel
exit
!
route-map from-router-tunnel permit 10
set table 201
exit
!
bfd
peer X.X.X.1 interface eth0
detect-multiplier 5
exit
!
peer Y.Y.Y.1 interface tun0
detect-multiplier 5
exit
!
exit
!
What am I doing wrong?
donatas.net# sh ip route table 200
Codes: K - kernel route, C - connected, L - local, S - static,
R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric, t - Table-Direct,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
VRF default table 200:
B> 10.0.0.1/32 [20/0] via 127.0.0.3 (recursive), weight 1, 00:00:13
* via 192.168.10.1, enp3s0, weight 1, 00:00:13
donatas.net# con
donatas.net(config)# router bgp
donatas.net(config-router)# neighbor 127.0.0.3 shutdown
donatas.net(config-router)# do sh ip route table 200
donatas.net(config-router)# no neighbor 127.0.0.3 shutdown
donatas.net(config-router)# do sh ip route table 200
Codes: K - kernel route, C - connected, L - local, S - static,
R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric, t - Table-Direct,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
VRF default table 200:
B> 10.0.0.1/32 [20/0] via 127.0.0.3 (recursive), weight 1, 00:00:03
* via 192.168.10.1, enp3s0, weight 1, 00:00:03
donatas.net(config-router)#
Config is:
...
neighbor 127.0.0.3 remote-as external
neighbor 127.0.0.3 soft-reconfiguration inbound
neighbor 127.0.0.3 route-map exa in
...
route-map exa permit 10
set table 200
exit
Maybe it has to do with our config using two route tables 200 and 201?
If you are about 0.0.0.0/0 to be announced by both peers and 0.0.0.0/0 installed into different tables by FRR, then this won't work with the current design on how BGP/Zebra operates. I suggest using VRFs instead.
Is this issue with the routes being the same? What if route table 200 has 0.0.0.0/0, and table 201 gets routes 0.0.0.0/1 and 128.0.0.0/1? This is just a curiosity, doesn't mean I would do it. I would probably switch to using VRFs if my kernel will support it.
If the mask is different (== different route), then it might work fine.
Thank you for looking into this. Much appreciated.
Description
Routes are not being removed from the route tables. I have witnessed this in three different scenarios.
neighbor X.X.X.1 shutdown
will bring down the neighbor, but will not remove the routes received from that neighbor.systemctl stop frr
will stop the service but the routes will still exist.Note: We are using
service integrated-vtysh-config
Version
How to reproduce
I am using multiple BGP neighbors (I have not tested this with one) to inject routes into different route tables.
Summary of BGP config
My test involved me shutting down the BGP session from the remote device. In this case, neighbor X.X.X.1 was down.
BGP info
X.X.X.1 routes are being put into table 200.
As you can see the route(s) still exist even though the neighbor is down. The routes from that neighbor are never removed.
Expected behavior
Routes are removed from their respective route tables.
Actual behavior
Routes stay in the route table.
Additional context
I found this issue from awhile ago, https://github.com/FRRouting/frr/issues/10390 and it is very similar to what I am seeing.
Please feel free to ask for more info or any debug output you would like to see.
Checklist