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

ME60 V800R010C10SPC500 Configuration Guide - IP Routing 01

This is ME60 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).
Configuring BGP Load Balancing

Configuring BGP Load Balancing

BGP load balancing improves network resource usage and reduces network congestion.

Usage Scenario

On large networks, there may be multiple valid routes to the same destination. BGP, however, advertises only the optimal route to its peers, which may result in load imbalance.

Either of the following methods can be used to address the problem:

  • Use BGP routing policies to allow traffic to be balanced. For example, use a routing policy to modify the Local_Pref, AS_Path, Origin, or MED attribute of BGP routes to control traffic forwarding and implement load balancing.

  • Use equal-cost routes to balance traffic by configuring the maximum number of routes for load balancing. Load balancing can be implemented globally or based on a specified peer or peer group.

NOTE:
  • Traffic can be balanced among BGP routes only when the first eight attributes described in "Route Selection" in BGP Route Processing and the AS_Path of the routes are the same.

  • You can change load balancing rules through configurations. For example, you can prevent the device from comparing AS_Path attributes or IGP costs. When performing these configurations, ensure that no routing loops will occur.

  • Local cross routes and routes imported between public network and VPN instances do not support load balancing.

The next section describes how to configure load balancing globally or based on a specified peer or peer group.

Pre-configuration tasks

Before configuring BGP load balancing, configure basic BGP functions.

Procedure

  • Configure BGP peer or peer group-based load balancing.

    1. Run system-view

      The system view is displayed.

    2. Run bgp as-number

      The BGP view is displayed.

    3. Run ipv4-family unicast

      The BGP-IPv4 unicast address family view is displayed.

      NOTE:

      The BGP-IPv4 unicast address family view is used as an example, and you can also configure load balancing in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv4 address family view, or BGP-VPN instance IPv6 address family view.

    4. Run peer { ipv4-address | ipv6–address | group-name } load-balancing [ as-path-ignore | as-path-relax ]

      BGP peer or peer group-based load balancing is configured.

      After the peer load-balancing command is run, BGP peer-based load balancing is implemented only when the following conditions are met:
      • The routes are received from the specified peer or peer group.
      • The optimal route and optimal equal-cost routes exist.
      • The AS_Path attribute is the same as that of the optimal route, or as-path-ignore or as-path-relax is specified in the peer load-balancing command.
        • If as-path-ignore is specified, the device ignores comparing AS_Path attributes when selecting routes for load balancing. In this case, routes can participate in load balancing even if their AS_Path attributes are different.
        • If as-path-relax is specified, the device ignores comparing the AS_Path attributes of the same length when selecting routes for load balancing. In this case, routes cannot participate in load balancing if their AS_Path attributes are of different lengths. For example, the AS_Path attribute of route A is 10, and the AS_Path attribute of route B is 10, 20. Because the two AS_Path attributes are of different lengths, the two routes cannot participate in load balancing.
    5. (Optional) Change load balancing rules.

      • Run the load-balancing as-path-ignore command to prevent the device from comparing AS_Path attributes when selecting routes for load balancing.
      • Run the load-balancing as-path-relax command to configure the device to ignore comparing the AS_Path attributes of the same length when selecting routes for load balancing.
      • Run the load-balancing igp-metric-ignore command to prevent the device from comparing IGP costs when selecting routes for load balancing.
      NOTE:

      The address family views supported by the preceding commands are different. When running any of the commands, ensure that the command is run in the correct address family view.

      Change load balancing rules based on network requirements and exercise caution when running the commands.

    6. Run commit

      The configuration is committed.

  • Configure global BGP load balancing.

    • Set the maximum number of BGP routes for load balancing.
      1. Run system-view

        The system view is displayed.

      2. Run bgp as-number

        The BGP view is displayed.

      3. Run ipv4-family unicast

        The IPv4-unicast address family view is displayed.

      4. Run maximum load-balancing [ ebgp | ibgp ] number [ ecmp-nexthop-changed ]

        The maximum number of BGP equal-cost routes for load balancing is set.

        • ebgp indicates that load balancing is implemented only among EBGP routes.

        • ibgp indicates that load balancing is implemented only among IBGP routes.

        • If neither ebgp nor ibgp is specified, both EBGP and IBGP routes can balance traffic, and the number of EBGP routes for load balancing is the same as the number of IBGP routes for load balancing.

        NOTE:

        By default, traffic cannot be balanced among IBGP and EBGP routes on the public network. If multiple routes with the same destination address exist on the public network, the system selects the optimal route first. If the optimal route is an IBGP route, only IBGP routes carry out load balancing. If the optimal route is an EBGP route, only EBGP routes carry out load balancing.

        The BGP-IPv4 unicast address family view is used as an example, and you can also configure load balancing in the BGP view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv4 address family view, or BGP-VPN instance IPv6 address family view.

      5. (Optional) Change load balancing rules.

        • Run the load-balancing as-path-ignore command to prevent the device from comparing AS_Path attributes when selecting routes for load balancing.
        • Run the load-balancing as-path-relax command to configure the device to ignore comparing the AS_Path attributes of the same length when selecting routes for load balancing.
        • Run the load-balancing igp-metric-ignore command to prevent the device from comparing IGP costs when selecting routes for load balancing.
        NOTE:

        The address family views supported by the preceding commands are different. When running any of the commands, ensure that the command is run in the correct address family view.

        Change load balancing rules based on network requirements and exercise caution when running the commands.

      6. Run commit

        The configuration is committed.

    • Set the maximum number of EBGP and IBGP routes for load balancing.

      This configuration is used in a VPN where a CE is dual-homed to two PEs. When the CE resides in the same AS as only one of the PEs, you can set the maximum number of EBGP and IBGP routes for load balancing so that VPN traffic can be balanced among EBGP and IBGP routes.

      1. Run system-view

        The system view is displayed.

      2. Run bgp as-number

        The BGP view is displayed.

      3. Run ipv4-family vpn-instance vpn-instance-name

        The BGP VPN instance address family view is displayed.

      4. Run maximum load-balancing eibgp number [ ecmp-nexthop-changed ]

        The maximum number of EBGP and IBGP routes for load balancing is set.

        After the maximum load-balancing eibgp number command is run on a device, the device, by default, changes the next hop of each route to itself before advertising the route to a peer, regardless of whether the route is to be used for load balancing. However, in RR or BGP confederation scenarios, the device does not change the next hop addresses of non-local routes to be advertised to a local address. As a result, besides the routes for load-balancing, those routes that are not supposed to participate in load balancing deliver traffic to the device, which overburdens the device. To address this problem, you can set ecmp-nexthop-changed so that the device changes the next hop of only routes that are to be used for load balancing to itself before advertising them to peers.

      5. (Optional) Change load balancing rules.

        • Run the load-balancing as-path-ignore command to prevent the device from comparing AS_Path attributes when selecting routes for load balancing.
        • Run the load-balancing as-path-relax command to configure the device to ignore comparing the AS_Path attributes of the same length when selecting routes for load balancing.
        • Run the load-balancing eibgp command to enable load balancing among EBGP and IBGP routes.
        • Run the load-balancing igp-metric-ignore command to prevent the device from comparing IGP costs when selecting routes for load balancing.
        NOTE:

        The address family views supported by the preceding commands are different. When running any of the commands, ensure that the command is run in the correct address family view.

        Change load balancing rules based on network requirements and exercise caution when running the commands.

      6. Run commit

        The configuration is committed.

Checking the Configurations

After configuring BGP load balancing, check the configurations.

  • Run the display bgp routing-table [ network ] [ mask | mask-length ] [ longer-prefixes ] command to check information about the BGP routing table.

  • Run the display ip routing-table [ verbose ] command to check information about the IP routing table.

# Run the display bgp routing-table command. The command output shows that more than one BGP route is selected to balance traffic.

<HUAWEI>display bgp routing-table 10.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 10.1.1.0/24:
 From: 10.2.1.2 (2.2.2.2)
 Route Duration: 0d00h03m55s
 Direct Out-interface: GigabitEthernet1/0/0
 Original nexthop: 200.1.1.2
 Qos information : 0x0
 AS-path 200 300, origin igp, pref-val 0, valid, external, best, select, pre 255
 Advertised to such 2 peers
    10.2.1.2
    10.2.2.2

 BGP routing table entry information of 10.1.1.0/24:
 From: 10.2.2.2 (3.3.3.3)
 Route Duration: 0d00h03m56s
 Direct Out-interface: GigabitEthernet2/0/0
 Original nexthop: 10.2.2.2
 Qos information : 0x0
 AS-path 200 300, origin igp, pref-val 0, valid, external, select, pre 255, not preferred for router ID
 Not advertised to any peers yet
Translation
Download
Updated: 2019-01-04

Document ID: EDOC1100059437

Views: 20752

Downloads: 15

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