Does portfast disable Spanning Tree?

A common misunderstanding among Cisco students is that portfast disables spanning tree on a certain interface. This is not correct, however…if you enable portfast on an interface then it will jump to the forwarding state of spanning tree. We still run spanning tree on the interface!

To prove this, let me give you an example. We’ll use two switches for this:

sw1 sw2 fa24

Above, we have a simple topology with two switches. Let’s configure FastEthernet0/24 on SW1 as an access port and enable portfast on it.

SW1(config)#interface fa0/24
SW1(config-if)#shutdown
SW1(config-if)#switchport mode access 
SW1(config-if)#spanning-tree portfast

Now before I ‘no shut’ the interface, we’ll enable a spanning tree debug:

SW1#debug spanning-tree events 
Spanning Tree event debugging is on

Now let’s see what will happen when the interface comes up:

SW1(config)#interface fa0/24
SW1(config-if)#no shutdown

On your console, you will see that the interfaces go to forwarding mode immediately:

SW1#
STP: VLAN0001 Fa0/24 ->jump to forwarding from blocking

Let’s take a look at the output of show spanning-tree:

SW1#show spanning-tree vlan 1

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     0011.bb0b.3600
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     0011.bb0b.3600
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/24              Desg FWD 19        128.26   P2p Edge

SW1 is our root bridge, and you can see that FastEthernet 0/24 has portfast enabled because of the p2p Edge type. The portfast-enabled interface is still sending BPDUs. You can verify it using the following command:

SW1#show spanning-tree interface FastEthernet 0/24 detail 
 Port 26 (FastEthernet0/24) of VLAN0001 is designated forwarding 
   Port path cost 19, Port priority 128, Port Identifier 128.26.
   Designated root has priority 32769, address 0011.bb0b.3600
   Designated bridge has priority 32769, address 0011.bb0b.3600
   Designated port id is 128.26, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   The port is in the portfast mode
   Link type is point-to-point by default
   BPDU: sent 74, received 0

If you use this command several times, you will see that the number of BPDUs sent will increase.

Let’s make SW2 the root bridge so we can see if SW1 processes incoming BPDUs:

SW2(config)#spanning-tree vlan 1 root primary 

This is what you will find on SW1 now:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now!

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 800 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)
525 Sign Ups in the last 30 days
satisfaction-guaranteed

  • 100% Satisfaction Guaranteed!
  • You may cancel your monthly membership at any time.
  • No Questions Asked!

Tags:


Forum Replies

  1. Hi Rene,

    I realized when you show
    SW1#show spanning-tree interface FastEthernet 0/24 detail

    q1) The “bpdu receive” is 0 - why ? ( non-root bridges do not send bpdu to root bridge ?)

    q2) What is the difference between “P2P Edge” and “P2P” ? What do that actually meant ?

    q3) Do we use portfast on ports that we are sure will not cause a loop ?

    Regards,
    Alan

  2. Hi Alan,

    1. With PVST, BPDUs are relayed from the root bridges down the tree to other non-root bridges.
    2. P2P Edge means that portfast has been enabled. Portfast enabled interfaces don't trigger a TCN. Take a look at the portfast tutorial here, I explained it there.
    3. That's right, Cisco IOS warns you when you enable it on interfaces. It doesn't disable STP though so it's not like you will have permanent loops.

    Rene

  3. Hi all,
    i have a port in access but from the output i see that port is in blocking:

    interface GigabitEthernet5/0/47
     switchport access vlan 201
     switchport mode access
    
    
    show spanning-tree vlan 201 blockedports
    Name                 Blocked Interfaces List
    -------------------- ------------------------------------
    VLAN0201             Gi5/0/47
    
    
    Port 431 (GigabitEthernet5/0/47) of VLAN0201 is backup blocking 
       Port path cost 4, Port priority 128, Port Identifier 128.431.
       Designated root has priority 24777, address 00be.758e.31c0
       Designated bridge has prio
    ... Continue reading in our forum

  4. Hello Valero

    Spanning Tree doesn’t only apply to trunk ports, but is also active on access ports as well. So it is perfectly normal to see access ports in the blocking state. This is the case even if you’re using portfast, as shown in the lesson.

    In this particular case, GigabitEthernet5/0/47 is actually a backup blocking port. This is a port state that we see when we use Rapid Spanning Tree. A backup blocking port will be used when there are two or more physical links between two switches. More about the backup port state can be seen at the following less

    ... Continue reading in our forum

  5. Hi, if portfast doesn’t disable spanning-tree we should always see BPDU’s on this interface.
    Even when we connect an unmanaged switch to an access port ?
    Do we need a BPDUGuard in order to block the port when a BPDU is received or does spanning-tree still do its job and block the port in case of a loop ?

    Thanks,
    Oliver

7 more replies! Ask a question or join the discussion by visiting our Community Forum