当前位置:网站首页>The principle and configuration of VLAN
The principle and configuration of VLAN
2022-08-09 08:16:00 【The direction of the light, 79】
The principle of VLAN and its configuration
VLAN: a technology that logically divides a physical LAN into multiple broadcast domains
Four types of ports:
1.access: connect to host (only one VLAN data can be passed)
2.trunk: between switches (multiple VLAN data can be passed)
3.Hybrid: promiscuous mode
4.QinQ: mostly used for operator boundary
PVID (port vlan id)

According to the direction of data flow: put PVID on the inbound direction of the access interface, and remove the PVID in the outbound direction
trunk: (one link carries multiple vlans)
VLAN1 does not tag by default, only has PVID

Static VLAN configuration
Interface commandssystem-view[Huawei]sysname SW1Display when vlan information [SW1]dis vlanAdd to[SW1]vlan 10[SW1-vlan10]qBulk add[SW1] vlan batch 20 30 40delete[SW1]undo vlan 10#####Add port to VLAN, Access port can only belong to 1 VLAN, generally used to connect computer port.Huaweil inte0/0/0 (enter interface mode)[Huawei-Ethernet0/0/0]port link-typeaccess (Define the Layer 2 port as access mode)[Huawei-Ethernet0/0/0]port default vlan10 (add the port to the vlan)[Huawei-Ethernet0/0/01]undo shutdown (open port)remove port from vlan[Huawei-Ethernet0/0/0lundo port default vlan[Huawei-Ethernet0/0/0]port link-type hybrid (restore the port type to the default hybrid mode)View the current port mode and status[Huawei-Ethernet0/0/0ldisthiscreate vlanSeparate view: display VLAN 10Batch creation: vlan batch 20 30 40Delete: undo vlan 40-------then display itAdd multiple ports to VLAN at the same time[Huaweilport-group1 (new group 1)[Huawei-port-qroup-1]group-member Ethernet 0/0/1 to Ethernet 0/0/20(members of group 1 are e0/0/1 to e0/0/20)[Huawei-port-group-1]port link-typeaccess[Huawei-port-qroup-1]port default vlan 30The port is restored to the default configuration. Note that after the command is executed, the interface will be shut down.[Huawei]clear configuration interfacee0/0/1View the specified vlan information[Huawei]dis vlan 10undo info-center enable ##Close the promptuser-interface console 0idle-timeout 0 0 ##Never timeoutclear configuration interface e0/0/3 ##delete the interfaceCan vlan1 be deleted?The default vlan1 is the default and cannot be deletedInstructions to delete vlans in batches (no way!)
Trunk introduction and configuration
1. The role of Trunk
Provide a link for each VLAN
Only use one link, and distinguish data from different VLANs by identification
2. TrunkConfiguration command
port link-type trunk #Define the Layer 2 port as trunk mode
port trunk allow-pass vlan10 20 #Configure the vlan that the trunk port allows to pass
undo shutdown #Enable the port
undo port trunkallow-pass vlan 10 #delete vlan
VLAN ID
1. vlan ID
Implement relay on Ethernet, there are two encapsulation types
- ISL (Cisco private standard)
- IEEE802.1q
ISL frame format

DA: target data
SA: source data
CRC: upper layer data
边栏推荐
猜你喜欢

VMware virtual machine cannot be connected to the Internet after forced shutdown

基于appinventor与EasyDL物体检测API的物体检测app

OpenHarmony轻智能产品开发直播笔记

The Martian - Simple Math Problems

P1064 Jin Ming's Budget Plan

LeetCode·每日一题·761.特殊的二进制序列·分治

Operations in the database (syntax)

The MySQL database
![[STL]list](/img/d1/f3c2d52502b2ca4eeaba1c7289562c.png)
[STL]list

Redis(八)集群
随机推荐
oracle权限问题
[STL]vector
引导过程与服务控制
VMware virtual machine cannot be connected to the Internet after forced shutdown
Non-decreasing Array
.net(一)WebService创建
App testing
交换机基本原理与配置
eTS UI开发学习
LeetCode·每日一题·636.函数的独占时间·栈模拟
6000 字+,帮你搞懂互联网架构演变历程!
Shell之函数与数组
3安装及管理程序
Set集合
Object detection app based on appinventor and EasyDL object detection API
Solidworks 2022 Inspection新增功能:光学字符识别、可自定义的检查报告
LAN技术-6MSTP
Matlab, and nonlinear equations solving linear equations
.net(二) 配置数据库
数制之间的转换