75
# In PVST mode, specify the device to calculate the default path costs of its ports by using IEEE
802.1d-1998, and set the path cost of Ethernet 1/0/3 to 2000 on VLANs 20 through 30.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] stp pathcost-standard dot1d-1998
[Sysname] interface ethernet 1/0/3
[Sysname-Ethernet1/0/3] stp vlan 20 to 30 cost 2000
Configuring the port priority
When the priority of a port changes, MSTP re-calculates the role of the port and initiates a state
transition. The priority of a port is an important factor in determining whether the port can be elected
as the root port of a device. If all other conditions are the same, the port with the highest priority will
be elected as the root port.
On a spanning tree device, a port can have different priorities and play different roles in different
spanning trees, so that data of different VLANs can be propagated along different physical paths,
implementing per-VLAN load balancing. You can set port priority values based on the actual
networking requirements.
To configure the priority of a port or a group of ports:
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Enter interface view or
port group view.
•
Enter Layer 2 Ethernet interface view or
Layer 2 aggregate interface view:
interface interface-type interface-number
•
Enter port group view:
port-group manual port-group-name
Use one of the
commands.
3.
Configure the port
priority.
•
In
STP/RSTP
mode:
stp port priority priority
•
In PVST mode:
stp vlan
vlan-list port priority priority
•
In MSTP mode:
stp
[
instance instance-id
]
port priority
priority
Use one of the
commands.
The default setting is
128.
Configuring the port link type
A point-to-point link directly connects two devices. If two root ports or designated ports are connected
over a point-to-point link, they can rapidly transition to the forwarding state after a
proposal-agreement handshake process.
Configuration restrictions and guidelines
•
You can configure the link type as point-to-point for a Layer 2 aggregate interface or a port that
operates in full duplex mode. Hewlett Packard Enterprise recommends you to use the default
setting and let the device to automatically detect the port link type.
•
The
stp point-to-point force-false
or
stp point-to-point force-true
command configured on a
port in MSTP or PVST mode is effective for all MSTIs or VLANs.