- An Overview of Confederation
Confederation is another means to limit the proliferation of IBGP session networks in AS. The same as route reflection, Confederation is recommended only when each router in the AS needs to establish a large number of IBGP peer-to-peer sessions.
The concept of BGP Confederation comes from the idea of dividing an AS into multiple sub-AS. Within each sub-AS, all IBGP rules are used. For example, all routers within the sub-AS must establish fully interconnected IBGP sessions. Although EBGP is run between sub-AS, the operation mode of intra Confederation routing is similar to that of IBGP routing within a single AS. In other words, when a route is exchanged across the sub-AS boundary, the MEd, next hop and local priority attributes of the route will remain intact. To the external network, the Confederation looks like a separate AS.
The BGP router in the sub-AS must establish a fully interconnected IBGP session. EBGP sessions must be established between sub-AS and between the Confederation itself and external AS. Since EBGP is run between sub-AS, the Confederation can easily detect the routing loop in the whole AS. As an anti-ring mechanism, the AS path list is used to enable the sub-AS to detect whether the received route updates contain its own sub-AS number.
- Deficiencies of Confederation
When cutting from non-Confederation to Confederation, the configuration and logical topology of routers are greatly changed, which is the main disadvantage of Confederation. In addition, without manually setting the BGP policy, routing is performed through Confederation, and the traffic may not “follow” the optimal path.
The Confederation appears as a separate AS. For an external AS that wants to forward traffic through the Confederation, the external AS knows nothing about the Confederation.
This is bound to mislead the external AS that selects routes according to the AS path length.
- Routing Switching and BGP Decision When Using Confederation
Although the sub-AS of the Confederation exchange routes through EBGP, in order to make the whole AS still operate like a single routing process domain, all IBGP rules are still applicable. Like Med and local priority values, the EBGP next hop of the route is still transmitted in AS unchanged.
As far as BGP decision algorithm is concerned, the only difference lies in the routing mode of BGP inside and outside the Confederation. Without Confederation, EBGP routing is better than IBGP routing. Once Confederation is introduced, a new EBGP route – Confederation external route is introduced between sub-AS. BGP selects optimal routing according to the following factors.
EBGP routing outside the Confederation > routing outside the Confederation >IBGP routing
Therefore, if BGP learns two routes to the same destination – one route leads to the outside of the Confederation, and the other passes through the entire Confederation – BGP will choose the former. In addition, if BGP learns two routes to the same destination from within and outside the sub-AS, BGP will choose the route outside the sub-AS. Of course, the premise is that all the attributes of the routes are the same.