Skip to content
FALCON CORETECHNOLOGIES

// Troubleshooting guide

Hosts in the same VLAN cannot reach each other across switches

A layer-by-layer method for finding why a VLAN stops at the trunk — missing VLANs, pruned allowed lists, mode mismatches and native VLAN problems.
3 min read#ccna#vlan#trunk#troubleshooting

Symptoms

  • Hosts on the same switch and VLAN can ping each other, but not hosts on another switch
  • Only some VLANs work across the uplink
  • %CDP-4-NATIVE_VLAN_MISMATCH messages in the log
  • The uplink is up/up but show interfaces trunk does not list it

How to think about it

Traffic for a VLAN crosses a switch-to-switch link only when all of these are true:

  1. The VLAN exists (and is active) on both switches.
  2. The link is actually trunking on both ends.
  3. The VLAN is in the allowed list on both ends.
  4. The VLAN is forwarding in spanning tree on that link (not pruned or blocked).
  5. The hosts are in the right VLAN with addresses in the same subnet.

Work through them in order. Each check is one command.

Step 1 — does the VLAN exist on both switches?

show vlan brief

If VLAN 20 is missing on SW2, frames tagged 20 arriving on the trunk are dropped. switchport access vlan 20 on a port does create the VLAN on most platforms, but a switch in VTP client mode or a typo (VLAN 200 instead of 20) can leave it missing. Fix: vlan 20 in global configuration.

show interfaces trunk
show interfaces GigabitEthernet1/0/24 switchport

If the port is not listed by show interfaces trunk, look at "Administrative Mode" and "Operational Mode":

SW1 mode SW2 mode Result
trunk trunk Trunk
trunk dynamic auto Trunk (DTP negotiates)
dynamic auto dynamic auto Access — neither side starts negotiation
trunk + nonegotiate dynamic auto Access on SW2 — no DTP is sent
access trunk Broken — one side tags, the other does not

Fix: configure switchport mode trunk on both ends (and switchport nonegotiate on both if you disable DTP).

Step 3 — is the VLAN allowed on both ends?

show interfaces trunk has three VLAN lists. The VLAN must appear in all three:

  • Vlans allowed on trunk — the configured list.
  • Vlans allowed and active in management domain — allowed and existing on this switch.
  • Vlans in spanning tree forwarding state and not pruned — actually forwarding.

A common cause: someone typed switchport trunk allowed vlan 30 meaning to add VLAN 30, and replaced the whole list. Fix with switchport trunk allowed vlan add 20.

Step 4 — native VLAN mismatch

If SW1 uses native VLAN 999 and SW2 uses native VLAN 1, untagged frames leak between the two VLANs and CDP logs a mismatch. STP may also block the port for those VLANs (*_PVID_inconsistent). Check with show interfaces trunk (column "Native vlan") on both ends and make them match.

Step 5 — spanning tree

show spanning-tree vlan 20

If the uplink is in the BLK/ALTN state for VLAN 20 and there is no other path, look for an inconsistent state (show spanning-tree inconsistentports) or an err-disabled port (show interfaces status err-disabled).

Step 6 — the hosts themselves

  • show mac address-table vlan 20 — are both hosts' MACs learned, and on which ports? A MAC learned in the wrong VLAN shows a misconfigured access port.
  • Check each host's IP address and mask. Two hosts in the same VLAN with addresses in different subnets will not talk without a router.

Quick checklist

Check Command Healthy result
VLAN exists show vlan brief VLAN listed, active, on both switches
Trunking show interfaces trunk Port listed, mode on / desirable
Allowed show interfaces trunk VLAN in all three lists
Native show interfaces trunk Same native VLAN on both ends
STP show spanning-tree vlan X Uplink FWD (or a working alternate path)
Hosts show mac address-table vlan X Both MACs learned