当前位置:网站首页>Hcip day 17
Hcip day 17
2022-07-02 04:39:00 【lbsjdxsn】
Step four :VLAN Routing between
A subinterface : A virtual interface , Logically, a physical interface is divided into multiple virtual sub interfaces
[r1-GigabitEthernet0/0/2.1]ip address 192.168.1.1 24
[r1-GigabitEthernet0/0/2.1]dot1q termination vid 2
Dot1q = 802.1Q
[r1-GigabitEthernet0/0/2.1]arp broadcast enable ---- Open sub connection
mouth ARP Broadcast request response
trunk Trunk roads need to be configured between switches , In the scenario of single arm routing , The link between the switch and the router also needs to be configured as trunk main rd .
It is realized through three-layer switch VLAN Routing between
SVI — Switch virtual interface — It is called Huawei switch VLANIF — Switches are designed for different applications VLAN Set the three-tier interface
management VLAN — Two-layer switch , There can only be one SVI Interface , Its function is only to meet the needs of remote login control equipment , therefore , His SVI An interface can only belong to one VLAN, And this VLAN We call it management VLAN.
Three layer switch — every last VLAN Can be configured with a SVI Interface . Because the layer-3 switch has the layer-3 forwarding function , therefore , This SVI The interface can be used for each of us VLAN Use the corresponding gateway interface .
[sw1]interface Vlanif 2 — establish VLAN Corresponding SVI Interface
[sw1-Vlanif2]
STP ---- Spanning tree protocol
redundancy — Line redundancy
Equipment redundancy
Gateway redundancy
UPS redundancy
Problems arising from the establishment of loop by switch
1、 Broadcast storm : The broadcast frame forms a two-layer loop with clockwise rotation and counterclockwise rotation in the two-layer loop , Infinite loop , Eventually lead to equipment downtime , Network paralysis .
2、MAC The flip of the address table (MAC Drift of address table )
3、 Frame copy
Spanning tree protocol : In a layer 2 switching network , The blocking part of logic interfaces , Realize the unique path from the root switch to all nodes, and it is the best route . Generate a topology without loops . When the best path fails , Individual blocking interfaces are open , Form a backup link .
STP ---- Standard spanning tree protocol — IEEE Issued by the organization 802.1D In the standard — The earliest spanning tree — The public agreement
PVST,PVST+ — The spanning tree private protocol developed by Cisco
RSTP — Fast spanning tree protocol — 802.1W
MSTP — Multiple spanning tree protocol — 802.1S
802.1D Make trees ---- A switching network, a tree
BPDU — STP Data packets of — B — This refers to the bridge ;PDU — Data protocol unit ---- It is a cross layer encapsulated data frame , Directly encapsulated into the second layer .
STP There are two kinds of BPDU: To configure BPDU,TCN BPDU
To configure BPDU
Protocol version ID — 802.1D — 0
802.1W — 2
802.S — 3
sign — 1 Bytes – 8 position ---- stay 802.1D Only the lowest and highest bits are used in , The middle six are useless .
Root bridge ID — 8 Bytes — For the root switch BID Root bridge ID
bridge ID(BID)---- 8 Bytes — In order to distinguish the switches in the switching network , Each switch needs to be designed with a ID Are identified
BID It's made up of two parts — The first two bytes : priority
The last six bytes : Switchboard MAC Address
Support STP Switchboard , Must have MAC Address , General layer-2 switch , only one SVI Interface , You can use the corresponding interface MAC Address most BID Medium MAC Address ; But layer 3 switches , There could be multiple MAC Address , Will be in all MAC Select the address with the lowest value MAC Address as BID Medium MAC Address .
Root path overhead — RPC — Send this BPDU The overhead value of the bridge device to the root bridge .
Interface ID — PID — 2 byte — It's made up of two parts : front 4 position : priority
after 12 position : Number of the interface
The above four parameters are participation STP Four parameters of spanning tree role election .
Max - hop — Maximum message lifetime — 20 ---- When one BPDU When the message lifetime of is greater than the maximum , We'll just ignore this BPDU, It is equivalent to giving STP A working radius is specified .
Forwarding delay — Switch dwell time in interface state , The default time is 15S.
TCN BPDU
Contains only three parameters ---- agreement ID, Protocol version ID,BPDU The type of 0 0 OX80
To configure BPDU — Only the root bridge can send , In the initial state of the switching network , All switches define local as root bridge , Conduct BPDU Sending of ; after , All devices in the whole network receive messages from other devices BPDU, after , Compare based on the parameters in the packet , Election bridge ; After that, all non root bridges will no longer send configuration BPDU, Instead, it only accepts and forwards the messages sent by the root bridge
BPDU; cycle 2S,max age 20s;
TCN BPDU
TCN BPDU — After local link failure ,STP Converge again , In order to speed up the refresh of all switches in the whole network MAC Record of address table , Will be distributed to all local STP Interface send TCN BPDU. After the neighbor switch receives it , Reply first TCA Mark position 1 Configuration of BPDU, For reliable transmission ; after , Then forward it level by level TCN BPDU Go to the root bridge , Reply by root bridge TC Mark position 1 Configuration of BPDU To step back to all switches ; Yes, all switches will temporarily MAC The aging time of the address table is from 300S It is amended as follows 15 second ( This value is equal to the forwarding delay time ). Used to speed up failure MAC Refresh of address table .
Root bridge (RB)
Root port (RP)
Designated port (DP)
Non specified port (NDP)
1、 The choice of network root — 802.1D A switching network generates a tree , A tree has and has only one root
The method of election : Compare configurations BPDU Medium BID = priority + MAC Address
priority :2 Bytes , The theoretical value range is 0 - 65535, But the real value range is 0 - 61440,BID The initial default value of is 32768, The smaller the better
There are... In total 16 position , But only the first 4 position , therefore , Every representative 4096. When the priority is modified , Only according to 4096 To modify the multiple of .
Back 12 position : Expansion system ID ---- stay 802.1D and 802.1W All of them are reserved , Only in 802.1S Enable (MSTP — More trees )
Compare priorities first , The smaller the priority, the better ; If the priority is the same , Then compare MAC Address , take MAC The smallest address is the root bridge .
2、 Election root port — On every non root bridge , There is only one interface closest to the root bridge , Used to accept messages sent by the root bridge BPDU.
RPC
The above three standards are supported by Huawei devices STP Cost value standard , Huawei devices default to 802.1t standard .
[Huawei]stp pathcost-standard ?
dot1d-1998 IEEE 802.1D-1998
dot1t IEEE 802.1T
legacy Legacy
1、 First compare the data sent by the root bridge received by the interface BPDU At the time of the RPC value
2、 When the interface RPC Value at the same time , It will compare the opposite end ( The superior ) The equipment BID, The small corresponding interface is the root port .
3、 If opposite end BID When it's the same , Compare the opposite end PID, choice PID The smaller corresponding port is used as the root port .
PID ---- Interface ID ---- 2 Bytes ---- front 4 position : priority
after 12 position : Number of the interface
priority : The value range is 0 - 240, The default value is 128. Every representative 16. When the priority is modified , Only according to 16 To modify the multiple of .
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 .
4、 If the end to end PID Also the same , It's more local PID, The smaller one is the root port .
3、 Select designated port — On every link where there is a protocol , There is and only one ; Used to forward messages 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 ;
1、 First compare the cost value of the interface exit direction , The low cost value is the specified port .
2、 If the cost value is the same , Will compare local BID, The interface corresponding to the small switch is the specified port ;
3、 If the local BID Phase at the same time , Then compare PID,PID Small for the specified port ;
4、 If the local PID Also the same , Then directly plug the interface . All remaining ports without roles are non specified ports , Need to be blocked .
边栏推荐
- win10 磁盘管理 压缩卷 无法启动问题
- Message mechanism -- message processing
- cookie、session、tooken
- Free drawing software recommended - draw io
- Mysql表insert中文变?号的问题解决办法
- Pytorch yolov5 exécute la résolution de bogues à partir de 0:
- How much can a job hopping increase? Today, I saw the ceiling of job hopping.
- UNET deployment based on deepstream
- 【c语言】动态规划---入门到起立
- Comp 250 parsing
猜你喜欢
AcrelEMS高速公路微电网能效管理平台与智能照明解决方案智慧点亮隧道
Federal learning: dividing non IID samples according to Dirichlet distribution
Pytoch --- use pytoch to predict birds
Cache consistency solution - how to ensure the consistency between the cache and the data in the database when changing data
Social media search engine optimization and its importance
正大美欧4的主账户关注什么数据?
Markdown编辑语法
Leetcode- insert and sort the linked list
WiFi 5GHz frequency
What data does the main account of Zhengda Meiou 4 pay attention to?
随机推荐
10 minutes to understand CMS garbage collector in JVM
Shenzhen will speed up the cultivation of ecology to build a global "Hongmeng Oula city", with a maximum subsidy of 10million yuan for excellent projects
Typescript practice for SAP ui5
oracle 存储过程与job任务设置
Record the bug of unity 2020.3.31f1 once
Actual combat | use composite material 3 in application
LCM of Spreadtrum platform rotates 180 °
Exposure X8 Standard Version picture post filter PS, LR and other software plug-ins
Mysql中常见的锁
IDEA xml中sql没提示,且方言设置没用。
Wechat applet calculates the distance between the two places
Social media search engine optimization and its importance
ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
正大留4的主账户信息汇总
Thinkphp內核工單系統源碼商業開源版 多用戶+多客服+短信+郵件通知
Play with concurrency: draw a thread state transition diagram
June book news | 9 new books are listed, with a strong lineup and eyes closed!
Markdown edit syntax
How much can a job hopping increase? Today, I saw the ceiling of job hopping.
Learn AI safety monitoring project from zero [attach detailed code]