当前位置:网站首页>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的
查看:
边栏推荐
猜你喜欢
Jiugongge lottery animation
“68道 Redis+168道 MySQL”精品面试题(带解析)
LeetCode中等题之比较版本号
机器学习实战(2)——端到端的机器学习项目
Jenkins修改默认主目录
LeetCode·297.二叉树的序列化与反序列化·DFS·BFS
2022年8月中国数据库排行榜:openGauss重夺榜眼,PolarDB反超人大金仓
2022 Recruitment Notice for Academician Zhao Guoping Group of Shenzhen Institute of Advanced Technology, Chinese Academy of Sciences
ArcMAP出现-15的问题无法访问[Provide your license server administrator with the following information:Err-15]
【百度统计】用户行为分析
随机推荐
跨域的五种解决方案
Proprietary cloud ABC Stack, the real strength!
机器学习实战(2)——端到端的机器学习项目
Detailed explanation of es6-promise object
【mysql索引实现原理】
Guo Jingjing's personal chess teaching, the good guy is a robot
AICOCO AI Frontier Promotion (8.10)
娄底疾控中心实验室设计理念说明
StarRocks on AWS 回顾 | Data Everywhere 系列活动深圳站圆满结束
Custom filters and interceptors implement ThreadLocal thread closure
Codeforces Round #276 (Div. 1) B. Maximum Value
Solve the idea that unit tests cannot use Scanner
阿里云贾朝辉:云XR平台支持彼真科技呈现国风科幻虚拟演唱会
What are the five common data types of Redis?What is the corresponding data storage space?Take you to learn from scratch
Jenkins修改端口号, jenkins容器修改默认端口号
【jstack、jps命令使用】排查死锁
2022 Recruitment Notice for Academician Zhao Guoping Group of Shenzhen Institute of Advanced Technology, Chinese Academy of Sciences
mSystems | Zhongnong Wang Jie Group Reveals the Mechanisms Affecting Soil "Plastic Interstitial" Microbial Communities
Loudi Cosmetics Laboratory Construction Planning Concept
G1和CMS的三色标记法及漏标问题