Configuration Condition
Before configuring a large-scale BGP network, ensure that:
- BGP is enabled.
- BGP neighbors are configured and a session is set up successfully.
Configure a BGP Peer Group
A BGP peer group is a group of BGP neighbors that are configured with the same configuration policy. Any configuration that is performed on a BGP peer group will take effect on all members of the peer group. In this way, by configuring the peer group, you can perform centralized management and maintenance on the neighbors.
Table 12-41 Configure a BGP peer group
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Enter the BGP configuration mode.
|
router bgp autonomous-system
|
-
|
Create a BGP peer group.
|
neighbor peer-group-name peer-group
|
Mandatory.
By default, no peer group is configured, and a neighbor is not in any peer group.
|
Add a neighbor into the peer group.
|
neighbor neighbor-address peer-group peer-group-name
|
-
The configuration on a peer group takes effect on all members of the peer group.
- After a neighbor is added into a peer group, if some configurations of the neighbor are the same as the configurations of the peer group, the configurations of the neighbor are deleted.
- If routing policies are configured in the incoming and outgoing directions of a peer group, after the routing policies are changed, the changes do not take effect on the neighbors that have been added into the peer group. To apply the changed routing policies on the peer group members, you need to reset the peer group.
Configure a BGP Route Reflector
In a large-scale BGP network, it is required that IBGP neighbors are fully connected, that is, each BGP needs to set up connections with all IBGP neighbors. In this way, in a network which contains N BGP neighbors, the number of BGP connections is N*(N-1)/2. The larger the number of connections is, the larger the number of route advertisements is. Configuring a BGP Route Reflector (RR) is a method of reducing the number of network connections. Multiple IBGPs are categorized into a group. In this group, a BGP is specified to act as the RR, while other BGPs act as client, and BGPs that are not in the group act as non-clients. Clients set up peer relations only with the RR while they do not set up peer relations with other BGPs. This reduces the number of mandatory IBGP connections, and the number of connections is N-1.
The following shoes the routing principles of the BGP RR:
- The RR reflects the routes that it learns from non-client IBGP neighbors only to clients.
- The RR reflects the routes that it learns from clients to all clients and non-clients except the clients that initiate the routes.
- The RR reflects the routes that it learns from EBGP neighbors to all clients and non-clients.
Table 12-42 Configure a BGP route reflector
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Enter the BGP configuration mode.
|
router bgp autonomous-system
|
-
|
Configure an RR cluster ID.
|
bgp cluster-id { cluster-id-in-ip | cluster-id-in-num }
|
Mandatory.
By default, the route ID is used as the RR cluster ID.
|
Configure a client as a client of the RR.
|
neighbor { neighbor-address | peer-group-name } route-reflector-client
|
Mandatory.
By default, no client is specified as a client of the RR.
|
Configure the route reflection function between BGP neighbors.
|
bgp client-to-client reflection
|
Optional.
By default, the route reflection function is enabled between RR clients.
|
-
An RR cluster ID is used to identify an RR area. An RR area can contain multiple RRs, and the RRs in the RR area have the same RR cluster ID.
Configure a BGP Confederation
In a large-scale BGP network, it is required that IBGP neighbors are fully connected, that is, each BGP needs to set up connections with all IBGP neighbors. In this way, in a network which contains N BGP neighbors, the number of BGP connections is N*(N-1)/2. The larger the number of connections is, the larger the number of route advertisements is. Configuring BGP confederations is another way of reducing the number of network connections. An AS area is divided into multiple sub-AS areas and each AS area forms a confederation. IBGP is adopted within a confederation to provide full connections, and sub-AS areas in the confederation are connected through EBGP connections. This effectively reduces the number of BGP connections.
In configuring BGP confederations, you need to assign a confederation ID for each confederation and specify members for the confederation. In the case of route reflection, only the route reflector is required to support route reflection. However, in the case of a confederation, all members in a confederation must support the confederation function.
Table 12-43 Configure a BGP confederation
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Enter the BGP configuration mode.
|
router bgp autonomous-system
|
-
|
Create a BGP confederation ID.
|
bgp confederation identifier as-number
|
Mandatory.
By default, no AS number is configured for a confederation.
|
Configure members for the confederation.
|
bgp confederation peers as-number-list
|
Mandatory.
By default, no sub-AS number is configured for a confederation.
|
-
A confederation ID is used to identify the sub-ASs of the confederation. Confederation members are divided into the sub-ASs.