cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11671
Views
10
Helpful
12
Replies

BGP route age

Olivier ARRIGHI
Level 1
Level 1

Hi folks

I'm looking for a command that would allow me to view a bgp route age.

thank

olivier

12 Replies 12

saurabh joshi
Level 1
Level 1

router#show ip bgp 66.66.66.66

BGP routing table entry for 66.66.66.66/32

Paths: (2 available, best #1)

  66.66.66.66/32

  3 i comm 65535:65281

  172.16.23.3 from 172.16.23.3 (peer 3.3.3.3)

    Origin IGP, local pref 100, weight 0, valid, best

     BGP Path Selection Criterion: Lowest BGP Neighbor Router-ID

    IGP Metric: 0 IGP Pref: 0 IGP Protocol: DIRECT

    IGP Next Hop: 0.0.0.0 Route Age: 0:03:22

  66.66.66.66/32 (Second best)

  77 i comm 65535:65281

  172.16.12.1 from 172.16.12.1 (peer 172.16.12.1)

    Origin IGP, local pref 100, weight 0, valid

    IGP Metric: 0 IGP Pref: 0 IGP Protocol: DIRECT

    IGP Next Hop: 0.0.0.0 Route Age: 0:02:21

Hi this a show command is from and old post (2004 i guess). Did you try to issue this command recently in a cisco box?

I did, and got nothing like this.

thanks

olivier

show ip route ?

Routing entry for 194.102.139.0/24
  Known via "bgp 6830", distance 200, metric 4294967294
  Tag 3209, type internal
  Last update from 84.116.128.68 2d16h ago
  Routing Descriptor Blocks:
  * 84.116.128.68, from 62.179.128.40, 2d16h ago
      Route metric is 4294967294, traffic share count is 1
      AS Hops 4
      Route tag 3209

Hi Dan, the show ip route command gives you the age of the route in the RIB, not in the BGP table.

Imagine you receive 2 routes via BGP, with exact same LP,AS path, med, internal/external. Then the decision is done on the age of the route learned by BGP. The oldest one wins. When doing a show ip bgp on this route, i see the several path, with the one prefered, and I know decision is done on the age, but i do not find a way to show age of routes from several BGP peers.

thanks

olivier

Hi ,

Are you sure about that ?

Check the best path selection algorithm for Cisco's BGP implementation

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml

Also i re-checked the rfc 4271 , and there was not mentioned the age of the prefix as a rule.

Can you post a show ip bgp that you think it match your case , we can check with the rules that are above.

Dan

Dan, have a look at #10 in the best path selection algo from within the link you sent me. This is where BGP chooses the oldest route ( mostly for stability reason).

Here is a show example :

PSM-PK5-ROO1#sh ip bgp 1.9.0.0

BGP routing table entry for 1.9.0.0/16, version 218850908

Paths: (5 available, best #4, table default)

  Advertised to update-groups:

     1

  3549 4788 4788

    162.97.116.117 from 162.97.116.117 (67.17.80.109)

      Origin IGP, metric 2604, localpref 100, valid, external

      Community: 3549:4025 3549:30840 4788:200 4788:210 18200:500

  3549 4788 4788, (received-only)

    162.97.116.117 from 162.97.116.117 (67.17.80.109)

      Origin IGP, metric 2604, localpref 100, valid, external

      Community: 3549:4025 3549:30840 4788:200 4788:210

  3549 4788 4788, (received & used)

    202.87.139.236 (metric 2) from 202.87.139.236 (202.87.139.236)

      Origin IGP, metric 14014, localpref 100, valid, internal

      Community: 3549:4025 3549:30840 4788:200 4788:210 18200:500

  1221 4637 4788

    203.62.252.39 from 203.62.252.39 (203.62.252.39)

      Origin IGP, localpref 100, valid, external, best

      Community: 18200:500

  1221 4637 4788, (received-only)

    203.62.252.39 from 203.62.252.39 (203.62.252.39)

      Origin IGP, localpref 100, valid, external

PSM-PK5-ROO1#

In this case, we have 2 ebgp exits, via AS1221 and via AS3549. The route has same LP, same as path length,med is not used because i'm not using bgp always compare med, both routes have same origin, both routes are external, and then we meet rule #10.

If I do flap ebgp peer via AS1221, the route will be prefered via AS3549, and will remain like this even if ebgp peer to AS1221 is back up again.Then if i do flap the ebgp peer to AS3549, the route will be prefered again through AS1221, even is AS3549 path is back up again. rule #10.

the show command saurabh showed me is exactly what i need : the age of the bgp route. Unfortunately, this is not shown anymore now is the few boxes i've tested with this show command.

Let me know if you have another interpretation of this behavior.

thanks

olivier

Hi Olivier,

You are right , the 10th is the route age. Due to the fact that your initial question was not related to the change of this behaviour, i have to agree with you that curently i didnt saw any command that could give you the reqired info.

Cheers

Dan

Hi guys,

I think the way the document describes the behavior of age is a little confusing.  #10 says the oldest route is preffered but really it's the first route to be received and if that route is lost there is no logic of which is the next oldest route, it goes to the next decision step which is lowest router-id.  So really, step #10 should just be described as there is no preemption when comparing router-id's, which ever neighbor sends the route first will win and if that route is lost we use the next lowest router-id, nothing to do with route age at that point.

I mocked this up with a single router having 3 x eBGP neighbors and messed around with shutting and no shutting a common ethernet segment the eBGP neighbors shared on the back end to simulate the loss of the route.

I had been meaning to figure this out for a while so I hope others enjoy the finding

Ben,

Woops, I forgot to add that if you do configure the "bgp bestpath compare-routerid" command set then route age does make a difference.  This is regardless if the routes are coming from neighbors with the same router-id.

So if you truely want step #10 to act on the age of a route then you should configure the command set I just mentioned, otherwise BGP bestpath will move on to using lowest router-id for as the next criteria for route selection.

Ben,

Hello,

 

I have run some tests and knowing that the prefix will not flap without the peer flap with it (unless the customer stop advertising it), the only possible way that I've found to see the route age is by seeing the peer age of the secondary Neighbor on show ip bgp summary command.

 

Here are the 2 paths to 15.15.15.0/28 that is going towards 1.1.1.1 and 210.10.0.1. The primary is 210.10.0.1.

ISP1#show ip bgp 
Network                       Next Hop    Metric    LocPrf    Weight       Path
* 15.15.15.0/28          1.1.1.1                                        0           100 15 i
*>                                210.10.0.1                                 0            210 15 i

The route that is in place:

ISP1#show ip route | i 15.15.15.0
B 15.15.15.0 [20/0] via 210.10.0.1, 00:55:32 <<<<<<

 

We can see that the route is older than the secondary neighbor age, therefore, as soon the neighbor 1.1.1.1 flapped, the route changed path to 210.10.0.1. So I don't think that we can see the path age on 210.10.0.1 because it just starts counting when it's in use, therefore the time of this route is the time of that the neighbor is up: 00:03:21:30 and the secondary 00:54:25.

ISP1#show ip bgp sum | b Neigh
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 100 223 227 94 0 0 00:54:59 25
210.10.0.1 4 210 221 224 94 0 0 03:21:30 35

 

I hope that I helped somehow.

 

Interesting. Your show ip bgp output is different from what I have seen. Which platform/IOS are you using? I tried 7200 and ISR and the command does not show route age or IGP information. I doubt if the router keeps track of route age at all. It looks like the route merely compares new routes with existing routes and has no idea which one is the second oldest.

route-views3>show ip bgp 66.66.66.66                                               

BGP routing table entry for 66.66.0.0/15, version 1347916243

Paths: (13 available, best #9, table Default-IP-Routing-Table)

  Not advertised to any peer

  3561 7843 11351

    206.24.210.102 from 206.24.210.102 (206.24.210.102)

      Origin IGP, localpref 100, valid, external

  9304 7843 11351

    218.189.6.129 from 218.189.6.129 (218.189.6.149)

      Origin IGP, localpref 100, valid, external

      Community: 9304:111 9304:401 9304:11119 65111:7843

  209 6453 7843 11351

    205.171.202.202 from 205.171.202.202 (205.171.202.202)

      Origin IGP, metric 8000056, localpref 100, valid, external

      Community: 209:888

  10026 7843 11351

    202.147.61.12 from 202.147.61.12 (202.147.61.4)

      Origin IGP, metric 2503, localpref 100, valid, external

      Community: 10026:1230 10026:31840 10026:40901

  209 6453 7843 11351

    205.171.3.22 from 205.171.3.22 (205.171.3.22)

      Origin IGP, metric 8000090, localpref 100, valid, external

      Community: 209:888

  5650 2828 2828 7843 11351

    74.40.7.35 from 74.40.7.35 (74.40.0.100)

      Origin IGP, metric 0, localpref 100, valid, external

  10026 7843 11351

    202.147.0.142 from 202.147.0.142 (202.147.0.132)

      Origin IGP, metric 10003, localpref 100, valid, external

      Community: 10026:1230 10026:31840 10026:40901

  3292 7843 11351

    195.215.109.254 from 195.215.109.254 (195.249.0.91)

      Origin IGP, localpref 100, valid, external

      Community: 3292:1100 3292:10101

  286 7843 11351

    134.222.87.4 from 134.222.87.4 (134.222.85.107)

      Origin IGP, localpref 100, valid, external, best

      Community: 286:18 286:19 286:28 286:29 286:49 286:800 286:888 286:3001

  3257 6453 7843 11351

    89.149.178.10 from 89.149.178.10 (213.200.87.91)

      Origin IGP, metric 10, localpref 100, valid, external

      Community: 3257:8012 3257:30110 3257:50001 3257:54900 3257:54901

  40387 11164 7843 11351

    72.36.126.8 from 72.36.126.8 (72.36.126.8)

      Origin IGP, localpref 100, valid, external

      Community: 40387:1450

  209 6453 7843 11351

    205.171.202.207 from 205.171.202.207 (205.171.202.207)

      Origin IGP, metric 8001456, localpref 100, valid, external

      Community: 209:888

  6939 2828 2828 7843 11351

    216.218.252.164 from 216.218.252.164 (216.218.252.164)

      Origin IGP, localpref 100, valid, external

This is not a Cisco output.  This is from another platform.  Please don't post inaccurate information.  It detracts from the forums effectiveness

http://www.powerfast.net/bgp/BGP_Nd50.html

 

Just had this discussion in an INE bootcamp and the instructor has been looking for a long time to find the age in the bgp table not the routing table.  Its possible its not available to view at the moment.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: