Configuring MPLS L3VPN FRR through IPv4 route backup for a VPNv4 route

Network requirements

CE 1 and CE 2 belong to VPN 1.

Configure EBGP between CEs and PEs to exchange VPN routes.

Configure OSPF to ensure connectivity between PEs, and configure MP-IBGP to exchange VPNv4 routing information between PEs.

Configure MPLS L3VPN FRR on PE 1 to achieve the following purposes:

Figure 87: Network diagram

Table 28: Interface and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

CE 1

Loop0

5.5.5.5/32

CE 2

Loop0

4.4.4.4/32

GE2/1/1

10.2.1.1/24

GE2/1/1

10.1.1.1/24

PE 1

Loop0

1.1.1.1/32

GE2/1/2

10.3.1.1/24

GE2/1/1

10.2.1.2/24

PE 2

Loop0

2.2.2.2/32

GE2/1/2

10.1.1.2/24

GE2/1/2

10.3.1.2/24

GE2/1/3

172.2.1.1/24

GE2/1/3

172.2.1.2/24

Configuration procedure

  1. Configure IP addresses and masks for interfaces as shown in Table 28, and configure BGP and MPLS L3VPN. (Details not shown.)

    For more information about configuring basic MPLS L3VPN, see "Configuring basic MPLS L3VPN."

  2. Configure MPLS L3VPN FRR on PE 1:

    # Configure BFD to test the connectivity of the LSP to 2.2.2.2/32.

    <PE1> system-view
    [PE1] mpls bfd enable
    [PE1] mpls bfd 3.3.3.3 32
    

    # Create routing policy frr, and specify the backup next hop as 10.1.1.1 for the route to 4.4.4.4/32.

    [PE1] ip prefix-list abc index 10 permit 4.4.4.4 32
    [PE1] route-policy frr permit node 10
    [PE1-route-policy] if-match ip address prefix-list abc
    [PE1-route-policy] apply fast-reroute backup-nexthop 10.1.1.1
    [PE1-route-policy] quit
    

    # Configure FRR for VPN instance vpn1 to use routing policy frr.

    [PE1] bgp 100
    [PE1-bgp-default] ip vpn-instance vpn1
    [PE1-bgp-default-vpn1] address-family ipv4 unicast
    [PE1-bgp-default-ipv4-vpn1] fast-reroute route-policy frr
    [PE1-bgp-default-ipv4-vpn1] quit
    [PE1-bgp-default-vpn1] quit
    

    # Specify the preferred value as 200 for BGP VPNv4 routes received from PE 2. This value is greater than the preferred value (0) for IPv4 unicast routes from CE 2, so PE 1 prefers the routes from PE 2.

    [PE1-bgp-default] address-family vpnv4
    [PE1-bgp-default-vpnv4] peer 3.3.3.3 preferred-value 200
    [PE1-bgp-default-vpnv4] quit
    [PE1-bgp-default] quit
    
  3. Enable MPLS BFD on PE 2.

    <PE2> system-view
    [PE2] mpls bfd enable
    

Verifying the configuration

# Display detailed information about the route to 4.4.4.4/32 on PE 1. The output shows the backup next hop for the route.

[PE1] display ip routing-table vpn-instance vpn1 4.4.4.4 32 verbose

Summary Count : 1

Destination: 4.4.4.4/32
   Protocol: BGP instance default
 Process ID: 0
  SubProtID: 0x1                    Age: 00h00m04s
       Cost: 0               Preference: 255
      IpPre: N/A             QosLocalID: N/A
        Tag: 0                    State: Active Adv
  OrigTblID: 0x0                OrigVrf: default-vrf
    TableID: 0x102               OrigAs: 300
      NibID: 0x15000004          LastAs: 300
     AttrID: 0x1               Neighbor: 2.2.2.2
      Flags: 0x110060       OrigNextHop: 2.2.2.2
      Label: 1275           RealNextHop: 172.2.1.2
    BkLabel: NULL             BkNextHop: 10.1.1.1
  Tunnel ID: 0x409            Interface: GE2/1/3
BkTunnel ID: Invalid        BkInterface: GE2/1/2
   FtnIndex: 0x0           TrafficIndex: N/A
  Connector: N/A