In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to spanning tree protocol in stp. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
1. Determine the role of the switch
Root switch: there is one and only one in the entire switching network
Non-root switch: the remaining switches are called non-root switches.
Note: each non-root switch will calculate the shortest, loop-free, layer 2 data forwarding path to the root switch, and eventually the path is in the "forwarding" state. Election principle: compare the BID (bridge ID) of each switch: priority + MAC address priority: default value is 32768; 2 bytes MAC address: use the MAC;6 bytes of the motherboard of the switch; comparison principle-first compare the priority, the smaller the better; secondly, compare the MAC address, the smaller the better; 2. Determine the role of the port root port: on each non-root switch, there is and only one. The port closest to the root switch; designated port: there is one and only one in each "network segment / segment"; the port closest to the root switch Non-designated port: all other ports, called "non-designated port" 3, determine the status of the port down-off (meaning that the current port does not have STP enabled) listening-listening, listening on all BPDU in the network in order to determine the role of the switch and port The port stays in this state for 15s; learning-learning, this stage is mainly to learn the source MAC address of the data frame received on the port, thus forming the MAC address table; the port stays in this state for 15s Forwarding-forwarding (final state), which implements the sending and receiving of packets blocking-blocking (final state), which cannot send and receive packets; can only receive BPDU.
Experimental steps and ideas:
one。 Configure the ip of the PC
Pc14:
Ip: 192.168.1.1
Subnet mask: 255.255.255.0
Gateway: 192.168.1.254
Pc15:
Ip: 192.168.2.1
Subnet mask: 255.255.255.0
Gateway: 192.168.2.254
Pc16:
Ip: 192.168.3.1
Subnet mask: 255.255.255.0
Gateway: 192.168.3.254
Pc17:
Ip: 192.168.4.1
Subnet mask: 255.255.255.0
Gateway: 192.168.4.254
Pc18:
Ip: 192.168.1.2
Subnet mask: 255.255.255.0
Gateway: 192.168.1.254
Pc19:
Ip: 192.168.2.2
Subnet mask: 255.255.255.0
Gateway: 192.168.2.254
Pc20:
Ip: 192.168.3.2
Subnet mask: 255.255.255.0
Gateway: 192.168.3.254
Pc21:
Ip: 192.168.4.2
Subnet mask: 255.255.255.0
Gateway: 192.168.4.254
Pc10:
Ip: 192.168.1.3
Subnet mask: 255.255.255.0
Gateway: 192.168.1.254
Pc11:
Ip: 192.168.2.3
Subnet mask: 255.255.255.0
Gateway: 192.168.2.254
Pc12:
Ip: 192.168.3.3
Subnet mask: 255.255.255.0
Gateway: 192.168.3.254
Pc13:
Ip: 192.168.4.3
Subnet mask: 255.255.255.0
Gateway: 192.168.4.254
two。 Create vlan and add ports to and set up trunk
1. Create a vlan on sw1 and add the port:
Vlan batch 10 20 30 40
Interface g0/0/3
Port link type-access
Port default vlan 10
Interface g0/0/4
Port link type-access
Port default vlan 20
Interface g0/0/5
Port link type-access
Port default vlan 30
Interface g0/0/6
Port link type-access
Port default vlan 40
Set up the trunk:
Interface ge0/0/1
Port link-type trunk
Port trunk allow-pass vlan all
Interface ge0/0/2
Port link-type trunk
Port trunk allow-pass vlan all
two。 Create a vlan on sw2 and add the port:
Vlan batch 10 20 30 40
Interface g0/0/3
Port link type-access
Port default vlan 10
Interface g0/0/4
Port link type-access
Port default vlan 20
Interface g0/0/5
Port link type-access
Port default vlan 30
Interface g0/0/6
Port link type-access
Port default vlan 40
Set up the trunk:
Interface ge0/0/1
Port link-type trunk
Port trunk allow-pass vlan all
Interface ge0/0/2
Port link-type trunk
Port trunk allow-pass vlan all
3. Create a vlan on sw3 and add the port:
Vlan batch 10 20 30 40
Interface g0/0/6
Port link type-access
Port default vlan 10
Interface g0/0/5
Port link type-access
Port default vlan 20
Interface g0/0/4
Port link type-access
Port default vlan 30
Interface g0/0/3
Port link type-access
Port default vlan 40
Set up the trunk:
Interface ge0/0/1
Port link-type trunk
Port trunk allow-pass vlan all
Interface ge0/0/2
Port link-type trunk
Port trunk allow-pass vlan all
three。 Configure MSTP spanning Tr
1. First determine the root switch and the secondary root switch on the sw1,sw2,sw3
Display stp brief View stp
Here sw2 is the root switch and sw1 is the secondary root switch
2.STP parameter modification (Huawei):
(1) modify the STP priority of the switch:
[SW] stp priority {value}-> must be a multiple of 4096
(2) modify the STP mode of the switch
[SW] stp mode {stp | rstp | mstp}
(3) modify the STP cost of the switch port:
[SW] interface fas0/13
[sw-fas0/13] stp cost {value}
(4) turn off / enable STP on the switch:
[sw] stp disable-> close STP
[sw] stp enable-> enable STP. Default is enabled.
3. Configure MSTP
MST domain (region), which can contain multiple instances at the same time
MSTI (instance), that is, MST instance. A MSTI can be associated with multiple VLAN at the same time.
1. Configure MST region on sw1
Stp region-configuration
Name of the region-name aaa configuration region
Instance 1 vlan 10 20
Instance 2 vlan 30 40
Active region-configuration
. Configure MST region on sw2
Stp region-configuration
Name of the region-name aaa configuration region
Instance 1 vlan 10 20
Instance 2 vlan 30 40
Active region-configuration
3. Configure primary and secondary roots
1. Configure the primary root on sw2
Stp instance 1 priority 0
Stp instance 2 priority 4096 sets SW2 as the root of the instance id
two。 Configure the primary root on sw1
Stp instance 2 priority 0
Stp instance 1 priority 4096 sets SW1 as the root of the instance id
4. Verification
Display stp instance (id)
four. Verification, test
Block any line between I switches to see if it can be connected to the whole network.
It can realize full Netcom, which shows that the experiment is successful.
This is the end of this article on "how to spanning Tree Protocol for stp". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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.