This section provides information to configure BGP using the command line interface.
Before BGP can be implemented, the following entities must be configured:
BGP is configured in the config>router>bgp context. Three hierarchical levels are included in BGP configurations:
Commands and parameters configured on the global level are inherited to the group and neighbor levels although parameters configured on the group and neighbor levels take precedence over global configurations.
A BGP system is comprised of ASs which share network reachability information. Network reachability information is shared with adjacent BGP systems neighbors. Further logical groupings are established within BGP systems within ASs. BGP supports two types of routing information exchanges:
This section provides information to configure BGP and configuration examples of common configuration tasks. The minimal BGP parameters that need to be configured are:
The BGP configuration commands have three primary configuration levels: bgp for global configurations, group name for BGP group configuration, and neighbor ip-address for BGP neighbor configuration. Within the different levels, many of the configuration commands are repeated. For the repeated commands, the command that is most specific to the neighboring router is in effect, that is, neighbor settings have precedence over group settings which have precedence over BGP global settings.
The following is a sample configuration that includes the preceding parameters. The following parameters are optional.
This section provides a brief overview of the tasks that must be performed to configure BGP and provides the CLI commands. To enable BGP, one AS must be configured and at least one group must be configured which includes neighbor (system or IP address) and peering information ASN.
Configure BGP hierarchically, the global level (applies to all peers), the group level (applies to all peers in peer-group), or the neighbor level (only applies to specified peer). By default, group members inherit the group’s configuration parameters although a parameter can be modified on a per-member basis without affecting the group-level parameters.
Many of the hierarchical BGP commands can be used on different levels. The most specific value is used. That is, a BGP group-specific command takes precedence over a global BGP command. A neighbor-specific statement takes precedence over a global BGP or group-specific command.
All BGP instances must be explicitly created on each node. When created, BGP is administratively enabled.
Configuration planning is essential to organize ASs and the 7210 nodes within the ASs, and determine the internal and external BGP peering.
To configure a basic autonomous system, perform the following tasks:
Before BGP can be configured, the autonomous system must be configured first. In BGP, routing reachability information is exchanged between autonomous systems (ASs). An AS is a group of networks that share routing information. The autonomous-system command associates an autonomous system number to the router being configured. A 7210 SAS device can only belong to one AS. The autonomous-system command is configured in the config>router context.
Use the following syntax to associate a 7210 SAS device to an autonomous system.
The 7210 SAS devise supports 4 bytes AS numbers by default. This means autonomous-system can have any value from 1 to 4294967295. The following shows the command usage to configure the autonomous system.
The following is a sample autonomous system configuration output.
In BGP, routing information is exchanged between autonomous systems. The BGP router ID, expressed like an IP address, uniquely identifies the router. It can be set to be the same as the loopback address.
Note that if a new or different router ID value is entered in the BGP context, then the new router ID value is used instead of the router ID configured on the router level, system interface level, or inherited from the MAC address. The router-level router ID value remains intact. A router ID can be derived by:
When configuring a new router ID, protocols are not automatically restarted with the new router ID. The next time a protocol is (re) initialized the new router ID is used. An interim period of time can occur when different protocols use different router IDs. To force the new router ID, issue the shutdown and no shutdown commands for each protocol that uses the router ID or restart the entire router. Use the following CLI syntax to configure the router ID:
The following shows the command usage to configure router ID.
The following is a sample router ID configuration output.
The following section describes the syntax used to configure the BGP components.
When the BGP protocol instance is created, the no shutdown command is not required since BGP is administratively enabled upon creation. Minimally, to enable BGP on a router, you must associate an autonomous system number for the router, have a preconfigured router ID or system interface, create a peer group, neighbor, and associate a peer ASN. There are no default groups or neighbors. Each group and neighbor must be explicitly configured.
All parameters configured for BGP are applied to the group and are inherited by each peer, but a group parameter can be overridden on a specific basis. BGP command hierarchy consists of three levels:
![]() | Note: Careful planning is essential to implement commands that can affect the behavior of global, group, and neighbor levels. Because the BGP commands are hierarchical, analyze the values that can disable features on a particular level. |
The following is a sample basic BGP configuration output.
A group is a collection of related BGP peers. The group name should be a descriptive name for the group. Follow your group, name, and ID naming conventions for consistency and to help when troubleshooting faults.
All parameters configured for a peer group are applied to the group and are inherited by each peer (neighbor), but a group parameter can be overridden on a specific neighbor-level basis.
The following is a sample BGP group configuration output.
After you create a group name and assign options, add neighbors within the same autonomous system to create IBGP connections and/or neighbors in different autonomous systems to create EBGP peers. All parameters configured for the peer group level are applied to each neighbor, but a group parameter can be overridden on a specific neighbor basis.
The following is a sample output for neighbors configured in group “headquarters1”.
The AIGP metric is an optional, non-transitive attribute that can be attached to selected routes using route policies. In networks that use AIGP, BGP paths with a lower end-to-end IGP cost are preferred, even if the compared paths span more than one AS or IGP instance.
AIGP is supported only in the base router BGP instance and only for label-IPv4 and 6PE routes. The AIGP attribute is only sent to peers configured using the configure>router>bgp>group>aigp and configure>router>bgp>group>neighbor>aigp commands.
The following is a sample BGP policy configuration output with AIGP attribute information included.
The following is a sample BGP instance configuration output with AIGP attribute information included.
This section describes the BGP configuration management tasks.
You can modify an ASN on a 7210 SAS but the new ASN will not be used until the BGP instance is restarted either by administratively disabling or enabling the BGP instance or by rebooting the system with the new configuration.
Since the ASN is defined in the config>router context, not in the BGP configuration context, the BGP instance is not aware of the change. Re-examine the plan detailing the autonomous system the SRs belonging to each group, group names, and peering connections. Changing an ASN on a 7210 SAS could cause configuration inconsistencies if associated peer-as values are not also modified as required. At the group and neighbor levels, BGP will re-establish the peer relationships with all peers in the group with the new ASN.
Use the following syntax to change an ASN.
Changing the router ID number in the BGP context causes the new value to overwrite the router ID configured on the router level, system interface level, or the value inherited from the MAC address. Changing the router ID on a router could cause configuration inconsistencies if associated values are not also modified.
When configuring a new router ID, protocols are not automatically restarted with the new router ID. The next time BGP is (re) initialized the new router ID is used. To force the new router ID, issue the shutdown and no shutdown commands for BGP or restart the entire router.
The following is a sample BGP configuration output with the BGP router ID specified.
Changing the router ID number in the config>router context causes the new value to overwrite the router ID configured on the protocol level, system interface level, or the value inherited from the MAC address. Changing the router ID on a router could cause configuration inconsistencies if associated values are not also modified.
When configuring a new router ID, protocols are not automatically restarted with the new router ID. The next time a protocol is (re) initialized the new router ID is used. An interim period of time can occur when different protocols use different router IDs. To force the new router ID, issue the shutdown and no shutdown commands for each protocol that uses the router ID or restart the entire router.
Use the following syntax to change a router ID.
The following is a sample router ID configuration output.
To delete a neighbor, you must shut down the neighbor before issuing the no neighbor ip-addr command.
Use the following syntax to delete a neighbor.
The following is a sample of the “headquarters1” configuration output with the neighbor 10.0.0.103 removed.
To delete a group, the neighbor configurations must be shut down first. After each neighbor is shut down, you must shut down the group before issuing the no group name command.
Use the following syntax to shut down a peer and neighbor and then delete a group.
If you try to delete the group without shutting down the peer-group, the following message appears.
You can change existing BGP parameters in the CLI. The changes are applied immediately.
See BGP Components for a complete list of BGP parameters.