In order to increase the redundancy of LAN, we often introduce redundant links into the network, but this will cause switching loops. Switching loops can bring about three problems: broadcast storm, multiple copies of the same frame, and unstable switch CAM tables. STP (Spanning Tree Protocol) can solve these problems. The basic idea of STP is to block some switch interfaces and build a forwarding tree without loops. STP uses BPDU (Bridge Protocol Data Unit) to communicate with other switches to determine which switch should block which interface. There are several key fields in BPDU, such as root bridge ID, path cost, port ID, etc.
[get ccna proxy exam here]In order to form a topology without loops in the network, the switches in the network should carry out the following three steps: (1) select the root bridge (2) select the root opening (3) select the specified opening. In these steps, which switch wins will depend on the following factors (in order):(1) The lowest root bridge ID; (2) The lowest root path cost; (3) The lowest sender bridge ID; (4) The lowest sender port ID.
Each switch has a unique bridge ID, which consists of two parts: network bridge priority +MAC address. The network bridge priority is a number of 2 bytes. The default priority of the switch is 32768; The MAC address is the MAC address of the switch. The switch with the lowest bridge ID is the root bridge. All the interfaces on the root bridge are designated ports, which will forward packets.
After the root bridge is selected, other switches become non-root bridges. Each non-root bridge shall select a root path to the root bridge. STP uses path cost to determine the best path to the root bridge (cost is cumulative, and link cost with large bandwidth is low). The path with the lowest cost value is the root path, and the interface is the root port. If the cost value is the same, the root port will be selected according to the order. The root port forwards packets.
Other interfaces of the switch need to be further divided as specify or block ports. Switches will further compete according to the above four factors. The designated port forwards data frames. The remaining interfaces will be blocked and will not forward packets. In this way the network builds a forwarding tree without loops.
When the network topology changes, the network will transition from one state to another, reopening or blocking some interfaces. The port of the switch must go through several states: disable, blocking, listening, learning, and finally forwarding.
Then let’s talk about the specific selection process:
At the beginning, the root switch is selected, that is, the root bridge. The selection of the root bridge is based on the bridge ID. The bridge with smaller bridge ID takes priority.
Then select the root port on each non-root switch:
1. Compare the root path cost of the port
2. The opposite end bid
3. The opposite end PID
4. Local PID
After the selection, select a specified port on each link in the following order:
1. Root path cost
2. BID
3. PID
Then block the non-root or non-designated ports and make them the standby port.
ccna 200-301 exam costAlso Read: Big Data Development And Its Application In Business Growth