96DescriptionUse the stp cost command to set the path cost of the port(s) in the specified MSTI or all MSTIs.Use the undo stp cost command to restore the system default.By default, the switch automatically calculates the path costs of ports in each MSTI based on thecorresponding standard.Configured in Layer 2 Ethernet interface view, the setting takes effect on the current interface only.Configured in port group view, the setting takes effect on all ports in the port group.Configured in Layer 2 aggregate interface view, the setting takes effect only on the aggregate interface.Configured on a member port in an aggregation group, the setting takes effect only after the port leavesthe aggregation group.Path cost is an important factor in spanning tree calculation. Setting different path costs for a port inMSTIs allows VLAN traffic flows to be forwarded along different physical links, achieving VLAN-basedload balancing.The path cost setting of a port can affect the role selection of the port. When the path cost of a port ischanged, MSTP will re-compute the role of the port and initiate a state transition.Related commands: display stp and stp pathcost-standard.Examples# Set the path cost of port GigabitEthernet 1/0/3 in MSTI 2 to 200. system-view[Sysname] interface gigabitethernet 1/0/3[Sysname-GigabitEthernet1/0/3] stp instance 2 cost 200stp edged-portSyntaxstp edged-port { enable | disable }undo stp edged-portViewLayer 2 Ethernet interface view, port group view, Layer 2 aggregate interface viewDefault level2: System levelParametersenable: Configures the current port(s) as an edge port or edge ports.disable: Configures the current port(s) as a non-edge port or non-edge ports.DescriptionUse the stp edged-port enable command to configure the port(s) as an edge port or ports.Use the stp edged-port disable command to configure the port(s) as a non-edge port or non-edge ports.Use the undo stp edged-port command to restore the default.By default, all ports are non-edge ports.