BGP Next-hop & iBGP switching

sh ip bgp

R1#sh ip bgp
BGP table version is 6, 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, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
     0.0.0.0          0.0.0.0                                0 i
 r>  1.1.1.0/30       20.20.20.1               0             0 20 ?
 r>  20.20.20.0/24    20.20.20.1               0             0 20 ?
 *>  30.30.30.0/24    20.20.20.1               0             0 20 ?
 *>i 40.40.40.0/24    1.1.2.2                  0    100      0 i

  • routes starting with * is a good route. can be advertized
  • routes starting wth r> RIB-failure. (Routing information Base failure)
    • Route already in routing table
    • Memory problem
    • Administrative boundries on table size
  • routes with > is best route for that prefix
  • routes with i is via iBGP (internal)
  • the next-hop with 0.0.0.0 means this router has that route (non-BGP) called a locally-originated route.

BGP rules for advertising of routes

  • Only advertise the best route in any BGP update.
  • Do not advertise iBGP-learned routes to iBGP peers.
    •  (Prevents routing loops).
    • Must be full mesh because of this.
      • 1 <-> 2 <->3   (2 can’t update to 3)
  • Local AS is not prepended.
  • eBGP: next-hop is updated.
  • iBGP: next-hop is not updated.

iBGP peers must have IGP reachability to the next-hops, if not:

  • iBGP-learned routes will not be installed in the IP Routing Table.
  • iBGP-learned routes will not be advertised to any other BGP peer.
  • Viewable via “show ip bgp 30.30.30.0/24” as “inaccessible“.
     Network          Next Hop            Metric LocPrf Weight Path
 *>i 1.1.1.0/30       20.20.20.1               0    100      0 20 ?
 *>i 20.20.20.0/24    20.20.20.1               0    100      0 20 ?
 *>i 30.30.30.0/24    20.20.20.1               0    100      0 20 ?

R3#sh ip bgp 30.30.30.0
BGP routing table entry for 30.30.30.0/24, version 6
Paths: (1 available, no best path)
  Not advertised to any peer
  Refresh Epoch 1
  20, (received & used)
    20.20.20.1 (inaccessible) from 1.1.2.1 (10.10.10.1)
      Origin incomplete, metric 0, localpref 100, valid, internal
      rx pathid: 0, tx pathid: 0

R1(config-router)#neighbor 1.1.2.2 next-hop-self

     Network          Next Hop            Metric LocPrf Weight Path
 *>i 1.1.1.0/30       1.1.2.1                  0    100      0 20 ?
 *>i 20.20.20.0/24    1.1.2.1                  0    100      0 20 ?
 *>i 30.30.30.0/24    1.1.2.1                  0    100      0 20 ?

Total number of prefixes 3
R3#
R3#sh ip bgp 30.30.30.0
BGP routing table entry for 30.30.30.0/24, version 4
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  Refresh Epoch 1
  20, (received & used)
    1.1.2.1 from 1.1.2.1 (10.10.10.1)
      Origin incomplete, metric 0, localpref 100, valid, internal, best
      rx pathid: 0, tx pathid: 0x0

 

Add a Comment

Your email address will not be published. Required fields are marked *


CAPTCHA Image
Reload Image