- Implementing Cisco Networking Solutions
- Harpreet Singh
- 287字
- 2025-04-04 18:14:23
Access ports and trunk ports
When two switches having more than one VLAN are connected to each other, they need a way to intimate the other switch about the VLAN number to which a particular frame belongs. The basic Ethernet header described earlier does not have any field to do this. IEEE defines a new specification 802.1Q that defines the use of VLAN, and how to transfer this information across the links that are shared by more than one VLANs. Ports that have only one VLAN are called access ports, and ports that need to connect to hosts in more than one VLAN are termed trunk ports. Generally, the inter switch links and the uplinks are trunk ports, and ports that connect to normal hosts are access ports:

The trunk ports carry tagged frames, as shown next, that have a specific field called the 802.1Q tag. This tag has fields that can be used for identification of the VLAN number and also for the classification of frames with regard to the priority that these frames need when being processed by the devices. We will describe the priority fields when we discuss Quality of Service in Chapter 9, Understanding and Configuring Quality of Service. An Ethernet frame with an 802.1Q header is as shown the following figure. The field lengths in bits are given in parenthesis:

Note in the preceding figure that the TPID value is always set to 8100 (hex) to indicate that this is a tagged frame. The VLAN numbers are carried in the VLAN ID field that is 12 bits long. Note that with the addition of the 802.1Q tag, the Ethernet header increases to 22 bytes.