Supported Platforms
Related Documentation
Example: Configuring Client-to-Client Reflection (OSPF)
Building on the topology shown in Example: Configuring the JCS1200 Platform as a Route Reflector, this example shows how to configure routers for OSPF client-to-client route reflection.
Requirements
This example requires the following hardware and software components:
- Junos OS Release 9.5 or later
- One JCS1200 platform with Routing Engines in slots 1,2, 3, and 4
- One T640 router with FPCs in slots 0, 1, and 2
Overview and Topology
Figure 1: Example: Configuring Client-to-Client Reflection (OSPF)

The example configuration shown in Figure 1 contains one router reflector (RR) and three client routers (R1, R2, and R3). The three routers (R1 through R3) and the route reflector (RR) are configured as PSDs that include Routing Engines on the JCS chassis.
The routers have the following loopback addresses:
- RR—10.12.1.1
- R1—10.12.1.2
- R2—10.12.1.3
- R3—10.12.1.4
With this configuration example, a route added to client router R1 is propagated to the route reflector (RR) and to the other client routers (R2, R3). This example uses OSPF as the IGP and enables BFD for the connections from the route reflector.
Configuration
First, configure protocols for the route reflector (RR), then configure protocols for the routers (R1, R2, and R3).
- PSD15 Configuration (Route Reflector)
- PSD11 Configuration (Router 1)
- PSD12 Configuration (Router 2)
- PSD13 Configuration (Router 3)
PSD15 Configuration (Route Reflector)
Step-by-Step Procedure
To configure the route reflector (PSD15):
- At the [edit routing-options] hierarchy level, include the autonomous-system 2 statement to configure the router’s AS number.
- At the [edit protocols] hierarchy level, include the bgp statement to enable BGP on the router.
- At the [edit protocols bgp] hierarchy level,
include the group int statement to define the routing group.
A BGP system must know which routers are its peers (neighbors). You define the peer relationship explicitly by configuring the neighboring routers that are the peers of the local BGP system. After peer relationships have been established, the BGP peers exchange update messages to advertise network reachability information.
- At the [edit protocols bgp group int] hierarchy
level:
- Include the type internal statement to configure an internal BGP group.
- Include the local-address 10.12.1.1 statement to specify the address of the local end of a BGP session. This address is used to accept incoming connections to the peer and to establish connections to the remote peer.
- Include the cluster 1.2.3.4 statement to specify the cluster identifier (IPV4 address) to be used by the route reflector cluster in the internal BGP group.
- Include the neighbor 10.12.1.2, neighbor 10.12.1.2, and neighbor 10.12.1.4 statements to specify which routers (Router 1, Router 2, and Router 3) are peers (neighbors) of the route reflector.
- At the [edit protocols] hierarchy level, include the ospf statement to enable OSPF on the router.
- At the [edit protocols ospf] hierarchy level, include the overload statement to prevent other routers from attempting to route data traffic through the route reflector. This option is set in the route reflector (RR), but not in Router 1, 2, and 3.
- At the [edit protocols ospf] hierarchy level, include the area 0.0.0.0 statement to specify the area identifier for this router to use when participating in OSPF routing. All routers in the area must use the same area identifier to establish adjacencies.
- At the [edit protocols ospf area 0.0.0.0] hierarchy level, include the interface fxp1.1 statement to configure the internal Ethernet interface in the backbone area.
- At the [edit protocols ospf area 0.0.0.0 fxp1.1] hierarchy level, include the bfd-liveness-detection statement to specify bidirectional failure detection timers.
- At the [edit protocols ospf area 0.0.0.0 fxp1.1 bfd-liveness-detection] hierarchy level, include the minimum-interval 333 statement to specify 333 milliseconds as the minimum interval at which the local router transmits a hello packet and then expects to receive a reply from its BFD neighbor.
- Repeat Steps 7 through 9 for the fxp0.1 internal
Ethernet interface:
- At the [edit protocols ospf area 0.0.0.0] hierarchy level, include the interface fxp0.1 statement to configure the internal Ethernet interface in the backbone area.
- At the [edit protocols ospf area 0.0.0.0 fxp0.1] hierarchy level, include the bfd-liveness-detection statement to specify bidirectional failure detection timers.
- At the [edit protocols ospf area 0.0.0.0 fxp0.1 bfd-liveness-detection] hierarchy level, include the minimum-interval 333 statement to specify 333 milliseconds as the minimum interval at which the local router transmits a hello packet and then expects to receive a reply from its BFD neighbor.
Results
Display the results of the configuration:
PSD11 Configuration (Router 1)
Step-by-Step Procedure
To configure the route reflector (PSD11):
- At the [edit routing-options] hierarchy level, include the autonomous-system 2 statement to configure the router’s AS number.
- At the [edit protocols] hierarchy level, include the bgp statement to enable BGP on the router.
- At the [edit protocols bgp] hierarchy level, include the group int statement to define the routing group.
- At the [edit protocols bgp group int] hierarchy
level:
- Include the type internal statement to configure an internal BGP group.
- Include the local-address 10.12.1.2 statement to specify the address of the local end of a BGP session. This address is used to accept incoming connections to the peer and to establish connections to the remote peer.
- Include the export nh-self statement to apply the nh-self policy to routes being exported from the routing table into BGP.
- Include the neighbor 10.12.1.1 statement to specify the route reflector (RR) as peer (neighbor) of Router 1. You do not need to include neighbor statements for Router 2 or Router 3.
- At the [edit protocols] hierarchy level, include the ospf statement to enable OSPF on the router.
- At the [edit protocols ospf] hierarchy level, include the area 0.0.0.0 statement to specify the area identifier for this router to use when participating in OSPF routing. All routers in the area must use the same area identifier to establish adjacencies.
- At the [edit protocols ospf area 0.0.0.0] hierarchy level, include the interface ge-1/1/1.0 statement to configure the Gigabit Ethernet interface in the backbone area.
- At the [edit protocols ospf area 0.0.0.0] hierarchy level, include the interface ge-1/1/0.0 statement to configure the Gigabit Ethernet interface in the backbone area.
- At the [edit policy-options] hierarchy level,
include the policy-statement nh-self statement to define
the nh-self policy.
A routing policy contains one or more terms. The nh-self policy you are defining includes three terms (term a, term b, and term c). This policy is applied to routes exported from the routing table into BGP.
- At the [edit policy-options nh-self] hierarchy level, include the term a statement to define the first term for the nh-self policy.
- At the [edit policy-options nh-self term a] hierarchy
level, include the following statements to specify that any static
route with destination prefix 0.0.0.0/0 is rejected:from {protocol static;route-filter 0.0.0.0/0 exact;}then reject;
- At the [edit policy-options nh-self] hierarchy level, include the term b statement to define the next term for the nh-self policy.
- At the [edit policy-options nh-self term b] hierarchy
level, include the following statements:from protocol static;then {next-hop self;accept;}
These statements specify that for all remaining static routes, the next-hop address is replaced by the local IP address used for the BGP adjacency. The router is then accepted with the new, next-hop value.
- At the [edit policy-options nh-self] hierarchy level, include the term c statement to define the next term for the nh-self policy.
- At the [edit policy-options nh-self term c] hierarchy level, include the then reject statement to reject all other routes.
Results
Display the results of the configuration:
PSD12 Configuration (Router 2)
Step-by-Step Procedure
To configure the route reflector (PSD12):
- At the [edit routing-options] hierarchy level, include the autonomous-system 2 statement to configure the router’s AS number.
- At the [edit protocols] hierarchy level, include the bgp statement to enable BGP on the router.
- At the [edit protocols bgp] hierarchy level, include the group int statement to define the routing group.
- At the [edit protocols bgp group int] hierarchy
level:
- Include the type internal statement to configure an internal BGP group.
- Include the local-address 10.12.1.3 statement to specify the address of the local end of a BGP session. This address is used to accept incoming connections to the peer and to establish connections to the remote peer.
- Include the export nh-self statement to apply the nh-self policy to routes being exported from the routing table into BGP.
- Include the neighbor 10.12.1.1 statement to specify the route reflector (RR) as peer (neighbor) of Router 2. You do not need to include neighbor statements for Router 1 or Router 3.
- At the [edit protocols] hierarchy level, include the ospf statement to enable OSPF on the router.
- At the [edit protocols ospf] hierarchy level, include the area 0.0.0.0 statement to specify the area identifier for this router to use when participating in OSPF routing. All routers in the area must use the same area identifier to establish adjacencies.
- At the [edit protocols ospf area 0.0.0.0] hierarchy level, include the interface ge-2/0/2.0 statement to configure the Gigabit Ethernet interface in the backbone area.
- At the [edit protocols ospf area 0.0.0.0] hierarchy level, include the interface ge-2/0/3.0 statement to configure the Gigabit Ethernet interface in the backbone area.
- At the [edit protocols ospf area 0.0.0.0] hierarchy level, include the interface ge-2/0/1.0 statement to configure the Gigabit Ethernet interface in the backbone area.
- At the [edit protocols ospf area 0.0.0.0 interface ge-2/0/1.0] hierarchy level, include the bfd-liveness-detection statement to specify bidirectional failure detection timers.
- At the [edit protocols ospf area 0.0.0.0 interface ge-2/0/1.0 bfd-liveness-detection] hierarchy level, include the minimum-interval 333 statement to specify 333 milliseconds as the minimum interval at which the local router transmits a hello packet and then expects to receive a reply from its BFD neighbor.
- At the [edit policy-options] hierarchy level,
include the policy-statement nh-self statement to define
the nh-self policy.
A routing policy contains one or more terms. The nh-self policy you are defining includes three terms (term a, term b, and term c). This policy is applied to routes exported from the routing table into BGP.
- At the [edit policy-options nh-self] hierarchy level, include the term a statement to define the first term for the nh-self policy.
- At the [edit policy-options nh-self term a] hierarchy
level, include the following statements to specify that any static
route with destination prefix 0.0.0.0/0 or destination prefix 10.12.1.1/32 is rejected:from {protocol static;route-filter 0.0.0.0/0 exact;route-filter 10.12.1.1/32 exact;}then reject;
- At the [edit policy-options nh-self] hierarchy level, include the term b statement to define the next term for the nh-self policy.
- At the [edit policy-options nh-self term b] hierarchy
level, include the following statements:from protocol static;then {next-hop self;accept;}
These statements specify that for all remaining static routes, the next-hop address is replaced by the local IP address used for the BGP adjacency. The router is then accepted with the new, next-hop value.
- At the [edit policy-options nh-self] hierarchy level, include the term c statement to define the next term for the nh-self policy.
- At the [edit policy-options nh-self term c] hierarchy level, include the then reject statement to reject all other routes.
Results
Display the results of the configuration:
PSD13 Configuration (Router 3)
Step-by-Step Procedure
To configure the route reflector (PSD13):
- At the [edit routing-options] hierarchy level, include the autonomous-system 2 statement to configure the router’s AS number.
- At the [edit protocols] hierarchy level, include the bgp statement to enable BGP on the router.
- At the [edit protocols bgp] hierarchy level, include the group int statement to define the routing group.
- At the [edit protocols bgp group int] hierarchy
level:
- Include the type internal statement to configure an internal BGP group.
- Include the local-address 10.12.1.4 statement to specify the address of the local end of a BGP session. This address is used to accept incoming connections to the peer and to establish connections to the remote peer.
- Include the export nh-self statement to apply the nh-self policy to routes being exported from the routing table into BGP.
- Include the neighbor 10.12.1.1 statement to specify the route reflector (RR) as peer (neighbor) of Router 3. You do not need to include neighbor statements for Router 1 or Router 2.
- At the [edit protocols] hierarchy level, include the ospf statement to enable OSPF on the router.
- At the [edit protocols ospf] hierarchy level, include the area 0.0.0.0 statement to specify the area identifier for this router to use when participating in OSPF routing. All routers in the area must use the same area identifier to establish adjacencies.
- At the [edit protocols ospf area 0.0.0.0] hierarchy level, include the interface ge-0/2/3.0 statement to configure the Gigabit Ethernet interface in the backbone area.
- At the [edit protocols ospf area 0.0.0.0] hierarchy level, include the interface ge-0/1/7.0 statement to configure the Gigabit Ethernet interface in the backbone area.
- At the [edit protocols ospf area 0.0.0.0] hierarchy level, include the interface ge-0/1/0.0 statement to configure the Gigabit Ethernet interface in the backbone area.
- At the [edit protocols ospf area 0.0.0.0 interface ge-0/1/0.0] hierarchy level, include the bfd-liveness-detection statement to specify bidirectional failure detection timers.
- At the [edit protocols ospf area 0.0.0.0 interface ge-0/1/0.0 bfd-liveness-detection] hierarchy level, include the minimum-interval 333 statement to specify 333 milliseconds as the minimum interval at which the local router transmits a hello packet and then expects to receive a reply from its BFD neighbor.
- At the [edit policy-options] hierarchy level,
include the policy-statement nh-self statement to define
the nh-self policy.
A routing policy contains one or more terms. The nh-self policy you are defining includes three terms (term a, term b, and term c). This policy is applied to routes exported from the routing table into BGP.
- At the [edit policy-options nh-self] hierarchy level, include the term a statement to define the first term for the nh-self policy.
- At the [edit policy-options nh-self term a] hierarchy
level, include the following statements to specify that any static
route with destination prefix 0.0.0.0/0 is rejected:from {protocol static;route-filter 0.0.0.0/0 exact;}then reject;
- At the [edit policy-options nh-self] hierarchy level, include the term b statement to define the next term for the nh-self policy.
- At the [edit policy-options nh-self term b] hierarchy
level, include the following statements:from protocol static;then {next-hop self;accept;}
These statements specify that for all remaining static routes, the next-hop address is replaced by the local IP address used for the BGP adjacency. The router is then accepted with the new, next-hop value.
- At the [edit policy-options nh-self] hierarchy level, include the term c statement to define the next term for the nh-self policy.
- At the [edit policy-options nh-self term c] hierarchy level, include the then reject statement to reject all other routes.
Results
Display the results of the configuration: