
Explanation:
A screenshot of a computer Description automatically generated

Explanation of Root Port Election in STP:
In a Spanning Tree Protocol (STP) network, the Root Port is selected on each switch (except the Root Bridge). The Root Port is the port with the lowest path cost to the Root Bridge. If there is a tie in path cost, the following criteria are used in sequence to break the tie:
Steps for Root Port Election in Sequence:
* RPC Comparison (Root Path Cost):
* The port with the lowest Root Path Cost is preferred.
* Root Path Cost is the cumulative cost of the path to the Root Bridge.
* Peer BID (Bridge ID) Comparison:
* If the Root Path Costs are equal, the Bridge ID of the connected switch (peer) is compared.
* The port connecting to the switch with the lower Bridge ID is preferred.
* Peer PID (Port ID) Comparison:
* If the Bridge IDs are equal, the Port ID of the peer's sending port is compared.
* The port connecting to the lower Port ID is preferred.
* Local PID (Port ID) Comparison:
* If all else is equal, the Local Port ID of the switch is used.
* The port with the lower Local Port ID is selected.