UNTAG is the ordinary Ethernet message, the common PC network card is able to identify such a message for communication; the change in tag structure is after the source MAC address and destination MAC address, plus 4bytes VLAN information, that is, VLAN tag header Generally, such a message the NIC of the ordinary PC is not recognized the description of the 802.1Q package tag message frame structure with 802.1Q frame is inserted on the standard Ethernet frame 4 bytes of identification. It contains: a 2-byte protocol identifier (TPID), the fixed value of the current 0x8100, indicating that the frame has 802.1Q of tag information. A 2-byte tag control information (TCI) containing three domains. The priority domain, which accounts for 3bits, represents the priorities of the message, with a value of 0 to 7,7 as the highest priority and 0 as the lowest priority. This domain is used by 802.1p. Canonical format indicator (CFI) domain, accounting for 1bit,0 for canonical format, for Ethernet, 1 for non-canonical format, for token Ring. The VLAN ID domain, which accounts for 12bit, is used to indicate the VLAN attribution. The Ethernet port has three types of links: Access, hybrid, and trunk. A port of type access can only belong to 1 VLANs, which is typically used to connect to a computer's port, and a trunk-type port that allows multiple VLANs to receive and send multiple VLAN messages, typically for ports connected between switches The hybrid type of port can allow multiple VLANs through, can receive and send packets of multiple VLANs, can be used to connect between switches, and can also be used to connect the user's computer. The hybrid port and trunk ports are handled the same way when they receive data, except when sending data: The hybrid port allows multiple VLANs to be sent without a label, while the trunk port allows only the default VLAN messages to be sent without tagging.
Here first to clarify the port's default VLAN this concept access port only belongs to 1 VLANs, so its default VLAN is its VLAN, not set; Hybrid port and trunk port belong to multiple VLANs, so you need to set the default VLAN ID. By default, the default VLAN for the hybrid port and trunk port is VLAN 1 when the port receives a message without VLAN tag, the message is forwarded to the port that belongs to the default VLAN (if the port's default VLAN ID is set). When the port sends a message with VLAN tag, if the VLAN ID of the message is the same as the default VLAN ID of the port, then the VLAN tag of the message is removed and then the message is sent. Note: For the Huawei switch default VLAN is called "Pvid VLAN", for Cisco switch the default VLAN is known as "Native VLAN" switch interface Access data processing process is as follows:
Acess Port Ticker Text:
Receive a message to determine if there is VLAN information: if there is no pvid on the upper port, and exchange forwarding, if there is a direct discard (default)
Acess Port Transmitter Text:
The VLAN information of the message is stripped and sent directly (therefore, the access port can realize the host communication under the same VLAN on the same switch, or it can realize the default VLAN1 message exchange at the switch-level connection, but it can't implement VLAN transmission. )
Trunk Port Ticker Text:
Receive a message to determine if there is VLAN information: If there is, determine whether the trunk port allows the data entry of the VLAN: if it can be forwarded, otherwise discarded, if there is no VLAN information, hit the upper port of the Pvid, and Exchange forwarding.
Trunk Port Sender Text:
Compares the VLAN information that will be sent to the pvid of the port and sends it directly if it is not equal. If the two are equal, the VLAN information is stripped and then sent. (therefore, the switch-level ports are all set to trunk and allow all VLANs to pass, vlan2-vlan4000 direct transmission, while the VLAN1 is the same as the trunk default pvid, you need to peel VLAN information and add VLAN information to achieve the transmission.) If you change the trunk's default Pvid, you can implement vlan-x under one switch and vlan-y communication under another switch. )
Hybrid Port Ticker Text:
Receive a message to determine if there is VLAN information: If so, then determine whether the hybrid port allows data entry for the VLAN: if it can be forwarded, otherwise discarded (the UNTAG configuration on the port is not considered, UNTAG configuration only acts when sending the message) If not, the pvid of the upper port is played and the exchange is forwarded.
Hybrid Port Transmitter text:
1. Judge the VLAN's properties on this port (disp interface to see which VLANs are UNTAG and which are tags)
2, if the UNTAG is stripped VLAN information, and then sent, if the tag is sent directly (so, hybrid implementation of different VLANs under the host communication. )
The following cases can help you understand the hybrid port mode of Huawei switches [Switch-ethernet0/1]int E0/1
[Switch-ethernet0/1]port Link-type Hybrid
[Switch-ethernet0/1]port hybrid Pvid VLAN 10
[Switch-ethernet0/1]port hybrid VLAN UNTAGGED[SWITCH-ETHERNET0/1] int E0/2
[Switch-ethernet0/2]port Link-type Hybrid
[Switch-ethernet0/2]port hybrid Pvid VLAN 20
[Switch-ethernet0/2]port hybrid VLAN untagged at this time the inter E0/1 and inter E0/2 the connected PC can be interoperable, but the data when the exchange of the return VLAN is different. The following inter E0/1 under the PC1 access Inter E0/2 received under the PC2 as an example to explain the data emitted by PC1, INTER0/1 Pvid package Vlan10 The token sent to the switch, the switch found VLAN10 Inter 2 allow the data of VLAN 10 to pass, so that the data is forwarded to Inter E0/2, because the inter E0/2 on the VLAN 10 is untagged, so the switch removes the VLAN10 tag on the packet at this time, in the form of ordinary packets sent to PC2, at this time pc1-> P2 Go is vlan10 again to analyze PC2 to pc1 back the process of the packet, PC2 the data emitted by INTER0/2 Pvid in Vlan20 package vlan20 after the tag into the switch, the switch found inter E0/1 allow VLAN 20 data through, So the data is forwarded to the Inter E0/1, because the Inter e0/1 VLAN 20 is untagged, so the switch at this time to remove the data packet Vlan20 mark, in the form of ordinary packets sent to PC1, at this time PC2->PC1 go is
This article from the "Network" blog, reproduced please contact the author!