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

bgpd: Do not keep stale paths in Adj-RIB-Out if not addpath aware #18275

Merged

Conversation

ton31337
Copy link
Member

@ton31337 ton31337 commented Feb 27, 2025

munet> r1 shi vtysh -c 'show ip bgp update advertised-routes'
update group 1, subgroup 1
BGP table version is 5, local router ID is 192.168.137.1
Status codes:  s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Origin codes:  i - IGP, e - EGP, ? - incomplete
     Network          Next Hop            Metric LocPrf Weight Path
 *> 1.0.0.0/24       192.168.137.201                10      0 65200 65444 i
 *> 10.0.0.0/24      192.168.137.100                10      0 65100 65444 65444 i
 *> 10.65.10.0/24    192.168.137.100          0     10      0 65100 i
 *> 10.200.2.0/24    192.168.137.202          0     10      0 65200 i

Announce one more 10.0.0.0/24 via 65200 and we have TWO paths 10.0.0.0/24 in adj-rib-out:

munet> r1 shi vtysh -c 'show ip bgp update advertised-routes'
update group 1, subgroup 1
BGP table version is 6, local router ID is 192.168.137.1
Status codes:  s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Origin codes:  i - IGP, e - EGP, ? - incomplete
     Network          Next Hop            Metric LocPrf Weight Path
 *> 1.0.0.0/24       192.168.137.201                10      0 65200 65444 i
 *> 10.0.0.0/24      192.168.137.100                10      0 65100 65444 65444 i
 *> 10.0.0.0/24      192.168.137.201                10      0 65200 65444 i
 *> 10.65.10.0/24    192.168.137.100          0     10      0 65100 i
 *> 10.200.2.0/24    192.168.137.202          0     10      0 65200 i

Stop announcing 10.0.0.0/24 via 65200 and we still have TWO paths for 10.0.0.0/24...

munet> r1 shi vtysh -c 'show ip bgp update advertised-routes'
update group 1, subgroup 1
BGP table version is 7, local router ID is 192.168.137.1
Status codes:  s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Origin codes:  i - IGP, e - EGP, ? - incomplete
     Network          Next Hop            Metric LocPrf Weight Path
 *> 1.0.0.0/24       192.168.137.201                10      0 65200 65444 i
 *> 10.0.0.0/24      192.168.137.100                10      0 65100 65444 65444 i
 *> 10.0.0.0/24      192.168.137.201                10      0 65200 65444 i
 *> 10.65.10.0/24    192.168.137.100          0     10      0 65100 i
 *> 10.200.2.0/24    192.168.137.202          0     10      0 65200 i

Why do we need to keep old paths in adj-rib-out if we don't have e.g. AddPaths enabled?

Shouldn't it be like here? (only one 10.0.0.0/24 in adj-rib-out for this update-group instead of multiple (stale from previous announcements))

munet> r1 shi vtysh -c 'show ip bgp update advertised-routes'
update group 1, subgroup 1
BGP table version is 6, local router ID is 192.168.137.1
Status codes:  s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Origin codes:  i - IGP, e - EGP, ? - incomplete
     Network          Next Hop            Metric LocPrf Weight Path
 *> 1.0.0.0/24       192.168.137.201                10      0 65200 65444 i
 *> 10.0.0.0/24      192.168.137.201                10      0 65200 65444 i
 *> 10.65.10.0/24    192.168.137.100          0     10      0 65100 i
 *> 10.200.2.0/24    192.168.137.202          0     10      0 65200 i

Closes #18222

@frrbot frrbot bot added the bgp label Feb 27, 2025
@ton31337 ton31337 force-pushed the fix/issue_18222_no_topotest branch 2 times, most recently from 9bf2ba2 to afcd211 Compare February 27, 2025 19:26
@ton31337 ton31337 marked this pull request as ready for review February 28, 2025 07:55
Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good ... waiting on Donatas to clear do not merge label

@pguibert6WIND
Copy link
Member

do you have a topotest for that ?

@frrbot frrbot bot added the tests Topotests, make check, etc label Mar 7, 2025
@github-actions github-actions bot added size/L rebase PR needs rebase and removed size/S labels Mar 7, 2025
@ton31337
Copy link
Member Author

ton31337 commented Mar 7, 2025

Added a topotest.

@IvayloJ
Copy link

IvayloJ commented Mar 8, 2025

@ton31337 Very sorry for the delay ! Please check my last post in #18222.

@ton31337 ton31337 force-pushed the fix/issue_18222_no_topotest branch 2 times, most recently from 91b730c to fad8b66 Compare March 14, 2025 12:08
@ton31337
Copy link
Member Author

@IvayloJ could you recheck?

```
munet> r1 shi vtysh -c 'show ip bgp update advertised-routes'
update group 1, subgroup 1
BGP table version is 5, local router ID is 192.168.137.1
Status codes:  s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Origin codes:  i - IGP, e - EGP, ? - incomplete
     Network          Next Hop            Metric LocPrf Weight Path
 *> 1.0.0.0/24       192.168.137.201                10      0 65200 65444 i
 *> 10.0.0.0/24      192.168.137.100                10      0 65100 65444 65444 i
 *> 10.65.10.0/24    192.168.137.100          0     10      0 65100 i
 *> 10.200.2.0/24    192.168.137.202          0     10      0 65200 i
```

Announce one more 10.0.0.0/24 via 65200 and we have TWO paths 10.0.0.0/24 in adj-rib-out:

```
munet> r1 shi vtysh -c 'show ip bgp update advertised-routes'
update group 1, subgroup 1
BGP table version is 6, local router ID is 192.168.137.1
Status codes:  s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Origin codes:  i - IGP, e - EGP, ? - incomplete
     Network          Next Hop            Metric LocPrf Weight Path
 *> 1.0.0.0/24       192.168.137.201                10      0 65200 65444 i
 *> 10.0.0.0/24      192.168.137.100                10      0 65100 65444 65444 i
 *> 10.0.0.0/24      192.168.137.201                10      0 65200 65444 i
 *> 10.65.10.0/24    192.168.137.100          0     10      0 65100 i
 *> 10.200.2.0/24    192.168.137.202          0     10      0 65200 i
```

Stop announcing 10.0.0.0/24 via 65200 and we still have TWO paths for 10.0.0.0/24...

```
munet> r1 shi vtysh -c 'show ip bgp update advertised-routes'
update group 1, subgroup 1
BGP table version is 7, local router ID is 192.168.137.1
Status codes:  s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Origin codes:  i - IGP, e - EGP, ? - incomplete
     Network          Next Hop            Metric LocPrf Weight Path
 *> 1.0.0.0/24       192.168.137.201                10      0 65200 65444 i
 *> 10.0.0.0/24      192.168.137.100                10      0 65100 65444 65444 i
 *> 10.0.0.0/24      192.168.137.201                10      0 65200 65444 i
 *> 10.65.10.0/24    192.168.137.100          0     10      0 65100 i
 *> 10.200.2.0/24    192.168.137.202          0     10      0 65200 i
```

Why do we need to keep old paths in adj-rib-out if we don't have e.g. AddPaths enabled?

Shouldn't it be like here? (only one 10.0.0.0/24 in adj-rib-out for this update-group instead of multiple (stale from previous announcements))

```
munet> r1 shi vtysh -c 'show ip bgp update advertised-routes'
update group 1, subgroup 1
BGP table version is 6, local router ID is 192.168.137.1
Status codes:  s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Origin codes:  i - IGP, e - EGP, ? - incomplete
     Network          Next Hop            Metric LocPrf Weight Path
 *> 1.0.0.0/24       192.168.137.201                10      0 65200 65444 i
 *> 10.0.0.0/24      192.168.137.201                10      0 65200 65444 i
 *> 10.65.10.0/24    192.168.137.100          0     10      0 65100 i
 *> 10.200.2.0/24    192.168.137.202          0     10      0 65200 i
```

Signed-off-by: Donatas Abraitis <[email protected]>
There was a case where removing the selected (single best) route leads to
adj-rib-out to be vanished at all.

Signed-off-by: Donatas Abraitis <[email protected]>
@ton31337 ton31337 force-pushed the fix/issue_18222_no_topotest branch from fad8b66 to f47b2fb Compare March 17, 2025 14:02
@ton31337 ton31337 removed do not merge rebase PR needs rebase labels Mar 17, 2025
@riw777 riw777 merged commit 1e69d08 into FRRouting:master Mar 18, 2025
16 of 17 checks passed
@ton31337 ton31337 deleted the fix/issue_18222_no_topotest branch March 19, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bgp master size/L tests Topotests, make check, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BGP probably a bug with multipath + addpath capability + bestpath calculation + route server scenario
4 participants