First, what is the problem of redundancy
As shown in the figure above:
1. Broadcast storm: When all the equipment just power up, at this time the PC needs to send data to the server, then, the PC needs to send ARP broadcast request server MAC address, because the switch does not store any MAC address, so the first step of the switch to learn the PC's source MAC address, and then the target Mac flood out, First SW1 from the interface 1 flood this frame, through the network segment 1 to reach the SW2 interface 1, because it is broadcast, SW2 from 2 interface flood the frame, It will eventually reach SW1. Secondly, SW1 the frame from the interface flood, but also from the interface 2 flood the frame through the network Segment 2 to reach SW2,SW2 also flood the broadcast frame, finally, because this frame is broadcast frame, will continue to cycle, causing broadcast storm.
2. Multi-frame replication: If the PC and SW2 have the MAC address of the storage server, and the SW1 is not stored, when the PC sends a unicast frame to the server, SW1 will flood the frame, and SW2 know which port the server is connected to SW2, so SW2 will only send frames to the server instead of flooding. Then, SW1 sends the frame from interface 1 and Interface 2, and SW2 receives two copies of the frame from the network Segment 1 and network Segment 2.
3.MAC Address Table instability: The PC to the server to send data, SW2 will be from Interface 1 and Interface 2 to receive the source MAC for the PC MAC address, so first interface 1 learning to Mac PC, and then interface 2 learning to Mac pc, resulting in the MAC address table instability.
Second, the function of the spanning tree: to prevent the loop when two layers have redundant links
Iii. the BPDU of the spanning tree
BPDU (bridge Protocol Data unit)
· The various elections of STP are realized by exchanging BPDU messages, BPDU are encapsulated directly in Ethernet frames.
• For all SW that participate in STP, they get the information of other SW in the network through the exchange of data message, this kind of message is called BPDU.
· The BPDU is directly encapsulated in the two-layer protocol, and its MAC address finally encapsulates the number of: 00. (01:80:c2:00:00:00)
· BPDU's function:
1. Election of the Root bridge
2. Determine the location of redundant paths
3. Avoid loops by blocking specific ports
4. Notification of network topology changes
5. Monitor the status of the spanning tree
· The BPDU is sent once per 2S by the root bridge.
The initial network, each SW thinks oneself is Root bridge, will send BPDU, compare lowest BID, elect a root bridge, at this time only root bridge send BPDU. Non-root bridges are forwarded only.