跳转到内容
Ask AI

Load Balance

此内容尚不支持你的语言。

Table 1 Packet Spray

CommandPurpose
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.

[Command] hash algorithm {random|round_robin}

[Purpose] Configure the hash algorithm of LAG based on packets.

[Parameters]

ParameterDescription
randomRandom hash allocation of packets.
round_robinSequential 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)# commit

[Command] hash algorithm ecmp {random|round_robin}

[Purpose] Configure the hash algorithm of ECMP based on packets.

[Parameters]

ParameterDescription
randomRandom hash allocation of packets.
round_robinSequential 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 random

Table 2 ARS View

CommandPurpose
show ars instanceDisplay ARS instance configuration
show ars interfaceDisplay the ARS status of the interface.
show ars profileDisplay ARS profile configuration.

[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/A

[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
……

[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 7616

Table 3 ARS Config

CommandPurpose
ars profileCreate ARS profile.
ars instance instance_nameCreate 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_valueSet the flow splitting interval
max-flows flow_valueSet the maximum number of flowlets that ECMP can track simultaneously in macro-flow.
ars disableDisable ARS at interface level.

[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 profile

[Command] ars instance instance_name

[Purpose] Create ARS instance.

[Parameters]

ParameterDescription
instance_nameName 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 test

[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]

ParameterDescription
A.B.C.D/MIPv4 destination address, bound to the ECMP group where the next hop of the destination address belongs.
A::B/MIPv6 destination address, bound to the ECMP group where the next hop of the destination address belongs.
instance_nameName 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 test

[Command] idle-time time_value

[Purpose] Set the flow splitting interval.

[Parameters]

ParameterDescription
time_valueIdle 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 200

[Command] max-flows flow_value

[Purpose] Set the maximum number of flowlet that ECMP group can track simultaneously in macro-flow table.

[Parameters]

ParameterDescription
flow_valueThe 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 1k

[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