Bridge: The predecessor of A vswitch, which refers to vswitch 1: STP OverviewSTP (Spanning Tree Protocol, Spanning Tree Protocol)Is to change a ring structure into a tree structure. It is used to logically block a network with loops and generate a logical tree structure.The role of STP:Logically disconnect the loop to prevent broadcast storms. Ii. Working Principle of STPSTP algorithm: ①: select the root bridge (RB) ②: select the root port (RP) ③: select the port (DP)Select root bridge: Based on the bridge ID(Bridge ID = bridge priority (0-65535, default 32768) + bridge MAC address)Select the root port: ①: the lowest root path cost to the root bridge. ②: The minimum ID of the directly connected bridge (not its own). ③: The minimum port ID value (the Peer Port)Select the specified port: ①: the root path cost is the lowest ②: The Bridge ID of the switch is small ③: the port ID value is small (your own)Port ID = port priority (range: 0-255, default: 128) + port numberRelationship between Bandwidth and path cost
Link bandwidth (Mb/s) |
Path cost |
10 |
100 |
16 |
62 |
45 |
39 |
100 |
19 |
155 |
14 |
622 |
6 |
1000 |
4 |
10000 |
2 |
Iii. BPDU (Bridge Protocol Data Unit, Bridge Protocol Data Unit)
Role of BPDU:Switches use BPDU to exchange information such as the bridge ID and root path cost. Two types of BPDU
: ①: Configure BPDU for Spanning Tree computing
②: Topology change BPDU, used to notify network topology changesFields and meanings of BPDU packets:
Root bridge ID: Consists of a two-byte priority and a six-byte bridge MAC address
Root path cost: Shows how far this BPDU has been transmitted from the root bridge.
Send bridge ID: Sends the bridge information of the BPDU.
Port ID: Consists of a byte port priority and a byte port number.
Timer: Describes how long the spanning tree can complete each of its functions, including message aging time, maximum aging time, access time, and forwarding latency. IV. STP convergence
Vswitch PortFive STP statuses:
Forwarding: Send or receive user data
Learning: Build a bridge table
Listen: Build an active Topology
Blocking: Only accept BPDU
Disable: Force close
STP Timer:
Hello time: Time interval between BPDU packets sent by the bridge
Forwarding delay: The time spent on listening and learning of a vswitch port. The default value is 15 seconds.
Maximum aging time: Maximum time for a vswitch to store a BPDU packet before it is discarded. The default value is 20 seconds.
Typical port transition: From blocking to listening (20 s), from listening to learning (15 s), from learning to forwarding (15 s) 5: STP applications
Relationship between STP and VLAN: 1: IEEE General spanning tree (CST) 2: Cisco VLAN spanning tree (PVST) 3: Cisco's PVST (PVST +) compatible with CST 4: ieee mst (Multi-spanning tree)
Significance of PVST + Configuration: 1: Use PVST + to achieve network load sharing 2: configure the speed port, which is the configuration command for connecting the port of the terminal to quickly enter the forwarding status PVST +:
Spanning-tree vlan
Vlan-list
Enable Spanning Tree
Spanning-tree vlan
Vlan-list
Priority
Bridge-priority
Modify bridge priority
Spanning-tree vlan
Vlan-list
Root{Primary | secondary}
Specify the root bridge directly
Spanning-tree vlan
Vlan-list
Cost
Cost
Modify port cost
Spanning-tree vlan
Vlan-list
Port-priority
Priority
Modify port priority
Configure the speed port for spanning-tree portfast
Show spanning-tree view the configuration of the spanning tree
Show spanning-tree vlan
Vlan-id
Detail: view detailed information about a vlan Spanning TreeIf you have any questions, please contact QQ: 651167970
From the BLOG with a black silhouette T73