Introduction to Network Basics 4
Ethernet and related concepts of STP
Related concepts of Ethernet / LAN (local area network):
Question:
The signal transmission distance is limited.
Solution:
Repeater-amplifies the electrical signal to extend the transmission distance of the information
Problems caused by repeaters:
Only 2 ports with few connected devices
Solution:
Hub-A multi-port repeater that can connect multiple devices
Problems with hubs:
The signals sent by different terminal devices will conflict.
Mitigation scheme for signal conflict:
CSMA/CD, with collision detection, carrier sense multiple access mechanism
Introduce new devices:
Bridge (bridge)-isolate collision domain
Question:
Bridge devices have fewer ports and can only connect 2 devices
Solution:
Introduce new devices:
Switch-a multi-port bridge that can be implemented
Isolation of conflict domain
STP spanning Tree Protocol problem in traditional switched networks: single point of failure
Solution:
Add redundant links
Add redundant Devic
First figure out how the loop is formed?
The questions that follow:
Data forwarding loop
The data that produces the loop will be continuously transmitted in the network, thus consuming
Link resources and device resources in the network
Solution:
Run the STP protocol on the switch
STP-spanning Tree Protocol; (802.1D)
-implement loop protection when there are redundant links;-implement BPDU-bridging protocol data unit-classify PVST\ RSTP\ MSTP
Working process:
1. Determine the role of the switch
Root switch
Non-root exchange
Principle: compare the BID (bridge ID) of each switch, the smaller the better
Composition:
Priority + MAC
Priority-default is 32768
MAC-MAC of the motherboard of the switch (base MAC)
View command: show version
2. Determine the port role
Root port-each non-root switch has only one port closest to the root switch
Designated port-there is a port closest to the root switch in each collision domain
Non-designated port-all other ports are called non-designated port
How to express "distance"? In STP, the distance of a path is represented by cost; for some links, there are default cost values: 10m-cost 100m-cost 19; 1G-cost 4; 10G-cost 2; BPDU-Root-ID / / indicates who the root switch is Cost / / indicates the distance from the switch sending the BPDU to the root switch BID / / indicates the name of the switch that sent the BPDU; Port-ID / / indicates the port on which the sending switch is sent;-composition: Port priority. Port number-priority default value is 128
3. Determine the port status
Disable / / is equivalent to shutdown, and the port cannot be used at this time
Listening / / listening, which listens for BPDU and is used to determine the port role
Learning / / learning, in which the MAC is learned, forming the MAC address table
Forwarding / / forwarding, that is, the final forwarding status of the port
(root port, designated port)
Block / / blocking, the port cannot send data at this time
(non-designated port)
4. How does the switch distinguish the BPDU of different VLAN:
We use the lower 12 bit of the 2-byte priority in BID as the
Vlan number
As a result, it is concluded that:
The priority field of the first two bytes, which is really used to indicate priority, is only 4.
Bit; for all, there can only be 16 priorities
However, when representing priority values, the following 12bit must be included.
At the same time, must be 0
That is, the priority of the STP for each switch is 0-15 to the power of 2 to 12.
Multiple, that is, a multiple of 4096