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

bgp: "show bgp neighbor x.x.x.x received-routes" shows routes after route-maps/filters etc #16943

Closed
2 tasks done
mwinter-osr opened this issue Sep 27, 2024 · 0 comments · Fixed by #16945
Closed
2 tasks done
Assignees
Labels

Comments

@mwinter-osr
Copy link
Member

Description

Seen in Version 10.1.1 and 8.4, probably in all versions.

When we configure a BGP peer as "soft-reconfiguration inbound", the command "show ip bgp neigh x.x.x.x received-routes" should show the BGP routes before any route-maps. However, in FRR the routes are seen after the route-maps are applied (and with the changes from the route-maps)

Version

Release version 10.1.1 (And also verified in 8.4 which has same issue)

How to reproduce

Create 2 routers and announce some routes from one router (R1) to the other router (R2). On R2 apply a route-map with an inbound AS-path prepend and configure soft-reconfiguration inbound.

The output of the show bgp neighbor <r2 ip> received-routes shows the routes with the prepended AS path.

Example snippet of config on R2 (receiving router):

router bgp 1000
 bgp log-neighbor-changes
 no bgp ebgp-requires-policy
 no bgp enforce-first-as
 neighbor 192.168.3.2 remote-as 2000
 !
 address-family ipv4 unicast
  neighbor 192.168.3.2 soft-reconfiguration inbound
  neighbor 192.168.3.2 route-map prepend in
 exit-address-family
exit
!
route-map prepend permit 10
 set as-path prepend 1111 2222 3333
exit
!
route-map prepend permit 20
exit

Expected behavior

Example output for my setup on what I would expect (and is seen on other platforms, i.e. Cisco):

# sh ip bgp neigh 192.168.3.2 received-routes
BGP table version is 37, local router ID is 192.168.0.0, vrf id 0
Default local pref 100, local AS 1000
Status codes:  s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *> 13.13.13.13/32   192.168.3.2              0             0 2000 2001 i
 *> 192.168.0.0/32   192.168.3.2                            0 2000 1000 i
 *> 192.168.0.1/32   192.168.3.2                            0 2000 1000 65000 i
 *> 192.168.0.2/32   192.168.3.2                            0 2000 1000 65001 i
 *> 192.168.0.3/32   192.168.3.2              0             0 2000 i
 *> 192.168.100.0/24 192.168.3.2                            0 2000 1000 i
 *> 192.168.101.0/24 192.168.3.2                            0 2000 1000 65000 i
 *> 192.168.102.0/24 192.168.3.2                            0 2000 1000 65001 i
 *> 192.168.103.0/24 192.168.3.2              0             0 2000 i

Total number of prefixes 9

Actual behavior

Current output as seen:

# sh ip bgp neigh 192.168.3.2 received-routes
BGP table version is 37, local router ID is 192.168.0.0, vrf id 0
Default local pref 100, local AS 1000
Status codes:  s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *> 13.13.13.13/32   192.168.3.2              0             0 1111 2222 3333 2000 2001 i
 *> 192.168.0.0/32   192.168.3.2                            0 1111 2222 3333 2000 1000 i
 *> 192.168.0.1/32   192.168.3.2                            0 1111 2222 3333 2000 1000 65000 i
 *> 192.168.0.2/32   192.168.3.2                            0 1111 2222 3333 2000 1000 65001 i
 *> 192.168.0.3/32   192.168.3.2              0             0 1111 2222 3333 2000 i
 *> 192.168.100.0/24 192.168.3.2                            0 1111 2222 3333 2000 1000 i
 *> 192.168.101.0/24 192.168.3.2                            0 1111 2222 3333 2000 1000 65000 i
 *> 192.168.102.0/24 192.168.3.2                            0 1111 2222 3333 2000 1000 65001 i
 *> 192.168.103.0/24 192.168.3.2              0             0 1111 2222 3333 2000 i

Total number of prefixes 9

Additional context

Filter-lists seem to work correctly. So if I have a prefix-list filtering inbound routes, the sh ip bgp neigh 192.168.3.2 received-routes still shows the routes and only the sh ip bgp neigh 192.168.3.2 routes has them filtered out

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@mwinter-osr mwinter-osr added the triage Needs further investigation label Sep 27, 2024
@ton31337 ton31337 added bgp and removed triage Needs further investigation labels Sep 27, 2024
@ton31337 ton31337 self-assigned this Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants