当前位置:网站首页>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

原网站

版权声明
本文为[The direction of the light, 79]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/221/202208090802284013.html