Mellanox MLNX-OS®Command Reference Guide for SX1018HP Ethernet Managed Blade Switch

Rev 1.6.2
Mellanox Technologies
339
spanning-tree cost
spanning-tree cost <port cost>
no spanning-tree cost
Configures the interface cost of the spanning tree.
The no form of the command returns configuration to its default.
Syntax Description port cost Sets the spanning tree cost of an interface.
Value range is 0-200000000.
Default The default cost is derived from the speed.
1Gbps 20000
10Gbps 2000
40Gbps 500
56Gbps 357
Modes/Context Config interface ethernet
History 3.1.0000
Role admin
Example
switch (config) # interface ethernet 1/1
switch (config interface ethernet 1/1) # spanning-tree cost 1000
switch (config interface ethernet 1/1) #
Related Commands show spanning-tree
Note
LAG default cost is calculated by dividing the port speed by the number of active links in
UP state. For example: if there were 4 links in the LAG out of which only two are in UP
state, assuming the port speed is 10Gbps, the LAG cost will be 2000/2 = 1000.
When configuring the cost for a LAG, the cost will be fixed to this configuration, no matter
what the number of active links (UIP state) in the LAG is
Unstable network may cause the LAG cost to change dynamically assuming the cost
parameter is not configured for anything else other than default