The stp edged-port default command configures the ports on a switching device as edge ports.
The undo stp edged-port default command restores the default setting.
By default, the ports on a switching device are non-edge ports.
After STP is enabled on a port, edge-port detecting is started automatically. If the port fails to receive BPDU packets within (2 x Hello Timer + 1) seconds, the port is set to an edge port. Otherwise, the port is set to a non-edge port.
Usage Scenario
On a Layer 2 network running a spanning tree protocol, a port connected to terminals does not need to participate in spanning tree calculation. If the port participates in spanning tree calculation, the network convergence speed will be affected. In addition, status changes of the port may cause network flapping, interrupting user traffic. To address this problem, you can run the stp edged-port enable command to configure the port as an edge port. Then, the port will not participate in the spanning tree calculation. This speeds up network convergence and improves network stability.
After the stp edged-port default command is run on a device, all ports of the device will be become edge ports. During network topology calculation, running the stp edged-port default command may cause a loop. Exercise caution when using this command.
Precautions
If a port of a switching device receives a BPDU after being configured as an edge port, the switching device will automatically set the port as a non-edge port and recalculate the spanning tree.
To prevent attackers from forging BPDUs to change edge ports on a switching device to non-edge ports, you can run the stp bpdu-protection command in the system view to configure BPDU protection on the switching device. After BPDU protection is enabled on a switching device, the switching device shuts down the edge port if the edge port receives a BPDU. The attributes of the edge port are not changed.
After the stp edged-port default command is run, a port that has been configured with the undo stp edged-port command will become an edge port. After the stp edged-port disable command is run, the port that has been configured with the undo stp edged-port command, however, will still serve as a non-edge port.