Enhance your Career in Networking With IPinBits!!!​

BGP Split Horizon

BGP was build for Internet Routing keeping in mind, so when we see any rules or implication of BGP like why it is so slow, why there are so many rules like Synchronization , separate split horizon?

To answer this query again, BGP wasn’t build to work as IGP, it’s main purpose is Internet Routing, External Peering’s , Handle global routing tables, it’s not just about 5-10-100 routers, it nearly thousands and thousands of Routers, in which ISP’s have there Own policies and stuff.

So this rules are important, and we need to understand those, so it will help us when we are troubleshooting, learning BGP.”

“BGP split-horizon rule states that a BGP router that receives a BGP route via an iBGP peering shall not advertise that route to another router that is an iBGP peer.”

Lets see what this above Rule means Exactly, and if the routes are not advertised then how the routing would work, what are the various method to break the above rule, since prefixes need to be advertised.

Let’s take the above Topology, to see how BGP Split Horizon works.

  • Here we have EBGP Between R1-R2, R1-R3. IBGP Between R2-R4, R4-R5, we will check the prefixes 10.1.1.0/24 and 10.1.2.0/24 (basically loopback I created for testing), to see the how Split horizon rule works, and how we can overcome it.
  • R2 has an iBGP peering with R4 and that R4 has an iBGP peering with R5. When R2 advertises the 10.1.1.0/24 network (as an example) to R4, it is via an iBGP peering. Because R4 and R5 are iBGP peers, R4 will not advertise the 10.1.1.0/24 network to R5 because of the BGP split-horizon rule.
  • But R5 has to learn this prefix 10.1.1.0/24, in order to communicate with R1, so R5 has to have an IBGP peering to the router (it can be direct/indirect BGP capabilities for IBGP peering) who has learned this route from R1, in this above case its R2 and R3 , we can use either of the router’s to peer up an IBGP session.
  • So here for R5 to learn the router 10.1.1.0/24 from R1, each and every router should have Mesh IBGP session. So, it can forward the route accordingly.

But this is ok for 4/5 routers, what if we have 100/1000’s of routers,

IBGP Session = n*(n-1)/2

                        =100(100-1)/2 = 4950 (Just IBGP sessions)

Although this solution works, but its not scalable when it comes to thousands of router, so they we have 2 other ways to overcome this scenarios,

1.Using Router Reflectors

2.Using AS-Confederations.

The method you will in most of the networks is RR i.e. Router Reflectors, we will have separate blog for this methods. The below output, is taken when we have full mesh IBGP session and R5 is now able to get R1’s route. 

R5#show bgp ipv4 unicast
BGP table version is 10, local router ID is 5.5.5.5
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
 * i 1.1.1.1/32       3.3.3.3                  0    100      0 100 ?
 *>i                  2.2.2.2                  0    100      0 100 ?
 * i 10.1.1.0/24      3.3.3.3                  0    100      0 100 i
 *>i                  2.2.2.2                  0    100      0 100 i
 * i 10.1.2.0/24      3.3.3.3                  0    100      0 100 i
 *>i                  2.2.2.2                  0    100      0 100 i

This is all about BGP Split Horizon Rule, hope you liked it, stay tuned folks for more such articles !!!

Related blog posts