<title>LAN Technology</title> LAN technology spanning Tree Protocol 1. Meaning of redundancy
Single point of failure: as shown on the left, there is only one link between the network segment A and the network segment B, and once the network cable fails, the net segment A and network segment B cannot be directly connected.
So how to avoid a single point of failure, such as the right, the network segment A and network segment B to add a link and a switch can effectively avoid a single point of failure. This is the redundant network design.
Adding additional links and devices to achieve redundancy can lead to high cost of investment. And the failure rate of network equipment is much lower than the failure rate of network line.
Therefore, you can use the way to avoid problems with single points of failure and additional costs.
2. The damage caused by the switching loop
1. A broadcast storm can destroy the entire switching network within a short period of time, leaving all the switches in a busy state. While the switch is constantly forwarding the broadcast, so all normal traffic is blocked, but in the user's Terminal network card is also forced to handle a large number of broadcast frames, so the terminal will also appear slow network, or even can not be connected. The broadcast storm may be caused by the failure of individual terminals to send broadcast packets continuously, and the emergence of switching loops is also a cause.
In the switching loop, not all networks are abnormal. Some applications must also use this broadcast, such as ARP parsing. ARP parsing is a normal broadcast, and because of a switching loop, even a normal broadcast such as ARP parsing can threaten the entire network. Because the switch handles the broadcast by forwarding the broadcast to all the ports on the switch itself, this processing of the broadcast frame in the event of a switching loop can lead to a broadcast storm.
2. Copying of Frames
Broadcast storms are not just a constant rotation between switches, but also a constant forwarding of all ports on the switch. Then the switch will take more time to deal with this constantly replicating the frame, so that the performance of the network, the host will be constantly busy processing these continuous broadcast frames, affecting the normal work of the host, in serious cases even lead to the host panic.
3.MAC Address Table is unstable
There is a cache of MAC addresses and port mappings in the memory of the switch, which is also called the MAC Address table. But in the event of a broadcast storm, as the broadcast storm is circulating in two opposite directions, it will affect the normal operation of the MAC address table.
We can solve single point of failure and such serious problem through spanning tree protocol.
3. Spanning Tree Protocol
Logically allowing one port in the switch to be in a blocked state, the loop can be clipped. This method is the spanning tree protocol.
Spanning tree protocol is the complex loop structure in the network, which becomes the tree structure of the simple loop-free structure.
The root bridge is the reference point that determines the loop switch to determine which port in the loop is in the forward state and which one is blocked.
1. Determine the root bridge, which is the value that is derived from comparing the priority and MAC addresses. The smaller priority is the root bridge. With the same priority, the smallest MAC address is called the root bridge. This time if you want to artificially change the root bridge, then you need to change the priority.
2. The closest port to the root bridge is the flag port, the switch with the flag port is called the flag switch, and the traffic on each network segment is shifted from the flag switch to its root bridge through the flag port, so all the ports of the root bridge are the flag ports on which it connects to the network segment. That is, all the ports of the root bridge cannot be in a blocked state.
3. For each non-root bridge switch, there is a port called the root port. The root port is the port with the least cost of the switch reaching the root bridge path, and the port cannot be blocked.
Port overhead (path Cost): Each port on the switch has a port cost, which is different depending on the media to which the port is connected.
- For a 10Gbps link, it has a port cost of 2
- For a 1Gbps link, it has a port cost of 4
- For a 100Mbps link, it has a port cost of 19
- For a 10Mbps link, it has a port cost of 100
For Switch B There are two ports, Port 1/1 has a port cost of 19, Port 1/2 has a port cost of 38, so port 1/1 is the root port. Port 1/1 on Switch C has a port cost of 19 and Port 1/2 has a port cost of 38, so ports 1/1 is also the root port.
If the Ethernet line between switch A and switch C is changed to 10Mbps, then the situation is different. The path cost of the switch C1/1 port becomes 100, and the path cost of Port 1/2 is 38, and at this point the 1/2 port becomes the root port.
4. At this time, Switch B's 1/2 port and switch C's 1/2 port will be blocked one. Then the two switches still take a comparison of MAC addresses to decide which port to block. A port with a larger MAC address will be blocked. So the 1/2 port of Switch C will be blocked, and the 1/2 port of the switch will become the flag port. This time, the spanning tree protocol for this loop is done.
4. Using BPDUs to pass switch information
BPDUs:
- → Root Bridge ID
- Priority level
- MAC address
- → Root port overhead
- → Sender's Bridge ID
- → Sender's Port ID
5. Port Status
1. block, delay 20 seconds
2. Monitor, delay 15 seconds
3. Study, delay 15 seconds
4. Forwarding
In the blocking state, the BPDUs are still allowed to pass. So the total delay will have 20+15+15=50 seconds, but in some companies delay 50 seconds is unacceptable, this time can change the delay setting. However, it is not recommended to easily change the default value of the spanning tree protocol, which may result in the inability to learn information about all switches in the network, or the inability to compute information, resulting in switching loops in the network.
6.802.1D Fast Spanning Tree protocol
Change the block to give up, the time can be convergent to 15 seconds.
1.portfast
2.uplinkfast
3.backbonefast
Web Technology Tutorial Notes (12) Spanning Tree protocol