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 Configuring OSPF Load Balancing

Example for Configuring OSPF Load Balancing

This section describes how to configure OSPF load balancing, including enabling load balancing and setting priorities for equal-cost routes.

Networking Requirements

On the network shown in Figure 5-15, the requirements are as follows:

  • Device A, Device B, Device C, Device D, and Device E are connected to each other through OSPF.

  • Device A, Device B, Device C, Device D, and Device E belong to Area 0.

  • Load balancing is configured so that the traffic from Device A to Device E is load-balanced by Device C and Device D.

Figure 5-15 Networking for configuring OSPF load balancing
NOTE:

Interface 1 to 4 in this example are GE 1/0/0, GE 2/0/0, GE 3/0/0 and GE 4/0/0, respectively.



Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure basic OSPF functions on each router for interconnection.

  2. Configure load balancing on Device A.

  3. Set the priority for equal-cost routes on Device A.

  4. Configure per-packet load balancing on Device A.

Data Preparation

To complete the configuration, you need the following data.

  • Data of Device A, including router ID (1.1.1.1), OSPF process ID (1), and network segment addresses of Area 0 (10.1.1.0/24, 10.1.2.0/24 and 10.1.3.0/24)

  • Data of Device B, including router ID (2.2.2.2), OSPF process ID (1), and network segment addresses of Area 0 (10.1.1.0/8 and 192.168.0.0/8)

  • Data of Device C, including router ID (3.3.3.3), OSPF process ID (1), and network segment addresses of Area 0 (10.1.2.0/8 and 192.168.1.0/8)

  • Data of Device D, including router ID (4.4.4.4), OSPF process ID (1), and network segment addresses of Area 0 (10.1.3.0/8 and 192.168.2.0/8)

  • Data of Device E, including router ID (5.5.5.5), OSPF process ID (1), and network segment addresses of Area 0 (192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24, and 172.17.1.0/24)

  • Number of equal-cost routes for load balancing on Device A (2)

  • Next hop weights of the routes from Device A to Device B, Device C, and Device D (2, 1, and 1, respectively)

Procedure

  1. Assign an IP address to each interface. For configuration details, see Configuration Files in this section.
  2. Configure basic OSPF functions. For details, see Example for Configuring Basic OSPF Functions.
  3. Display the routing table of Device A.

    As shown in the routing table, Device A has three valid next hops: Device B (10.1.1.2), Device C (10.1.2.2), and Device D (10.1.3.2) because the default maximum number of equal-cost routes is 6.

    <DeviceA> display ip routing-table
    Route Flags: R - relay, D - download
    to fib, T - to vpn-instance, B - black hole route
    ----------------------------------------------------------------------------
    Routing Tables : _public_
             Destinations : 15       Routes : 15
    
    Destination/Mask    Proto  Pre  Cost  Flags     NextHop         Interface
    
           10.1.1.0/24  Direct 0    0       D        10.1.1.1         GigabitEthernet1/0/0
           10.1.1.1/32  Direct 0    0       D        127.0.0.1        GigabitEthernet1/0/0
           10.1.1.2/32  Direct 0    0       D        10.1.1.2         GigabitEthernet1/0/0
           10.1.2.0/24  Direct 0    0       D        10.1.2.1         GigabitEthernet2/0/0
           10.1.2.1/32  Direct 0    0       D        127.0.0.1        GigabitEthernet2/0/0
           10.1.2.2/32  Direct 0    0       D        10.1.2.2         GigabitEthernet2/0/0
           10.1.3.0/24  Direct 0    0       D        10.1.2.1         GigabitEthernet3/0/0
           10.1.3.1/32  Direct 0    0       D        127.0.0.1        GigabitEthernet3/0/0
           10.1.3.2/32  Direct 0    0       D        10.1.2.2         GigabitEthernet3/0/0
        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
        192.168.0.0/24  OSPF   10   2       D        10.1.1.2         GigabitEthernet1/0/0
        192.168.1.0/24  OSPF   10   2       D        10.1.2.2         GigabitEthernet2/0/0
        192.168.2.0/24  OSPF   10   2       D        10.1.2.2         GigabitEthernet3/0/0
         172.17.1.0/24  OSPF   10   3       D        10.1.1.2         GigabitEthernet1/0/0
                        OSPF   10   3       D        10.1.2.2         GigabitEthernet2/0/0
                        OSPF   10   3       D        10.1.3.2         GigabitEthernet3/0/0

  4. Set the maximum number of routes for load balancing to 2 on Device A.

    [~DeviceA] ospf 1
    [*DeviceA-ospf-1] maximum load-balancing 2
    [*DeviceA-ospf-1] commit
    [~DeviceA-ospf-1] quit

    # Display the routing table of Device A. You can view two routes for load balancing on Device A, with Device B (10.1.1.2) and Device C (10.1.2.2) as the next hops.

    [~DeviceA] display ip routing-table
    Route Flags: R - relay, D - download
    to fib, T - to vpn-instance, B - black hole route
    ----------------------------------------------------------------------------
    Routing Tables : _public_
             Destinations : 15       Routes : 15
    
    Destination/Mask    Proto  Pre  Cost  Flags     NextHop         Interface
    
           10.1.1.0/24  Direct 0    0       D        10.1.1.1         GigabitEthernet1/0/0
           10.1.1.1/32  Direct 0    0       D        127.0.0.1        GigabitEthernet1/0/0
           10.1.1.2/32  Direct 0    0       D        10.1.1.2         GigabitEthernet1/0/0
           10.1.2.0/24  Direct 0    0       D        10.1.2.1         GigabitEthernet2/0/0
           10.1.2.1/32  Direct 0    0       D        127.0.0.1        GigabitEthernet2/0/0
           10.1.2.2/32  Direct 0    0       D        10.1.2.2         GigabitEthernet2/0/0
           10.1.3.0/24  Direct 0    0       D        10.1.2.1         GigabitEthernet3/0/0
           10.1.3.1/32  Direct 0    0       D        127.0.0.1        GigabitEthernet3/0/0
           10.1.3.2/32  Direct 0    0       D        10.1.2.2         GigabitEthernet3/0/0
        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
        192.168.0.0/24  OSPF   10   2       D        10.1.1.2         GigabitEthernet1/0/0
        192.168.1.0/24  OSPF   10   2       D        10.1.2.2         GigabitEthernet2/0/0
        192.168.2.0/24  OSPF   10   2       D        10.1.2.2         GigabitEthernet3/0/0
         172.17.1.0/24  OSPF   10   3       D        10.1.1.2         GigabitEthernet1/0/0
                        OSPF   10   3       D        10.1.2.2         GigabitEthernet2/0/0

  5. Set the priority for equal-cost routes on Device A.

    [~DeviceA] ospf 1
    [*DeviceA-ospf-1] nexthop 10.1.1.2 weight 2
    [*DeviceA-ospf-1] nexthop 10.1.2.2 weight 1
    [*DeviceA-ospf-1] nexthop 10.1.3.2 weight 1
    [*DeviceA-ospf-1] commit
    [~DeviceA-ospf-1] quit

  6. Verify the configuration.

    # Display the routing table of Device A.

    [~DeviceA] display ip routing-table
    Route Flags: R - relay, D - download
    to fib, T - to vpn-instance, B - black hole route
    ----------------------------------------------------------------------------
    Routing Tables : _public_
             Destinations : 15       Routes : 15
    
    Destination/Mask    Proto  Pre  Cost  Flags     NextHop         Interface
    
           10.1.1.0/24  Direct 0    0       D        10.1.1.1         GigabitEthernet1/0/0
           10.1.1.1/32  Direct 0    0       D        127.0.0.1        GigabitEthernet1/0/0
           10.1.1.2/32  Direct 0    0       D        10.1.1.2         GigabitEthernet1/0/0
           10.1.2.0/24  Direct 0    0       D        10.1.2.1         GigabitEthernet2/0/0
           10.1.2.1/32  Direct 0    0       D        127.0.0.1        GigabitEthernet2/0/0
           10.1.2.2/32  Direct 0    0       D        10.1.2.2         GigabitEthernet2/0/0
           10.1.3.0/24  Direct 0    0       D        10.1.2.1         GigabitEthernet3/0/0
           10.1.3.1/32  Direct 0    0       D        127.0.0.1        GigabitEthernet3/0/0
           10.1.3.2/32  Direct 0    0       D        10.1.2.2         GigabitEthernet3/0/0
        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
        192.168.0.0/24  OSPF   10   2       D        10.1.1.2         GigabitEthernet1/0/0
        192.168.1.0/24  OSPF   10   2       D        10.1.2.2         GigabitEthernet2/0/0
        192.168.2.0/24  OSPF   10   2       D        10.1.2.2         GigabitEthernet3/0/0
         172.17.1.0/24  OSPF   10   3       D        10.1.2.2         GigabitEthernet2/0/0
                        OSPF   10   3       D        10.1.3.2         GigabitEthernet3/0/0

    As shown in the routing table, the priority of the route with 10.1.2.2 and 10.1.3.2 as the next hop addresses is higher than that of the route with 10.1.1.2 as the next hop address. Therefore, Device A has only two valid next hops, Device C (10.1.2.2) and Device D (10.1.3.2).

Configuration Files

  • Device A configuration file

    #
     sysname DeviceA
     #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 10.1.1.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 10.1.2.1 255.255.255.0
    #
    interface GigabitEthernet3/0/0
     undo shutdown
     ip address 10.1.3.1 255.255.255.0
    #
    ospf 1 router-id 1.1.1.1
     maximum load-balancing 2
     nexthop 10.1.1.2 weight 2
     nexthop 10.1.2.2 weight 1
     nexthop 10.1.3.2 weight 1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 10.1.2.0 0.0.0.255
      network 10.1.3.0 0.0.0.255
    #
    return
  • Device B configuration file

    sysname DeviceB
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 10.1.1.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 192.168.0.1 255.255.255.0
    #
    ospf 1 router-id 2.2.2.2
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 192.168.0.0 0.0.255.255
    #
    return
  • Device C configuration file

    #
     sysname DeviceC
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 10.1.2.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 192.168.1.1 255.255.255.0
    #
    ospf 1 router-id 3.3.3.3
     area 0.0.0.0
      network 10.1.2.0 0.0.0.255
      network 192.168.1.0 0.0.0.255
    #
    return
  • Device D configuration file

    #
     sysname DeviceD
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 10.1.3.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 192.168.2.1 255.255.255.0
    #
    ospf 1 router-id 4.4.4.4
     area 0.0.0.0
      network 10.1.3.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
  • Device E configuration file

    #
     sysname DeviceE
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ip address 192.168.0.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     undo shutdown
     ip address 192.168.1.2 255.255.255.0
    #
    interface GigabitEthernet3/0/0
     undo shutdown
     ip address 192.168.2.2 255.255.255.0
    #
    interface GigabitEthernet4/0/0
     undo shutdown
     ip address 172.17.1.1 255.255.255.0
    #
    ospf 1 router-id 4.4.4.4
     area 0.0.0.0
      network 192.168.0.0 0.0.255.255
      network 192.168.1.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
      network 172.17.1.0 0.0.0.255
    #
    return
Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055018

Views: 47389

Downloads: 200

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