Usage Scenario
When Layer 3 and Layer 2 devices are directly connected through Ethernet interfaces and the Ethernet interface connecting the Layer 2 device to the Layer 3 device is added to a VLAN, you need to run the vlan-type dot1q command to bind the Ethernet sub-interface on the Layer 3 device to the VLAN and configures Dot1q VLAN encapsulation for the Ethernet sub-interface. This ensures that the two devices properly communicate with each other.
Prerequisites
Before running the vlan-type dot1q command in a VE sub-interface view or global VE sub-interface view, the interface on which the sub-interface is to be created must have been bound to a VE-Group.
Precautions
Sub-interfaces of different interfaces can be bound to the same VLAN, but sub-interfaces of the same interface cannot be bound to the same VLAN. One Ethernet sub-interface can be associated with only one VLAN.<br />
If user packets are configured to carry double VLAN tags using the user-vlan { { start-vlan-id [ end-vlan-id ] [ qinq start-pe-vlan [ end-pe-vlan ] ] } | any-other } command, either of the following situations occurs:
- The outer VLAN ID is the same as the VLAN ID associated with the dot1q sub-interface configured using the vlan-type dot1q command on the same main interface.
- The outer VLAN ID is the same as the VLAN ID terminated by another dot1q VLAN tag termination sub-interface on the same main interface when the sub-interface accesses the Layer 2 network.
In the preceding two scenarios, BAS users cannot go online. To resolve this problem, run the vlan-miss to-cpu enable command to enable the device to send BAS service packets carrying double VLAN tags to the CPU. After this command is run, BAS users can go online.