The VLAN (Virtual Local Area Network) is named in Chinese.
A VLAN divides a physical LAN into multiple logical LANs, and each VLAN is a broadcast domain. Hosts in VLAN can communicate with messages through the traditional Ethernet communication mode, but between hosts in different VLAN, communication must be realized through network layer devices such as router or three-layer switch.
Here are the port-based Vlan rules:
The Access port can only belong to one VLAN, so its default VLAN is the VLAN it is located in and does not need to be set. Hybrid ports and Trunk ports can belong to more than one VLans, so you need to set the default VLAN ID for the ports.
1, Access port: receive the packet without tag, and add the default VLAN Tag for the packet; When the received packet has a Tag, ① when the VLAN ID is the same as the default VLAN ID, the packet is received; ② when the VLAN ID is different from the default VLAN ID, the packet is discarded; When sending the packet, the VLAN ID is the default VLAN ID, so it does not need to be set, and it is sent after removing the Tag.
2. Trunk port: when the received packet does not have a Tag, when the port has joined the default VLAN, the Tag of the default VLAN is encapsulated for the packet and forwarded, when the port has not joined the default VLAN, the packet is discarded; When the received packet has a Tag, the packet will be received if the VLAN ID is the allowed VLAN ID of the port. When the VLAN ID is not the allowed VLAN ID of the port, the packet will be discarded. When sending the packet, when the VLAN ID is the same as the default VLAN ID, remove the Tag and send the packet. When the VLAN ID is different from the default VLAN ID, keep the original Tag and send the packet.
3. Hybrid port: The operation when receiving a packet is the same as the operation of the Trunk port. When sending a packet, when the VLAN ID carried in the packet is the VLAN ID allowed by the port, the packet is sent, and you can configure whether the port carries a Tag when sending the packet of the VLAN (including the default VLAN) through the command.
The following figure shows our HDV 8pon port EPON OLT
Our HDV 8pon port EPON OLT to configure the default vlan command in the port is: port default-vlan 100.
The command to add a port to the corresponding vlan is: vlan hybrid 100 untagged. You can replace hybrid with access and trunk, and untagged with tagged, depending on your needs.