Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

BGP Route Reflectors

Understanding BGP Route Reflectors

This topic discusses using BGP route reflectors to simplify configuration and aid in scaling.

In a BGP Autonomous System (AS), routes must be distributed among all AS border routers. The Border Gateway Protocol (BGP) achieves this through internal BGP (IBGP) peering sessions. By default, routes learned from one IBGP peer are not advertised to other IBGP peers. This restriction requires a full mesh of IBGP sessions between all routers in the AS to ensure complete route visibility.

However, maintaining a full mesh increases configuration complexity and limits scalability. Each new IBGP peer must establish sessions with every other peer in the AS. The total number of sessions required for a full mesh is calculated using the formula v * (v - 1)/2, where v represents the number of BGP peers.

In addition to configuration overhead, a full mesh can increase route scaling. Every IBGP peer receives all routes, even if many are suboptimal for its location in the network.

BGP route reflection, defined in RFC 4456, addresses the scalability challenges of IBGP full mesh topologies. Route reflection allows a router, known as a route reflector (RR), to redistribute routes learned from one IBGP peer to other IBGP peers. This relaxes the default BGP rule that prevents IBGP-to-IBGP advertisement of routes.

Because route reflection introduces the possibility of routing loops, RFC 4456 defines two new BGP path attributes that ensure loop prevention and consistent path selection:

  • ORIGINATOR_ID – Identifies the router ID of the BGP neighbor that originally advertised the route. The ORIGINATOR_ID attribute is attached only when the route is first reflected.

  • CLUSTER_LIST – Records the cluster IDs of the route reflectors that have reflected the route as it propagates through the network.

For details about how these attributes influence BGP best path selection, see Understanding BGP Path Selection.

Because of the internal BGP (IBGP) full-mesh requirement, most networks use route reflectors to simplify configuration. Using a route reflector, routers are grouped into clusters, which are identified by numeric identifiers unique to the autonomous system. Within the cluster, you must configure a BGP session from a single router (the route reflector) to each internal peer. With this configuration, the IBGP full-mesh requirement is met.

To use route reflection in an AS, you designate one or more routers as a route reflector—typically, one per point of presence (POP). Route reflectors have the ability to readvertise routes learned from an internal peer to other internal peers. Rather than requiring all internal peers to be fully meshed with each other, route reflection requires only that the route reflectors be fully meshed with all internal peers. The route reflector and all of its internal peers form a cluster, as shown in Figure 1.

Note:

For some Juniper Networks devices, you must have an Advanced BGP Feature license installed on each device that uses a route reflector. For license details, see the Software Installation and Upgrade Guide.

Figure 1: Simple Route Reflector Topology (One Cluster)Route Reflector topology with central RR node redistributing BGP routes to client routers in a cluster.

Figure 1 shows Router RR configured as the route reflector for Cluster 127. The other routers are designated internal peers within the cluster. BGP routes are advertised to Router RR by any of the internal peers. RR then readvertises those routes to all other peers within the cluster.

You can configure multiple clusters and link them by configuring a full mesh of route reflectors (see Figure 2).

Figure 2: Basic Route Reflection (Multiple Clusters that are fully meshed)Puzzle with circles labeled RR 1 to RR 4 connected by lines and arrows indicating directions or paths.

Figure 2 shows Route Reflectors RR 1, RR 2, RR 3, and RR 4 as fully meshed internal peers. When a router advertises a route to RR 1, RR 1 readvertises the route to the other route reflectors, which, in turn, readvertise the route to the remaining routers within the AS. Route reflection allows the route to be propagated throughout the AS without the scaling problems created by the full mesh requirement.

Note:

A route reflector that supports multiple clusters does not accept a route with the same cluster ID from a non-client router. Therefore, you must configure a different cluster ID for a redundant RR to reflect the route to other clusters.

A client is an IBGP router that receives routes from the route reflector. A non-client is another IBGP neighbor. The route reflector adverises routes learned from non-clients only to its clients, not to non-clients. However, a route reflector advertises routes learned from clients to both clients and non-clients.

However, as clusters become large, a full mesh with a route reflector becomes difficult to scale, as does a full mesh between route reflectors. To help offset this problem, you can group clusters of routers together into clusters of clusters for hierarchical route reflection (see Figure 3).

Figure 3: Hierarchical Route Reflection (Clusters of Clusters)Hierarchical network topology with Route Reflectors RR 1, RR 2, RR 3, and RR 4 in BGP, showing cluster connections.

Figure 3 shows RR 2, RR 3, and RR 4 as the route reflectors for Clusters 127, 19, and 45, respectively. Rather than fully mesh those route reflectors, the network administrator has configured them as part of another cluster (Cluster 6) for which RR 1 is the route reflector. When a router advertises a route to RR 2, RR 2 readvertises the route to all the routers within its own cluster, and then readvertises the route to RR 1. RR 1 readvertises the route to the routers in its cluster, and those routers propagate the route down through their clusters.

Non-forwarding Route Reflectors

In many networks, BGP route reflectors are deployed to improve scalability but are not directly involved in forwarding traffic. These route reflectors maintain BGP control-plane functions without participating in data forwarding. When a route reflector is not in the traffic path, it does not need to install the routes it reflects into its forwarding table. Such devices are referred to as non-forwarding route reflectors.

You can configure non-forwarding route reflectors in one of the following ways:

  • Using the no-install statement – Introduced in Junos OS Release 15.1, the no-install statement prevents BGP routes from being installed in the forwarding table. You can configure this option per address family at the following hierarchy level:

  • Using a forwarding-table export policy – In Junos OS releases earlier than 15.1, you can achieve similar behavior by configuring a forwarding-table export policy that rejects routes learned from BGP.

Non-forwarding route reflectors help reduce the resource load on devices that primarily serve as control-plane routers, especially in large-scale service provider networks.

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 4 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 non-clients 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 non-clients (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 non-clients, you need a neighbor statement for each non-client 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 non-clients 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 4: IBGP Network Using a Route Reflector Network topology showing BGP Route Reflector setup in AS 17. Route Reflector 192.168.6.5 connects to client routers 192.168.5.5, 192.168.0.1, 192.163.6.4, and 192.168.40.4.

Configuration

Procedure

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.

Note:

This example redistributes OSPF-learned routes into BGP using the send-ospf export policy:

Redistributing OSPF into BGP is not normally required for route reflector operation. It is used here only to create BGP routes that the route reflector can advertise to its clients, allowing you to observe how route reflection behaves in a simple lab topology.

In a production deployment, route reflectors typically reflect BGP routes learned from clients and do not redistribute IGP routes into BGP unless this behavior is specifically desired.

In this example, routers A, D, and E are non-client IBGP peers and are configured in a full mesh to ensure consistent route exchange outside the route reflector client cluster.

Device A

Device B

Device C

Device D

Device E

Step-by-Step Procedure

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 Junos OS CLI User Guide.

To configure IBGP in the network using Juniper Networks Device A as a route reflector:

  1. Configure the interfaces.

  2. 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.

  3. Configure static routing or an interior gateway protocol (IGP).

    This example uses OSPF.

  4. Configure the policy that redistributes OSPF routes into BGP.

  5. Configure the router ID and the autonomous system (AS) number.

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 non-client BGP peer within the cluster that you are configuring, if the other non-client 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 Junos OS CLI User Guide.

To configure client peers:

  1. Configure the interfaces.

  2. Configure the BGP neighbor relationship with the route reflector.

    Also apply the policy that redistributes OSPF routes into BGP.

  3. Configure OSPF.

  4. Configure the policy that redistributes OSPF routes into BGP.

  5. Configure the router ID and the AS number.

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 Non-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 Junos OS CLI User Guide.

To configure non-client peers:

  1. Configure the interfaces.

  2. Configure the BGP neighbor relationships with the RRroute reflector and with the other non-client peers.

    Also apply the policy that redistributes OSPF routes into BGP.

  3. Configure OSPF.

  4. Configure the policy that redistributes OSPF routes into BGP.

  5. Configure the router ID and the AS number.

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 non-client BGP peer within the cluster that you are configuring if the other non-client devices are from Juniper Networks. Otherwise, consult the device’s documentation for instructions.

Verification

Confirm that the configuration is working properly.

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.

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.

Verifying Routing Table Information

Purpose

Verify that the routing table contains the IBGP routes.

Action

From operational mode, enter the show route command.

Understanding a Route Reflector That Belongs to Two Different Clusters

The purpose of route reflection is loop prevention when the internal BGP (IBGP) routing devices are not fully meshed. To accomplish this, RRs break one of the rules of normal BGP operation: They readvertise routes learned from an internal BGP peer to other internal BGP peers.

Normally, a single RR is a member of only one cluster. Consider, for example, that in a hierarchical RR design, a tier-two RR can be the client of a tier-1 RR, but they can not be clients of each other.

However, when two RRs are clients of each other and the routes are being reflected from one cluster to another, only one of the cluster IDs is included in the cluster list. This is because having one cluster ID in the cluster list is adequate for loop prevention in this case.

Table 1 summarizes the rules that route reflectors use when filling in a reflected route's cluster list with cluster IDs.

Table 1: Rules for Route Reflectors

Route Reflection Scenario

Configuration

When reflecting a route from one of the clients to a non-client router

client -> RR -> non-client

The RR fills the cluster ID associated with that client in the cluster list of the reflected route.

When reflecting a route from a non-client router to a client router

non-client -> RR -> client

The RR fills the cluster ID associated with that client in the cluster list of the reflected route.

When reflecting a route from a client router to another client router that is in a different cluster

client1 -> RR -> client2 (different cluster)

The RR fills the cluster ID associated with client1 in the cluster list before reflecting the cluster ID to client2. The cluster ID associated with client 2 is not added.

When reflecting a route from a client router to a non-client router that is in a different autonomous system.

For example, when you have configured a tier 2 RR and 2 BGP groups, one for the RR clients and the other for tier 1 RR, and you are reflecting a route from one autonomous system to another autonomous system.

client -> RR -> non-client (different AS)

The RR does not fill the cluster list with the cluster-ID before reflecting the route to the non-client device because the cluster-ID is specific to one autonomous system.

Example: Configuring a Route Reflector That Belongs to Two Different Clusters

This example shows how to configure a route reflector (RR) that belongs to two different clusters. This is not a common scenario, but it might be useful in some situations.

Requirements

Configure the device interfaces and an internal gateway protocol (IGP). For an example of an RR setup that includes the interface and IGP configuration, see Example: Configuring a Route Reflector.

Overview

In this example, Device RR1 is a route reflector for both Device R3 and Device RR2. The route reflector RR1 has two different cluster IDs assigned, one is 10.13.1.3 for RR1-R3 and 10.12.1.2 for RR1-RR2.

Device RR2 is a route reflector for Device R4.

Consider figure Figure 5.

Figure 5: Route Reflector in Two Different Clusters Network topology diagram with routers: R0 Non-client 192.168.16.1, RR1 192.168.20.1, RR2 192.168.40.1, R3 Client 192.168.48.1, R4 Client 192.168.32.1. R0 connects to RR1, RR1 connects to RR2 and R3, RR2 connects to R4.

This example shows the BGP configuration on Device RR1 and Device RR2.

Configuration

Prerequisites

Before configuring BGP route reflectors in multiple clusters, ensure that IP reachability exists between all BGP peers. In this example, an interior gateway protocol (IGP), such as OSPF or IS-IS, provides reachability between the loopback interfaces used for IBGP sessions. Interface and IGP configuration is assumed to be in place and is not shown here.

Procedure

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 RR1

Device RR2

Configuring Device RR1

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 Junos OS CLI User Guide.

To configure Device RR1:

  1. Configure the peering relationship with Device R3.

  2. Configure the peering relationship with Device R0.

  3. Configure the peering relationship with Device RR2.

Results

From configuration mode, confirm your configuration by entering the show protocols command. 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.

Configuring Device RR2

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 Junos OS CLI User Guide.

To configure Device RR2:

  1. Configure the peering relationship with Device R4.

  2. Configure the peering relationship with Device RR1.

Results

From configuration mode, confirm your configuration by entering the show protocols command. 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.

Verification

Confirm that the configuration is working properly.

Checking the Cluster ID Advertised for Route 10.3.3.3

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 route advertising-protocol bgp neighbor-address command.

Meaning

The 10.3.3.3/32 route originates from the Device RR1’s client peer, Device R3. When this route is sent to RR1’s client, Device RR2, the route has the 10.13.1.3 cluster ID attached, which is the cluster ID for RR1-R3.

Checking the Cluster ID Advertised for Route 10.1.0.1

Purpose

Check the route advertisement from Device RR1 to Device RR2.

Action

From operational mode, enter the show route advertising-protocol bgp neighbor-address command.

Meaning

The 10.1.0.1/32 route originates from the Device RR1’s non-client peer, Device R0. When this route is sent to RR1’s client, Device RR2, the route has the 10.12.1.2 cluster ID attached, which is the cluster ID for RR1-RR2.

Device RR1 preserves the inbound cluster ID from Device RR2 when advertising to another client in a different cluster (Device R4).

Route Reflection at AS Border Routers

In most deployments, BGP route reflectors operate exclusively as internal BGP (IBGP) routers. However, in some network designs, a route reflector may also function as an autonomous system border router (ASBR) and maintain external BGP (EBGP) peering sessions.

When a Junos OS router performs both roles and receives a route from an EBGP peer, special considerations apply if the router advertises that route to IBGP peers configured as route reflector clients using the cluster option. In this case, Junos OS attaches the ORIGINATOR_ID and CLUSTER_LIST path attributes when reflecting the route to IBGP clients.

RFC 4456, which defines BGP route reflection, does not explicitly specify expected behavior for routes learned via EBGP and subsequently reflected to IBGP clients by a dual-role ASBR and route reflector. Junos OS applies route reflection attributes consistently in this scenario to prevent routing loops and to preserve deterministic path selection within the autonomous system.

When deploying route reflection on AS border routers, carefully consider routing policy, path selection, and failure scenarios to ensure that reflected routes do not introduce unintended routing behavior.

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
15.1
Starting in Junos OS Release 15.1, the no-install statement eliminates interaction between the routing protocols daemon (rpd) and other components in the Junos system such as the kernel or the distributed firewall daemon (dfwd).
15.1
In releases previous to Junos OS Release 15.1, you can reduce the workload on a route reflector that is not in the traffic-forwarding path by using a forwarding-table export policy that rejects routes learned from BGP.