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 BGP Load Balancing

Example for Configuring BGP Load Balancing

Networking Requirements

On the network shown in Figure 9-37, BGP is configured on all routers. RouterA is in AS 100. RouterB and RouterC are in AS 300. RouterD is in AS 200. Network congestion from RouterA to destination address 8.1.1.0/24 needs to be relieved and network resources need to be fully utilized.

Figure 9-37 Networking diagram of configuring BGP load balancing

Configuration Roadmap

The configuration roadmap is as follows:

  1. Establish EBGP connections between RouterA and RouterB and between RouterA and RouterC, between RouterD and RouterB and between RouterD and RouterC to enable ASs to communicate with each other using BGP.

  2. Configuring load balancing on RouterA so that RouterA can send traffic to RouterD through either RouterB or RouterC.

Procedure

  1. Configure an IP address for each interface.

    # Configure IP addresses for all interfaces of RouterA.

    <Huawei> system-view
    [Huawei] sysname RouterA
    [RouterA] interface gigabitethernet 1/0/0
    [RouterA-GigabitEthernet1/0/0] ip address 200.1.1.1 255.255.255.0
    [RouterA-GigabitEthernet1/0/0] quit
    [RouterA] interface gigabitethernet 2/0/0
    [RouterA-GigabitEthernet2/0/0] ip address 200.1.2.1 255.255.255.0
    [RouterA-GigabitEthernet2/0/0] quit

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

  2. Establish BGP connections.

    # Configure RouterA.

    [RouterA] bgp 100
    [RouterA-bgp] router-id 1.1.1.1
    [RouterA-bgp] peer 200.1.1.2 as-number 300
    [RouterA-bgp] peer 200.1.2.2 as-number 300
    [RouterA-bgp] quit

    # Configure RouterB.

    [RouterB] bgp 300
    [RouterB-bgp] router-id 2.2.2.2
    [RouterB-bgp] peer 200.1.1.1 as-number 100
    [RouterB-bgp] peer 200.1.3.1 as-number 200
    [RouterB-bgp] quit

    # Configure RouterC.

    [RouterC] bgp 300
    [RouterC-bgp] router-id 3.3.3.3
    [RouterC-bgp] peer 200.1.2.1 as-number 100
    [RouterC-bgp] peer 200.1.4.1 as-number 200
    [RouterC-bgp] quit

    # Configure RouterD.

    [RouterD] bgp 200
    [RouterD-bgp] router-id 4.4.4.4
    [RouterD-bgp] peer 200.1.3.2 as-number 300
    [RouterD-bgp] peer 200.1.4.2 as-number 300
    [RouterD-bgp] ipv4-family unicast
    [RouterD-bgp-af-ipv4] network 8.1.1.0 255.255.255.0
    [RouterD-bgp-af-ipv4] quit
    [RouterD-bgp] quit

    # View the routing table of RouterA.

    [RouterA] display bgp routing-table 8.1.1.0 24
    
     BGP local router ID : 1.1.1.1
     Local AS number : 100
     Paths : 2 available, 1 best, 1 select
     BGP routing table entry information of 8.1.1.0/24:
     From: 200.1.1.2 (2.2.2.2)
     Route Duration: 00h00m50s
     Direct Out-interface: GigabitEthernet1/0/0
     Original nexthop: 200.1.1.2
     Qos information : 0x0
     AS-path 300 200, origin igp, pref-val 0, valid, external, best, select, active, pre 255
     Advertised to such 2 peers:
        200.1.1.2
        200.1.2.2
    
     BGP routing table entry information of 8.1.1.0/24:
     From: 200.1.2.2 (3.3.3.3)
     Route Duration: 00h00m51s
     Direct Out-interface: GigabitEthernet2/0/0
     Original nexthop: 200.1.2.2
     Qos information : 0x0
     AS-path 300 200, origin igp, pref-val 0, valid, external, pre 255, not preferred for router ID
     Not advertised to any peer yet

    The preceding command output shows that there are two valid routes from RouterA to destination 8.1.1.0/24. The route with the next-hop address of 200.1.1.2 is the optimal route because the router ID of RouterB is smaller.

  3. Configure BGP load balancing.

    # Configure load balancing on RouterA.

    [RouterA] bgp 100
    [RouterA-bgp] ipv4-family unicast
    [RouterA-bgp-af-ipv4] maximum load-balancing 2
    [RouterA-bgp-af-ipv4] quit
    [RouterA-bgp] quit

  4. Verify the configuration.

    # View the routing table of RouterA.

    [RouterA] display bgp routing-table 8.1.1.0 24
    
     BGP local router ID : 1.1.1.1
     Local AS number : 100
     Paths : 2 available, 1 best, 2 select
     BGP routing table entry information of 8.1.1.0/24:
     From: 200.1.1.2 (2.2.2.2)
     Route Duration: 00h03m55s
     Direct Out-interface: GigabitEthernet1/0/0
     Original nexthop: 200.1.1.2
     Qos information : 0x0
     AS-path 300 200, origin igp, pref-val 0, valid, external, best, select,  active, pre 255
     Advertised to such 2 peers
        200.1.1.2
        200.1.2.2
    
     BGP routing table entry information of 8.1.1.0/24:
     From: 200.1.2.2 (3.3.3.3)
     Route Duration: 00h03m56s
     Direct Out-interface: GigabitEthernet2/0/0
     Original nexthop: 200.1.2.2
     Qos information : 0x0
     AS-path 300 200, origin igp, pref-val 0, valid, external, select,  active, pre 255, not preferred for router ID
     Not advertised to any peer yet

    The preceding command output shows that BGP route 8.1.1.0/24 has two next hops: 200.1.1.2 and 200.1.2.2. Both of them are optimal routes.

Configuration Files

  • Configuration file of RouterA

    #
    sysname RouterA
    #
    interface GigabitEthernet1/0/0
     ip address 200.1.1.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 200.1.2.1 255.255.255.0
    #
    interface LoopBack0
     ip address 1.1.1.1 255.255.255.255
    #
    bgp 100
     router-id 1.1.1.1
     peer 200.1.1.2 as-number 300
     peer 200.1.2.2 as-number 300
     #
     ipv4-family unicast
      undo synchronization
      maximum load-balancing 2
      peer 200.1.1.2 enable
      peer 200.1.2.2 enable
    #
    return
  • Configuration file of RouterB

    #
    sysname RouterB
    #
    interface GigabitEthernet1/0/0
     ip address 200.1.1.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 200.1.3.2 255.255.255.0
    #
    interface LoopBack0
     ip address 2.2.2.2 255.255.255.255
    #
    bgp 300
     router-id 2.2.2.2
     peer 200.1.1.1 as-number 100
     peer 200.1.3.1 as-number 200
     #
     ipv4-family unicast
      undo synchronization
      peer 200.1.1.1 enable
      peer 200.1.3.1 enable
    #
    return
  • Configuration file of RouterC

    #
    sysname RouterC
    #
    interface GigabitEthernet1/0/0
     ip address 200.1.4.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 200.1.2.2 255.255.255.0
    #
    interface LoopBack0
     ip address 3.3.3.3 255.255.255.255
    #
    bgp 300
     router-id 3.3.3.3
     peer 200.1.2.1 as-number 100
     peer 200.1.4.1 as-number 200
     #
     ipv4-family unicast
      undo synchronization
      peer 200.1.2.1 enable
      peer 200.1.4.1 enable
    #
    return
  • Configuration file of RouterD

    #
    sysname RouterD
    #
    interface GigabitEthernet1/0/0
     ip address 200.1.4.1 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip address 200.1.3.1 255.255.255.0
    #
    interface GigabitEthernet3/0/0
     ip address 8.1.1.1 255.255.255.0
    #
    interface LoopBack0
     ip address 4.4.4.4 255.255.255.255
    #
    bgp 200
     router-id 4.4.4.4
     peer 200.1.3.2 as-number 300
     peer 200.1.4.2 as-number 300
     #
     ipv4-family unicast
      undo synchronization
      network 8.1.1.0 255.255.255.0
      peer 200.1.3.2 enable
      peer 200.1.4.2 enable
    #
    return
Translation
Download
Updated: 2019-05-17

Document ID: EDOC1000174069

Views: 144182

Downloads: 280

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