Timedora

3 Trunk Configuration

Learn how IEEE 802.1Q trunks carry VLAN traffic between switches, how to configure matching trunk settings, and how to verify and troubleshoot connectivity.

How trunks carry traffic

An carries traffic for multiple VLANs over one Ethernet link. Switches identify most frames with an 802.1Q tag. Frames in the are normally sent untagged, while frames for other VLANs carry their IDs.

Configure both trunk ends

Configure the VLANs on both switches, then configure the inter-switch interface at each end. In this example, the link carries VLANs 10 and 20, with 99 as the .

Example configuration

Allowed VLANs and list changes

Apply equivalent trunk settings on the neighboring switch. VLANs must exist and be active where they are needed. 99 must be included in the to carry data; being the does not override the allowed list.

The command switchport trunk allowed 10,20,99 sets the list to those VLANs rather than adding them to an existing list. To change a list without replacing it, use a command such as switchport trunk allowed add 30. Many Cisco switches allow all VLANs on a trunk by default, so a deliberate list can restrict unnecessary traffic.

Match the

The handles untagged traffic on an 802.1Q trunk. In the example, frames for VLANs 10 and 20 cross the link tagged with their IDs, while 99 frames are normally untagged.

Configure the same at both ends. If the values differ, untagged traffic can be assigned to different VLANs at each switch, and spanning-tree inconsistencies may be reported.

Verify trunk state and membership

Use these commands to check the operational trunk state, switchport settings, and membership:

Confirm that the interface is trunking, the matches the intended value, and VLANs 10, 20, and 99 appear in the allowed and active lists.

Test and troubleshoot connectivity

For an end-to-end test, connect or configure an access port in 10 on each switch, assign the hosts addresses in the same IP subnet, and ping between them. Repeat the test for 20 if needed.

If a ping fails, check that the exists, is active, and is allowed on every trunk in the path. Verify both trunk ends and the access-port assignments, and check link status and host addressing. A trunk can be up even when a particular is absent from its allowed or active VLANs.