In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
-STP: spanning tree protocol-spanning Tree Protocol
1. Function: in the switching network, there is a backup link to prevent the occurrence of layer 2 data forwarding loop.
two。 Principle
+ + determine the role of the switch
-root switch; non-root switch-election basis: BID-bridge ID, bridge ID
Priority + MAC address
2Byte 6Byte
* Note: election principles:
-first compare the priority of BID. The smaller the better. The default is 32768.
-if the priority is the same, compare the MAC address as small as possible. It is essentially the "base MAC address" of the switch, that is, the MAC address of the motherboard of the switch-show version
+ + determine the role of the port
(root-port) Root Port: on each non-root switch, there is one and only one, the nearest port to the root switch.
(designated-port) designated port: in each network segment (collision domain), there is one and only one, from the root switch, the nearest port
(non-designated-port) non-designated port: all other ports are called non-designated ports.
How to represent "distance" in STP?
Cost: the cost represents the distance to the root switch, which is related to the port bandwidth.
Bandwidth cost (default correspondence)
10m-100
100m-19
1G-4
+ + determine the port status down/disable: indicates that the port is closed or hung up
Listening: indicates the listening status, which cannot send and receive user data.
Learning: indicates the learning status, which cannot be used to send and receive user data
Forwarding: indicates the forwarding status, which can be sent and received normally (final status)
Blocking: indicates the blocking state, which cannot send and receive user data (final status)
Verify the command: show spanning-tree / / View the STP information on the switch.
3.BPDU message structure:
Root-ID / / indicates the ID of the root switch (priority + base-MAC)
Cost / / indicates the distance from the switch that sent the BPDU to the root switch
BID / / indicates the name of the switch that sent the BPDU
Port-ID / / indicates the egress port of the switch that sent the BPDU
Hello-time / / indicates the period in which BPDU is sent. The default is 2s.
Forward-delay / / indicates forwarding delay. Default is 15s.
Max-age / / indicates the maximum survival time. The default is 20s.
Note:
When STP chooses switch role and port role during its work, it is determined by comparing the above four fields of BPDU. If the root-id is the same, compare the next one, the smaller the cost value, the better; if the same, the smaller the BID, the better; if the same, the smaller the next Port-id, the better, it can't be the same.
-composition of port-id:
Port- priority + port- number (default is 128A)
4. The so-called convergence refers to the time it takes for China Unicom to resume when the network fails.
-time: 30s---50s
With the development of the network, the basic network has higher and higher requirements for network convergence time, so 30-50 time is too long, so we developed a new public standard protocol-RSTP, fast spanning tree. )
5. Public Standard Private Protocol (cisco)
IEEE 802.1d (STP)-spanning Tree PVST
IEEE 802.1w (RSTP)-Rapid spanning Tree PV-RSTP
IEEE 802.1s (MSTP)-multiple spanning Tree MIST
6. Reasons for improving the speed of convergence
①: the efficiency of finding problems has improved:
In traditional STP, if a switch finds a link failure, it will generate a TCN BPDU to tell the root switch, and then the root switch, re-generate a new configuration BPDU, and then send it to all other non-root switches.
In RSTP, if a switch finds a link failure, it will generate a new TCN BPDU and send it directly to all the switches connected to it.
②: the efficiency of problem solving improves the refinement of port roles:
Root port
Designated port
Alternate port-is the replacement of the root port
Backup port-is a backup of the specified port
Compact port status: learning-> learning (MAC address table for this state learning)
Forwarding-> forward
Discarding-> discard
(equivalent to down / listening / blocking in STP)
7. Why is it a multiple of 4096?
When we configure the STP priority of the switch, the value we configure must be a multiple of 4096. Because in BID's 2-byte priority, in fact, the priority itself is only 4 bit, followed by 12bit, that is, the sys-id-ext, that is, the extended system ID, in fact, the value itself is the VLAN number. The main purpose is to introduce STP that runs on VLAN, such as PVST
8. Advantages:
The design of STP (PVST) based on VLAN allows us to load balance traffic among multiple switches based on VLAN, thus improving the utilization of devices.
9.STP features?
Fast convergence portfast uplink-fast
Security feature bpduguard bpdufilter root-guard
10. Gateway redundancy protocol
HSRP-Cisco Private
VRRP-Common Standard
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.