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 goes 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 a couple of 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! Here is why:

  • 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 655 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

535 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

Ask a question or join the discussion by visiting our Community Forum