Related Documentation
- ACX, M, MX, T Series
- Understanding Internal BGP Peering Sessions
- ACX, J, M, MX, SRX Series
- BGP Configuration Overview
Example: Configuring Internal BGP Peering Sessions on Logical Systems
This example shows how to configure internal BGP peer sessions on logical systems.
Requirements
In this example, no special configuration beyond device initialization is required.
Overview
In this example, you configure internal BGP (IBGP) peering sessions.
In the sample network, the devices in AS 17 are fully meshed in the group internal-peers. The devices have loopback addresses 192.168.6.5, 192.163.6.4, and 192.168.40.4.
Figure 1 shows a typical network with internal peer sessions.
Figure 1: Typical Network with IBGP Sessions

Configuration
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.
Device A
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 internal BGP peer sessions on Device A:
- Configure the interfaces.[edit logical-systems A interfaces lt-0/1/0 unit 1]user@R1# set description to-Buser@R1# set encapsulation ethernetuser@R1# set peer-unit 2user@R1# set family inet address 10.10.10.1/30user@R1# set family inet address 192.168.6.5/32user@R1# upuser@R1# up[edit logical-systems A interfaces]user@R1# set lo0 unit 1 family inet address 192.168.6.5/32user@R1# exit[edit]user@R1# edit logical-systems B interfaces lt-0/1/0[edit logical-systems B interfaces lt-0/1/0]user@R1# set unit 2 description to-Auser@R1# set unit 2 encapsulation ethernetuser@R1# set unit 2 peer-unit 1user@R1# set unit 2 family inet address 10.10.10.2/30user@R1# set unit 5 description to-Cuser@R1# set unit 5 encapsulation ethernetuser@R1# set unit 5 peer-unit 6user@R1# set family inet address 10.10.10.5/30user@R1# up[edit logical-systems B interfaces]user@R1# set lo0 unit 2 family inet address 192.163.6.4/32user@R1# exit[edit]user@R1# edit logical-systems C interfaces lt-0/1/0 unit 6[edit logical-systems C interfaces lt-0/1/0 unit 6]set description to-Bset encapsulation ethernetset peer-unit 5set family inet address 10.10.10.6/30user@R1# upuser@R1# up[edit logical-systems C interfaces]set lo0 unit 3 family inet address 192.168.40.4/32
- Configure BGP.
On Logical System A, the neighbor statements are included for both Device B and Device C, even though Logical System A is not directly connected to Device C.
[edit logical-systems A protocols bgp group internal-peers]user@R1# set type internaluser@R1# set local-address 192.168.6.5user@R1# set export send-directuser@R1# set neighbor 192.163.6.4user@R1# set neighbor 192.168.40.4
[edit logical-systems B protocols bgp group internal-peers]user@R1# set type internaluser@R1# set local-address 192.163.6.4user@R1# set export send-directuser@R1# set neighbor 192.168.40.4user@R1# set neighbor 192.168.6.5
[edit logical-systems C protocols bgp group internal-peers]user@R1# set type internaluser@R1# set local-address 192.168.40.4user@R1# set export send-directuser@R1# set neighbor 192.163.6.4user@R1# set neighbor 192.168.6.5 - Configure OSPF.[edit logical-systems A protocols ospf area 0.0.0.0]user@R1# set interface lo0.1 passiveuser@R1# set interface lt-0/1/0.1
[edit logical-systems A protocols ospf area 0.0.0.0]user@R1# set interface lo0.2 passiveuser@R1# set interface lt-0/1/0.2user@R1# set interface lt-0/1/0.5
[edit logical-systems A protocols ospf area 0.0.0.0]user@R1# set interface lo0.3 passiveuser@R1# set interface lt-0/1/0.6 - Configure a policy that accepts direct routes.
Other useful options for this scenario might be to accept routes learned through OSPF or local routes.
[edit logical-systems A policy-options policy-statement send-direct term 2]user@R1# set from protocol directuser@R1# set then accept
[edit logical-systems B policy-options policy-statement send-direct term 2]user@R1# set from protocol directuser@R1# set then accept
[edit logical-systems C policy-options policy-statement send-direct term 2]user@R1# set from protocol directuser@R1# set then accept - Configure the router ID and the autonomous system (AS)
number.[edit logical-systems A routing-options]user@R1# set router-id 192.168.6.5user@R1# set autonomous-system 17
[edit logical-systems B routing-options]user@R1# set router-id 192.163.6.4user@R1# set autonomous-system 17
[edit logical-systems C routing-options]user@R1# set router-id 192.168.40.4user@R1# set autonomous-system 17
Results
From configuration mode, confirm your configuration by entering the show logical-systems 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
Confirm that the configuration is working properly.
- Verifying BGP Neighbors
- Verifying BGP Groups
- Verifying BGP Summary Information
- Verifying That BGP Routes Are Installed in the Routing Table
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.
user@R1> show bgp neighbor logical-system A
Peer: 192.163.6.4+179 AS 17 Local: 192.168.6.5+58852 AS 17 Type: Internal State: Established Flags: <Sync> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ send-direct ] Options: <Preference LocalAddress Refresh> Local Address: 192.168.6.5 Holdtime: 90 Preference: 170 Number of flaps: 0 Peer ID: 192.163.6.4 Local ID: 192.168.6.5 Active Holdtime: 90 Keepalive Interval: 30 Peer index: 0 BFD: disabled, down NLRI for restart configured on peer: inet-unicast NLRI advertised by peer: inet-unicast NLRI for this session: inet-unicast Peer supports Refresh capability (2) Restart time configured on the peer: 120 Stale routes from peer are kept for: 300 Restart time requested by this peer: 120 NLRI that peer supports restart for: inet-unicast NLRI that restart is negotiated for: inet-unicast NLRI of received end-of-rib markers: inet-unicast NLRI of all end-of-rib markers sent: inet-unicast Peer supports 4 byte AS extension (peer-as 17) Peer does not support Addpath Table inet.0 Bit: 10000 RIB State: BGP restart is complete Send state: in sync Active prefixes: 0 Received prefixes: 3 Accepted prefixes: 3 Suppressed due to damping: 0 Advertised prefixes: 2 Last traffic (seconds): Received 16 Sent 1 Checked 63 Input messages: Total 15713 Updates 4 Refreshes 0 Octets 298622 Output messages: Total 15690 Updates 2 Refreshes 0 Octets 298222 Output Queue[0]: 0 Peer: 192.168.40.4+179 AS 17 Local: 192.168.6.5+56466 AS 17 Type: Internal State: Established Flags: <Sync> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ send-direct ] Options: <Preference LocalAddress Refresh> Local Address: 192.168.6.5 Holdtime: 90 Preference: 170 Number of flaps: 0 Peer ID: 192.168.40.4 Local ID: 192.168.6.5 Active Holdtime: 90 Keepalive Interval: 30 Peer index: 1 BFD: disabled, down NLRI for restart configured on peer: inet-unicast NLRI advertised by peer: inet-unicast NLRI for this session: inet-unicast Peer supports Refresh capability (2) Restart time configured on the peer: 120 Stale routes from peer are kept for: 300 Restart time requested by this peer: 120 NLRI that peer supports restart for: inet-unicast NLRI that restart is negotiated for: inet-unicast NLRI of received end-of-rib markers: inet-unicast NLRI of all end-of-rib markers sent: inet-unicast Peer supports 4 byte AS extension (peer-as 17) Peer does not support Addpath Table inet.0 Bit: 10000 RIB State: BGP restart is complete Send state: in sync Active prefixes: 0 Received prefixes: 2 Accepted prefixes: 2 Suppressed due to damping: 0 Advertised prefixes: 2 Last traffic (seconds): Received 15 Sent 22 Checked 68 Input messages: Total 15688 Updates 2 Refreshes 0 Octets 298111 Output messages: Total 15688 Updates 2 Refreshes 0 Octets 298184 Output Queue[0]: 0
Verifying BGP Groups
Purpose
Verify that the BGP groups are configured correctly.
Action
From the operational mode, enter the show bgp group command.
user@A> show bgp group logical-system A
Group Type: Internal AS: 17 Local AS: 17 Name: internal-peers Index: 0 Flags: <Export Eval> Export: [ send-direct ] Holdtime: 0 Total peers: 2 Established: 2 192.163.6.4+179 192.168.40.4+179 inet.0: 0/5/5/0 Groups: 1 Peers: 2 External: 0 Internal: 2 Down peers: 0 Flaps: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 5 0 0 0 0 0
Verifying BGP Summary Information
Purpose
Verify that the BGP configuration is correct.
Action
From the operational mode, enter the show bgp summary command.
user@A> show bgp summary logical-system A
Groups: 1 Peers: 2 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 5 0 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 192.163.6.4 17 15723 15700 0 0 4d 22:13:15 0/3/3/0 0/0/0/0 192.168.40.4 17 15698 15699 0 0 4d 22:13:11 0/2/2/0 0/0/0/0
Verifying That BGP Routes Are Installed in the Routing Table
Purpose
Verify that the export policy configuration is working.
Action
From the operational mode, enter the show route protocol bgp command.
user@A> show route protocol bgp logical-system
A
inet.0: 7 destinations, 12 routes (7 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.10.10.0/30 [BGP/170] 4d 11:05:55, localpref 100, from 192.163.6.4 AS path: I > to 10.10.10.2 via lt-0/1/0.1 10.10.10.4/30 [BGP/170] 4d 11:05:55, localpref 100, from 192.163.6.4 AS path: I > to 10.10.10.2 via lt-0/1/0.1 [BGP/170] 4d 11:03:10, localpref 100, from 192.168.40.4 AS path: I > to 10.10.10.2 via lt-0/1/0.1 192.163.6.4/32 [BGP/170] 4d 11:05:55, localpref 100, from 192.163.6.4 AS path: I > to 10.10.10.2 via lt-0/1/0.1 192.168.40.4/32 [BGP/170] 4d 11:03:10, localpref 100, from 192.168.40.4 AS path: I > to 10.10.10.2 via lt-0/1/0.1
Related Documentation
- ACX, M, MX, T Series
- Understanding Internal BGP Peering Sessions
- ACX, J, M, MX, SRX Series
- BGP Configuration Overview
Published: 2012-12-08
Related Documentation
- ACX, M, MX, T Series
- Understanding Internal BGP Peering Sessions
- ACX, J, M, MX, SRX Series
- BGP Configuration Overview