Load Balance
此内容尚不支持你的语言。
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}
Section titled “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 terminalsonic(config)# interface link-aggregation 100sonic(config-lagif-100)# hash algorithm randomPlease enter 'commit' to make hash algorithm command take effectsonic(config-lagif-100)# commithash algorithm ecmp {random|round_robin}
Section titled “hash 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 terminalsonic(config)# hash algorithm ecmp randomARS View
Section titled “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
Section titled “show ars instance”[Command] show ars instance
[Purpose] Display ARS instance configuration.
[View] Privileged User View
[Use Cases]
sonic# show ars instanceInstance Name Assign Mode Idle Time Max Flows Binding Status--------------- ------------------- ----------- ----------- ----------------test per_flowlet_quality 256 512 N/Ashow ars interface
Section titled “show ars interface”[Command] show ars instance
[Purpose] Display the ARS status of the interface.
[View] Privileged User View
[Use Cases]
sonic# show ars interfaceInterface Status Scaling Factor----------- ----------- ----------------0/0 Enabled 100000/1 Enabled 100000/2 Enabled 100000/3 Enabled 100000/4 Enabled 100000/5 Enabled 100000/6 Enabled 100000/7 Enabled 100000/8 Enabled 10000……show ars profile
Section titled “show ars profile”[Command] show ars profile
[Purpose] Display ARS profile configuration.
[View] Privileged User View
[Use Cases]
sonic# show ars profileAlgorithm IPv4 Enable IPv6 Enable Load Past Min Load Past Max Overall Max Flows Remaining Max Flows----------- ------------- ------------- --------------- --------------- ------------------- ---------------------EWMA True True 0 4096 8128 7616ARS Config
Section titled “ARS 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
Section titled “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 terminalsonic(config)# ars profilesonic(config-arsprofile)# show this!ars profilears instance
Section titled “ars instance”[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 terminalsonic(config)# ars instance testsonic(config-ars-instance-test)# show this!ars instance testars nexthop-group {
Section titled “ars nexthop-group {”[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 terminalsonic(config)# ars instance testsonic(config-ars-instance-test)# exitsonic(config)# ars nexthop-group 10.0.0.0/24 instance testidle-time time_value
Section titled “idle-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 terminalsonic(config)# ars instance testsonic(config-ars-instance-test)# idle-time 200sonic(config-ars-instance-test)# show this!ars instance test idle-time 200max-flows
Section titled “max-flows”[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 terminalsonic(config)# ars instance testsonic(config-ars-instance-test)# max-flows 1k!ars instance test max-flows 1kars disable
Section titled “ars 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 terminalsonic(config)# interface ethernet 0/400sonic(config-if-0/400)# ars disablesonic(config-if-0/400)# show this!interface ethernet 0/400 ars disable fec rs mtu 9216 speed 800000