Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Router Configurations for the Load-Balanced MPLS Network

    Purpose

    The configurations in this topic are for the six routers in the example network illustrated in Load-Balancing Network Topology.

    Action

    To display the configuration of a router, use the following Junos OS CLI operational mode command:

    user@host> show configuration | no-more

    Sample 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 RID
        autonomous-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 enabled
            traffic-engineering;
            area 0.0.0.0 {
                interface fe-0/1/2.0;
                interface fe-1/3/0.0;
                interface  lo0.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 RID
         autonomous-system 65432; #Full mesh IBGP
        forwarding-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 lsp 1 { #First LSP
                 to 192.168.0.1;  # Destination of the LSP
                 install 10.0.90.14/32 active; # The prefix is installed in the
                primary 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 interfaces
                10.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 route
            group 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 enabled
            traffic-engineering;
            area 0.0.0.0 {
                interface fe-0/1/0.0;
                interface fe-0/1/2.0;
                 interface  lo0.0 {
                     passive; #Ensures protocols do not run over this interface
                }
            }
        }
    }
    policy-options { #Load balancing policy
        policy-statement lbpp {
            then {
                load-balance per-packet;
            }
        }
        policy-statement send-statics {  #Static route policy
            term 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 RID
         autonomous-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 enabled
            traffic-engineering;
            area 0.0.0.0 {
                interface fe-0/1/0.0;
                interface so-0/0/1.0;
                interface so-0/0/2.0;
                interface  lo0.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 RID
         autonomous-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 enabled
            traffic-engineering;
            area 0.0.0.0 {
                interface so-0/0/1.0;
                interface so-0/0/3.0;
                interface  lo0.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 RID
         autonomous-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 enabled
            traffic-engineering;
            area 0.0.0.0 {
                interface so-0/0/2.0;
                interface so-0/0/3.0;
                interface fe-0/1/0.0;
                interface  lo0.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 RID
         autonomous-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 route
                neighbor 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 enabled
            traffic-engineering;
            area 0.0.0.0 {
                interface fe-0/1/0.0;
                interface fe-1/3/0.0;
                interface  lo0.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;
            }
        }
    }
    

    Meaning

    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 Load-Balancing Network Topology.

    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. The passive statement 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 R1 shows the base configuration plus four LSPs (lsp1 through lsp4) configured to R0. The four LSPs are configured with different primary paths that specify a loose hop through R4 for lsp1 and lsp4, and through R2 for lsp2 and lsp3.

    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-packet option, and the policy is exported at the [edit routing-options forwarding-table] hierarchy level.

    Sample Output 6 from egress router R0 shows one LSP (r0-r6) to R6 used 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, R0 has 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.

    Published: 2012-06-27