当前位置:网站首页>Three layer switching ②
Three layer switching ②
2022-07-04 01:24:00 【BA Bo'er Ben, BA Bo'er Ben】
VLAN Routing between :
Switchboard SVI: Switch virtual interface , In Huawei settings go by the name of VLANIF, yes Switches are designed for different applications vlan Set the three-tier interface
① For layer 2 switches , There can only be one SVI Interface , Its function is to remotely login and control equipment ( General switches cannot be configured IP Address , So I can't get through IP Manage it )
Layer 2 switch SVI An interface can only belong to one vlan, And configured SVI This vlan go by the name of management vlan
② For layer 3 switches , Each of the three-layer switches vlan Can be configured with one SVI Interface
Three layer switch has three-layer forwarding function , So this SVI Interfaces can be used for each VLAN Use the corresponding gateway interface
STP Spanning tree protocol :
STP The spanning tree protocol is for Line redundancy , If the line redundancy is not eliminated, the loop will cause problems such as broadcast storm
STP Spanning tree protocol : In a layer 2 switching network , The only path from the root switch to all nodes is realized through the logical blocking part of the interface , And generate a topology without loop for the best path , When the best path fails, individual blocking interfaces are opened to form a backup link
STP The standard spanning tree protocol is composed of IEEE Issued by the organization 802.1D standard ( The earliest spanning tree protocol , public )
In addition, there are other types of spanning tree protocols on the market :PVST,PVST+( Cisco's private spanning tree protocol ),RSTP( Fast spanning tree protocol ·802.1W),MSTP( Multiple spanning tree protocol 802.1S)
802.1D Spanning tree stipulates that there can only be one tree in a switching network !!!
The problem of switch loop :
① Broadcast storm ( The broadcast frame forms a clockwise and counterclockwise loop in the layer 2 loop , And wireless loop , Eventually lead to equipment downtime , Network paralysis )
②MAC Address table flip (MAC Address table drift )
Due to carrying PC1 Of all the FFFF The address information will be forwarded continuously , And switch MAC The address will be constantly refreshed , here ,PC1 The information will be in the... Of the switch MAC The table is constantly refreshed
③ Multi frame copy
Same reason MAC Address table flip , Eventually, the switch goes down
STP The type of packet transmitted :
STP In the spanning tree, there are mainly transfers BPDU package (B It refers to the bridge ,PDU Refers to the data protocol unit ),BPDU It is a cross layer encapsulated data frame , Encapsulate the data directly into the second layer
STP There are two kinds of BPDU Data packets :① To configure BPDU,②TCN BPDU
① To configure BPDU:
Only the root bridge can send , In the switching network The initial state All switches define themselves as root bridges , Send configuration in switched network BPDU; Then the whole STP All switches in the network receive messages from other devices BPDU Data packets , then STP The switching equipment in the network will compare based on the parameters in the packet , Election bridge ; Finally, all non root bridges will no longer send BPDU Data packets , And just accept and forward the messages sent by the root bridge BPDU Data packets ( Period of transmission 2s,max age 20s)
②TCN BPDU:
After link failure occurs to the local equipment , according to STP Spanning tree protocol , The equipment causing link failure will be modified BPDU The contents of the packet , Then forward to all local STP Interface ( What is forwarded at this time is TCN BPDU Data packets ), To speed up convergence to refresh STP Of all switches in the network MAC Address table records .
And the neighbor switch is receiving TCN BPDU After the packet , The... In the packet will be sent first TCA Mark position 1 Then forward the reply to the failed equipment ( To configure BPDU) For reliable transmission . Then forward it level by level TCN BPDU To the root bridge , The root bridge then sends TC The mark position is 1 Of BPDU Package to all switches ( Purpose : Give Way STP Of all switches in the network MAC The aging time of the address table temporarily changes from 300s It is amended as follows 15s)
Non root switch cannot send configuration BPDU, But you can forward and accept BDPU Information ( Sent by faulty equipment TCN BPDU By modifying and forwarding the configuration BPDU Information )
BDPU Data packets :
Compared with BPDU Data packets ,TCN BPDU The packet contains only three parameters : agreement ID, Protocol version ID,BPDU The type of
Protocol version ID:
stay BPDU In the packet , agreement ID The set number of is :802.1D Set number as 0,802.1W Set number as 2,802.S Set number as 3
Sign a :
The placeholder of the flag is 1 Bytes (8 position ), And in the 802.1D Only the lowest and highest bits in the data frame are used in the Protocol , The middle six digits are not used
Root bridge ID:
The root bridge occupies 8 Bytes , This location records STP Of the root switch in the network BID, Root bridge ID
bridge ID(BID):
The space occupied by the bridge is 8 Bytes , This location is to distinguish the switches in the switching network , Each switch needs to be set with a ID Are identified ,BID It's made up of two parts , The first two bytes are priority , The last six bytes are the... Of the switch MAC Address
Support STP The switch of the protocol must have MAC Address , General layer-2 switch , only one SVI Interface , Use switch interface MAC The smallest address is exchanged MAC Address ; But in the layer 3 switch , There could be multiple MAC Address , Will In all MAC Select the address with the lowest value MAC Address as BID Medium MAC Address .
Root path overhead (RPC):
Root bridge send BPDU The overhead value of the packet arriving at the bridge device
Interface ID(PID):
placeholder 2 byte , Interface ID It's made up of two parts , front 4 Bit is priority , after 12 Bit is the number of the interface
Root bridge ID, bridge ID, Root path overhead , Interface ID It's participation STP The four main parameters of spanning tree role election
Max - hop:
Message lifetime , Similar to three layers TTL, Maximum message lifetime 20, When one BPDU When the message lifetime of is greater than the maximum , This will be ignored directly BPDU, It is equivalent to giving STP A working radius is specified
Forwarding delay :
BPDU Switch dwell time in interface state , The default time is 15S
BID:
BID= priority +MAC Address
priority :2 Bytes , The theoretical value range is 0-65535(2^16), But the real value range is 0-61440,BID The default value of the initial value of is 32768[1000.0000.0000.0000]( The smaller the better ).
There are... In total 16 position , But only before use 4 position ( So every representative 4096), So when modifying the priority , Only according to 4096 Modify the multiple of . hinder 12 Bit is the extended system ID, stay 802.1D and 802.1W All of them are reserved , Only in 802.1S( Multiple spanning tree protocol ) Start in
MAC The address is selected from each port of the switch MAC The smallest address is BID Of MAC Address
PID:
PID The interface of ID Is two bytes ( front 4 Bit is priority , after 12 Bit is the interface number )
Priority value range 0-240, The default value is 128, Every representative 16. When the priority is modified , Only according to 16 To modify the multiple of
STP The election :
STP The main election is : Root bridge (RB), Root port (RP), Designated port (DP), Non specified port (NDP) These four parameters
Root bridge election :
802.1D Provisions of the agreement : One STP The switching network can only generate one number , And a tree has only one root
Root bridge election : Compare BPDU Medium BID(BID= priority +MAC Address )
①BPDU In comparison Compare first BID The priority of the , The lower the priority, the better
② If If the priority is the same, compare MAC Address , take MAC The smallest address is the root bridge
Root port election :
On every non root bridge , There is only one interface closest to the root bridge , Used to receive BPDU
① First Compare the data sent by the root bridge received by the interface BPDU At the time of the Cost value
② When Interface RPC Same value when , It will be more Opposite end Of ( The superior ) The equipment BID,BID The small corresponding interface is the root port
③ When To the end BID Same value when , It will be more Opposite end Of ( The superior ) The equipment PID,PID The small corresponding interface is the root port
PID Comparison is to compare priorities first , The lower the priority, the better ; If the priority is the same , Then compare the interface number , The smaller the interface number, the better
STP The reason why we compare the opposite end first BID Why : If the root bridge goes down , Preference will be given BID Small as a new root bridge , There is no need to switch the root port again
④ When To the end PID Same value when , It will be more Local The equipment PID,PID The small corresponding interface is the root port
# Opposite end PID The same situation : Connect a hub under the switch
Specify the port :
On every link where there is a protocol , There is only one designated port , The original forwarding came from the root bridge BPDU
① There is a link with the root port , The end-to-end port of the root port must be the specified port , All interfaces of the root bridge must be specified ports
② Comparison interface Out of direction cost value , Select the one with low cost as the specified port
③ When When the cost value of the interface is the same , It will be more Local The equipment BID,BID The small interface is the specified port
④ When The local BID Phase at the same time , It will be more Local The equipment PID,PID The small interface is the specified port
Local BID The same thing , The local switch uses the network cable to plug the two interfaces together
⑤ When The local PID Phase at the same time , Directly plug this interface
The local PID The same thing , The local switch is connected to the hub , Then plug the two interfaces of the hub together
Non specified port :
Non designated ports are the remaining ports after selecting the root port and designated port , Unspecified ports are logically blocked , As line backup redundancy
Logic blocking does not directly disconnect this line , Instead, these interfaces do not forward messages when they receive them . It will be enabled in case of line fault
边栏推荐
- Mobile asynchronous sending SMS verification code solution -efficiency+redis
- Flutter local database sqflite
- CesiumJS 2022^ 源码解读[8] - 资源封装与多线程
- 51 single chip microcomputer timer 2 is used as serial port
- Sequence list and linked list
- 查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题
- Hash table, string hash (special KMP)
- Release and visualization of related data
- 功能:求5行5列矩阵的主、副对角线上元素之和。注意, 两条对角线相交的元素只加一次。例如:主函数中给出的矩阵的两条对角线的和为45。
- 机器学习基础:用 Lasso 做特征选择
猜你喜欢
MySQL deadly serial question 2 -- are you familiar with MySQL index?
Install the pit that the electron has stepped on
Infiltration learning diary day19
Huawei BFD and NQA
1-redis architecture design to use scenarios - four deployment and operation modes (Part 1)
查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题
MPLS experiment
A malware detection method for checking PLC system using satisfiability modulus theoretical model
[prefix and notes] prefix and introduction and use
机器学习基础:用 Lasso 做特征选择
随机推荐
SRCNN:Learning a Deep Convolutional Network for Image Super-Resolution
PMP 考试常见工具与技术点总结
[prefix and notes] prefix and introduction and use
Trading software programming
在寻求人类智能AI的过程中,Meta将赌注押向了自监督学习
PMP 考试常见工具与技术点总结
Summary of common tools and technical points of PMP examination
【.NET+MQTT】. Net6 environment to achieve mqtt communication, as well as bilateral message subscription and publishing code demonstration of server and client
Stringutils and collectionutils
【.NET+MQTT】. Net6 environment to achieve mqtt communication, as well as bilateral message subscription and publishing code demonstration of server and client
AI helps make new breakthroughs in art design plagiarism retrieval! Professor Liu Fang's team paper was employed by ACM mm, a multimedia top-level conference
MySQL introduction - functions (various function statistics, exercises, details, tables)
I don't care about you. OKR or KPI, PPT is easy for you
手机异步发送短信验证码解决方案-Celery+redis
关于 uintptr_t和intptr_t 类型
C import Xls data method summary I (upload files and create Workbooks)
[common error] custom IP instantiation error
Msp32c3 board connection MSSQL method
Who moved my code!
A little understanding of GSLB (global server load balance) technology