How BGP Controls Route Flow with Diversification and Complexity

The BGP protocol is designed for routing between autonomous systems, but it can also be used within an autonomous system, making it a dual-purpose routing protocol.

Two BGP neighbors that communicate between autonomous systems must exist on the same physical link.

BGP routers within the same autonomous system can communicate with each other to ensure they all have the same information about the entire autonomous system. After exchanging information, they will determine which BGP router within the autonomous system will serve as the connection point responsible for receiving information from outside the autonomous system.

I. BGP is fundamentally a policy-based routing protocol. Its complexity does not stem from how difficult the routing algorithm is to learn but primarily from the diverse and complex methods used to control routing traffic flow. Any routing protocol must first solve the loop problem. OSPF and IS-IS use the SPF algorithm to solve it, while EIGRP’s algorithm is relatively novel, employing a diffusing update algorithm. BGP, in its design, uses many small techniques, focusing efforts on designing diverse control attributes.

II. A critical inherent attribute of BGP is AS_PATH. In BGP routing updates, the autonomous system (AS) numbers traversed are added to the update. This way, when BGP discovers that its own AS is among them, it can determine a loop has occurred. For EBGP, this consideration holds without major issues. However, in certain scenarios, problems can arise. Whether through manual or automatic BGP summarization attributes, if a route is summarized as 10.233.40.0/17 and transmitted to AS300, then passed back to AS100, from AS100’s perspective, the AS_PATH of this route is (300,200)鈥攊ts own AS is not included! This will lead to a routing loop.

III. The solution is to add the AS_SET attribute, so that the original AS_PATH attribute values are preserved even after route summarization (aggregation). This prevents routing loops. Using this flagging method prevents loops during inter-AS transmission. But the question then arises: what if this occurs within a single AS?

Within IBGP, everything revolves within a single AS from start to finish, and adding to AS_PATH is unnecessary. Therefore, in BGP, IBGP does not add the AS_PATH attribute. So how is this problem solved?

IV. The developers devised an ingenious approach: if IBGP neighbors only pass updates directly to adjacent peers, i.e., one-to-one. For example, I know A, and A knows B, but B and I do not know each other because A will not introduce me to the other party.

If BGP is defined this way, routes learned from an IBGP neighbor are not advertised to other IBGP neighbors. This inherently prevents loops because a loop simply cannot form鈥攊t’s all point-to-point paths.

V. At this point, we can consider the problem similarly to OSPF: just find a representative to solve it, which is the DR+BDR

Leave a Comment

Your email address will not be published.