当前位置:网站首页>Basic knowledge of switches
Basic knowledge of switches
2022-08-10 13:07:00 【angry curly hair】
First, make a comparative understanding of switching and routing:
Routing technology deals with communication between different network segments
Switching technology deals with communications within the same network segment
A router is a Layer 3 network device;
交换机,网桥是二层设备; (注:也有三层交换机)
Routers forward based on routing tables;
交换机基于MAC地址表转发;
The basic working principle of the switch
1:Switch enablement process
RAM:随机存储(当前配置文件)
ROM:只读存储(自检程序)
NVRAM:非易失性存储(保存配置)
Flash:闪存(操作系统)交换机 : 二层基于MACAddress forwarding device,依靠MAC地址表进行数据的转发.
2:MAC地址表: 3元素组成,VLAN ID 、MAC地址、端口编号
3:路由器、交换机、网桥、集线器的区别
4:交换机的分类:二层交换机 和 多层交换机
5:How Layer 2 switches work: 1.存储转发 2.forward through 3.无分片转发
6:交换机的基本功能:
(2)基于源MAC地址学习
(2)基于目标MAC地址转发
(3)数据过滤
(4)防止环路 (stp生成树协议)
7:Multicast data frameMac地址固定:01-00-5E 前25位固定,第25位为0
8:MACAddress learning has a time-to-live:If a device has messages within the time-to-live,macAddress table update time;
ARP协议
ARP协议:
产生原因:Know another device on the local area networkIP不知MAC地址,Therefore, the encapsulation is sent forwardARP包请求MAC地址,The other party responds with an answerARP回复MAC地址.
封装:Two-tier package.
发送方式:洪泛(Similar to a router's broadcast).
正向ARP(通过对方的IPaddress requesting counterpartyMAC地址)
反向ARP(通过MACThe address of the requesting partyIP地址,Rarely)
无故ARP 免费ARP (目标IP是自己,MCA是全F,请求自己MAC,此种ARPWhether the role query is the sameIP);
Flooded data frames are required during data forwarding:
1.全F的数据帧.
2. 01-00-5Emulticast data frame.
3.Unknown single wave(MACNot found in the address table)
交换机的作用:
1.提供端口密度--集线器HUB
2.实现二层单播——基于MAC地址转发
3.彻底解决冲突
4.延长传输距离
工作再数据链路层避免了电流与电流相遇的问题
VLAN(虚拟局域网)技术:
一个VLAN=一个广播域=an independent network segment
VLAN1位默认VLAN,All interfaces are here by defaultVLAN
VLAN使用VLAN ID进行标识
VLAN ID 范围1—4094(0——4095 0和4095被保留)
802.1Q封装:也称为dot1Q, 对流量进行VLAN 标记的.
PVID : 端口VLAN 标识符 ,默认所有的接口PVID 为 VLAN 1 ;
接口类型: Access trunk hybrid (混杂接口) 802.1Qtunnel
链路类型:access trunk
Access : 连接终端(PC router Firewall 服务器 )
Trunk : 中继接口,传递标签 标记 tag .
There are two lists for all Huawei interfaces: tagged-list(Hit the tag list ) untagged-list(Remove tag list)
Access 接口: 访问接口 接入接口
vlan的配置思路
1.交换机上创建vlan
2.接口划入vlan
3.trunk干道
4.vlan间路由——子接口 svi
路由器接口配置
子接口:
dot1q termination vid 2
允许vlan2再此接口
arp broadcast enable
开启接口的广播应答
vlan中的配置命令
创建VLAN :
查看:
设置接口类型为access 并指定PVID :
查看MAC地址表:
默认MACThe aging time of the address is 300s,All items can be modified in HuaweiMACThe aging time of the address entry:
查看MAC地址表的老化时间:
静态MAC地址条目:
查看:
Initialize all configuration of the interface: (The interface is closed by default after initialization,需要手工开启)
Trunk : 中继协议,干道协议,使用一条物理链路传递多VLAN 的流量;
注:Huawei must be theretrunk内允许vlan通过
Trunk 入方向 :
Trunk 出方向:
Trunk配置:
修改trunk接口的PVID :
Hybrid: 混杂接口,华为交换机默认模式 (access+trunk),Packets passing on the link can be tagged or unlabeled,At the same time, you can customize the tag list and remove tag list
hybridThe interface configuration of the connected host: (Outgoing messages cannot have labels)
hybridThe interface to which the switch is connected: (The outgoing must have a label)
View the list of interface tags and remove tags:
MUX VLAN : Equivalent to Cisco's privateVLAN (PVLAN )定义主从VLAN
从VLAN 分为:组VLAN 和 隔离VLAN
规则: 主VLAN Can and all fromVLAN 通信,从VLAN cannot communicate between them,组VLAN 之内可以通信 ,隔离VLAN cannot communicate within.
1.创建所有的VLAN(主从)
2.在主VLAN当中开启MUX-VLAN 功能,At the same time, it associates all its slavesVLAN (and formulate fromVLAN 的 类型)
3.接口划入VLAN 之内:
查看:
Set up port isolation for some interfaces:Enable port isolation in global mode:
The interface enables port isolation and specifies the samegroup ID (仅仅group ID interfaces are isolated from each other;Equivalent to dividing all interfaces into the same isolationVLAN )
查看:
Super VLAN : 超级VLAN ,super VLAN all children withinVLAN 配置相同网段的IP地址(可以节约IP地址),不同子VLAN 之间不能通信,Which interface does not exist does not existsuper VLAN 中 ;若子VLAN 之间要通信,必须在super VLAN enabled on the Layer 3 interfaceARP代理功能:
开启:
VLAN mapping : VLAN 映射 ,during the transfer of dataVLAN Change of mark,Generally used in metropolitan area network.
在ISPThe switch is configured on the switch connecting the client:
1.定义为trunk链路
2.启用QINQ 的VLAN 转换能力
3.定义VLAN 的映射列表
4.定义VLAN 的允许列表
查看:
QINQ技术:Double or multilayerVLAN marked to cross the second floorISP技术.
接口配置802.1Q 隧道技术:
1.接口封装为802.1Q的隧道模式
2.端口的PVID 为 500(All data frames received by the interface are incremented802.1Q的新标记)
查看:
802.1Q隧道技术 堆叠VLAN 做法:
1.接口必须为hybrid接口
2.启用QINQ VLAN 映射功能
3.for differentVLAN 的 Define different stacksVLAN
4.Add the corresponding one to the list of removal labels of the interfaceVLAN ID
查看:
VLAN 之间的通信:
1.使用VLAN 单臂路由
2.使用SVI接口(VLAN-if)
SVI----交换虚拟接口,on the switch不同的VLAN interface that can be set(此接口为3层接口)功能:
- act as a counterpartVLAN gateway within ,为不同VLAN communication between them is possible
2.It is convenient for users to carry out remote control(telnet ssh)
SVI 存在条件:
1.The switch exists to belong toSVI接口对应VLAN ID active interface
2.Trunk 链路,SVI对应VLAN id 存在于trunk链路的VLAN allowed list
3.针对三层交换机,可以创建多个SVI --多个SVI可以同时工作,But for Layer 2 switches,启用多个SVI时,只有最后一个SVI 是up的
查看:
边栏推荐
- kubernetes介绍
- Overseas media publicity. What problems should domestic media pay attention to?
- 漏洞管理计划的未来趋势
- Wirshark common operations and tcp three-way handshake process example analysis
- 部署项目半途而废后续
- LeetCode·每日一题·640.求解方程·模拟构造
- 表中存在多个索引问题? - 聚集索引,回表,覆盖索引
- ArcMAP出现-15的问题无法访问[Provide your license server administrator with the following information:Err-15]
- Solve the idea that unit tests cannot use Scanner
- Twikoo腾讯云函数部署转移到私有部署
猜你喜欢
【百度统计】用户行为分析
LeetCode·每日一题·640.求解方程·模拟构造
Comparison version number of middle questions in LeetCode
ArcMAP has a problem of -15 and cannot be accessed [Provide your license server administrator with the following information:Err-15]
Chapter9 : De Novo Molecular Design with Chemical Language Models
Wirshark common operations and tcp three-way handshake process example analysis
Efficient and Robust 2D-to-BEV Representation Learning via Geometry-guided Kernel Transformer 论文笔记
国外媒体宣发怎样做才可以把握重点
BEVDet4D: Exploit Temporal Cues in Multi-camera 3D Object Detection 论文笔记
How to do foreign media publicity to grasp the key points
随机推荐
海外邮件发送指南(二)
把相亲角搬到海外,不愧是咱爸妈
【iOS】面试整理
LeetCode简单题之合并相似的物品
Blast!ByteDance successfully landed, only because the interview questions of LeetCode algorithm were exhausted
娄底石油化工实验设计、建设规划概述
百度用户产品流批一体的实时数仓实践
来看Prada大秀吗?在元宇宙里那种!
查看 CUDA cudnn 版本 & 测试 cuda 和 cudnn 有效性「建议收藏」
bgp双平面实验 路由策略控制流量
基础 | batchnorm原理及代码详解
Polygon zkEVM工具——PIL和CIRCOM
阿里云贾朝辉:云XR平台支持彼真科技呈现国风科幻虚拟演唱会
Pod生命周期
LeetCode medium topic search of two-dimensional matrix
加密游戏:游戏的未来
Solution for "Certificate not valid for requested usage" after Digicert EV certificate signing
H264 GOP 扫盲
表中存在多个索引问题? - 聚集索引,回表,覆盖索引
Wirshark common operations and tcp three-way handshake process example analysis