8

I have been searching this on the web. It is generally expressed as by default, iBGP does not propagate routes learned via other iBGP neighbors. I am trying to understand the underlying reason.

The answers I have found are somewhat circular: the routes are not propagated because BGP has a full mesh connection.

Why BGP has a full mesh connection?

-Because routes are not propagated.

Can someone elaborate on the underlying design cause?

3 Answers 3

7

The reason is to prevent routing loops. BGP routers don't advertise routes learned from iBGP neighbor A on to a second iBGP neighbor C. This is specified in the BGP RFC 4271 §9.2 paragraph 2. To illustrate:

+-------+            +-------+            +---------+
| RTR A |----iBGP----| RTR B |----eBGP----| TRANSIT |
+-------+            +-------+            +---------+
                         |
                        iBGP
                         |
                     +-------+
                     | RTR C |
                     +-------+
  • RTR B won't propagate routes from A to C or vise-versa.
  • RTR B will propagate routes from A and C to TRANSIT.
  • RTR B will propagate routes from TRANSIT to A and C.

It's required to have an additional iBGP session between routers A and C for the network to function properly, or use route-reflection or confederation, which allows B to propagate routes from A to C, while adding some additional loop prevention complexity.

The requirement for an iBGP session between routers A and C does not mean there needs to be an actual layer-2 network connection between them. iBGP is designed to operate over multiple hops across your backbone network.

0
5

Just wanted to expand a little bit...

illustration

BGP heavily relies on AS numbers when it comes to loop prevention. If there are multiple routers within the AS, they by definition are sharing the same ASN, making it impossible to rely upon ASN to prevent loops between them. That's why something else should be designed -- routes received from routers with the same ASN are simply not propagated back to routers of that AS. That's where full mesh becomes a requirement so that BGP tables on all iBGP participants stay consistent.

http://network.jecool.net/bgp-loop-prevention/

In BGP there are two loop prevention mechanism:

  • for EBGP there is AS-Path attribute which states that router will drop BGP advertisement when it sees it own AS number in AS path
    attribute
  • for IBGP there is split horizon rule which states that update sent by one IBGP neighbor should be not send to another IBGP
    neighbor

Quite an important piece of already mentioned RFC 4271: https://www.rfc-editor.org/rfc/rfc4271#section-5.1.2.

   AS_PATH is a well-known mandatory attribute.  This attribute
   identifies the autonomous systems through which routing information
   carried in this UPDATE message has passed.  The components of this
   list can be AS_SETs or AS_SEQUENCEs.

   When a BGP speaker propagates a route it learned from another BGP
   speaker's UPDATE message, it modifies the route's AS_PATH attribute
   based on the location of the BGP speaker to which the route will be
   sent:

      a) When a given BGP speaker advertises the route to an internal
         peer, the advertising speaker SHALL NOT modify the AS_PATH
         attribute associated with the route.

      b) When a given BGP speaker advertises the route to an external
         peer, the advertising speaker updates the AS_PATH attribute as
         follows:

         1) if the first path segment of the AS_PATH is of type
            AS_SEQUENCE, the local system prepends its own AS number as
            the last element of the sequence (put it in the leftmost
            position with respect to the position of octets in the
            protocol message).  If the act of prepending will cause an
            overflow in the AS_PATH segment (i.e., more than 255 ASes),
            it SHOULD prepend a new segment of type AS_SEQUENCE and
            prepend its own AS number to this new segment.

         2) if the first path segment of the AS_PATH is of type AS_SET,
            the local system prepends a new path segment of type
            AS_SEQUENCE to the AS_PATH, including its own AS number in
            that segment.

         3) if the AS_PATH is empty, the local system creates a path
            segment of type AS_SEQUENCE, places its own AS into that
            segment, and places that segment into the AS_PATH.
-1

This is the Split-Horizon rule for iBGP. The overall idea behind this is that BGP is meant to be a Border protocol literally, and your AS is supposed to be like your Home turf. eBGP is more like outsiders. BGP does not want to get too hung up on the intricacies of routing WITHIN your AS, and expects you to have that stuff managed by an IGP. So Think of your AS as your House. If your mom yells Dinner is ready, you don't go knock on your brother and sisters doors (iBGP neighbors) to let them know she said that, you are assuming that they have their own rapport with mom. If Guests (eBGP neighbors) are over, on the other hand, your spouse says Dinner is ready, you make a point to let each individual guest know that because they are not IN the 'circle of trust'. This is a very silly analogy but it really works in my head to understand why that happens.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.