Preferred tunnel and tunnel selection order configuration example

Network requirements

PE 1 has multiple tunnels to reach PE 2: two MPLS TE tunnels on interfaces Tunnel 1 and Tunnel 3, one GRE tunnel on interface Tunnel 2, and one LDP LSP tunnel.

PE 1 has multiple MPLS VPN instances: vpna, vpnb, vpnc, vpnd, vpne, vpnf, and vpng. Table 12 shows the tunnel policy that PE 1 uses for each VPN instance.

Table 12: Tunnel policies used for VPN instances

VPN instance

Tunnel policy

vpna, vpnb

Use MPLS TE tunnel Tunnel1 as the preferred tunnel.

vpnc, vpnd

Use MPLS TE tunnel Tunnel3 as the preferred tunnel.

vpne, vpnf

Use GRE tunnel Tunnel2 as the preferred tunnel.

vpng

Uses one tunnel selected in LDP LSP-GRE-MPLS TE order.

Configuration procedure

  1. Configure tunnel policies on PE 1:

    # Create tunnel policy preferredte1, and configure tunnel 1 as the preferred tunnel.

    <PE1> system-view
    [PE1] tunnel-policy preferredte1
    [PE1-tunnel-policy-preferredte1] preferred-path tunnel 1
    [PE1-tunnel-policy-preferredte1] quit
    

    # Create tunnel policy preferredte3, and configure tunnel 3 as the preferred tunnel.

    [PE1] tunnel-policy preferredte3
    [PE1-tunnel-policy-preferredte3] preferred-path tunnel 3
    [PE1-tunnel-policy-preferredte3] quit
    

    # Create tunnel policy preferredgre2, and configure tunnel 2 as the preferred tunnel.

    [PE1] tunnel-policy preferredgre2
    [PE1-tunnel-policy-preferredgre2] preferred-path tunnel 2
    [PE1-tunnel-policy-preferredgre2] quit
    

    # Create tunnel policy select-lsp.

    [PE1] tunnel-policy select-lsp
    

    # Configure the policy to select only one tunnel in LDP LSP-GRE-MPLS TE order.

    [PE1-tunnel-policy-select-lsp] select-seq lsp gre cr-lsp load-balance-number 1
    [PE1-tunnel-policy-select-lsp] quit
    
  2. Configure MPLS VPN instances and apply tunnel policies to the VPN instances:

    # Create MPLS VPN instances vpna and vpnb, and apply tunnel policy preferredte1 to them.

    [PE1] ip vpn-instance vpna
    [PE1-vpn-instance-vpna] route-distinguisher 100:1
    [PE1-vpn-instance-vpna] vpn-target 100:1
    [PE1-vpn-instance-vpna] tnl-policy preferredte1
    [PE1-vpn-instance-vpna] quit
    [PE1] ip vpn-instance vpnb
    [PE1-vpn-instance-vpnb] route-distinguisher 100:2
    [PE1-vpn-instance-vpnb] vpn-target 100:2
    [PE1-vpn-instance-vpnb] tnl-policy preferredte1
    [PE1-vpn-instance-vpnb] quit
    

    # Create MPLS VPN instances vpnc and vpnd, and apply tunnel policy preferredte3 to them.

    [PE1] ip vpn-instance vpnc
    [PE1-vpn-instance-vpnc] route-distinguisher 100:3
    [PE1-vpn-instance-vpnc] vpn-target 100:3
    [PE1-vpn-instance-vpnc] tnl-policy preferredte3
    [PE1-vpn-instance-vpnc] quit
    [PE1] ip vpn-instance vpnd
    [PE1-vpn-instance-vpnd] route-distinguisher 100:4
    [PE1-vpn-instance-vpnd] vpn-target 100:4
    [PE1-vpn-instance-vpnd] tnl-policy preferredte3
    [PE1-vpn-instance-vpnd] quit
    

    # Create MPLS VPN instances vpne and vpnf, and apply tunnel policy preferredgre2 to them.

    [PE1] ip vpn-instance vpne
    [PE1-vpn-instance-vpne] route-distinguisher 100:5
    [PE1-vpn-instance-vpne] vpn-target 100:5
    [PE1-vpn-instance-vpne] tnl-policy preferredgre2
    [PE1-vpn-instance-vpne] quit
    [PE1] ip vpn-instance vpnf
    [PE1-vpn-instance-vpnf] route-distinguisher 100:6
    [PE1-vpn-instance-vpnf] vpn-target 100:6
    [PE1-vpn-instance-vpnf] tnl-policy preferredgre2
    [PE1-vpn-instance-vpnf] quit
    

    # Create MPLS VPN instance vpng, and apply tunnel policy select-lsp to it.

    [PE1] ip vpn-instance vpng
    [PE1-vpn-instance-vpng] route-distinguisher 100:7
    [PE1-vpn-instance-vpng] vpn-target 100:7
    [PE1-vpn-instance-vpng] tnl-policy select-lsp