Skip to content
7LayerX

Switching / Hands-on lab

Trace a VLAN across an 802.1Q trunk

Follow a host's traffic through access ports and a trunk to find where VLAN connectivity breaks.

beginnerCisco IOS802.1Q
Before you start:Basic Ethernet switching concepts · Access to a lab switch or simulator

Lab goal

Trace a client in VLAN 20 across two switches. Verify the access VLAN at the edge, the allowed VLAN list on the trunk, and the destination port before changing configuration.

This lab uses Cisco IOS-style commands. Simulator and switch output can differ by platform and release.

Topology

Client A -- access port SW1 -- trunk -- SW2 -- access port -- Client B
                 VLAN 20          802.1Q             VLAN 20

Assign both clients addresses in the same lab subnet. Confirm that each access port is intended to carry untagged client traffic in VLAN 20.

Inspect the access ports

On each switch, check that VLAN 20 exists and the client-facing interface is assigned to it.

show vlan brief
show interfaces GigabitEthernet0/1 switchport

If the interface is in the wrong access VLAN, correct that endpoint assignment in the lab and verify the change. Do not change the trunk until the edge configuration is understood.

Inspect the trunk

show interfaces trunk
show interfaces GigabitEthernet0/24 switchport

Confirm the inter-switch link is operational as a trunk and VLAN 20 is allowed and active on it. A VLAN can be allowed by configuration but absent from the active or forwarding lists.

Verify spanning tree and MAC learning

show spanning-tree vlan 20
show mac address-table dynamic vlan 20

Confirm the expected trunk is forwarding for VLAN 20 and that each switch learns the client MAC address on the expected local port. If a MAC is learned on an unexpected interface, inspect the topology before making further changes.

Test the path

  1. Ping the other client from Client A.
  2. Observe the MAC address table on both switches.
  3. If the ping fails, compare access VLAN, trunk state, allowed VLANs, spanning-tree forwarding, and client addressing in that order.
  4. Make one lab change and repeat the same observations.

Success criteria

  • VLAN 20 is present and active on both switches.
  • Both client ports are assigned to VLAN 20.
  • The inter-switch link forwards VLAN 20.
  • Each switch learns the remote client MAC address over the trunk.
  • The two clients can reach one another at Layer 2 and Layer 3 as configured by the lab.

Pass it along

Found this useful? Share it.

Choose a platform or copy the direct link.

LinkedInXFacebook

Continue reading

Reader signal

Was this useful?

Your feedback helps shape the next field note and lab.

… views

Views count when this page opens. You can change or remove your vote during this tab session.