To configure the Border Gateway Protocol (BGP), you can include the following statements. Three portions of the bgp statement—those in which you configure global BGP, group-specific, and peer-specific options—contain many of the same statements. The following simplified version of the bgp statement omits these repeated statements to present a high-level, readable overview:
- protocols {
-
-
bgp {
- ...global-bgp-configuration ...
-
-
group group-name {
-
peer-as autonomous-system;
-
type type;
- [network/mask-length ];
- ... peer-specific-configuration ...
-
-
neighbor address {
- ... peer-specific-configuration ...
- }
- }
- }
- }
For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.
For a list of global BGP statements, see Defining BGP Global Properties. For a list of group-specific statements, see Defining Group Properties. For a list of peer-specific statements, see Defining Peer Properties.
![]() |
Note: Changing configuration statements that affect BGP peerings, such as enabling or disabling remove-private or renaming a BGP group, resets the BGP sessions. Changes that affect BGP peerings should only be made when resetting a BGP session is acceptable. |
Many of the global BGP, group-specific, and peer-specific statements are identical. For statements that you can configure at more than one level in the hierarchy, the more-specific statement overrides the less-specific statement. That is, a group-specific statement overrides a global BGP statement, and a peer-specific statement overrides a global BGP or group-specific statement.
By default, BGP is disabled.
This chapter describes the following tasks for configuring BGP: