Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Overview

Traditional static load balancing does not consider the utilization of each member link within the load-balancing group, leading to uneven load distribution among the member links. This issue becomes more pronounced with the appearance of large data flows, exacerbating congestion on the selected member link and potentially causing packet loss.

By enabling dynamic load balancing, the traffic of Equal-Cost Multi-Path (ECMP) routing can be distributed across different member links through dynamic load balancing, maximizing load balancing among the member links.

Implementation Principle

PICOS supports Normal mode of Dynamic load balancing.

There is link transmission delay between two directly connected devices. If the time interval between two data packets to be sent is greater than the maximum link transmission delay of the member links in the load-balancing group, these two packets can be forwarded using different member links without causing out-of-order delivery at the receiving end. Normal mode dynamic load balancing is based on this principle.

In Normal mode, the device determines the time interval between the packet to be forwarded and the previous packet in its flow. If the interval is greater than the maximum link transmission delay of the member links, the packet to be forwarded is considered the first packet of a new flowset. If the interval is less than the maximum link transmission delay, the packet is considered part of the same flowset as the previous packet.

The device forwards the packets based on the flowset, selecting the member link with the lighter load for forwarding. Packets within the same flowset are forwarded using the same member link.

Restrictions and Guidelines

When you configure Dynamic Load Balancing, follow these restrictions and guidelines:

  • Dynamic Load Balancing for ECMP is only supported on Trident3 and Tomahawk3 platforms.

  • When the ECMP hash-mapping mode configuration (set/delete) changes, a system restart is required for the configuration to take effect.

  • ECMP hash-mapping modes (round-robin-load-balancing, randomized-load-balancing, symmetric and dlb-normal) are mutually exclusive. To switch between modes, you must first delete the configured mode before setting up the new one. Then, restart the system for the configuration to take effect.

Configuring Dynamic Load Balancing

Procedure

Step 1         Enable normal mode of Dynamic Load Balancing for ECMP (Equal-Cost Multi-Path Routing).

set interface ecmp hash-mapping dlb-normal [flowset-time <flowset-time>]    

By default, Dynamic Load Balancing for ECMP is disabled.

Step 2         Commit the configuration.   

commit

Step 3         Under Linux shell, run the following command to restart the system for the configuration to take effect.

sudo systemctl restart picos

Configuration Example

  • The following commands enable normal mode of Dynamic Load Balancing for ECMP.

admin@PICOS# set interface ecmp hash-mapping dlb-normal
admin@PICOS# commit
admin@PICOS# exit
admin@PICOS> start shell sh
admin@PICOS:~$ sudo systemctl restart picos

Verify the Configuration

  • Use the command run show route ipv4 to view the ECMP routes. In the following show result, we can see that the destination address 10.20.51.0/24 is reached via three different next hops: 192.168.0.1, 192.168.1.1, and 192.168.2.1, forming ECMP routes.

admin@PICOS# run show route ipv4
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, T - Table, D - SHARP,
       F - PBR,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

K * 0.0.0.0/0 [255/8192] unreachable (blackhole), 23:42:36
K>* 0.0.0.0/0 [0/2] via 10.10.51.1, eth0, 23:42:36
C>* 10.10.51.0/24 is directly connected, eth0, 23:42:36
S>* 10.20.51.0/24 [1/0] via 192.168.0.1, vlan10, weight 1, 00:09:06
  *                     via 192.168.1.1, vlan20, weight 1, 00:09:06
  *                     via 192.168.2.1, vlan30, weight 1, 00:09:06
C>* 192.168.0.0/24 is directly connected, vlan10, 00:09:09
C>* 192.168.1.0/24 is directly connected, vlan20, 00:09:09
C>* 192.168.2.0/24 is directly connected, vlan30, 00:09:09
  • Use the command run show interface gigabit-ethernet <interface-name> to view the traffic distribution for each interface. Here is an example:

admin@PICOS# run show interface gigabit-ethernet ge-1/1/5
Physical interface: ge-1/1/5, Enabled, error-discard False, Physical link is Up
Interface index: 5, Mac Learning Enabled
Port mode: trunk
Description:
Link-level type: Ethernet, MTU: 1518, Speed: 2.5Gb/s, Duplex: Full
Source filtering: Disabled, Flow control: Disabled
Auto-negotiation: Enabled, Advertised speed modes: 10M,100M,1G,2.5G
Interface flags: SNMP-Traps Internal: 0x0
Interface rate limit  ingress: unlimited, egress: unlimited
Interface burst limit ingress: unlimited, egress: unlimited
Precision Time Protocol mode: none
Current address: 1c:72:1d:c9:1b:e1, Hardware address: 1c:72:1d:c9:1b:e1
Traffic statistics:
  5 sec input rate 5440 bits/sec, 1 packets/sec
  5 sec output rate 0 bits/sec, 0 packets/sec
  Input Packets............................12235
  Output Packets...........................135
  Input Octets.............................3943964
  Output Octets............................14660
  • No labels