Example: Load-Balanced MPLS Network
Purpose
When you configure several RSVP LSPs to the same egress router, the LSP with the lowest metric is selected and carries all traffic. If all of the LSPs have the same metric, one of the LSPs is selected at random and all traffic is forwarded over it. To distribute traffic equally across all LSPs, you can configure load balancing on the ingress or transit routers, depending on the type of load balancing configured.
Figure 10 illustrates an MPLS network with four LSPs configured to the same egress router (
R0). Load balancing is configured on ingress router R1. The example network uses Open Shortest Path First (OSPF) as the interior gateway protocol (IGP) with OSPF area0.0.0.0. An IGP is required for the Constrained Shortest Path First (CSPF) LSP, which is the default for the JUNOS software. In addition, the example network uses a policy to create BGP traffic.
![]()
The network shown in Figure 10 consists of the following components:
- A full-mesh interior BGP (IBGP) topology, using AS 65432
- MPLS and RSVP enabled on all routers
- A send-statics policy on routers R1 and
R0that allows a new route to be advertised into the network- Four unidirectional LSPs between R1 and
R0, and one reverse direction LSP betweenR0and R1, which allows for bidirectional traffic- Load balancing configured on ingress router R1
The network shown in Figure 10 is a BGP full-mesh network. Since route reflectors and confederations are not used to propagate BGP learned routes, each router must have a BGP session with every other router running BGP.
For complete configurations for all routers in the example MPLS network, see Router Configurations for the Load-Balanced MPLS Network.
For a description of the situation before and after load balancing is configured in the network to use all four LSPs to forward traffic, see Traffic Flows Before Load Balancing.
Router Configurations for the Load-Balanced MPLS Network
Purpose
The configurations in this section are for the six routers in the example network illustrated in Figure 10.
Action
To display the configuration of a router, use the following JUNOS CLI operational mode command:
user@host>show configuration | no-moreSample Output 1
The following configuration output is for edge router
R6.user@R6>show configuration | no-more[...Output truncated...]interfaces {fe-0/1/2 {unit 0 {family inet {address 10.0.16.14/30;}family mpls;#MPLS enabled on relevant interfaces}}fe-1/3/0 {unit 0 {family inet {address 10.10.12.1/24;}}}fxp0 {unit 0 {family inet {address 192.168.70.148/21;}}}lo0 {unit 0 {family inet {address 192.168.6.1/32;}}}}routing-options {static {[...Output truncated...]router-id 192.168.6.1;#Manually configured RIDautonomous-system 65432;#Full mesh IBGP}}protocols {rsvp {interface fe-0/1/2.0;interface fxp0.0 {disable;}}mpls {interface fe-0/1/2.0;interface fxp0.0 {disable;}}bgp {group internal {type internal;local-address 192.168.6.1;neighbor 192.168.1.1;neighbor 192.168.2.1;neighbor 192.168.4.1;neighbor 192.168.9.1;neighbor 192.168.0.1;}}ospf{#IGP enabledtraffic-engineering;area 0.0.0.0 {interface fe-0/1/2.0;interface fe-1/3/0.0;interfacelo0.0{passive;#Ensures protocols do not run over this interface}}}}Sample Output 2
The following configuration output is for ingress router
R1.user@R1>show configuration | no-more[...Output truncated...]interfaces {fe-0/1/0 {unit 0 {family inet {address 10.0.12.13/30;}family mpls;#MPLS enabled on relevant interfaces}}fe-0/1/2 {unit 0 {family inet {address 10.0.16.13/30;}family mpls;}}fxp0 {unit 0 {family inet {address 192.168.70.143/21;}}}lo0 {unit 0 {family inet {address 192.168.1.1/32;}}}}routing-options {static {[...Output truncated...]route 100.100.1.0/24 reject;#Static route for send-statics policy}router-id 192.168.1.1;#Manually configured RIDautonomous-system 65432;#Full mesh IBGPforwarding-table {export lbpp;#Routes exported to forwarding table}}protocols {rsvp {interface fe-0/1/0.0;interface fe-0/1/2.0;interface fxp0.0 {disable;}}mpls {label-switched-path lsp1 {#First LSPto 192.168.0.1;# Destination of the LSPinstall 10.0.90.14/32 active; # The prefix is installed in theprimary via-r4; # inet.0 routing table}label-switched-path lsp2{to 192.168.0.1;install 10.0.90.14/32 active;primary via-r2;}label-switched-path lsp3{to 192.168.0.1;install 10.0.90.14/32 active;primary via-r2;}label-switched-path lsp4{to 192.168.0.1;install 10.0.90.14/32 active;primary via-r4;}path via-r2{ #Primary path to spread traffic across interfaces10.0.29.2 loose;}path via-r4{10.0.24.2 loose;}interface fe-0/1/0.0;interface fe-0/1/2.0;interface fxp0.0 {disable;}}bgp {export send-statics;#Allows advertising of a new routegroup internal {type internal;local-address 192.168.1.1;neighbor 192.168.2.1;neighbor 192.168.4.1;neighbor 192.168.9.1;neighbor 192.168.6.1;neighbor 192.168.0.1;}}ospf{ #IGP enabledtraffic-engineering;area 0.0.0.0 {interface fe-0/1/0.0;interface fe-0/1/2.0;interfacelo0.0{passive;#Ensures protocols do not run over this interface}}}}policy-options {#Load balancing policypolicy-statement lbpp {then {load-balance per-packet;}}policy-statement send-statics {#Static route policyterm statics {from {route-filter 100.100.1.0/24 exact;}then accept;}}}Sample Output 3
The following configuration output is for transit router
R2.user@R2>show configuration | no-more[...Output truncated...]interfaces {so-0/0/1 {unit 0 {family inet {address 10.0.24.1/30;}family mpls;#MPLS enabled on relevant interfaces}}so-0/0/2 {unit 0 {family inet {address 10.0.29.1/30;}family mpls;}}fe-0/1/0 {unit 0 {family inet {address 10.0.12.14/30;}family mpls;}}fxp0 {unit 0 {family inet {address 192.168.70.144/21;}}}lo0 {unit 0 {family inet {address 192.168.2.1/32;}}}}routing-options {static {[...Output truncated...]router-id 192.168.2.1;#Manually configured RIDautonomous-system 65432;#Full mesh IBGP}}protocols {rsvp {interface so-0/0/1.0;interface fe-0/1/0.0;interface so-0/0/2.0;interface fxp0.0 {disable;}}mpls {interface fe-0/1/0.0;interface so-0/0/1.0;interface so-0/0/2.0;interface fxp0.0 {disable;}}bgp {group internal {type internal;local-address 192.168.2.1;neighbor 192.168.1.1;neighbor 192.168.4.1;neighbor 192.168.9.1;neighbor 192.168.6.1;neighbor 192.168.0.1;}}ospf{ #IGP enabledtraffic-engineering;area 0.0.0.0 {interface fe-0/1/0.0;interface so-0/0/1.0;interface so-0/0/2.0;interfacelo0.0{passive;#Ensures protocols do not run over this interface}}}}Sample Output 4
The following configuration output is for transit router
R4.user@R4>show configuration | no-more[...Output truncated...]interfaces {so-0/0/1 {unit 0 {family inet {address 10.0.24.2/30;}family mpls;# MPLS enabled on relevant interfaces}}so-0/0/3 {unit 0 {family inet {address 10.0.49.1/30;}family mpls;}}fxp0 {unit 0 {family inet {address 192.168.70.146/21;}}}lo0 {unit 0 {family inet {address 192.168.4.1/32;}}}}routing-options {static {[...Output truncated...]router-id 192.168.4.1;#Manually configured RIDautonomous-system 65432;#Full mesh IBGP}protocols {rsvp {interface so-0/0/1.0;interface so-0/0/3.0;interface fxp0.0 {disable;}}mpls {interface so-0/0/1.0;interface so-0/0/3.0;interface fxp0.0 {disable;}}bgp {group internal {type internal;local-address 192.168.4.1;neighbor 192.168.1.1;neighbor 192.168.2.1;neighbor 192.168.9.1;neighbor 192.168.6.1;neighbor 192.168.0.1;}}ospf{ #IGP enabledtraffic-engineering;area 0.0.0.0 {interface so-0/0/1.0;interface so-0/0/3.0;interfacelo0.0{passive;#Ensures protocols do not run over this interface}}}}Sample Output 5
The following configuration output is for transit router
R9.user@R9>show configuration | no-more[...Output truncated...]interfaces {so-0/0/2 {unit 0 {family inet {address 10.0.29.2/30;}family mpls;#MPLS enabled on relevant interfaces}}so-0/0/3 {unit 0 {family inet {address 10.0.49.2/30;}family mpls;}}fe-0/1/0 {unit 0 {family inet {address 10.0.90.13/30;}family mpls;}}fxp0 {unit 0 {family inet {address 192.168.69.206/21;}}}lo0 {unit 0 {family inet {address 192.168.9.1/32;}}}}routing-options {static {[...Output truncated...]router-id 192.168.9.1;#Manually configured RIDautonomous-system 65432;#Full mesh IBGP}protocols {rsvp {interface so-0/0/2.0;interface so-0/0/3.0;interface fe-0/1/0.0;interface fxp0.0 {disable;}}mpls {interface so-0/0/2.0;interface so-0/0/3.0;interface fe-0/1/0.0;interface fxp0.0 {disable;}}bgp {group internal {type internal;local-address 192.168.9.1;neighbor 192.168.1.1;neighbor 192.168.2.1;neighbor 192.168.4.1;neighbor 192.168.0.1;neighbor 192.168.6.1;}}ospf{ #IGP enabledtraffic-engineering;area 0.0.0.0 {interface so-0/0/2.0;interface so-0/0/3.0;interface fe-0/1/0.0;interfacelo0.0{passive;#Ensures protocols do not run over this interface}}}}Sample Output 6
The following configuration output is for egress router
R0.user@R0>show configuration | no-more[...Output truncated...]interfaces {fe-0/1/0 {unit 0 {family inet {address 10.0.90.14/30;}family mpls;#MPLS enabled on relevant interfaces}}fe-1/3/0 {unit 0 {family inet {address 10.10.11.1/24;}}fxp0 {unit 0 {family inet {address 192.168.69.207/21;}}}lo0 {unit 0 {family inet {address 192.168.0.1/32;}}}}routing-options {static {[...Output truncated...]route 100.100.10.0/24 reject;#Static route for send-statics policy}router-id 192.168.0.1;#Manually configured RIDautonomous-system 65432;#Full mesh IBGP}protocols {rsvp {interface fe-0/1/0.0;interface fe-1/3/0.0;interface fxp0.0 {disable;}}mpls {label-switched-path r0-r6 {to 192.168.6.1;}interface fe-0/1/0.0;interface fe-1/3/0.0;interface fxp0.0 {disable;}}bgp {group internal {type internal;local-address 192.168.0.1;export send-statics;#Allows advertising of a new routeneighbor 192.168.9.1;neighbor 192.168.6.1;neighbor 192.168.1.1;neighbor 192.168.2.1;neighbor 192.168.4.1;}}ospf{ #IGP enabledtraffic-engineering;area 0.0.0.0 {interface fe-0/1/0.0;interface fe-1/3/0.0;interfacelo0.0{passive;#Ensures protocols do not run over this interface}}}}policy-options {policy-statement send-statics {term statics {from {route-filter 100.100.10.0/24 exact;}then accept;}}}What It Means
Sample Outputs 1 through 6 show the base interfaces, routing options, protocols, and policy options configurations for all six routers in the example network illustrated in Figure 10.
All routers in the network have MPLS, RSVP, and BGP enabled. OSPF is configured as the IGP, and relevant interfaces have basic IP information and MPLS support.
In addition, all routers have the router ID (RID) configured manually at the
[edit routing-options]hierarchy level to avoid duplicate RID problems. Thepassivestatement is included in the OSPF configuration to ensure that protocols are not run over the loopback (lo0) interface and that the loopback (lo0) interface is advertised correctly throughout the network.Sample Outputs 1, 3, 4, and 5 for
R6, R2, R4, and R9 show the base configuration for transit label-switched routers. The base configuration includes all interfaces enabled for MPLS, the RID manually configured, and the relevant protocols (RSVP, MPLS, BGP, and OSPF).Sample Output 2 from ingress router
R1shows the base configuration plus four LSPs (lsp1throughlsp4)configured toR0. The four LSPs are configured with different primary paths that specify a loose hop throughR4forlsp1andlsp4, and throughR2forlsp2andlsp3.To create traffic, R1 has a static route (
100.100.1.0/24)configured at the[edit routing-options static route]hierarchy level. The prefix is included in the send-statics policy at the[edit policy-options send statics]hierarchy level so the routes can become BGP routes.In addition, on the ingress router R1, load balancing is configured using the
per-packetoption, and the policy is exported at the[edit routing-options forwarding-table]hierarchy level.Sample Output 6 from egress router
R0shows one LSP (r0-r6) toR6used to create bidirectional traffic. OSPF requires bidirectional LSP reachability before it will advertise the LSP into the IGP. Although the LSP is advertised into the IGP, no hello messages or routing updates occur over the LSP—only user traffic is sent over the LSP. The router uses its local copy of the IGP database to verify bidirectional reachability.In addition,
R0has a static route (100.100.10.0/24)configured at the[edit routing-options static route]hierarchy level. The prefix is included in the send-statics policy at the[edit policy-options send statics]hierarchy level so the routes can become BGP routes.