Example: Configuring BGP Point-to-Point Peer Sessions
This example shows how to configure BGP Point-to-Point peer sessions.
Requirements
Before you begin:
- Configure network interfaces. See the Junos OS Interfaces Configuration Guide for Security Devices.
- Configure security filters. See the Junos OS Security Configuration Guide.
- Configure a routing policy to advertise the BGP routes.
Overview
Figure 1 shows a network with BGP peering sessions. In the sample network, a device in AS 17 has BGP peering sessions to a group of peers as external-peers. Peers A, B, and C reside in AS 22 and have IP addresses as 10.10.10.10, 10.10.10.11, and 10.10.10.12. Peer D resides in AS 79, at IP address 10.21.7.2.
Figure 27: Typical Network with BGP Peering Sessions

Configuration
CLI Quick Configuration
To quickly configure the BGP Point-to-Point Peering Sessions, copy the following commands and paste them into the CLI:
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode.
To configure the BGP peering sessions:
- Create a routing options.[edit]user@host# edit routing-options
- Set the AS number.[edit routing-options]user@host# set autonomous-system 17
- Configure BGP.[edit]user@host# edit protocols bgp
- Create the BGP group and add the external
neighbor address.[edit protocols bgp]user@host# set group external-peers neighbor 10.10.10.10

Note: Repeat Step 4 for each BGP neighbor (10.10.10.11 and 10.10.10.12) within the external peer group that you are configuring.
- Set the AS number at the group level.[edit protocols bgp]user@host# set group external-peers peer-as 22
- Set the AS number at the individual neighbor
level.[edit protocols bgp group external-peers]user@host# set neighbor 10.21.7.2 peer-as 79
- Set the group type.[edit protocols bgp group external-peers]user@host# set type external
Results
From configuration mode, confirm your configuration by entering the show protocols bgp command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Verifying a BGP Configuration
To confirm that the configuration is working properly, perform these tasks:
Verifying BGP Neighbors
Purpose
Verify that BGP is running on configured interfaces and that the BGP session is active for each neighbor address.
Action
From operational mode, enter the show bgp neighbor command.
Verifying BGP Groups
Purpose
Verify that the BGP groups are configured correctly.
Action
From operational mode, enter the show bgp group command.
Verifying BGP Summary Information
Purpose
Verify that the BGP configuration is correct.
Action
From operational mode, enter the show bgp summary command.
Related Topics
- Junos OS Feature Support Reference for SRX Series and J Series Devices
- Example: Configuring Internal BGP Peering Sessions
- BGP Configuration Overview
- Verifying a BGP Configuration
Hide Navigation Pane
Show Navigation Pane
Download
SHA1