Figure 1-2Encapsulation format of traditional Ethernet frames

DA&SA

Type

Data

In Figure 1-2 DA refers to the destination MAC address, SA refers to the source MAC address, and Type refers to the upper layer protocol type of the packet. IEEE 802.1Q protocol defines that a 4-byte VLAN tag is encapsulated after the destination MAC address and source MAC address to show the information about VLAN.

Figure 1-3Format of VLAN tag

VLAN Tag

DA&SA

TPID

Priority CFI VLAN ID

Type

As shown in Figure 1-3, a VLAN tag contains four fields, including the tag protocol identifier (TPID), priority, canonical format indicator (CFI), and VLAN ID.

z

z

z

z

TPID is a 16-bit field, indicating that this data frame is VLAN-tagged. By default, it is 0x8100 in the WX3000 series devices.

Priority is a 3-bit field, referring to 802.1p priority. Refer to the “QoS-QoS profile” part of this manual for details.

CFI is a 1-bit field, indicating whether the MAC address is encapsulated in the standard format. 0 (the value of the CFI filed) indicates the MAC address is encapsulated in the standard format and 1 indicates the MAC address is not encapsulated in the standard format. The value is 0 by default.

VLAN ID is a 12-bit field, indicating the ID of the VLAN to which this packet belongs. It is in the range of 0 to 4,095. Generally, 0 and 4,095 is not used, so the field is in the range of 1 to 4,094.

The frame format here takes the Ethernet II encapsulation as an example. Ethernet also supports 802.2/802.3 encapsulation, where VLAN tag is also encapsulated after the DA and SA field. Refer to Encapsulation Format of Ethernet Data for 802.2/802.3 encapsulation format.

VLAN ID identifies the VLAN to which a packet belongs. When a switch receives a packet carrying no VLAN tag, the switch encapsulates a VLAN tag with the default VLAN ID of the inbound port for the packet, and sends the packet to the default VLAN of the inbound port for transmission. For the details about setting the default VLAN of a port, refer to the default VLAN ID configuration of a port section in the “Port Basic Configuration” part of the manual.

MAC address learning mechanism of VLANs

Switches forward packets according to the destination MAC addresses of the packets. So that switches maintain a table called MAC address forwarding table to record the source MAC addresses of the received packets and the corresponding ports receiving the packets for consequent packet forwarding. The process of recording is called MAC address learning.

1-3

Page 64
Image 64
3Com WX3000 operation manual MAC address learning mechanism of VLANs, 2Encapsulation format of traditional Ethernet frames