Skip navigation
Cisco Learning Home > Certifications > Routing & Switching (CCNP) > Discussions

_Communities

This Question is Not Answered 1 Correct Answer available (4 pts) 2 Helpful Answers available (2 pts)
13982 Views 22 Replies Latest reply: Jan 2, 2012 5:39 AM by Flanger RSS Go to original post 1 2 Previous Next

Currently Being Moderated
  • kddwivedi 3 posts since
    Sep 8, 2009
    Currently Being Moderated
    15. Jan 24, 2011 7:56 AM (in response to Brian)
    Re: BGP metrics and Administrative Distance

    Hats off to you Brian. I was wrong.

  • daniel.rodrig 11 posts since
    Jan 25, 2010
    Currently Being Moderated
    16. Jan 24, 2011 8:42 AM (in response to kddwivedi)
    Re: BGP metrics and Administrative Distance

    I think that regarding the original question from the AD. It can be resumed to the following.

     

    The BGP decision process will chose the best path to an specific prefix/leng from all the options it have. In that decision process one of the steps says that an eBGP learned prefix is better than an iBGP- But is just that, a step and a higher precedence step can override this (example: Weight). After that the AD will be compared against the other routing protocols (IGP's) to pick the best route to go into the RIB.

     

    Good information source: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800c95bb.shtml

     

    Daniel,

    http://blog.initialdraft.com/

  • Brian 2,971 posts since
    Aug 17, 2009
    Currently Being Moderated
    17. Jan 24, 2011 1:26 PM (in response to kddwivedi)
    Re: BGP metrics and Administrative Distance

    No problem.  I loved labbing this up.  If you look at the BGP Best Path Algorithm, AD is not mentioned in anyone of the 13 selection steps.  I believe it is step #7 that mentions, prefer eBGP over iBGP.  I don't think this has anything to do with AD.

  • daniel.rodrig 11 posts since
    Jan 25, 2010
    Currently Being Moderated
    18. Feb 10, 2011 9:56 AM (in response to Harris)
    Re: BGP metrics and Administrative Distance

    Hi,

     

    My friend have posted an article about the BGP best path selection after a recent discussion we had with some other workmates (including references to this thread).

    Its a long post, but with detailed explanation and examples:

     

    http://blog.initialdraft.com/archives/702

     

    Anyway, I just though that this may be interesting for you guys.

     

    Regards,

  • Mohammed.Sidqathulla 5 posts since
    May 6, 2011
    Currently Being Moderated
    19. Jul 23, 2011 7:41 PM (in response to Brian)
    Re: BGP metrics and Administrative Distance

    Hi Brian,

    I Completely understood but "Aaron balchunas" Explanation forced me to think again. He state that  To Determine the best route to a destination, a router considers three elements in this ORDER

    1.Prefex-Length

    2.Metric

    3.Administrative Distance.

    According to you, Post # 1

    "AD is the first criterion to determin which routing protocol to use when you learn the route information for a destination from two different routing protocols.  The routing protocol with the lower AD is added to the routing table.

    The router then chooses the longest prefix match amoung the routes to the same destination.

     

    Please find the attached file of " Aaron Balchunas"

     

    Regards,

    M.S.Khan.

     

    Message was edited by: Mohammed.Sidqathulla

  • Brian 2,971 posts since
    Aug 17, 2009

    Nice paper, but there are some fundamental errors.  Try reading the following document from Cisco.

     

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

     

    Basically you have the process of installing routes into the routing and the routing process it self.  The above document describes the process of building the routing table, which must occur first.  There are three things to consider when building the routing table, AD, metric and prefix length.

     

    Take the following topology and examples:

     

    Screenshot_best_path_selection.png

     

    In the diagram above, we have EIGRP on the link on the left, RIPv2 in the middle and OSPF on the right.  We enable RIPv2 first with "auto-summary" enabled.  The routing table output below for R1 shows only a single RIP route since this is the only route to the destination network 172.16.100.0/24.  However, since "auto-summary" is enabled in RIPv2, the route is automatically summarized to the "classful" network boundary.  Hence R3 advertises this as 172.16.0.0/16 and this is the route that is installed R1's routing table.

     

    RT1#sh ip rou

    Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

           E1 - OSPF external type 1, E2 - OSPF external type 2

           i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

           ia - IS-IS inter area, * - candidate default, U - per-user static route

           o - ODR, P - periodic downloaded static route

     

    Gateway of last resort is not set

     

    R    172.16.0.0/16 [120/1] via 192.168.3.3, 00:00:21, Serial1/1

    C    192.168.0.0/24 is directly connected, Loopback0

    C    192.168.1.0/24 is directly connected, Loopback1

    C    192.168.3.0/24 is directly connected, Serial1/1

    RT1#

     

    +++++++++++++++++++

     

    Next, we enable OSPF along with RIP.  The routing table output below for R1 shows two routes. One via RIPv2 with "auto-summary" enabled on Serial 1/1 and one via OSPF enabled on Serial 1/2.  Notice how there is a route to 172.16.100.0/24 learned via OSPF and the 172.16.0.0/16 route learned via RIPv2.  Both routes are in R1's routing table because they are of different prefix lengths, therefore seen as different destinations and considered separate routes.  This is a classic example of different destination or prefix-lengths.

     

    RT1#sh ip rou

    Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

           E1 - OSPF external type 1, E2 - OSPF external type 2

           i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

           ia - IS-IS inter area, * - candidate default, U - per-user static route

           o - ODR, P - periodic downloaded static route

     

    Gateway of last resort is not set

     

         172.16.0.0/16 is variably subnetted, 3 subnets, 3 masks

    O       172.16.4.4/32 [110/65] via 192.168.4.4, 00:00:06, Serial1/2

    R       172.16.0.0/16 [120/1] via 192.168.3.3, 00:00:07, Serial1/1

    O       172.16.100.0/24 [110/65] via 192.168.4.4, 00:00:06, Serial1/2

    C    192.168.4.0/24 is directly connected, Serial1/2

    C    192.168.0.0/24 is directly connected, Loopback0

    C    192.168.1.0/24 is directly connected, Loopback1

    C    192.168.2.0/24 is directly connected, Serial1/0

    C    192.168.3.0/24 is directly connected, Serial1/1

    RT1#

     

    ++++++++++++++++++++

     

    Next we disable "auto-summary" under the RIP routing process.  Now Router R3 advertises the 172.16.100.0/24 network instead of the "classful" default network of 172.16.0.0/16.  Now R1 has received two different routes to the same destination and therefore AD is used to decide which route to install in the routing table.  Since OSPF has a lower AD (110 vs 120) then RIP, the OSPF route is installed in the routing table.  This is a classic example of the same destination or same prefix-length.

     

    RT1#sh ip rou        

    Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

           E1 - OSPF external type 1, E2 - OSPF external type 2

           i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

           ia - IS-IS inter area, * - candidate default, U - per-user static route

           o - ODR, P - periodic downloaded static route

     

    Gateway of last resort is not set

     

         172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks

    O       172.16.4.4/32 [110/65] via 192.168.4.4, 00:04:43, Serial1/2

    R       172.16.3.0/24 [120/1] via 192.168.3.3, 00:00:08, Serial1/1

    O       172.16.100.0/24 [110/65] via 192.168.4.4, 00:04:43, Serial1/2

    C    192.168.4.0/24 is directly connected, Serial1/2

    C    192.168.0.0/24 is directly connected, Loopback0

    C    192.168.1.0/24 is directly connected, Loopback1

    C    192.168.2.0/24 is directly connected, Serial1/0

    C    192.168.3.0/24 is directly connected, Serial1/1

    RT1#

     

    ++++++++++++++++++++

     

    In the final example, we enable EIGRP between R1 and R2.  R1 now has received three different routes to the same destination.  One from R2, one from R3 and one from R4.  Now with three routes to the same destination the router must decide which route will be installed in the routing table.  Again, it is the AD that is used to decide which route to install.  The three AD are, 90 vs 110 vs 120, and therefore the lowest wins.  The EIGRP route is installed in R1s routing table.

     

    RT1#sh ip rou

    Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

           E1 - OSPF external type 1, E2 - OSPF external type 2

           i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

           ia - IS-IS inter area, * - candidate default, U - per-user static route

           o - ODR, P - periodic downloaded static route

     

    Gateway of last resort is not set

     

         172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks

    O       172.16.4.4/32 [110/65] via 192.168.4.4, 00:08:49, Serial1/2

    D       172.16.2.0/24 [90/2297856] via 192.168.2.2, 00:00:36, Serial1/0

    R       172.16.3.0/24 [120/1] via 192.168.3.3, 00:00:05, Serial1/1

    D       172.16.100.0/24 [90/2172416] via 192.168.2.2, 00:00:36, Serial1/0

    C    192.168.4.0/24 is directly connected, Serial1/2

    C    192.168.0.0/24 is directly connected, Loopback0

    C    192.168.1.0/24 is directly connected, Loopback1

    C    192.168.2.0/24 is directly connected, Serial1/0

    C    192.168.3.0/24 is directly connected, Serial1/1

    RT1#

     

    ++++++++++++++++++++

     

    Once the routing table is built, the routing process will route packets based on the longest match to the destination from all routes "installed" in the routing table,  This is where the prefix-length (longest match wins) is used to select the best path to the destination.  If there are two or more routes to the same destination learned via the same routing protocol, the route with the lowest metric is used to select the best path to the destination.  The AD is not used in the actual routing process, but is used by the router to "choose" which routes are installed in the router's routing table.  This must occur first, before we can even make a routing decision.

     

    I hope this helps explain the process a little it better.  However, the original question was in regard to BGP, which has its own Best Path Algorithm.

     

    Brian

  • Mohammed.Sidqathulla 5 posts since
    May 6, 2011
    Currently Being Moderated
    21. Jul 24, 2011 1:26 PM (in response to Brian)
    Re: BGP metrics and Administrative Distance

    Great Explanation Brian ! Thanks a Ton for clearing my confusion.

  • Flanger 3 posts since
    May 25, 2010
    Currently Being Moderated
    22. Jan 2, 2012 5:39 AM (in response to Brian)
    Re: BGP metrics and Administrative Distance

    Thank you very much for such a detailed explanation!

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)