Meaning of Port number in Show spanning Tree

jskfan used Ask the Experts™
Meaning of Port number in Show spanning Tree

in the output of the command below  I see:

 Port        1 (Ethernet0/0)

I wonder what Port 1 means?  I thought the port is the same as interface.

Thank you

SW1#sh spanning-tree  vlan 20

  Spanning tree enabled protocol ieee
  Root ID    Priority    24596
             Address     aabb.cc00.0400
             Cost        200
             Port        1 (Ethernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32788  (priority 32768 sys-id-ext 20)
             Address     aabb.cc00.0100
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Root FWD 100       128.1    Shr 
Et0/1               Altn BLK 100       128.2    Shr 


Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2018

Port <number> is part of switch internal port numeration on device that is needed to establish STP port identifier. Physical port numeration does not need to match exact physical port number (and sometimes even can't match since device can have more than one line card). Typically, physical port count starts with 1 and each next port increases by 1, but it may depend on hardware model and line card that is in use.
In the case above port eth0/0 is port 1 and eth0/1 is port 2. If you want to check each port number on device you can do it by issuing command  show spanning-tree detail. Port number in example above is showing which port is chosen to be STP root port on local device.
Port priority (default value is 128) and port number together make port identifier (the same way as STP priority and MAC address create  STP bridge ID). Port identifier is last option that can/will be used in determination of port which will be unblocked, if all other previous steps in STP election fail to determine best path to root bridge (example would be 2 switches connected to each other with two or more links - port identifier is option of last resort that can be used to determine which port should be elected as root port (will be in forwarding state) on device which lost STP root bridge election).
Top Expert 2015
The simple answer is that spanning tree uses an integer to define the port numbers.  Spanning tree can’t deal with e0/0 or g1/0/1.  So Cisco (and other vendors who don’t have simple numbered ports) allocate an integer for each port.  i.e. e0/0=1, e0/1=2, e0/2=3 and so on.


Thank you Guys

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial