当前位置:网站首页>HCIP Fifteenth Day Notes (Three-layer Architecture of Enterprise Network, VLAN and VLAN Configuration)
HCIP Fifteenth Day Notes (Three-layer Architecture of Enterprise Network, VLAN and VLAN Configuration)
2022-08-03 13:36:00 【oranges love oranges】
一、企业网的三层架构(企业网搭建时的一个参考建议方案):
园区
----工厂、政府机关、写字楼、商场、The network built in these public places such as campuses to realize data intercommunication is called the campus network(“城市,除了街道,都是园区”),不同园区搭建网络其侧重点不同,但是都可以参考三层架构来进行搭建.
1、接入层:
Provide terminal equipment(电脑等)接入网络------It is mainly composed of access layer switches----Access layer switches are mainly composed of layer 2 switches,
二层交换机指的是通过识别MAC地址查询MAC地址表来进行二层转发的设备.
(//The Layer 2 switch itself is not requiredMAC地址)
“无线永远是有线的最后一公里”----The main reason is that the wireless transceiver device still needs to be connected to the wired network through the network cable,
AP
-----无线接入点
WLAN
(//家庭中WLANThe operator deployed in the access cell)------无线局域网------从广义上来讲,指以无线电波、激光,Infrared, etc. to replace the network composed of part or all of the transmission medium in the wired local area network.
无线的缺陷:
1、传输速率低于有线,并且信号强度存在波动,和信号发射点位置越远,信号越弱.
2、无线信号Penetration is poor(//信号越高,Penetration is poor,基站越多,比如5G)
以太网可以实现频分
3、上网用户数量增多,则网络卡顿严重
CSMA/CD----Carrier Sense Multiple Access/冲突检测(//类似于排队,Sort the signals in order,Then check whether the previous one has been sent,See if the previous one has a signal,If the previous signal is gone,Then post the second one)
There's a reason wireless networks don't use collision detection techniques:
1、无线网络本身信号强度动态范围非常大,往往收到的信号强度可能远小于发出时的强度,所以,检测冲突比较困难.
2、在无线网络的应用场景中,存在很多冲突无法检测的场景
CSMA/CA
------载波侦听多路访问/冲突避免
1、Even when no signal is detected,也不立即发送信息,而是先执行避让动作,给自己设计一个随机的计时器,时间到了之后,sending information.
2、CSMA/CA技术,为了保证传输的数据的可靠性,
采用了停等式流控----每发一个数据包,要求对方回复ACK进行确认,否则重传.
2、汇聚层(//使用三层交换机)----- The traffic that will be collected by the access layer switch,Aggregation is required,Then the aggregation layer is formed.
Aggregation layer devices generally use Layer 3 switches to complete,Layer 3 switch features:
The Layer 2 port used by the solid Layer 2 forwarding of the existing Layer 2 switch,There are also Layer 3 ports similar to routers that can implement Layer 3 forwarding.
The most direct difference between a Layer 3 port and a Layer 2 port
:Layer 3 ports need to be configuredIP地址,则也需要具有MAC地址),所以,在三层 in the switch,即拥有MAC地址表以及路由表,相当于是二层交换机和路由器集成的产物.
企业网的三层架构-----核心思想------冗余(备份)
------保证网络的稳定性
1、线路冗余
2、设备冗余
3、网关冗余
4、UPS冗余-----UPS-----不间断电源
3、核心层--------The main function is to complete the fast forwarding of data between the private network and the public network.
The core layer generally uses routers as core devices.
二、VLAN
V-----虚拟
LAN---局域网------广播域
虚拟局域网-------It can be understood as a virtual broadcast domain,交换机和路由器协同工作后,将原来一个广播域逻辑上划分成多个虚拟的广播域.
VLAN的配置:
step
:
1、创建VLAN
[lsw]vlan 2
[lsw-vlan2]
[lsw]display vlan ------查看VLAN
[lsw]vlan batch 4 to 100----批量创建VLAN
[lsw]undo vlan batch 4 to 100----批量删除VLAN
VID
-----VLAN ID-----用来区分和标定不同的VLAN-----IEEE组织在802.1Q标准中进行了规定,规定VID必须由12位二进制构成------0-4095,其中0和4095为保留----所以,VID取值范围为1-4094.
2、将接口划入到VLAN
将VID配置映射到交换机的接口上,实现VLAN的划分-----物理VLAN/一层VLAN.
将VID配置映射到数据包中的MAC地址,实现VLAN的划分------二层VLAN
将数据帧中的类型字段所标记的上层协议和VID进行映射,实现VLAN的划分-----三层VLAN
因为设备的层次叫法主要是根据其转发特性来决定的,并不代表设备没有处理上层的能力,所以VLAN也可以基于IP地址进行划分,也可以基于策略进行划分.
In the switch in order to distinguish differentVLAN的流量,需要给数据帧打上标签,于是有了802.1Q帧
,在普通的以太网Ⅱ型帧的基础上,在其源MAC和类型字段之间增加了4个字节的标签,称为TAG,里面包含12位的VID,Such frames are called tagged帧,没有打标签的帧也可以被称为untagged帧.
依靠802.1Q帧的特性,交换机和PC之间的链路称为Access链路,AccessThe interface on the switch side of the link is calledAccess接口,Access链路中,只能通过untagged帧,并且,这些帧一定属于某一个特定的VLAN;我们将交换机和交换机之间的链路称为trunk链路(trunk干道),trunk链路中交换机侧的接口被称为trunk接口.trunklink cantagged帧,并且这些帧可以属于多个VLAN.
3、配置trunk干道
1、 将接口划入VLAN
[lsw1]int g 0/0/1
[lsw1-GigabitEthernet0/0/1]port link-type access ------使用access链路
[lsw1-GigabitEthernet0/0/1]port default vlan 2----默认接口为VLAN2
[lsw1-GigabitEthernet0/0/1]
[lsw1-GigabitEthernet0/0/2]port link-type access
[lsw1-GigabitEthernet0/0/2]port default vlan 2
[lsw1-GigabitEthernet0/0/2]
[lsw1]port-group group-member GigabitEthernet 0/0/3 GigabitEthernet 0/0/4-----批量创建VLAN3
[lsw1-port-group]port link-type access
[lsw1-GigabitEthernet0/0/3]port link-type access
[lsw1-GigabitEthernet0/0/4]port link-type access
[lsw1-port-group]port default vlan 3
[lsw1-GigabitEthernet0/0/3]port default vlan 3
[lsw1-GigabitEthernet0/0/4]port default vlan 3
[lsw1-port-group]
2、trunk配置
[lsw1]int g 0/0/5
[lsw1-GigabitEthernet0/0/5]port link-type trunk ----使用trunk链路
[lsw1-GigabitEthernet0/0/5]port trunk allow-pass vlan ?
INTEGER<1-4094> VLAN ID
all All
[lsw1-GigabitEthernet0/0/5]port trunk allow-pass vlan 2 3-----允许trunk链路通过VLAN 2和VLAN 3
[lsw1-GigabitEthernet0/0/5]
[lsw2]int g 0/0/1
[lsw2-GigabitEthernet0/0/1]port link-type trunk
[lsw2-GigabitEthernet0/0/1]port trunk allow-pass vlan all ----允许通过所有VLAN
[lsw2-GigabitEthernet0/0/1]
Hybrid-
—混杂接口
[lsw1]display port vlan active -----查看
在不做任何配置的情况下,华为交换机默认的接口类型为hybrid类型.
PVID-----代表接口所属的VID-----华为设备设定,All interfaces are without device configuration,其PVID为1,即其默认属于VLAN 1
华为设备规定,All data entering the switch through the interface must be tagged,If not labelled,需要打上进入接口PVID的标签.
VLAN list----允许列表,该接口允许那些VLAN的流量通过,则列表中就有他们的VID
这两个标记代表的是从该接口转出的数据是否允许带标签,T允许带标签,ULabels are not allowed:
U----untagged
T----tagged
注意:在trunk干道中,只有和trunk接口PVID相同的VLANTraffic can go out without labels
Access接口
:
1、当Access接口从链路上收到一个untagged帧时,交换机首先会在数据帧中添加VID为PVID的标签,之后查看允许列表,If the allow list is in that dataframeVID号,则转发(Access接口因为允许列表中的VID 号和自己的PVID相同,所以,这种情况下,一定可以转发)
2、当一个tagged帧从交换机的其他端口到达一个Access端口后,交换机会检查这个帧中的tag的VID是否和允许列表中的VID相同,如果不同.则丢弃;如果相同,则需要先剥离标签后发出到链路上.
3、如果Access接口在链路上收到一个tagged帧,then the switch will check itVIDWhether it will be in the local allow list,如果在,则转发,不在,则丢弃.
trunk接口
:
1、当trunkThe interface received one from the linkuntagged帧,交换机首先会在数据帧中添加VID为PVID的标签,之后,查看允许列表,如果允许列表中有该数据帧标签中的VID号,则转发,如果没有,则丢弃.
2、当一个tagged帧从交换机的其他接口到达一个trunk接口后,如果这个tag中的VID不在trunk接口中,Then the allow list will be discarded directly,如果在,则转发.如果VID和trunk接口的PVID相同,则剥离标签后发出,如果不相同,则不剥离标签,直接发出.
3、当trunk接口在链路上收到tagged帧,交换机将先查看这个tagged帧中的VID是否在允许列表中,如果在,则转发,如果不在,则丢弃.
Access
----可以修改PVID,可以修改允许列表(但是PVID和允许列表必须相同且只能允许一个VLAN的流量通过),The packaging method for export can only be packaged without labels
trunk
----可以修改PVID,可以修改允许列表,而且允许列表中可以通过多个VLAN的流量,出口封装方式仅为带标签封装(PVID若在允许列表中,The package is assumed to be unlabeled by default)
[lsw1-GigabitEthernet0/0/5]port trunk pvid ?-------修改trunk接口的PVID
vlan Virtual LAN
hybrid
------可以修改PVID,可以修改允许列表,而且允许列表中可以通过多个VLAN的流量,而且可以修改出口的封装方式.
[lsw3]int g 0/0/1
[lsw3-GigabitEthernet0/0/1]port link-type hybrid ------Modify the type of the interface to promiscuous mode
[lsw3-GigabitEthernet0/0/1]port hybrid pvid vlan 2------修改混杂口的PVID
[lsw3-GigabitEthernet0/0/1]
[lsw3-GigabitEthernet0/0/1]port hybrid untagged vlan 2 3 4----修改允许列表,并且出去的时候不带标签
[lsw3-GigabitEthernet0/0/1]port hybrid tagged vlan 2 3 4-----带标签
4、VLAN间路由
子接口------路由器的虚拟接口-----路由器将一个物理接口逻辑上的切分为多个虚拟的子接口.
[R1]int g 0/0/0.1-----创建子接口
[R1-GigabitEthernet0/0/0.1]
[R1-GigabitEthernet0/0/0.1]ip address 192.168.1.254 24
[R1-GigabitEthernet0/0/0.1]dot1q termination vid 2-----识别VLAN 2
[R1-GigabitEthernet0/0/0.1]arp broadcast enable -----开启ARP广播-----开启后子接口才会进行ARP应答
边栏推荐
- GameFi industry down but not out | June Report
- 细胞图像数据的主动学习
- 豪威集团发布新款5000万像素图像传感器OV50E
- An introduction to the width tool, deformation tool and lasso tool
- 硬件业务收入下滑,为了赚钱,苹果暧昧对待流氓软件和增加广告了
- Comics: how do you prove that sleep does not release the lock, and wait to release lock?
- IDEA的模板(Templates)
- PyTorch builds a classification network model (Mnist dataset, fully connected neural network)
- Golang 互斥锁
- An animation optimization of traditional guide layer animation
猜你喜欢
PyTorch framework to train linear regression model (CPU and GPU environment)
The components of the basis of An animation movie clip animation between traditional filling
Graphic animation and button animation of an animation basic component
leetcode 11. 盛最多水的容器
svn安装包和客户端
Classes and objects (upper)
An introduction to the camera
【框架】idea找不到xxx依赖项怎么办
How to disable software from running in the background in Windows 11?How to prevent apps from running in the background in Windows 11
OpenCV 透视变换
随机推荐
An动画基础之按钮动画与基础代码相结合
Golang 接口 interface
Notepad++ install jsonview plugin
国产替代风潮下,电子元器件B2B商城系统如何助力企业突围市场竞争
IDEA的模板(Templates)
An工具介绍之形状工具及渐变变形工具
D the author: d new features
ECCV 2022 | AirDet: 无需微调的小样本目标检测方法
软件测试面试(四)
The components of the basis of An animation movie clip animation between traditional filling
PyTorch框架训练线性回归模型(CPU与GPU环境)
[OpenCV] Cascade classifier training model
Nanoprobes 金纳米颗粒标记试剂丨1.4 nm Nanogold 标记试剂
How to make the history record time-stamped before
leetcode 448. Find All Numbers Disappeared in an Array 找到所有数组中消失的数字(简单)
Forrester:行业云帮助中国企业更快适应未来的发展
标题 node第一个服务器程序
Redis connection pool tool class
Nanoprobes金脂质偶联物的相关应用
硬件业务收入下滑,为了赚钱,苹果暧昧对待流氓软件和增加广告了