Configuration Guide Vol. 1


28.10.2 Configuring PortFast

<Structure of this section>

(1) Configuring PortFast

PortFast can be applied to allow immediate communication for ports known in advance not to have loops occur, such as ports connecting terminals.

Points to note

When the spanning-tree portfast default command is set, PortFast functionality is applied by default on access ports, protocol ports, and MAC ports. To apply this by default and disable it for each port, set the spanning-tree portfast disable command.

For trunk ports, this can be applied by specification for each port.

Command examples

  1. (config)# spanning-tree portfast default

    Sets that PortFast functionality is to be applied by default for all access ports, protocol ports, and MAC ports.

  2. (config)# interface gigabitethernet 1/0/1

    (config-if)# switchport mode access

    (config-if)# spanning-tree portfast disable

    (config-if)# exit

    Sets that PortFast functionality is not to be used on port 1/0/1 (access port).

  3. (config)# interface gigabitethernet 1/0/3

    (config-if)# switchport mode trunk

    (config-if)# spanning-tree portfast trunk

    Specifies port 1/0/3 for the trunk port, so that PortFast functionality is applied. It is not applied by default to the trunk port. The trunk parameter needs to be specified to specify each port.

(2) Configuring BPDU Guard

BPDU guard functionality puts ports for which PortFast is applied in inactive status when they receive BPDUs. Normally, PortFast functionality is used to specify a port that is not a redundant path, assuming that no Spanning Tree switch exists in front of the port. This is set to avoid unintended topology changes caused by received BPDUs.

Points to note

In order to set BPDU guard functionality, PortFast functionality must be set at the same time. The spanning-tree portfast bpduguard default command can be used to apply BPDU guards by default for all ports to which PortFast functionality is applied. To disable BPDU guard functionality when it is applied by default, set the spanning-tree bpduguard disable command.

Command examples

  1. (config)# spanning-tree portfast default

    (config)# spanning-tree portfast bpduguard default

    Sets PortFast functionality for all access ports, protocol ports, and MAC ports. It also sets BPDU guard functionality for all ports to which PortFast functionality is applied.

  2. (config)# interface gigabitethernet 1/0/1

    (config-if)# spanning-tree bpduguard disable

    (config-if)# exit

    Sets BPDU guard functionality to not be used on port 1/0/1 (access port). Normal PortFast functionality is applied to port 1/0/1.

  3. (config)# interface gigabitethernet 1/0/2

    (config-if)# switchport mode trunk

    (config-if)# spanning-tree portfast trunk

    Sets PortFast functionality for port 1/0/2 (trunk port). It also sets BPDU guard functionality. Because PortFast functionality is not applied by default to trunk ports, it is set for each port. If BPDU guard functionality is set by default, BPDU guards are applied automatically when PortFast functionality is set. If it is not set by default, it is set using the spanning-tree bpduguard enable command.