当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
Collection 接口 & List 接口
OpenHarmony轻智能产品开发直播笔记
LAN技术-6MSTP
P1064 金明的预算方案
IO byte stream reads text Chinese garbled
浅谈Flask_script
Operations in the database (syntax)
System transformation and subnetting
IO字节流读取文本中文乱码
A watch - article HongMeng development practical experience
3安装及管理程序
MySql homework practice questions
磁盘管理与挂载
Different styles of Flask-restful
Non-decreasing Array
Database MySQL installation and uninstallation
Set集合
MySQL数据库
Introduction to the Endpoint
The story of the disappearing WLAN of Windows 10 computers