In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
STP
Function:
(1) eliminate the possible path loops in the bridged network by blocking redundant links.
(2) when the current path fails, activate redundant backup links and restore network connectivity.
STP (Spanning Tree Protocol, spanning Tree Protocol) is a protocol used to eliminate physical loops at the data link layer in a local area network. By exchanging BPDU (Bridge Protocol Data Unit, bridge protocol data unit) between bridges, the equipment is guaranteed to complete the calculation process of spanning tree.
Election of Root Bridge:
The bridge ID consists of bridge priority (BridgePriority) and bridge MAC address (BridgeMacAddress). The bridge with small bridge ID is elected as the root bridge.
Determination of port role:
(1) all ports on the root bridge are designated ports (Designated Port)
(2) choose the port with the lowest root path cost (RootPathCost) as the root port (Root Port) on the non-root bridge.
(3) each physical segment selects the bridge with the lowest root path cost as the designated bridge (Designated Bridge), and the port connecting the designated bridge is the designated port.
(4) the rest of the ports that are not root ports and designated ports are set to blocking state by STP.
Root path cost:
(1) the root path cost (RootPathCost) is the algebraic sum of all link costs (Cost) on the path to the root.
(2) when a non-root bridge elects a root port, the port with the lowest root path cost is the root port.
(3) when the designated bridge is elected by the physical segment, the bridge with the lowest path cost is the designated bridge.
Determine the port role through the bridge ID:
(1) when the root path cost is the same, the smallest port of the bridge ID is designated as the root port in the connected network segment.
(2) when the root path cost is the same, the bridge with the smallest bridge ID is elected as the designated bridge on the physical segment, and the port connecting the designated bridge is the designated port.
(3) when the root path cost and designated bridge ID are the same, the port with a small ID of the designated port is the root port.
(4) the root bridge ID:64 bit, such as BridgeID: 0.0000-0000-0000. Before the point is the bridge priority, and the last 48 bits are mac addresses (non-Ethernet mac addresses), abbreviated BID.
Note:
Root Bridge: there is and only one
Compare bridge id, first priority, then mac, the smaller the priority, the higher the priority.
Only the root bridge will actively send its own BPDU message, and the non-root bridge will retain the BPDU message of the root bridge and forward it to a third party.
After any switch turns on the STP protocol, it is initially assumed that it is the root. After a period of election, the root bridge sends its own BPDU regularly, and the non-root bridge only retains or forwards it.
Port status:
Port state migration:
After a port is selected as a designated port or root port, it needs to go through Listening and Learning from the Blocking state to the Forwarding state. The default Forwarding Delay time is 15 seconds.
Shortcomings of spanning tree:
The port must go through twice the Forwarding Delay time from the blocking state to the forwarding state. If the topology in the network changes frequently, the network will lose connectivity frequently. The server is inaccessible for at least 30 seconds each time the topology changes.
Stp configuration commands:
Enable the stp feature:
Stp global enable
Close the port stp special:
Undo stp enable
Configure stp operation mode
Stp mode {stp\ rstp\ mstp\ pvst}
Configure the priority of the current device
Stp [instance instance-id] priority (4096 multiples, up to 4096 times 15 instance is the priority of the specified switch in each instance)
Configure the port to be an edge port and cannot configure this command in stp mode.
Stp edged-port
Display stp brief
RSTP:
RSTP (Rapid Spanning Tree Protocol, Rapid spanning Tree Protocol) is an optimized version of STP.
RSTP has all the functions of STP
RSTP enables fast convergence:
In some cases, the delay for the port to enter the forwarding state is greatly shortened, thus shortening the time it takes for the network to finally achieve topology stability.
Problems with STP and RSTP:
There are actually multiple VLAN running on the Trunk link
All VLAN share one spanning tree
Unable to share the load of different VLAN on multiple Trunk links
PVST (Per VLAN Spanning Tree):
One STP or RSTP protocol runs on each VLAN, and the spanning tree between different VLAN is completely independent.
Single VLAN level load sharing over multiple Trunk links
MSTP (Multiple Spanning Tree Protocol, multiple spanning Tree Protocol):
Bundle multiple VLAN to one instance, each generating a separate spanning tree
VLAN-level load sharing over multiple Trunk links
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.