How does STP calculate the lowest port ID

I was reading about how STP determines which port to block. I was looking at this url explicitly this section

The following algorithm is used to determine the root port or designated port (in order):

  1. Prefer the lowest Root Path Cost.
  2. In case of the same Root Path Cost, prefer the lowest Bridge ID of the designated switch (the neighbor that sends BPDUs).
  3. In case of receiving BPDUs on multiple ports from the same designated switch (BPDU sender), prefer the lowest Port ID (known also as port priority) of the sender. That parameter has a default value 128 and is configurable.
  4. In case of all above are did not resolve the problem, prefer the lowest Port ID of the BPDU sender.

The first 3 parts I understand fine. It's the last one that I wanted some clarification on.

The website goes on to show and example where the BPDU frame is being sent from a switch (SW3) on interfaces Fa0/3 and Fa0/4 to another switch (SW4). SW4 chooses it's port Fa0/1 because that port is connected to Fa0/3 and 3 is lower than 4.


My question is:

Is that really as simple as it sounds? A simple calculation on which port number is lower or is there more to it? What would happen if I had Po1 and Fa0/1 and all other factors were the same?

Leave Your Comment

Leave a Reply

%d bloggers like this: