Example: Configuring External BGP Point-to-Point Peer Sessions


This example shows how to configure BGP point-to-point peer sessions.


Before you begin, if the default BGP policy is not adequate for your network, configure routing policies to filter incoming BGP routes and to advertise BGP routes.


Figure 1 shows a network with BGP peer sessions. In the sample network, Device E in AS 17 has BGP peer sessions to a group of peers called external-peers. Peers A, B, and C reside in AS 22 and have IP addresses,, and Peer D resides in AS 79, at IP address This example shows the configuration on Device E.

Figure 1: Typical Network with BGP Peer Sessions
Typical Network with
BGP Peer Sessions


CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure the BGP peer sessions:

  1. Configure the interfaces to Peers A, B, C, and D.
  2. Set the autonomous system (AS) number.
  3. Create the BGP group, and add the external neighbor addresses.
  4. Specify the autonomous system (AS) number of the external AS.
  5. Add Peer D, and set the AS number at the individual neighbor level.

    The neighbor configuration overrides the group configuration. So, while peer-as 22 is set for all the other neighbors in the group, peer-as 79 is set for neighbor

  6. Set the peer type to external BGP (EBGP).


From configuration mode, confirm your configuration by entering the show interfaces, show protocols, and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

If you are done configuring the device, enter commit from configuration mode.


Confirm that the configuration is working properly.

Verifying BGP Neighbors


Verify that BGP is running on configured interfaces and that the BGP session is active for each neighbor address.


From operational mode, run the show bgp neighbor command.

user@E> show bgp neighbor

Verifying BGP Groups


Verify that the BGP groups are configured correctly.


From operational mode, run the show bgp group command.

user@E> show bgp group

Verifying BGP Summary Information


Verify that the BGP configuration is correct.


From operational mode, run the show bgp summary command.

user@E> show bgp summary