Load Balance
Features below are only supported on CX864E-N.
Packet Spray
Table 1 Packet Spray
Command | Purpose |
|---|---|
hash algorithm {random|round_robin} | Configure the hash algorithm of LAG based on packets. |
hash algorithm ecmp {random|round_robin} | Configure the hash algorithm of ECMP based on packets. |
hash algorithm {random|round_robin}
[Command] hash algorithm {random|round_robin}
[Purpose] Configure the hash algorithm of LAG based on packets.
[Parameters]
Parameter | Description |
|---|---|
random | Random hash allocation of packets. |
round_robin | Sequential round-robin allocation of packets. |
[View] LAGIF Configuration View
[Notes] Run commit to take effect. Defaults to hash based on five-tuple. Only CX864-N supports this feature. Run command no hash algorithm to restore to the default configuration.
[Use Cases]
sonic# configure terminal
sonic(config)# interface link-aggregation 100
sonic(config-lagif-100)# hash algorithm random
Please enter 'commit' to make hash algorithm command take effect
sonic(config-lagif-100)# commithash algorithm ecmp {random|round_robin}
[Command] hash algorithm ecmp {random|round_robin}
[Purpose] Configure the hash algorithm of ECMP based on packets.
[Parameters]
Parameter | Description |
|---|---|
random | Random hash allocation of packets. |
round_robin | Sequential round-robin allocation of packets. |
[View] Global Configuration View
[Notes] Defaults to hash based on five-tuple. Only CX864-N supports this feature. The ECMP hash algorithm and the LAG hash algorithm are independently controlled. Please configure the hash algorithm before route distribution. If the hash algorithm is modified after routes have been distributed, the routes need to be regenerated. Run command no hash algorithm ecmp to restore to the default configuration.
[Use Cases]
onic# configure terminal
sonic(config)# hash algorithm ecmp randomARS
ARS View
Table 2 ARS View
Command | Purpose |
|---|---|
show ars instance | Display ARS instance configuration |
show ars interface | Display the ARS status of the interface. |
show ars profile | Display ARS profile configuration. |
show ars instance
[Command] show ars instance
[Purpose] Display ARS instance configuration.
[View] Privileged User View
[Use Cases]
sonic# show ars instance
Instance Name Assign Mode Idle Time Max Flows Binding Status
--------------- ------------------- ----------- ----------- ----------------
test per_flowlet_quality 256 512 N/Ashow ars interface
[Command] show ars instance
[Purpose] Display the ARS status of the interface.
[View] Privileged User View
[Use Cases]
sonic# show ars interface
Interface Status Scaling Factor
----------- ----------- ----------------
0/0 Enabled 10000
0/1 Enabled 10000
0/2 Enabled 10000
0/3 Enabled 10000
0/4 Enabled 10000
0/5 Enabled 10000
0/6 Enabled 10000
0/7 Enabled 10000
0/8 Enabled 10000
……show ars profile
[Command] show ars profile
[Purpose] Display ARS profile configuration.
[View] Privileged User View
[Use Cases]
sonic# show ars profile
Algorithm IPv4 Enable IPv6 Enable Load Past Min Load Past Max Overall Max Flows Remaining Max Flows
----------- ------------- ------------- --------------- --------------- ------------------- ---------------------
EWMA True True 0 4096 8128 7616ARS Config
Table 3 ARS Config
Command | Purpose |
|---|---|
ars profile | Create ARS profile. |
ars instance instance_name | Create ARS instance. |
ars nexthop-group {A.B.C.D/M|A::B/M} instance instance_name | Bind the ARS instance to an ECMP group. |
idle-time time_value | Set the flow splitting interval |
max-flows flow_value | Set the maximum number of flowlets that ECMP can track simultaneously in macro-flow. |
ars disable | Disable ARS at interface level. |
ars profile
[Command] ars profile
[Purpose] Create ARS profile.
[View] Global Configuration View.
[Notes] Enable ARS globally and create a profile to automatically bind to the switch. This will take effect globally. Currently, the device supports only one profile. Run command no ars profile to delete the ARS profile.
[Use Cases]
sonic# configure terminal
sonic(config)# ars profile
sonic(config-arsprofile)# show this
!
ars profilears instance instance_name
[Command] ars instance instance_name
[Purpose] Create ARS instance.
[Parameters]
Parameter | Description |
|---|---|
instance_name | Name of ARS instance, in string form |
[View] Global Configuration View.
[Notes] Run command no ars instance instance_name to delete the ARS instance .
[Use Cases]
sonic# configure terminal
sonic(config)# ars instance test
sonic(config-ars-instance-test)# show this
!
ars instance testars nexthop-group {A.B.C.D/M|A::B/M} instance instance_name
[Command] ars nexthop-group {A.B.C.D/M|A::B/M} instance instance_name
[Purpose] Bind the ARS instance to an ECMP group.
[Parameters]
Parameter | Description |
|---|---|
A.B.C.D/M | IPv4 destination address, bound to the ECMP group where the next hop of the destination address belongs. |
A::B/M | IPv6 destination address, bound to the ECMP group where the next hop of the destination address belongs. |
instance_name | Name of ARS instance, in string form. |
[View] Global Configuration View.
[Notes] ECMP groups and ARS instances can only be bound one-to-one. Run command no ars nexthop-group {A.B.C.D/M |A::B/M} instance instance_name to delete the bond with ECMP group.
[Use Cases]
sonic# configure terminal
sonic(config)# ars instance test
sonic(config-ars-instance-test)# exit
sonic(config)# ars nexthop-group 10.0.0.0/24 instance testidle-time time_value
[Command] idle-time time_value
[Purpose] Set the flow splitting interval.
[Parameters]
Parameter | Description |
|---|---|
time_value | Idle duration in microseconds. The range is 1-1048, and the default value is 256. |
[View] Flow splitting is triggered if the frame interval exceeds this time; ARS instance Configuration View.
[Notes] Run command no idle-time to restore the idle duration value to the default value.
[Use Cases]
sonic# configure terminal
sonic(config)# ars instance test
sonic(config-ars-instance-test)# idle-time 200
sonic(config-ars-instance-test)# show this
!
ars instance test
idle-time 200max-flows flow_value
[Command] max-flows flow_value
[Purpose] Set the maximum number of flowlet that ECMP group can track simultaneously in macro-flow table.
[Parameters]
Parameter | Description |
|---|---|
flow_value | The number of flowlet, optional parameters 32/64/ 128/256/512/1k/2k, and the default value is 512. |
[View] ARS instance Configuration View.
[Notes] It is recommended to use the default value. Run command no max-flows to restore the number of flowlet to the default value.
[Use Cases]
sonic# configure terminal
sonic(config)# ars instance test
sonic(config-ars-instance-test)# max-flows 1k
!
ars instance test
max-flows 1kars disable
[Command] ars disable
[Purpose] Disable ARS at interface-level.
[View] Physical Interface Configuration View.
[Notes] Run command no ars disable to enable ARS.
[Use Cases]
sonic# configure terminal
sonic(config)# interface ethernet 0/400
sonic(config-if-0/400)# ars disable
sonic(config-if-0/400)# show this
!
interface ethernet 0/400
ars disable
fec rs
mtu 9216
speed 800000