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

NE40E V800R010C10SPC500 Configuration Guide - IP Routing 01

This is NE40E V800R010C10SPC500 Configuration Guide - IP Routing
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 Associating Direct Routes with a VRRP Backup Group

Example for Associating Direct Routes with a VRRP Backup Group

Associating direct routes with a Virtual Router Redundancy Protocol (VRRP) backup group prevents user-to-network traffic and network-to-user traffic that traverse the VRRP backup group from being transmitted on different paths. This section shows an example of how to associate direct routes with a VRRP backup group.

Networking Requirements

Device 1 and Device 2 form a VRRP backup group on the network shown in Figure 2-11. Device 1 is the master device while Device 2 is the backup device. The VRRP backup group functions as the user-side gateway. User-to-network traffic is forwarded to Device 1. Meanwhile, the Open Shortest Path First (OSPF) protocol runs on Device 1, Device2, and Device3 so that these devices can communicate with one another at the IP layer. Network-to-user traffic travels on the path that OSPF selects. Device 3 has two equal-cost routes destined for the user network segment 11.1.1.0/24 that OSPF selects. Therefore, the two routes load-balance the network-to-user traffic. User-to-network traffic and network-to-user traffic travel on different paths.

Figure 2-11 Association between direct routes and a VRRP backup group
NOTE:

Interfaces 1 through 2 in this example are GE 1/0/0, GE 1/0/1, respectively.


To resolve the preceding problem, associate the direct route that the virtual IP network segment generates with a VRRP backup group. The association allows Device 2 to increase the direct route cost. Enable OSPF to import Device 2's direct routes and inherit the costs from the imported direct routes. The cost of the direct route destined for 11.1.1.1/24 is less than that of the route destined for 11.1.1.2/24. Device 3 selects the route with a smaller cost to forward network-to-user traffic. Therefore, user-to-network traffic and network-to-user traffic are transmitted on the same path.

Precautions

When associating direct routes with a VRRP backup group, note the following point:

  • OSPF cannot run on Device 1's and Device 2's VRRP-enabled interfaces. If both VRRP and OSPF run on Device 1's and Device 2's interfaces, OSPF cannot inherit the costs from the imported direct routes after the association.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure a VRRP backup group on Device 1 and Device 2.

  2. Configure OSPF on Device 1, Device 2, and Device 3.

  3. Associate direct routes with the VRRP backup group on NEP1 and Device 2.

  4. Enable OSPF to import direct routes on Device 1 and Device 2 and to inherit the costs of the imported direct routes.

Data Preparation

To complete the configuration, you need the following data:

  • VLAN ID 10 configured on the Switch

  • VRRP ID 1 and a virtual IP address 11.1.1.111 of the VRRP backup group

  • Device 1's VRRP priority 120 and Device 2's VRRP priority 100 (the default value)

  • Cost of direct routes to the virtual IP network segment on Device 2 (300)

Procedure

  1. Configure an IP address for each interface. For configuration details, see Configuration File in this section.
  2. Configure a VRRP backup group.

    # Configure a VLAN with VLAN ID 10 on the Switch. Add GE 1/0/0 and GE 1/0/1 to VLAN 10 so that the Switch transparently transmits VRRP packets sent by Device 1 or Device 2.

    <Switch> system-view
    [~Switch] interface gigabitethernet 1/0/0
    [~Switch-GigabitEthernet1/0/0] portswitch
    [*Switch-GigabitEthernet1/0/0] commit
    [~Switch-GigabitEthernet1/0/0] quit
    [~Switch] interface gigabitethernet 1/0/1
    [~Switch-GigabitEthernet1/0/1] portswitch
    [*Switch-GigabitEthernet1/0/1] commit
    [~Switch-GigabitEthernet1/0/1] quit
    [~Switch] vlan 10
    [*Switch-vlan10] port gigabitethernet 1/0/0
    [*Switch-vlan10] port gigabitethernet 1/0/1
    [*Switch-vlan10] commit
    [~Switch-vlan10] quit

    # Create VRRP backup group 1 on Device 1, and set the priority of Device 1 in the VRRP backup group to 120 so that Device 1 functions as the master device.

    <Device1> system-view
    [~Device1] interface gigabitethernet 1/0/0
    [~Device1-GigabitEthernet1/0/0] vrrp vrid 1 virtual-ip 11.1.1.111
    [*Device1-GigabitEthernet1/0/0] vrrp vrid 1 priority 120
    [*Device1-GigabitEthernet1/0/0] commit
    [~Device1-GigabitEthernet1/0/0] quit

    # Create VRRP backup group 1 on Device 2, and set the priority of Device 2 in the VRRP backup group to 100 so that Device 2 functions as the backup device.

    <Device2> system-view
    [~Device2] interface gigabitethernet 1/0/0
    [~Device2-GigabitEthernet1/0/0] vrrp vrid 1 virtual-ip 11.1.1.111
    [*Device2-GigabitEthernet1/0/0] commit
    [~Device2-GigabitEthernet1/0/0] quit

  3. Configure OSPF.

    # Configure OSPF on Device 1.

    [~Device1] ospf 1
    [*Device1-ospf-1] area 0
    [*Device1-ospf-1-area-0.0.0.0] network 11.1.3.0 0.0.0.255
    [*Device1-ospf-1-area-0.0.0.0] commit
    [~Device1-ospf-1-area-0.0.0.0] quit
    [~Device1-ospf-1] quit

    # Configure OSPF on Device 2.

    [~Device2] ospf 1
    [*Device2-ospf-1] area 0
    [*Device2-ospf-1-area-0.0.0.0] network 11.1.2.0 0.0.0.255
    [*Device2-ospf-1-area-0.0.0.0] commit
    [~Device2-ospf-1-area-0.0.0.0] quit
    [~Device2-ospf-1] quit

    # Configure OSPF on Device 3.

    <Device3> system-view
    [~Device3] ospf 1
    [*Device3-ospf-1] area 0
    [*Device3-ospf-1-area-0.0.0.0] network 11.1.2.0 0.0.0.255
    [*Device3-ospf-1-area-0.0.0.0] network 11.1.3.0 0.0.0.255
    [*Device3-ospf-1-area-0.0.0.0] commit
    [~Device3-ospf-1-area-0.0.0.0] quit
    [~Device3-ospf-1] quit

  4. Associate direct routes with the VRRP backup group.

    # Associate direct routes with the VRRP backup group on Device 1.

    [~Device1] interface gigabitethernet 1/0/0
    [~Device1-GigabitEthernet1/0/0] direct-route track vrrp vrid 1 degrade-cost 300
    [*Device1-GigabitEthernet1/0/0] commit
    [~Device1-GigabitEthernet1/0/0] quit

    # Associate direct routes with the VRRP backup group on Device2.

    [~Device2] interface gigabitethernet 1/0/0
    [~Device2-GigabitEthernet1/0/0] direct-route track vrrp vrid 1 degrade-cost 300
    [*Device2-GigabitEthernet1/0/0] commit
    [~Device2-GigabitEthernet1/0/0] quit

  5. Configure OSPF to import direct routes.

    # Configure OSPF on Device 1.

    [~Device1] ospf 1
    [*Device1-ospf-1] import-route direct
    [*Device1-ospf-1] default cost inherit-metric
    [*Device1-ospf-1] commit
    [~Device1-ospf-1] quit

    # Configure OSPF on Device 2.

    [~Device2] ospf 1
    [*Device2-ospf-1] import-route direct
    [*Device2-ospf-1] default cost inherit-metric
    [*Device2-ospf-1] commit
    [~Device2-ospf-1] quit

  6. Check the configuration.

    # Run the display ip routing-table command on Device 2 to view information about the IP routing table. The command output shows that the cost of direct route to the virtual IP network segment (11.1.1.0/24) is 300.

    <Device2> display ip routing-table
    Route Flags: R - relay, D - download
    to fib, T - to vpn-instance, B - black hole route
    ------------------------------------------------------------------------------
    Routing Table : _public_
             Destinations : 12       Routes : 12        
    
    Destination/Mask    Proto  Pre  Cost        Flags NextHop         Interface
    
         11.1.1.0/24  Direct 0    300           D  11.1.1.2        GigabitEthernet1/0/0
           11.1.1.2/32  Direct 0    0             D  127.0.0.1       GigabitEthernet1/0/0
         11.1.1.111/32  O_ASE  150  0             D  11.1.2.2        GigabitEthernet1/0/1
         11.1.1.255/32  Direct 0    0             D  127.0.0.1       GigabitEthernet1/0/0
           11.1.2.0/24  Direct 0    0             D  11.1.2.1        GigabitEthernet1/0/1
           11.1.2.1/32  Direct 0    0             D  127.0.0.1       GigabitEthernet1/0/1
         11.1.2.255/32  Direct 0    0             D  127.0.0.1       GigabitEthernet1/0/1
           11.1.3.0/24  OSPF   10   2             D  11.1.2.2        GigabitEthernet1/0/1
          127.0.0.0/8   Direct 0    0             D  127.0.0.1       InLoopBack0
          127.0.0.1/32  Direct 0    0             D  127.0.0.1       InLoopBack0
    127.255.255.255/32  Direct 0    0             D  127.0.0.1       InLoopBack0
    255.255.255.255/32  Direct 0    0             D  127.0.0.1       InLoopBack0

    # Run the display ip routing-table 11.1.1.0 command on Device 3 to view information about the route destined for 11.1.1.0/24. In this example, the route with 11.1.3.1 as the next hop is displayed, which means that network-to-user traffic passes through Device 1.

    <Device3> display ip routing-table 11.1.1.0
    Route Flags: R - relay, D - download
    to fib, T - to vpn-instance, B - black hole route
    ------------------------------------------------------------------------------
    Routing Table : _public_
    Summary Count : 1
    
    Destination/Mask    Proto  Pre  Cost        Flags NextHop         Interface
    
           11.1.1.0/24  O_ASE  150  0             D  11.1.3.1        GigabitEthernet1/0/0

Configuration Files

  • Switch configuration file

    #
    sysname Switch
    #
    vlan batch 10
    #               
    interface GigabitEthernet1/0/0
     portswitch     
     undo shutdown  
     port default vlan 10
    #               
    interface GigabitEthernet1/0/1
     portswitch     
     undo shutdown  
     port default vlan 10
    #
  • Device 1 configuration file

    #
    sysname Device1
    #
    interface GigabitEthernet1/0/0
     undo shutdown  
     ip address 11.1.1.1 255.255.255.0
     vrrp vrid 1 virtual-ip 11.1.1.111
     vrrp vrid 1 priority 120
     direct-route track vrrp vrid 1 degrade-cost 300
    #
    interface GigabitEthernet1/0/1
     undo shutdown
     ip address 11.1.3.1 255.255.255.0
    #               
    ospf 1          
     default cost inherit-metric
     import-route direct
     area 0.0.0.0   
      network 11.1.3.0 0.0.0.255
    #
  • Device 2 configuration file

    #
    sysname Device2
    #
    interface GigabitEthernet1/0/0
     undo shutdown  
     ip address 11.1.1.2 255.255.255.0
     vrrp vrid 1 virtual-ip 11.1.1.111
     direct-route track vrrp vrid 1 degrade-cost 300
    #
    interface GigabitEthernet1/0/1
     undo shutdown
     ip address 11.1.2.1 255.255.255.0
    #               
    ospf 1          
     default cost inherit-metric
     import-route direct
     area 0.0.0.0   
      network 11.1.2.0 0.0.0.255
    #
  • Device3 configuration file

    #
    sysname Device3
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 11.1.3.2 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     undo shutdown
     ip address 11.1.2.2 255.255.255.0
    #               
    ospf 1          
     area 0.0.0.0   
      network 11.1.2.0 0.0.0.255
      network 11.1.3.0 0.0.0.255
    #
Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055018

Views: 47334

Downloads: 200

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