No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CLI-based Configuration Guide - IP Unicast Routing

AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R009

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Configuring IP FRR on the Public Network

Example for Configuring IP FRR on the Public Network

Networking Requirements

As shown in Figure 11-1, four routers exist on the network and run OSPF. Link A (RouterT->RouterA->RouterC) functions as the primary link to forward services, and link B (RouterT->RouterB->RouterC) functions as the backup link. When the primary link fails, services must be rapidly switched from the primary link to the backup link to ensure that services are forwarded correctly from RouterT to RouterC.

Figure 11-1 Networking diagram of configuring IPv4 FRR on the public network

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure the OSPF cost on GE3/0/0 of RouterT and RouterC to enable OSPF to select link A (RouterT->RouterA->RouterC) as the primary link.

  2. Configure a route-policy on RouterT and apply this route-policy for IP FRR on the public network to configure link B (RouterT->RouterB->RouterC) as the backup link of link A.

Procedure

  1. Configure an IP address for each interface.

    # Configure an IP address for each interface on RouterT.

    <Huawei> system-view
    [Huawei] sysname RouterT
    [RouterT] interface gigabitethernet 1/0/0
    [RouterT-GigabitEthernet1/0/0] ip address 172.16.1.1 24
    [RouterT-GigabitEthernet1/0/0] quit
    [RouterT] interface gigabitethernet 2/0/0
    [RouterT-GigabitEthernet2/0/0] ip address 192.168.10.1 24
    [RouterT-GigabitEthernet2/0/0] quit
    [RouterT] interface gigabitethernet 3/0/0
    [RouterT-GigabitEthernet3/0/0] ip address 192.168.20.1 24
    [RouterT-GigabitEthernet3/0/0] quit
    

    The configurations of RouterA, RouterB, and RouterC are similar to the configuration of RouterT, and are not mentioned here.

  2. Configure OSPF on RouterT, RouterA, RouterB, and RouterC.

    # Configure RouterT.

    [RouterT] ospf
    [RouterT-ospf-1] area 0
    [RouterT-ospf-1-area-0.0.0.0] network 172.16.1.0 0.0.0.255
    [RouterT-ospf-1-area-0.0.0.0] network 192.168.10.0 0.0.0.255
    [RouterT-ospf-1-area-0.0.0.0] network 192.168.20.0 0.0.0.255
    [RouterT-ospf-1-area-0.0.0.0] quit

    # Configure RouterA.

    [RouterA] ospf
    [RouterA-ospf-1] area 0
    [RouterA-ospf-1-area-0.0.0.0] network 192.168.10.0 0.0.0.255
    [RouterA-ospf-1-area-0.0.0.0] network 192.168.11.0 0.0.0.255
    [RouterA-ospf-1-area-0.0.0.0] quit

    # Configure RouterB.

    [RouterB] ospf
    [RouterB-ospf-1] area 0
    [RouterB-ospf-1-area-0.0.0.0] network 192.168.20.0 0.0.0.255
    [RouterB-ospf-1-area-0.0.0.0] network 192.168.21.0 0.0.0.255
    [RouterB-ospf-1-area-0.0.0.0] quit

    # Configure RouterC.

    [RouterC] ospf
    [RouterC-ospf-1] area 0
    [RouterC-ospf-1-area-0.0.0.0] network 172.17.1.0 0.0.0.255
    [RouterC-ospf-1-area-0.0.0.0] network 192.168.11.0 0.0.0.255
    [RouterC-ospf-1-area-0.0.0.0] network 192.168.21.0 0.0.0.255
    [RouterC-ospf-1-area-0.0.0.0] quit

  3. Set the cost for OSPF interfaces.

    # Set the cost for GE3/0/0 on RouterT to 100 so that OSPF prefers link A as the primary link.

    [RouterT] interface gigabitethernet 3/0/0
    [RouterT-GigabitEthernet3/0/0] ospf cost 100
    [RouterT-GigabitEthernet3/0/0] quit

    # Set the cost for GE3/0/0 on RouterC to 100 so that OSPF prefers link A as the primary link.

    [RouterC] interface gigabitethernet 3/0/0
    [RouterC-GigabitEthernet3/0/0] ospf cost 100
    [RouterC-GigabitEthernet3/0/0] quit

  4. Configure a route-policy.

    # Configure a route-policy on RouterT, specify the backup outbound interface and backup next hop, and configure an if-match clause to limit the application scope.

    [RouterT] ip ip-prefix frr1 permit 172.17.1.1 24
    [RouterT] route-policy ip_frr_rp permit node 10
    [RouterT-route-policy] if-match ip-prefix frr1
    [RouterT-route-policy] apply backup-nexthop 192.168.20.2
    [RouterT-route-policy] apply backup-interface gigabitethernet 3/0/0
    [RouterT-route-policy] quit

  5. Enable IP FRR on the public network on RouterT.

    [RouterT] ip frr route-policy ip_frr_rp 

  6. Verify the configuration.

    # On RouterT, check detailed information about routes to the 172.17.1.0 network segment. The command output shows that the backup next hop to 172.17.1.0 is 192.168.20.2 and the backup outbound interface is GigabitEthernet3/0/0.

    <RouterT> display ip routing-table 172.17.1.0 verbose
    Route Flags: R - relay,
    D - download to fib
    ------------------------------------------------------------------------------
    Routing Table : Public
    Summary Count : 1
    
    Destination: 172.17.1.0/24
         Protocol: OSPF            Process ID: 1
       Preference: 10                    Cost: 3
          NextHop: 192.168.10.2     Neighbour: 0.0.0.0
            State: Active Adv             Age: 00h06m49s
              Tag: 0                 Priority: low
            Label: NULL               QoSInfo: 0x0
       IndirectID: 0x0
     RelayNextHop: 0.0.0.0          Interface: GigabitEthernet2/0/0
         TunnelID: 0x0                  Flags:  D
       BkNextHop: 192.168.20.2  BkInterface: GigabitEthernet3/0/0
          BkLabel: NULL           SecTunnelID: 0x0
     BkPETunnelID: 0x0        BkPESecTunnelID: 0x0
     BkIndirectID: 0x0

    # Run the shutdown command on GE 2/0/0 of RouterA to simulate a primary link fault.

    [RouterA] interface gigabitethernet 2/0/0
    [RouterA-GigabitEthernet2/0/0] shutdown

    # On RouterT, check detailed information about routes to the 172.17.1.0 network segment. The command output shows that the next hop to 172.17.1.0 becomes 192.168.20.2.

    <RouterT> display ip routing-table 172.17.1.0 verbose
    Route Flags: R - relay,
    D - download to fib
    ------------------------------------------------------------------------------
    Routing Table : Public
    Summary Count : 1
    
    Destination: 172.17.1.0/24
         Protocol: OSPF            Process ID: 1
       Preference: 10                    Cost: 102
          NextHop: 192.168.20.2     Neighbour: 0.0.0.0
            State: Active Adv             Age: 00h00m14s
              Tag: 0                 Priority: low
            Label: NULL               QoSInfo: 0x0
       IndirectID: 0x0
     RelayNextHop: 0.0.0.0          Interface: GigabitEthernet2/0/0
         TunnelID: 0x0                  Flags:  D
        BkNextHop: 192.168.20.2   BkInterface: GigabitEthernet3/0/0
          BkLabel: NULL           SecTunnelID: 0x0
     BkPETunnelID: 0x0        BkPESecTunnelID: 0x0
     BkIndirectID: 0x0

Configuration Files

  • Configuration file of RouterT

    #
     sysname RouterT
    #
    ip frr route-policy ip_frr_rp
    #
    interface GigabitEthernet1/0/0 
     ip address 172.16.1.1 255.255.255.0 
    #
    interface GigabitEthernet2/0/0
     ip address 192.168.10.1 255.255.255.0
    # 
    interface GigabitEthernet3/0/0 
     ip address 192.168.20.1 255.255.255.0
     ospf cost 100 
    #
    ospf 1
     area 0.0.0.0
      network 172.16.1.0 0.0.0.255
      network 192.168.10.0 0.0.0.255
      network 192.168.20.0 0.0.0.255
    #
    ip ip-prefix frr1 index 10 permit 172.17.1.0 24
    #
    route-policy ip_frr_rp permit node 10
     if-match ip-prefix frrl
     apply backup-nexthop 192.168.20.2
     apply backup-interface GigabitEthernet3/0/0
    #
    return
  • Configuration file of RouterA

    #
     sysname RouterA
    #
    interface GigabitEthernet1/0/0
     ip address 192.168.10.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 192.168.11.2 255.255.255.0
    #
    ospf 1
     area 0.0.0.0
      network 192.168.10.0 0.0.0.255
      network 192.168.11.0 0.0.0.255
    #
    return
  • Configuration file of RouterB

    #
     sysname RouterB
    #
    interface GigabitEthernet1/0/0
     ip address 192.168.20.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 192.168.21.2 255.255.255.0
    #
    ospf 1
     area 0.0.0.0
      network 192.168.20.0 0.0.0.255
      network 192.168.21.0 0.0.0.255
    #
    return
  • Configuration file of RouterC

    #
     sysname RouterC
    #
    interface GigabitEthernet1/0/0
     ip address 172.17.1.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 192.168.11.1 255.255.255.0
    #
    interface GigabitEthernet3/0/0
     ip address 192.168.21.1 255.255.255.0
     ospf cost 100
    #
    ospf 1
     area 0.0.0.0
      network 172.17.1.0 0.0.0.255
      network 192.168.11.0 0.0.0.255
      network 192.168.21.0 0.0.0.255
    #
    return
Translation
Download
Updated: 2019-05-17

Document ID: EDOC1000174069

Views: 113779

Downloads: 254

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next