当前位置:网站首页>VLAN partition and routing between VLANs
VLAN partition and routing between VLANs
2022-06-11 16:31:00 【PICACHU+++】
One 、VLAN Major advantages
1. Limit broadcast domain
The broadcast domain is limited to one VLAN Inside ,VLAN The broadcast traffic sent by the internal device can only be sent in this VLAN Internal communication , It saves valuable bandwidth resources , At the same time, it also improves the network performance .
2. It can flexibly set up virtual working groups
VLAN Users in can be located in different physical locations in the network , It can be connected to the switch of each access layer , It can also be connected to the convergence layer or even the core switch , Network construction is more convenient .
3. Enhance network security
Because it's different VLAN The messages in the are directly isolated at layer 2 , So although the host IP The address is in the agreed network segment , But it's different VLAN Hosts in cannot be accessed directly , Security has been enhanced .
Two 、VLAN The frame format 
1.TPID: Label protocol ID
Take a fixed value 0x8100, Indicates a carry 802.1Q The frame of the tag , There can be one or more , If not 802.1Q My device received a frame like this , It will be discarded .
2.TCI: Label control information
It is divided into three parts :
PRI: priority , Value range 0-7, The higher the value, the higher the priority , When the switch is blocked , Give priority to sending high priority data frames .
CFI: Standard format indicator , Express MAC Whether the address is encapsulated in a standard format .CFI take 0 when ,MAC The address is packaged in standard format ( Low pass first ), take 1 when , Package in non-standard format ( High pass first ). Used to distinguish Ethernet frames 、FDDI Frame and token ring frame .
VLAN ID:VLAN identifier , Value range 0-4095 The bit , however 0 and 4095 In the agreement, it is reserved as VLAN ID, Cannot be assigned to a user .
VLAN Frame kind of data The field length range is unchanged , Still 46-1500 Bytes , It can be explained that VLAN Frames are longer than normal Ethernet frames ,VLAN Frame kind of type The field is fixed to 0x8100 Representative for IEEE802.1Q tag frame , If you don't support IEEE 802.1Q My device received a frame like this , It will be discarded .
3. Form of Ethernet frame
It is generally divided into marked frames (taggde), It is the addition of one or more 4 byte VLAN The frame of the tag , Unlabeled frames (untagged) frame , It's primitive 、 Not joined 4 byte VLAN The frame of the tag . The types of frames transmitted in common devices are as follows :
(1) User host 、 The server 、Hub、 Fool switch ( Unmanageable switch ) Only send and receive untagged frame
(2) Switch and AP(WLAN access controller ) Both sending and receiving tagged frame , Can also send and receive untagged frame
(3) The voice terminal can send and receive one at the same time tagged Frames and a untagged frame .
In order to improve processing efficiency , In support of VLAN All the data frames processed inside the switch are tagged frame .
3、 ... and 、 Switch port type
There are three types of ports :access、trunk、hybrid. All three switching ports involve an important concept ——PVID(port VLAN ID, port VLAN ID)
The frame received by the switch from the opposite end device may be untagged Data frame of , But all Ethernet frames in the switch are tagged Is handled in the form of forwarded , Therefore, the switch must give the port the untagged The data frame is marked with tag.
The network personnel must configure the default for the switch VLAN ID, In order to receive untagged Data frame , The switch can add default VLAN ID Of VLAN tag. This default VLAN ID Namely PVID, That is, by default, the VLAN.
1.access port
This port is generally used for unrecognized tag User terminal ( host 、 The server ) And network devices ( Fool switch 、 Hub, etc ) Connected to a , because access Data frame sent by port , Always without VLAN Labeled . in addition ,access The port is allowed to carry only one specified VLAN The label frame of passes , That is, a access Only one port can be added VLAN, This VLAN ID It's the time to access Port of PVID.

access Type port can be used for connection between switches , Implement two different VLAN( But it must be in the same IP Network segment ) Direct layer 2 interworking of , But only two can be realized at most VLAN Direct exchange of visits between , And these two VLAN It must be on different network segments .
2.Trunk Type port
Trunk Ports are generally used to connect switches 、 Router 、AP, And can send and receive at the same time tagged The frame and untagged Frame voice terminal ,Trunk Ports allow multiple VLAN Frame band in tag adopt , But only in frames tag Field value and port PVID same VLAN The frame in is removed when it is sent from the port of this type VLAN label .

① stay trunk Type port ,PVID Only if you receive frames without labels , Or send with PVID same VLAN The frame of the tag works , In other cases, do not consider PVID.
②trunk By default, ports only allow VLAN 1 Through the frame of , Because the default PVID by VLAN 1, So send VLAN 1 Frames in without labels .
3.Hybrid Type port
Hybrid Ports can be thought of as access and trunk A mixture of ports , Because it allows the port to send one or more VLAN Remove the label when the frame in , It also allows the port to send one or more VLAN When the frame in the VLAN label , therefore Hybrid Type port can be connected but not recognized VLAN Tag user terminals and network devices , It can also be used to connect switches 、 Router 、AP And can send and receive at the same time VLAN Frames and without labels VLAN Tag the frame of the voice terminal .

① stay Hybrid Port type ,PVID Works only when a frame without a label is received , Ports are not considered in other cases PVID.
②Hybrid By default, ports only allow VLAN 1 Through the frame of , And send VLAN 1 The frame in is sent without label .
③ stay Hybrid Port , Whether data frames will be sent without labels PVID irrelevant , It needs to be specified by hand .
3、 ... and 、VLAN The way of division
1. Port based partitioning
Method : According to the Ethernet port LAN Divide
somewhat : Simple configuration , Is the most commonly used
shortcoming : inflexible , When VLAN When the member interface in changes, it needs to be reconfigured VLAN
scene : Any network , But the network location should be fixed
2. be based on MAC Address partition
Method : According to the source of the data frame MAC Add address division VALN, Pre configured MAC Address and VLAN ID Mapping table of , According to the mapping table, the corresponding... Is added to the frame VLAN ID, Then the data frame is specified VLAN Transmission of .
advantage : Users do not need to re divide the physical location VLAN, It improves the security and flexibility of end users
shortcoming : Big workload
scene : A small network that often moves its location but does not often change its network card
3. Based on subnet partition
Method : According to the source in the data frame IP Address and subnet mask division VLAN, Pre configured IP Address and VLAN ID The mapping relation of , Add the corresponding... In the frame according to the mapping table VLAN ID, Then the data frame is in the specified VLAN Transmission of
advantage : The physical location changes only need to be reconfigured VLAN, Can reduce network traffic , Make the broadcast domain span multiple switches
shortcoming : Regular distribution of users , And multiple users are in the same network segment
scene : Highly mobile and easy to manage
4. Based on protocol partition VLAN
Method : According to the protocol of the data frame ( family ) Type and packaging format VLAN, Configure the Ethernet frame in advance “ agreement ” Fields and “VLAN ID” Field mapping table , If the switch receives untagged frame , According to the mapping table, the corresponding... Is added to the frame VLAN ID, Then the data frame will be specified in VLAN Transmission of .
advantage : Easy to maintain and manage .
shortcoming : All the protocol types and VLAN ID Initial configuration of the mapping relationship table ; It is necessary to analyze the formats of various protocols and convert them accordingly , This will consume too many resources of the switch .
scene : A network running multiple protocols at the same time .
5. Based on Policy Division VLAN
Method : It can realize multiple combination planning methods , Including the interface ,MAC Address ,IP Address, etc , The network administrator configures the policy in advance , If you receive untagged frame , And match the configuration policy , Then the data frame is added with the specified VLAN Of tag, Then the data frame will be specified in VLAN Transmission of .
advantage : High safety , Users can't change IP Address and MAC Address ; The network administrator can choose the division method according to his own management mode or needs .
shortcoming : Each policy should be configured manually , stay VLAN The workload is heavy when there are many .
scene : It is applicable to the environment with complex requirements .
边栏推荐
- A team of heavyweights came to the "digital transformation" arena of CLP Jinxin ice and snow sports
- Enterprise purchase, sales and inventory management system based on SSM framework [source code + database + design]
- How to optimize the performance of compose? Find the answer through "underlying principles" | developers say · dtalk
- 【opencvsharp】opencvsharp_samples.core示例代码笔记
- laravel 2020-01-01T00:00:00.000000Z 日期转化
- PyQt5 使QPlainTextEdit控件支持行号显示
- 2022g1 industrial boiler stoker test questions and simulation test
- 瑞吉外卖项目(三)员工管理业务开发
- Aaai2022 latest "time series data processing" report, 127 pages of PPT describing time series data processing and medical application progress
- Can I eat meat during weight loss? Will you get fat?
猜你喜欢

Student website template brown cake dessert website design - brown cake dessert shop (4 pages) gourmet dessert website production final assignment finished product_ Fresh fruit web design final assign

2022年R1快開門式壓力容器操作考試題庫及模擬考試

时序预测 | MATLAB实现RBF径向基神经网络时间序列未来多步预测

学生网站模板棕色蛋糕甜品网站设计——棕色蛋糕甜品店(4页) 美食甜品网页制作期末大作业成品_生鲜水果网页设计期末作业

Production problem troubleshooting reference

2022年安全员-B证国家题库及模拟考试

JDBC debugging error, ask for guidance

信息收集常用工具及命令

Zhenxiang, Huawei gives n+1 for voluntary resignation

虚拟局域网划分与虚拟局域网间路由(VLAN)
随机推荐
Laravel 2020-01-01t00:00:00.000000z date conversion
Laravel listening mode
[从零开始学习FPGA编程-18]:快速入门篇 - 操作步骤2-6- VerilogHDL时序电路语法分析(以计数器为例)
1267_FreeRTOS启动第一个任务接口prvPortStartFirstTask实现分析
[从零开始学习FPGA编程-17]:快速入门篇 - 操作步骤2-5- VerilogHDL硬件描述语言符号系统与程序框架(软件程序员和硬件工程师都能看懂)
【opencvsharp】opencvsharp_samples.core示例代码笔记
基于ssm框架实现的企业进销存管理系统【源码+数据库+毕设】
Simulated 100 questions and simulated examination for main principals of hazardous chemical business units in 2022
大龄码农从北京到荷兰的躺平生活
LeetCode——24. 两两交换链表中的节点(三指针)
leetcode-141. Circular linked list
什么是泛型?为什么要使用泛型?泛型怎么用?那包装类呢?
[sword finger offer] 21 Adjust array order so that odd numbers precede even numbers
真香,华为主动离职也给 N+1
20 full knowledge maps of HD data analysis have been completed. It is strongly recommended to collect them!
Transfer learning
如何优化 Compose 的性能?通过「底层原理」寻找答案 | 开发者说·DTalk
类的 prototype 属性和__proto__属性,类原型链有两条继承路线
虚拟局域网划分与虚拟局域网间路由(VLAN)
Detailed explanation of the functions of list and dict data types