Skip navigation
Cisco Learning Home > CCIP Study Group > Discussions
3322 Views 49 Replies Latest reply: Apr 16, 2012 12:58 PM by Joshua Johnson - CCNP R&S RSS Go to original post 1 2 3 4 Previous Next

Currently Being Moderated
  • Martin 13,077 posts since
    Jan 16, 2009

    Third hop rule says if routers are on the same L2 network, BGP router uses the appropriate address as the next-hop address (by changing the next-hop attribute) to avoid inserting additional hopsinto the path.

     

    you are seeing is normal behaviour for BGP when all routers are connected to the same network.

     

    Let me do my own test in about 45 minutes (gotta go to a meeting)

  • Martin 13,077 posts since
    Jan 16, 2009

    Test 1 with iBGP:

    R1 R2 R3 are on 10.10.10.0/24; R1 and R2 are iBGP; R2 and R3 are OSPF. R2 is advertising 11.11.11.0 network to R1 via BGP. vR2 is also advertising its loopback.

     

    R1 gets it and changes source to R3 (not R2) for 11.11.11.0 but not for 2.2.2.2 (R2's loopback).

     

    R1#sh ip bgp

    BGP table version is 5, local router ID is 10.10.10.1

     

       Network          Next Hop            Metric LocPrf Weight Path

    *>i2.2.2.2/32       10.10.10.2               0    100      0 i

    r>i10.10.10.0/24    10.10.10.2               0    100      0 i

    *>i11.11.11.0/24    10.10.10.3              20    100      0 i

    R1#

     

    Test 2 with EBGP;

     

    R1#sh ip bgp summary

    BGP router identifier 10.10.10.1, local AS number 1

    BGP table version is 12, main routing table version 12

    3 network entries using 360 bytes of memory

    3 path entries using 156 bytes of memory

    3/2 BGP path/bestpath attribute entries using 372 bytes of memory

    1 BGP AS-PATH entries using 24 bytes of memory

    0 BGP route-map cache entries using 0 bytes of memory

    0 BGP filter-list cache entries using 0 bytes of memory

    BGP using 912 total bytes of memory

    BGP activity 6/3 prefixes, 6/3 paths, scan interval 60 secs

     

    Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

    10.10.10.2      4     2       7       6       12    0    0 00:01:56        3

    R1#sh ip bgp

    BGP table version is 12, local router ID is 10.10.10.1

    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

    *> 2.2.2.2/32       10.10.10.2               0             0 2 i

    r> 10.10.10.0/24    10.10.10.2               0             0 2 i

    *> 11.11.11.0/24    10.10.10.3              20             0 2 i

    R1#

    R1#sh ip bgp 11.11.11.0

    BGP routing table entry for 11.11.11.0/24, version 11

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

    Flag: 0x820

      Not advertised to any peer

      2

        10.10.10.3 from 10.10.10.2 (2.2.2.2)

          Origin IGP, metric 20, localpref 100, valid, external, best

    R1#

    R1#sh run | s router

    router bgp 1

    no synchronization

    bgp log-neighbor-changes

    neighbor 10.10.10.2 remote-as 2

    no auto-summary

     

    R2#sh run | b router

    router ospf 1

    log-adjacency-changes

    network 10.10.10.0 0.0.0.255 area 0

    !

    router bgp 2

    no synchronization

    bgp log-neighbor-changes

    network 2.2.2.2 mask 255.255.255.255

    network 10.10.10.0 mask 255.255.255.0

    network 11.11.11.0 mask 255.255.255.0

    neighbor 10.10.10.1 remote-as 1

    no auto-summary

     

    To Sum-up: 3rd hot rule applies if routers are on same subnet; Works for either iBGP or eBGP peerings.

    Attachments:
  • Martin 13,077 posts since
    Jan 16, 2009

    cannot open your file even after converting / into \ for windows; no access to Ubuntu at the moment;

     

    next-hop-self is a fix for this phenomenon when it happens

     

    nothing about this in other books?

  • Martin 13,077 posts since
    Jan 16, 2009

    I know,  I will try again it soon;

  • chris_lei 37 posts since
    Jun 26, 2008

    Hi,

     

    have a look at http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800c95bb.shtml

     

    section BGP Next Hop (Multiaccess Networks) there it is EBGP.

     

    I think it makes no difference if IBGP or EBGP, it is used to avoid an extra hop on MA networks.

     

    Where do you got the "the 3rd hop rule"  from? Any book or just self created?

  • chris_lei 37 posts since
    Jun 26, 2008

    Hi,

     

    I used BGP 3rd hop rule.zip

     

    If you configure an EBGP session between r1 and r3 ( AS3) you see the following on r3 wich has no session to r2

     

    R3#sh ip bgp summary

    BGP router identifier 3.3.3.3, local AS number 3

    BGP table version is 6, main routing table version 6

    3 network entries using 360 bytes of memory

    3 path entries using 156 bytes of memory

    2/1 BGP path/bestpath attribute entries using 248 bytes of memory

    1 BGP AS-PATH entries using 24 bytes of memory

    0 BGP route-map cache entries using 0 bytes of memory

    0 BGP filter-list cache entries using 0 bytes of memory

    BGP using 788 total bytes of memory

    BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

     

    Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

    10.10.10.1      4     1      22      20        6    0    0 00:16:11        3

     

     

    r3# sh ip bgp

    BGP table version is 6, local router ID is 3.3.3.3

    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

    *> 2.2.2.2/32       10.10.10.2                             0 1 2 i

     

    10.10.10.2  is IP of r2

     

    so r3 goes direct to r2 not over r1

     

    R3#sh ip route

    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

     

         2.0.0.0/32 is subnetted, 1 subnets

    B       2.2.2.2 [20/0] via 10.10.10.2, 00:13:32

     

     

    You can test if IPBGP works the same by changing the setup.

     

     

    Hope this helps.

  • Martin 13,077 posts since
    Jan 16, 2009

    "the 3rd hop rule" in my post # 8 is actually from D.Teare "BSCI" 2007 Cisco Press book. She did wrote "sometimes" called such.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)