当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
网络层协议介绍
LVM与磁盘配额
3D软件开发工具HOOPS全套产品开发介绍 | HOOPS Exchange、HOOPS Communicator
【redis】使用redis实现简单的分布式锁,秒杀并发场景可用
数据库中的操作(语法)
web基本概念
一文搞懂 条件编译和预处理指令 #define、#undef、#ifdef、#ifndef、#if、#elif、#else、#endif、defined 详解
可能导致Loadrunner检查点中savecount为0的分析
LeetCode·每日一题·761.特殊的二进制序列·分治
MySql homework practice questions
鸿蒙开发实战一——手表篇
get一个小技巧,教你如何在typora写文章上传图片到博客上
浅谈Flask_script
jdbctemplate连接sql server,代码中查出来的数据跟数据库中不一致,如何解决?
[STL]list
动态设置img标签图片失效问题
IO字节流读取文本中文乱码
系统安全及应用
libtorch示例
图像处理(一)图像基础