当前位置:网站首页>Hcia-r & s self use notes (18) campus network architecture foundation, switch working principle, VLAN principle
Hcia-r & s self use notes (18) campus network architecture foundation, switch working principle, VLAN principle
2022-07-26 23:02:00 【Master basket ladle Xiao Lu】
Infrastructure of campus network (7/22,33min)
Switching technology / Two layer technology
Routing technology is not necessarily a three-tier Technology ( Such as RIP Packaged in UDP 520,OSPF Packaged in IP 89)
The layer-2 switch works at the data link layer , Operate on data frames . After receiving the data frame , The switch will forward the data frame according to the header information of the data frame

When it comes to layer 2 Networks
How switches work (7/22,42min)
The main functions of the switch :
Access of terminal equipment
Ethernet data frame exchange , According to the purpose MAC Address forwarding data frame ; Study MAC Address , And maintain MAC Address table ;
Prevent layer 2 loop
| principle | remarks |
Study Learn | When a frame is received from an interface , Put the in frame Source MAC Bind to this interface , Deposit in MAC Address table |
flooding Flood | When received from an interface Broadcast frame 、 Multicast frame 、 Unknown unicast frame ( The goal is MAC There is no such thing as MAC In the address table ), Forward the frame from all other interfaces , Except the receiving port |
forward Forward | When received from an interface Known unicast frames , Immediately forward it from the corresponding interface |
to update Update | Each record is saved by default 300s The records learned by all interfaces will be cleared after the switch is restarted After the interface is closed, the records learned by the interface will be cleared A source MAC Appear on another interface , Old records will be deleted , Add a new record |
Contract awarding means learning , Without any reason ARP It can also make the switch learn MAC Address
Relative switch , If the router finds that there is no target route, it will directly lose packets
dis mac-add agenting-time Check the aging time ( If not, five minutes mac The watch is empty )
An interface can only learn one of a host mac, May float back and forth
Multicast Optimization Technology , Flood control
Ethernet interface working mode :
| The term | remarks |
| Half duplex | half-duplex Both sides of the communication can send and receive data , But not at the same time .( Telephone ) |
| full duplex | full-duplex Both sides of communication can receive and send data at the same time .( Walkie-talkie ) |
| rate | speed Both ends shall negotiate during interface connection , If the negotiation fails, normal communication cannot be performed |
Duplex and rate are adaptive by default (negotiation auto);
Turn off auto negotiation :
int GigabitEthernet 0/0/1
undo auto-negotiation or negotiation auto disable( Depending on the device version )Half duplex may occur CRC And Framements( Fragmentation ) as well as Collisions( Conflict , Packet flow conflict ) Wrong package
VLAN principle (7/22,48min)
Vlan(Virtual Local Area Network), Virtual LAN .
VLAN advantage :
Effective control of the broadcast domain ; Enhance the security of LAN ; Flexible construction of virtual working groups ; Simplify network management
VLAN summary :
A physical LAN is logically divided into multiple broadcast domains ;
1 VLAN =1 Broadcast area =1 subnet
The radio won't be in VLAN Forward between , But limited to their own VLAN in
Different VLAN The devices between cannot communicate by default , Layer 3 equipment is required to realize interworking
VLAN Range :
0-4095, common 4096 individual (0 and 4095 Make reservations ,1 As the default )
VLAN Label Introduction :
Ethernet frame source mac Insert a 4 Bytes of tag

Switch to pc Or between switch ports pvid And vlan Consistent time , No tag
VLAN Link type :
| type | remarks |
Access Link Access link | Used to connect to Hosts and switches The link to The frames transmitted on the access link are untagged frame |
Trunk link main rd / Relay link | be used for Interconnection of switches or Between switch and router ( Single arm routing ) The link to Almost all the frames transmitted on the trunk link are tagged Frames are used for both end recognition |
also Hybrid And QinQ Two kinds of
PVID:
namely Port VLAN ID, Represents the default value of the port VLAN
Interface type -Access:
For connecting to the host ;
After receiving the data, it will add VLAN Tag,VLAN ID And the port of PVID identical ;
Will be removed before forwarding data VLAN Tag
host A Send data to the switch , Label the switch 10, Find another one pvid10 Port forwarding , And peel off tag
notes :
PC Cannot send or receive with tag Frame of ( Can't recognize )
The switch is labeled only for self identification
if host A Send the label to the switch as 20 Data packets of , Switch interface (PVID by 10) How to deal with —— take 20 Change it to 10
Interface type -Trunk:
When a frame is received ( Into the direction )
If the frame does not contain Tag, On the port PVID;
If the frame contains Tag, It doesn't change
When sending a frame ( Exit direction ), Of the frame VLAN ID stay Trunk In the allowed sending list of :
If it is connected with the port PVID identical , Then peel off Tag send out ;
If it is connected with the port PVID Different , Send it directly
Carrying multiple vlan Of traffic
Interface type -Hybrid
whole access The mouth can also pass ( The host address should be the same as the network segment )
You can connect to the host , You can also connect to other switches .
Both access links and trunk links can be connected
Allow multiple VLAN Through the frame of , And can be in the direction of the interface will be some VLAN The frame of Tag be stripped ( Depends on the configuration of the command )
Special scenes :
Rely only on Access Interface completion is different VLAN( But the same network segment ) Host communication :

The cascade port of the switch is set as above , It can also realize data communication
PC-A→SW1 Gi0/0/1( Add tags PVID10)→SW1 Gi0/0/2( Peel off the label PVID 10)→SW2 Gi0/0/1( Add tags PVID 20)→SW2 Gi0/0/2( Peel off the label PVID20)→PC-B
边栏推荐
猜你喜欢

Kalibr calibration realsensed435i -- multi camera calibration

Summary of shell related commands

Eureka基本使用

Makefile related syntax summary (openc910)

ESMFold: AlphaFold2之后蛋白质结构预测的新突破

DAO:OP 代币和不可转让的 NFT 致力于建立新的数字民主

PostgreSQL and Navicat: the backbone of the database industry

杰理下载器强制下载工具的使用介绍_AC695N696NAD14AD15全系列支持

Regular expressions and bypass case recurrence

Database full stack Engineers (devdbops) have low down payment and high return, and pay after employment
随机推荐
2022-07-26:以下go语言代码输出什么?A:5;B:hello;C:编译错误;D:运行错误。 package main import ( “fmt“ )
Making wechat robot with go (I) sending messages
基本的SELECT语句
Embedded sig | distributed soft bus
Xu Li, CEO of Shangtang Technology: the company's valuation has exceeded $7billion, so we are not in a hurry to go public
杭州银行面试题【杭州多测师】【杭州多测师_王sir】
gateway基本使用
【HCIP】OSPF 路由计算
中兴通讯:5G基站在全球发货已超过5万个!
基于gRPC编写golang简单C2远控
What if redis memory is full? This is the right way to deal with it
各有一项指纹专利被宣告无效!汇顶与思立微均正式回应!
Domestic DRAM will be mass produced by the end of the year, but the road ahead is still long!
Kt6368a Bluetooth chip development precautions and problem collection - long term update
Weilai cup 2022 Niuke summer multi school training camp 2
Programmer growth chapter 29: how to motivate employees?
蔚来杯2022牛客暑期多校训练营2
菜鸟网络面试【杭州多测师】【杭州多测师_王sir】
CSRC: agree to the IPO registration of Chuanyin holding science and Technology Innovation Board
【flask高级】结合源码分析flask中的线程隔离机制