Supported Platforms
Related Documentation
- ACX, J, M, MX, QFX, SRX, T Series
- Example: Configuring Internal BGP Peer Sessions
- Example: Configuring External BGP Point-to-Point Peer Sessions
- ACX, J, M, MX, PTX, SRX, T Series
- Understanding BGP Route Reflectors
- ACX, J, M, MX, SRX Series
- BGP Configuration Overview
- Additional Information
- Routing Policy Configuration Guide
Example: Configuring a Route Reflector
This example shows how to configure a route reflector.
Requirements
No special configuration beyond device initialization is required before you configure this example.
Overview
Generally, internal BGP (IBGP)-enabled devices need to be fully meshed, because IBGP does not readvertise updates to other IBGP-enabled devices. The full mesh is a logical mesh achieved through configuration of multiple neighbor statements on each IBGP-enabled device. The full mesh is not necessarily a physical full mesh. Maintaining a full mesh (logical or physical) does not scale well in large deployments.
Figure 1 shows an IBGP network with Device A acting as a route reflector. Device B and Device C are clients of the route reflector. Device D and Device E are outside the cluster, so they are nonclients of the route reflector.
On Device A (the route reflector), you must form peer relationships with all of the IBGP-enabled devices by including the neighbor statement for the clients (Device B and Device C) and the nonclients (Device D and Device E). You must also include the cluster statement and a cluster identifier. The cluster identifier can be any 32-bit value. This example uses the loopback interface IP address of the route reflector.
On Device B and Device C, the route reflector clients, you only need one neighbor statement that forms a peer relationship with the route reflector, Device A.
On Device D and Device E, the nonclients, you need a neighbor statement for each nonclient device (D-to-E and E-to-D). You also need a neighbor statement for the route reflector (D-to-A and E-to-A). Device D and Device E do not need neighbor statements for the client devices (Device B and Device C).
![]() | Tip: Device D and Device E are considered to be nonclients because they have explicitly configured peer relationships with each other. To make them RRroute reflector clients, remove the neighbor 192.168.5.5 statement from the configuration on Device D, and remove the neighbor 192.168.0.1 statement from the configuration on Device E. |
Figure 1: IBGP Network Using a Route Reflector

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
Device B
Device C
Device D
Device E
Configuring the Route Reflector
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 IBGP in the network using Juniper Networks Device A as a route reflector:
- Configure the interfaces.[edit interfaces]user@A# set fe-0/0/0 unit 1 description to-Buser@A# set fe-0/0/0 unit 1 family inet address 10.10.10.1/30user@A# set fe-0/0/1 unit 3 description to-Duser@A# set fe-0/0/1 unit 3 family inet address 10.10.10.9/30user@A# set lo0 unit 1 family inet address 192.168.6.5/32
- Configure BGP, including the cluster identifier and neighbor
relationships with all IBGP-enabled devices in the autonomous system
(AS).
Also apply the policy that redistributes OSPF routes into BGP.
- Configure static routing or an interior gateway protocol
(IGP).
This example uses OSPF.
[edit protocols ospf area 0.0.0.0]user@A# set interface lo0.1 passiveuser@A# set interface fe-0/0/0.1user@A# set interface fe-0/0/1.3 - Configure the policy that redistributes OSPF routes into
BGP.[edit policy-options policy-statement send-ospf term 2]user@A# set from protocol ospfuser@A# set then accept
- Configure the router ID and the autonomous system (AS)
number.[edit routing-options]user@A# set router-id 192.168.6.5user@A# set autonomous-system 17
Results
From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show policy-options, 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.
![]() | Note: Repeat these steps for each nonclient BGP peer within the cluster that you are configuring, if the other nonclient devices are from Juniper Networks. Otherwise, consult the device’s documentation for instructions. |
Configuring Client Peers
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 client peers:
- Configure the interfaces.[edit interfaces]user@B# set fe-0/0/0 unit 2 description to-Auser@B# set fe-0/0/0 unit 2 family inet address 10.10.10.2/30user@B# set fe-0/0/1 unit 5 description to-Cuser@B# set fe-0/0/1 unit 5 family inet address 10.10.10.5/30user@B# set lo0 unit 2 family inet address 192.163.6.4/32
- Configure the BGP neighbor relationship with the route
reflector.
Also apply the policy that redistributes OSPF routes into BGP.
[edit protocols bgp group internal-peers]user@B# set type internaluser@B# set local-address 192.163.6.4user@B# set export send-ospfuser@B# set neighbor 192.168.6.5 - Configure OSPF.[edit protocols ospf area 0.0.0.0]user@B# set interface lo0.2 passiveuser@B# set interface fe-0/0/0.2user@B# set interface fe-0/0/1.5
- Configure the policy that redistributes OSPF routes into
BGP.[edit policy-options policy-statement send-ospf term 2]user@B# set from protocol ospfuser@B# set then accept
- Configure the router ID and the AS number.[edit routing-options]user@B# set router-id 192.163.6.4user@B# set autonomous-system 17
Results
From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show policy-options, 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.
![]() | Note: Repeat these steps for each client BGP peer within the cluster that you are configuring if the other client devices are from Juniper Networks. Otherwise, consult the device’s documentation for instructions. |
Configuring Nonclient Peers
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 nonclient peers:
- Configure the interfaces.[edit interfaces]user@D# set fe-0/0/0 unit 4 description to-Auser@D# set fe-0/0/0 unit 4 family inet address 10.10.10.10/30user@D# set fe-0/0/1 unit 7 description to-Euser@D# set fe-0/0/1 unit 7 family inet address 10.10.10.13/30user@D# set lo0 unit 4 family inet address 192.168.0.1/32
- Configure the BGP neighbor relationships with the RRroute
reflector and with the other nonclient peers.
Also apply the policy that redistributes OSPF routes into BGP.
[edit protocols bgp group internal-peers]user@D# set type internaluser@D# set local-address 192.168.0.1user@D# set export send-ospfuser@D# set neighbor 192.168.6.5user@D# set neighbor 192.168.5.5 - Configure OSPF.[edit protocols ospf area 0.0.0.0]user@D# set interface lo0.4 passiveuser@D# set interface fe-0/0/0.4user@D# set interface fe-0/0/1.7
- Configure the policy that redistributes OSPF routes into
BGP.[edit policy-options policy-statement send-ospf term 2]user@D# set from protocol ospfuser@D# set then accept
- Configure the router ID and the AS number.[edit routing-options]user@D# set router-id 192.168.0.1user@D# set autonomous-system 17
Results
From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show policy-options, 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.
![]() | Note: Repeat these steps for each nonclient BGP peer within the cluster that you are configuring if the other nonclient devices are from Juniper Networks. Otherwise, consult the device’s documentation for instructions. |
Verification
Confirm that the configuration is working properly.
- Verifying BGP Neighbors
- Verifying BGP Groups
- Verifying BGP Summary Information
- Verifying Routing Table Information
Verifying BGP Neighbors
Purpose
Verify that BGP is running on configured interfaces and that the BGP session is established for each neighbor address.
Action
From operational mode, enter the show bgp neighbor command.
user@A> show bgp neighbor
Peer: 192.163.6.4+179 AS 17 Local: 192.168.6.5+62857 AS 17 Type: Internal State: Established (route reflector client)Flags: <Sync> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ send-ospf ] Options: <Preference LocalAddress Cluster 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: 6 Accepted prefixes: 1 Suppressed due to damping: 0 Advertised prefixes: 6 Last traffic (seconds): Received 5 Sent 3 Checked 19 Input messages: Total 2961 Updates 7 Refreshes 0 Octets 56480 Output messages: Total 2945 Updates 6 Refreshes 0 Octets 56235 Output Queue[0]: 0 Peer: 192.168.0.1+179 AS 17 Local: 192.168.6.5+60068 AS 17 Type: Internal State: Established (route reflector client)Flags: <Sync> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ send-ospf ] Options: <Preference LocalAddress Cluster Refresh> Local Address: 192.168.6.5 Holdtime: 90 Preference: 170 Number of flaps: 0 Peer ID: 192.168.0.1 Local ID: 192.168.6.5 Active Holdtime: 90 Keepalive Interval: 30 Peer index: 3 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: 6 Accepted prefixes: 1 Suppressed due to damping: 0 Advertised prefixes: 6 Last traffic (seconds): Received 18 Sent 20 Checked 12 Input messages: Total 15 Updates 5 Refreshes 0 Octets 447 Output messages: Total 554 Updates 4 Refreshes 0 Octets 32307 Output Queue[0]: 0 Peer: 192.168.5.5+57458 AS 17 Local: 192.168.6.5+179 AS 17 Type: Internal State: Established (route reflector client)Flags: <Sync> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ send-ospf ] Options: <Preference LocalAddress Cluster Refresh> Local Address: 192.168.6.5 Holdtime: 90 Preference: 170 Number of flaps: 0 Peer ID: 192.168.5.5 Local ID: 192.168.6.5 Active Holdtime: 90 Keepalive Interval: 30 Peer index: 2 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: 7 Accepted prefixes: 7 Suppressed due to damping: 0 Advertised prefixes: 6 Last traffic (seconds): Received 17 Sent 3 Checked 9 Input messages: Total 2967 Updates 7 Refreshes 0 Octets 56629 Output messages: Total 2943 Updates 6 Refreshes 0 Octets 56197 Output Queue[0]: 0 Peer: 192.168.40.4+53990 AS 17 Local: 192.168.6.5+179 AS 17 Type: Internal State: Established (route reflector client)Flags: <Sync> Last State: OpenConfirm Last Event: RecvKeepAlive Last Error: None Export: [ send-ospf ] Options: <Preference LocalAddress Cluster 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: 7 Accepted prefixes: 7 Suppressed due to damping: 0 Advertised prefixes: 6 Last traffic (seconds): Received 5 Sent 23 Checked 52 Input messages: Total 2960 Updates 7 Refreshes 0 Octets 56496 Output messages: Total 2943 Updates 6 Refreshes 0 Octets 56197 Output Queue[0]: 0
Verifying BGP Groups
Purpose
Verify that the BGP groups are configured correctly.
Action
From operational mode, enter the show bgp group command.
user@A> show bgp group
Group Type: Internal AS: 17 Local AS: 17 Name: internal-peers Index: 0 Flags: <> Export: [ send-ospf ] Options: <Cluster> Holdtime: 0 Total peers: 4 Established: 4 192.163.6.4+179 192.168.40.4+53990 192.168.0.1+179 192.168.5.5+57458 inet.0: 0/26/16/0 Groups: 1 Peers: 4 External: 0 Internal: 4 Down peers: 0 Flaps: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 26 0 0 0 0 0
Verifying BGP Summary Information
Purpose
Verify that the BGP configuration is correct.
Action
From operational mode, enter the show bgp summary command.
user@A> show bgp summary
Groups: 1 Peers: 4 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 26 0 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 192.163.6.4 17 2981 2965 0 0 22:19:15 0/6/1/0 0/0/0/0 192.168.0.1 17 36 575 0 0 13:43 0/6/1/0 0/0/0/0 192.168.5.5 17 2988 2964 0 0 22:19:10 0/7/7/0 0/0/0/0 192.168.40.4 17 2980 2964 0 0 22:19:14 0/7/7/0 0/0/0/0
Verifying Routing Table Information
Purpose
Verify that the routing table contains the IBGP routes.
Action
From operational mode, enter the show route command.
user@A> show route
inet.0: 12 destinations, 38 routes (12 active, 0 holddown, 10 hidden) + = Active Route, - = Last Active, * = Both 10.10.10.0/30 *[Direct/0] 22:22:03 > via fe-0/0/0.1 [BGP/170] 22:20:55, MED 2, localpref 100, from 192.168.40.4 AS path: I > to 10.10.10.2 via fe-0/0/0.1 [BGP/170] 22:20:51, MED 3, localpref 100, from 192.168.5.5 AS path: I > to 10.10.10.10 via fe-0/0/1.3 10.10.10.1/32 *[Local/0] 22:22:03 Local via fe-0/0/0.1 10.10.10.4/30 *[OSPF/10] 22:21:13, metric 2 > to 10.10.10.2 via fe-0/0/0.1 [BGP/170] 22:20:51, MED 4, localpref 100, from 192.168.5.5 AS path: I > to 10.10.10.10 via fe-0/0/1.3 10.10.10.8/30 *[Direct/0] 22:22:03 > via fe-0/0/1.3 [BGP/170] 22:20:51, MED 2, localpref 100, from 192.168.5.5 AS path: I > to 10.10.10.10 via fe-0/0/1.3 [BGP/170] 22:20:55, MED 3, localpref 100, from 192.168.40.4 AS path: I > to 10.10.10.2 via fe-0/0/0.1 10.10.10.9/32 *[Local/0] 22:22:03 Local via fe-0/0/1.3 10.10.10.12/30 *[OSPF/10] 22:21:08, metric 2 > to 10.10.10.10 via fe-0/0/1.3 [BGP/170] 22:20:55, MED 4, localpref 100, from 192.168.40.4 AS path: I > to 10.10.10.2 via fe-0/0/0.1 192.163.6.4/32 *[OSPF/10] 22:21:13, metric 1 > to 10.10.10.2 via fe-0/0/0.1 [BGP/170] 22:20:55, MED 1, localpref 100, from 192.168.40.4 AS path: I > to 10.10.10.2 via fe-0/0/0.1 [BGP/170] 22:20:51, MED 3, localpref 100, from 192.168.5.5 AS path: I > to 10.10.10.10 via fe-0/0/1.3 192.168.0.1/32 *[OSPF/10] 22:21:08, metric 1 > to 10.10.10.10 via fe-0/0/1.3 [BGP/170] 22:20:51, MED 1, localpref 100, from 192.168.5.5 AS path: I > to 10.10.10.10 via fe-0/0/1.3 [BGP/170] 22:20:55, MED 3, localpref 100, from 192.168.40.4 AS path: I > to 10.10.10.2 via fe-0/0/0.1 192.168.5.5/32 *[OSPF/10] 22:21:08, metric 2 > to 10.10.10.10 via fe-0/0/1.3 [BGP/170] 00:15:24, MED 1, localpref 100, from 192.168.0.1 AS path: I > to 10.10.10.10 via fe-0/0/1.3 [BGP/170] 22:20:55, MED 4, localpref 100, from 192.168.40.4 AS path: I > to 10.10.10.2 via fe-0/0/0.1 192.168.6.5/32 *[Direct/0] 22:22:04 > via lo0.1 [BGP/170] 22:20:51, MED 2, localpref 100, from 192.168.5.5 AS path: I > to 10.10.10.10 via fe-0/0/1.3 [BGP/170] 22:20:55, MED 2, localpref 100, from 192.168.40.4 AS path: I > to 10.10.10.2 via fe-0/0/0.1 192.168.40.4/32 *[OSPF/10] 22:21:13, metric 2 > to 10.10.10.2 via fe-0/0/0.1 [BGP/170] 22:20:55, MED 1, localpref 100, from 192.163.6.4 AS path: I > to 10.10.10.2 via fe-0/0/0.1 [BGP/170] 22:20:51, MED 4, localpref 100, from 192.168.5.5 AS path: I > to 10.10.10.10 via fe-0/0/1.3 224.0.0.5/32 *[OSPF/10] 22:22:07, metric 1 MultiRecv
Related Documentation
- ACX, J, M, MX, QFX, SRX, T Series
- Example: Configuring Internal BGP Peer Sessions
- Example: Configuring External BGP Point-to-Point Peer Sessions
- ACX, J, M, MX, PTX, SRX, T Series
- Understanding BGP Route Reflectors
- ACX, J, M, MX, SRX Series
- BGP Configuration Overview
- Additional Information
- Routing Policy Configuration Guide
Published: 2012-12-08
Supported Platforms
Related Documentation
- ACX, J, M, MX, QFX, SRX, T Series
- Example: Configuring Internal BGP Peer Sessions
- Example: Configuring External BGP Point-to-Point Peer Sessions
- ACX, J, M, MX, PTX, SRX, T Series
- Understanding BGP Route Reflectors
- ACX, J, M, MX, SRX Series
- BGP Configuration Overview
- Additional Information
- Routing Policy Configuration Guide