We have completed the upgrade of IEOC! All posts, comments and user profiles have been migrated. For security reasons, we have reset all passwords. To set a new password please Click Here. Further updates soon to follow.

BGP Best Path Selection vs IP Route

Happy new Year Experts !

wonder any one has a better understanding for relationship between the best path result obtained in sh ip bgp vs sh ip route?[8-|]

Refer to below output

R1#sh ip bgp
BGP table version is 245925, local router ID is
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf  Weight      Path
*>                        400          0               65206 i
*                                      400          0               65206 i                   
* i                             0      400         0                65206 i

R1#sh ip ro | i is variably subnetted, 1298 subnets, 14 masks
B [20/0] via, 2w2d


Question : from the sh ip bgp output indicate that the best valid path to reach is via next hop

                likewise from the sh ip ro output , it show that the route to reach is via next hop of


anyone can shed some light , as i expecting both result of sh ip bgp and sh ip ro should be the same next hop ip address?

but in reality i getting different ip &

thanks alot !!!




  • well, but it is close, close enough does not count?   .102 & .101 [:D]

    there is 2nd line in bgp with, 2 entries but 1st the best , so  what does show ip bgp show ?

  • I also would like to see the more descriptive output.

    show ip bgp

    show ip route



  • hi Martini, thx for looking into this, ya it does not count as basically 101 and 102 are different bgp router neighbor

    R1#sh ip bgp
    BGP routing table entry for, version 245731
    Paths: (5 available, best #1, table Default-IP-Routing-Table)
    Multipath: eBGP iBGP
      Advertised to update-groups:
         1                            2
      65206 from (
          Origin IGP, localpref 400, valid, external, multipath, best
      65206, (received-only) from (
          Origin IGP, metric 1, localpref 100, valid, external
      65206 from (
          Origin IGP, localpref 400, valid, external, multipath
      65206, (received-only) from (
          Origin IGP, metric 1, localpref 100, valid, external
      65206, (received & used) (metric 2) from (
          Origin IGP, metric 0, localpref 400, valid, internal

  • well well, [8-|] , my piping | include command make me overlook another route in the ip routing table,...revisted below is the result ...my apology

    R1#sh ip route bgp | b is variably subnetted, 1296 subnets, 14 masks

    B [20/0] via, 2w3d
                            [20/0] via, 2w3d

    so BGP injected both route into routing table ...now it started to make some sense : )

  • (received & used) versus received-only --- i think is due to bgp multipath feature.

    in sh run | s r bgp do u ahve command    maximum -path x

  • yes , it is multipath with following command line in the router bgp section config:

     maximum-paths 4
     maximum-paths ibgp  4

  • well, another puzzle, if this is a multipath, it should show a *m identifier in the sh ip bgp  : )



  • peetypeety ✭✭

    (received & used) versus received-only --- i think is due to bgp multipath feature.

    Nope, it's due to soft-reconfiguration inbound being enabled. If enabled for a particular neighbor, the learned routes could have three different possible outcomes:

    (received & used) - means the prefix was not altered by the inbound filtering mechanisms (if any), and is being used in the same form as it was learned.

    (received) - means this is how the prefix was learned, prior to any inbound filtering/manipulation mechanisms being applied.

    [nothing in parenthesis] - means this is how the prefix exists in the BGP RIB, after all inbound filtering/manipulation is applied.

    Note that soft-reconfig in is configured on a per-neighbor basis. A neighbor without this feature enabled would simply show the prefixes after filtering.

Sign In or Register to comment.