Example: Configuring Internal BGP Peering Sessions
This example shows how to configure internal BGP 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 point-to-point peer sessions. See Example: Configuring BGP Point-to-Point Peer Sessions.
Overview
In this example you configure internal BGP peer sessions. Connections between peering networks are typically made through an exterior gateway protocol (EGP), most commonly BGP. BGP is an EGP used primarily to establish point-to-point connections and transmit data between peer autonomous systems. Unlike RIP and OSPF links, BGP peering sessions must be explicitly configured at both ends. BGP must explicitly advertise the routes between its peers. The route advertisements determine prefix reachability and the way packets are routed between BGP neighbors. Because BGP uses the packet path to determine route selection, it is considered a path-vector protocol.
In the sample network, the device in AS 17 is fully meshed with its internal peers in the group internal-peers, which have IP addresses as 192.168.6.4, 192.168.6.5, 192.168.6.6, 192.168.6.7 and 192.168.40.4.
Figure 1 shows a typical network with external and internal peer sessions.
Figure 28: Typical Network with EBGP External Sessions and IBGP Internal Sessions

Configuration
CLI Quick Configuration
To quickly configure internal BGP 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 internal BGP peer sessions:
- Configure BGP.[edit]user@host# edit protocols bgp
- Create the BGP group.[edit protocols bgp]user@host# set group internal-peers
- Add the internal neighbor address.[edit protocols bgp]user@host# set neighbor 192.168.6.4

Note: Repeat Step 2 for each internal BGP neighbor (192.168.6.5, 192.168.6.6, 192.168.6.7, and 192.168.40.4) within the network.
- Set the group type.[edit protocols bgp]user@host# set type internal
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.
Verification
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 the operational mode, enter the show bgp neighbor command.
Verifying BGP Groups
Purpose
Verify that the BGP groups are configured correctly.
Action
From the operational mode, enter the show bgp group command.
Verifying BGP Summary Information
Purpose
Verify that the BGP configuration is correct.
Action
From the operational mode, enter the show bgp summary command.
Related Topics
- Junos OS Feature Support Reference for SRX Series and J Series Devices
- show bgp neighbor in the Junos Routing Protocols and Policies Command Reference
- show bgp summary in the Junos Routing Protocols and Policies Command Reference
- show bgp group in the Junos Routing Protocols and Policies Command Reference
- ping in the Junos System Basics and Services Command Reference
Hide Navigation Pane
Show Navigation Pane
Download
SHA1