ebgp question

happy420goluckyhappy420golucky Member Posts: 78 ■■□□□□□□□□
I was looking at an issue today and wanted to check the routes I was receiving from an ebgp peer. When I checked to see that neighbor's received routes, I see two prefix's but they are valid but not the best route. When I run the second command "sh ip bgp neighbor 155.1.45.4 routes" I see the same prefix's and are known as the best routes. Can anybody give any pointers as to where to read/ or look on the router to understand why this shows up like this? Thanks in advance.


Rack1R5#sh ip bgp neighbors 155.1.45.4 received-routes
BGP table version is 84, local router ID is 150.1.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
* 1.2.3.4/32 155.1.45.4 0 100 i
* 28.119.16.0/24 155.1.45.4 0 100 54 i
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rack1R5#sh ip bgp neighbor 155.1.45.4 routes
BGP table version is 84, local router ID is 150.1.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 1.2.3.4/32 155.1.45.4 0 100 i
*> 28.119.16.0/24 155.1.45.4 0 100 54 i
Every passing minute is a chance to turn it all around.

Comments

  • Forsaken_GAForsaken_GA Member Posts: 4,024
    What does sh ip bgp show?

    Are the routes installed in the routing table?

    Do you have a valid route to the next hop address your peer is advertising for these routes?
  • happy420goluckyhappy420golucky Member Posts: 78 ■■□□□□□□□□
    What does sh ip bgp show?

    Are the routes installed in the routing table?

    Do you have a valid route to the next hop address your peer is advertising for these routes?

    Yes the routes are installed in the routing table.

    Yes there is a valid next hop.

    If you seen what I posted, it shows that I have a valid next hop. Which is why I am a little confused on my results. The ebgp peer is a directly connected neighbor off of a serial port.

    Have I been mistaken in thinking that the two commands are requesting the same information?
    Every passing minute is a chance to turn it all around.
  • tim100tim100 Member Posts: 162
    Have I been mistaken in thinking that the two commands are requesting the same information?

    "Received-routes" shows all received routes whether they are rejected or accepted and "routes" shows all received routes that are accepted. It is possible that the routes have been filtered by a recent configuration change either on your side or the peer and it has not refreshed. Do you have soft reconfiguration enabled?
  • deth1kdeth1k Member Posts: 312
    I was looking at an issue today and wanted to check the routes I was receiving from an ebgp peer. When I checked to see that neighbor's received routes, I see two prefix's but they are valid but not the best route. When I run the second command "sh ip bgp neighbor 155.1.45.4 routes" I see the same prefix's and are known as the best routes. Can anybody give any pointers as to where to read/ or look on the router to understand why this shows up like this? Thanks in advance.


    Rack1R5#sh ip bgp neighbors 155.1.45.4 received-routes
    BGP table version is 84, local router ID is 150.1.5.5
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete

    Network Next Hop Metric LocPrf Weight Path
    * 1.2.3.4/32 155.1.45.4 0 100 i
    * 28.119.16.0/24 155.1.45.4 0 100 54 i
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Rack1R5#sh ip bgp neighbor 155.1.45.4 routes
    BGP table version is 84, local router ID is 150.1.5.5
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete

    Network Next Hop Metric LocPrf Weight Path
    *> 1.2.3.4/32 155.1.45.4 0 100 i
    *> 28.119.16.0/24 155.1.45.4 0 100 54 i

    What you're seeing is a normal behaviour for that command.
  • happy420goluckyhappy420golucky Member Posts: 78 ■■□□□□□□□□
    tim100 wrote: »
    "Received-routes" shows all received routes whether they are rejected or accepted and "routes" shows all received routes that are accepted. It is possible that the routes have been filtered by a recent configuration change either on your side or the peer and it has not refreshed. Do you have soft reconfiguration enabled?

    Thanks I appreciate the clarification. When I ran into this issue, I executed the ip bgp neigh x.x.x.x soft in / out, but only on this router since I don't have access to the other router.

    I still see the same result. Going off your explanation, all the routes learned from this peer are valid-best routes, even though the routes that are being advertised from it are only valid routes.

    I have this peer configured under a peer group and have soft-reconfiguration enabled. Could you configure a route-map that would change the advertised routes to only be known by my router as valid route?
    The only filtering we are doing on our side is a prefix list permitting the two class c network inbound from that peer.
    Every passing minute is a chance to turn it all around.
  • happy420goluckyhappy420golucky Member Posts: 78 ■■□□□□□□□□
    *@%@* Bump *@%@*
    Every passing minute is a chance to turn it all around.
  • networker050184networker050184 Mod Posts: 11,962 Mod
    What you are seeing is normal output like deth1k pointed out. The received-routes command doesn't show any of them selected as best. It just shows you what routes the neighbor has sent you.

    To see the actual routes that are valid use the "show ip bgp 1.1.1.1" command.
    An expert is a man who has made all the mistakes which can be made.
  • tim100tim100 Member Posts: 162
    What you are seeing is normal output like deth1k pointed out. The received-routes command doesn't show any of them selected as best. It just shows you what routes the neighbor has sent you.

    To see the actual routes that are valid use the "show ip bgp 1.1.1.1" command.

    Partial output from an active internet EBGP router:

    7206COGENT#sh ip bgp neighbors 38.103.72.158 received-routes
    BGP table version is 27201408, local router ID is 38.103.72.159
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete

    Network Next Hop Metric LocPrf Weight Path
    *> 1.9.0.0/16 38.103.72.158 2000 0 174 1273 4788 i
    *> 1.12.0.0/24 38.103.72.158 2000 0 174 1239 4837 4808 17431 18245 i
    *> 1.12.0.0/14 38.103.72.158 68990 0 174 4134 4847 18245 i
    *> 1.12.1.0/24 38.103.72.158 68990 0 174 4134 4847 18245 i
    *> 1.21.0.0/16 38.103.72.158 68990 0 174 2914 2519 i


    7206COGENT#sh ip bgp neighbors 38.103.72.158 routes
    BGP table version is 27201828, local router ID is 38.103.72.159
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
    r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete

    Network Next Hop Metric LocPrf Weight Path
    *> 1.9.0.0/16 38.103.72.158 2000 0 174 1273 4788 i
    *> 1.12.0.0/24 38.103.72.158 2000 0 174 1239 4837 4808 17431 18245 i
    *> 1.12.0.0/14 38.103.72.158 68990 0 174 4134 4847 18245 i
    *> 1.12.1.0/24 38.103.72.158 68990 0 174 4134 4847 18245 i
    *> 1.21.0.0/16 38.103.72.158 68990 0 174 2914 2519 i
  • networker050184networker050184 Mod Posts: 11,962 Mod
    I believe it depends on if you are doing any kind of attribute manipulation. If you are not manipulating any attributes then I believe both commands show the same output.
    An expert is a man who has made all the mistakes which can be made.
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Here we are setting the weight to make these routes active. As you can see the received-routes does not reflect this. The routes command how ever does reflect the route as best with the weight now present.
    sho ip bgp neighbors 4.78.208.117 received-routes
    BGP table version is 17899734, local router ID is 
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
    
       Network          Next Hop            Metric LocPrf Weight Path
    *  1.9.0.0/16       4.78.208.117             0             0 3356 1273 4788 i
    *  1.11.128.0/17    4.78.208.117             0             0 3356 2828 9318 38091 17839 i
    *  1.12.0.0/24      4.78.208.117             0             0 3356 1239 4837 4808 17431 18245 i
    *  1.12.0.0/14      4.78.208.117             0             0 3356 1239 4837 4808 17431 18245 i
    *  1.21.0.0/16      4.78.208.117             0             0 3356 2516 2519 i
    *  1.22.0.0/23      4.78.208.117             0             0 3356 6453 4755 45528 i
    *  1.22.16.0/23     4.78.208.117             0             0 3356 6453 4755 45528 i
    *  1.22.24.0/23     4.78.208.117             0             0 3356 6453 4755 24186 45528 i
    *  1.22.32.0/23     4.78.208.117             0             0 3356 6453 4755 24186 45528 i
    *  1.22.40.0/23     4.78.208.117             0             0 3356 6453 4755 24186 45528 i
    *  1.22.48.0/23     4.78.208.117             0             0 3356 6453 4755 24186 45528 i
    *  1.22.56.0/23     4.78.208.117             0             0 3356 6453 4755 24186 45528 i
    
    ++++++++++++++++++++++++++++++++++++++++++++++++++
    
    sho ip bgp neighbors 4.78.208.117 routes
    BGP table version is 17899762, local router ID is 
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
    
       Network          Next Hop            Metric LocPrf Weight Path
    *  1.9.0.0/16       4.78.208.117             0           100 3356 1273 4788 i
    *  1.11.128.0/17    4.78.208.117             0           100 3356 2828 9318 38091 17839 i
    *  1.12.0.0/24      4.78.208.117             0           100 3356 1239 4837 4808 17431 18245 i
    *  1.12.0.0/14      4.78.208.117             0           100 3356 1239 4837 4808 17431 18245 i
    *> 1.21.0.0/16      4.78.208.117             0           100 3356 2516 2519 i
    *> 1.22.0.0/23      4.78.208.117             0           100 3356 6453 4755 45528 i
    *> 1.22.16.0/23     4.78.208.117             0           100 3356 6453 4755 45528 i
    *> 1.22.24.0/23     4.78.208.117             0           100 3356 6453 4755 24186 45528 i
    *> 1.22.32.0/23     4.78.208.117             0           100 3356 6453 4755 24186 45528 i
    *> 1.22.40.0/23     4.78.208.117             0           100 3356 6453 4755 24186 45528 i
    *> 1.22.48.0/23     4.78.208.117             0           100 3356 6453 4755 24186 45528 i
    *> 1.22.56.0/23     4.78.208.117             0           100 3356 6453 4755 24186 45528 i
    
    An expert is a man who has made all the mistakes which can be made.
  • tim100tim100 Member Posts: 162
    Here we are setting the weight to make these routes active. As you can see the received-routes does not reflect this. The routes command how ever does reflect the route as best with the weight now present.
    sho ip bgp neighbors 4.78.208.117 received-routes
    BGP table version is 17899734, local router ID is 64.89.64.60
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
    
       Network          Next Hop            Metric LocPrf Weight Path
    *  1.9.0.0/16       4.78.208.117             0             0 3356 1273 4788 i
    *  1.11.128.0/17    4.78.208.117             0             0 3356 2828 9318 38091 17839 i
    *  1.12.0.0/24      4.78.208.117             0             0 3356 1239 4837 4808 17431 18245 i
    *  1.12.0.0/14      4.78.208.117             0             0 3356 1239 4837 4808 17431 18245 i
    *  1.21.0.0/16      4.78.208.117             0             0 3356 2516 2519 i
    *  1.22.0.0/23      4.78.208.117             0             0 3356 6453 4755 45528 i
    *  1.22.16.0/23     4.78.208.117             0             0 3356 6453 4755 45528 i
    *  1.22.24.0/23     4.78.208.117             0             0 3356 6453 4755 24186 45528 i
    *  1.22.32.0/23     4.78.208.117             0             0 3356 6453 4755 24186 45528 i
    *  1.22.40.0/23     4.78.208.117             0             0 3356 6453 4755 24186 45528 i
    *  1.22.48.0/23     4.78.208.117             0             0 3356 6453 4755 24186 45528 i
    *  1.22.56.0/23     4.78.208.117             0             0 3356 6453 4755 24186 45528 i
    
    ++++++++++++++++++++++++++++++++++++++++++++++++++
    
    sho ip bgp neighbors 4.78.208.117 routes
    BGP table version is 17899762, local router ID is 64.89.64.60
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
    
       Network          Next Hop            Metric LocPrf Weight Path
    *  1.9.0.0/16       4.78.208.117             0           100 3356 1273 4788 i
    *  1.11.128.0/17    4.78.208.117             0           100 3356 2828 9318 38091 17839 i
    *  1.12.0.0/24      4.78.208.117             0           100 3356 1239 4837 4808 17431 18245 i
    *  1.12.0.0/14      4.78.208.117             0           100 3356 1239 4837 4808 17431 18245 i
    *> 1.21.0.0/16      4.78.208.117             0           100 3356 2516 2519 i
    *> 1.22.0.0/23      4.78.208.117             0           100 3356 6453 4755 45528 i
    *> 1.22.16.0/23     4.78.208.117             0           100 3356 6453 4755 45528 i
    *> 1.22.24.0/23     4.78.208.117             0           100 3356 6453 4755 24186 45528 i
    *> 1.22.32.0/23     4.78.208.117             0           100 3356 6453 4755 24186 45528 i
    *> 1.22.40.0/23     4.78.208.117             0           100 3356 6453 4755 24186 45528 i
    *> 1.22.48.0/23     4.78.208.117             0           100 3356 6453 4755 24186 45528 i
    *> 1.22.56.0/23     4.78.208.117             0           100 3356 6453 4755 24186 45528 i
    

    The received-routes command did not reflect this because the weight attribute had not been applied yet. It should show up if you type the command again with the weight attribute applied.
  • networker050184networker050184 Mod Posts: 11,962 Mod
    tim100 wrote: »
    The received-routes command did not reflect this because the weight attribute had not been applied yet. It should show up if you type the command again with the weight attribute applied.


    No, it never shows up in the received-routes command on any of our transit routers. Those commands were directly after each other and no change has been made in a while. It may be a difference in IOS.
    An expert is a man who has made all the mistakes which can be made.
  • tim100tim100 Member Posts: 162
    No, it never shows up in the received-routes command on any of our transit routers. Those commands were directly after each other and no change has been made in a while. It may be a difference in IOS.
    No, it never shows up in the received-routes command on any of our transit routers. Those commands were directly after each other and no change has been made in a while. It may be a difference in IOS.

    I applied a test route-map with the following config:

    ip prefix-list TEST seq 5 permit 1.9.0.0/16

    route-map TEST permit 10
    match ip address prefix-list TEST
    set local-preference 300

    route-map TEST permit 1000

    router bgp 53521
    neighbor 38.103.72.158 route-map TEST in

    and here is the partial output:
    7206COGENT(config-router)#do sh ip bgp nei 38.103.72.158 received-routes
    BGP table version is 27269529, local router ID is 38.103.72.159
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
    
       Network          Next Hop            Metric LocPrf Weight Path
    *  1.9.0.0/16       38.103.72.158         2000             0 174 1273 4788 i
    *  1.11.128.0/17    38.103.72.158         2000             0 174 2828 9318 38091 17839 i
    *> 1.12.0.0/24      38.103.72.158         2000             0 174 1239 4837 4808 17431 18245 i
    *> 1.12.0.0/14      38.103.72.158        68990             0 174 4134 4847 18245 i
    *> 1.12.1.0/24      38.103.72.158        68990             0 174 4134 4847 18245 i
    
    ---------------------------------------------------
    
    7206COGENT(config-router)#do sh ip bgp nei 38.103.72.158 routes         
    BGP table version is 27269590, local router ID is 38.103.72.159
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
    
       Network          Next Hop            Metric LocPrf Weight Path
    *> 1.9.0.0/16       38.103.72.158         2000    300      0 174 1273 4788 i
    *  1.11.128.0/17    38.103.72.158         2000             0 174 2828 9318 38091 17839 i
    *> 1.12.0.0/24      38.103.72.158         2000             0 174 1239 4837 4808 17431 18245 i
    *> 1.12.0.0/14      38.103.72.158        68990             0 174 4134 4847 18245 i
    *> 1.12.1.0/24      38.103.72.158        68990             0 174 4134 4847 18245 i
    

    Notice since the local-preference attribute was applied only to prefix 1.9.0.0/16 that in "received-routes" it doesn't show up as best but in "routes" it does. The other prefixes have no attributes applied so the output is consistent. If nothing is applied as far as attributes/route-maps etc... then the output will be consistent. When attributes/route-maps etc... are applied then the output in "received-routes" for those specific prefixes will not show up as best but they will show up as best in "routes" as all of our outputs have showed. Attribute values for attributes such as local-preference and weight will not show up in "received-routes" either. If something like local-preference was configured you would see that value in "received-routes" on an iBGP peer.
  • networker050184networker050184 Mod Posts: 11,962 Mod
    tim100 wrote: »
    I applied a test route-map with the following config:

    ip prefix-list TEST seq 5 permit 1.9.0.0/16

    route-map TEST permit 10
    match ip address prefix-list TEST
    set local-preference 300

    route-map TEST permit 1000

    router bgp 53521
    neighbor 38.103.72.158 route-map TEST in

    and here is the partial output:
    7206COGENT(config-router)#do sh ip bgp nei 38.103.72.158 received-routes
    BGP table version is 27269529, local router ID is 38.103.72.159
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
    
       Network          Next Hop            Metric LocPrf Weight Path
    *  1.9.0.0/16       38.103.72.158         2000             0 174 1273 4788 i
    *  1.11.128.0/17    38.103.72.158         2000             0 174 2828 9318 38091 17839 i
    *> 1.12.0.0/24      38.103.72.158         2000             0 174 1239 4837 4808 17431 18245 i
    *> 1.12.0.0/14      38.103.72.158        68990             0 174 4134 4847 18245 i
    *> 1.12.1.0/24      38.103.72.158        68990             0 174 4134 4847 18245 i
    
    ---------------------------------------------------
    
    7206COGENT(config-router)#do sh ip bgp nei 38.103.72.158 routes         
    BGP table version is 27269590, local router ID is 38.103.72.159
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
    
       Network          Next Hop            Metric LocPrf Weight Path
    *> 1.9.0.0/16       38.103.72.158         2000    300      0 174 1273 4788 i
    *  1.11.128.0/17    38.103.72.158         2000             0 174 2828 9318 38091 17839 i
    *> 1.12.0.0/24      38.103.72.158         2000             0 174 1239 4837 4808 17431 18245 i
    *> 1.12.0.0/14      38.103.72.158        68990             0 174 4134 4847 18245 i
    *> 1.12.1.0/24      38.103.72.158        68990             0 174 4134 4847 18245 i
    
    Notice since the local-preference attribute was applied only to prefix 1.9.0.0/16 that in "received-routes" it doesn't show up as best but in "routes" it does. The other prefixes have no attributes applied so the output is consistent. If nothing is applied as far as attributes/route-maps etc... then the output will be consistent. When attributes/route-maps etc... are applied then the output in "received-routes" for those specific prefixes will not show up as best but they will show up as best in "routes" as all of our outputs have showed. Attribute values for attributes such as local-preference and weight will not show up in "received-routes" either. If something like local-preference was configured you would see that value in "received-routes" on an iBGP peer.

    Thanks for taking the time to research and lab it up. I've never actually used just the neighbor routes command before today. I always just use the show ip bgp for a certain prefix or the received-routes to see what I'm getting from a neighbor.
    An expert is a man who has made all the mistakes which can be made.
  • happy420goluckyhappy420golucky Member Posts: 78 ■■□□□□□□□□
    tim100 wrote: »
    I applied a test route-map with the following config:

    ip prefix-list TEST seq 5 permit 1.9.0.0/16

    route-map TEST permit 10
    match ip address prefix-list TEST
    set local-preference 300

    route-map TEST permit 1000

    router bgp 53521
    neighbor 38.103.72.158 route-map TEST in

    and here is the partial output:
    7206COGENT(config-router)#do sh ip bgp nei 38.103.72.158 received-routes
    BGP table version is 27269529, local router ID is 38.103.72.159
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
    
       Network          Next Hop            Metric LocPrf Weight Path
    *  1.9.0.0/16       38.103.72.158         2000             0 174 1273 4788 i
    *  1.11.128.0/17    38.103.72.158         2000             0 174 2828 9318 38091 17839 i
    *> 1.12.0.0/24      38.103.72.158         2000             0 174 1239 4837 4808 17431 18245 i
    *> 1.12.0.0/14      38.103.72.158        68990             0 174 4134 4847 18245 i
    *> 1.12.1.0/24      38.103.72.158        68990             0 174 4134 4847 18245 i
    
    ---------------------------------------------------
    
    7206COGENT(config-router)#do sh ip bgp nei 38.103.72.158 routes         
    BGP table version is 27269590, local router ID is 38.103.72.159
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete
    
       Network          Next Hop            Metric LocPrf Weight Path
    *> 1.9.0.0/16       38.103.72.158         2000    300      0 174 1273 4788 i
    *  1.11.128.0/17    38.103.72.158         2000             0 174 2828 9318 38091 17839 i
    *> 1.12.0.0/24      38.103.72.158         2000             0 174 1239 4837 4808 17431 18245 i
    *> 1.12.0.0/14      38.103.72.158        68990             0 174 4134 4847 18245 i
    *> 1.12.1.0/24      38.103.72.158        68990             0 174 4134 4847 18245 i
    

    Notice since the local-preference attribute was applied only to prefix 1.9.0.0/16 that in "received-routes" it doesn't show up as best but in "routes" it does. The other prefixes have no attributes applied so the output is consistent. If nothing is applied as far as attributes/route-maps etc... then the output will be consistent. When attributes/route-maps etc... are applied then the output in "received-routes" for those specific prefixes will not show up as best but they will show up as best in "routes" as all of our outputs have showed. Attribute values for attributes such as local-preference and weight will not show up in "received-routes" either. If something like local-preference was configured you would see that value in "received-routes" on an iBGP peer.

    Fricking awesome! Thank you for taking the time to lab it up, and thanks to everyone elses feedback. :)
    Every passing minute is a chance to turn it all around.
Sign In or Register to comment.