VLAN Troubleshooting
The following figure shows
the flow for troubleshooting VLANs.
To troubleshoot VLAN issues when you have no connection between PCs that
belong to the same VLAN, follow these high-level steps:
1.
Use the show vlan command to check whether the port belongs to the expected VLAN. If the
port is assigned to the wrong VLAN, use the switchport access vlan command
to correct the VLAN membership. Use the show mac address-table command
to check which addresses were learned on a particular port of the switch and to
which VLAN that port is assigned.
2.
If the VLAN to which the port is
assigned is deleted, the port becomes inactive. Use the show vlan or show interfaces
switchport command to verify that the VLAN is present in the VLAN database.
MAC Address Table Verification
To display the MAC address table, use the show
mac-address-table command in privileged EXEC mode as shown in the following example. This
command displays the MAC address table for the switch. Specific views can be
defined by using the optional keywords and arguments. The example shows MAC
addresses that were learned on the FastEthernet0/1 interface. It can be seen
that MAC address 000c.296a.a21c was learned on the interface FastEthernet0/1 in
VLAN 10. If this number is not the expected VLAN number, change the port VLAN
membership using theswitchport access
vlan command.
SW1#show
mac address-table interface FastEthernet 0/1
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
10 000c.296a.a21c DYNAMIC
Fa0/1
10
000f.34f9.9181 DYNAMIC Fa0/1
Total
Mac Addresses for this criterion: 2
Troubleshooting Missing VLANs
Each port in a switch belongs to a VLAN. If the VLAN to which the port
belongs is deleted, the port becomes inactive. All ports belonging to the VLAN
that was deleted are unable to communicate with the rest of the network.
As shown in the following
example, use the command show interface interfaceswitchport to check whether the port is inactive. If the port is inactive, it
will not be functional until the missing VLAN is created using the vlan vlan_id command or the port is assigned to a valid VLAN.
SW1#show
interfaces FastEthernet 0/1
switchport
Name:
Fa0/1
Switchport:
Enabled
Administrative
Mode: static access
Operational
Mode: static access
Administrative
Trunking Encapsulation: dot1q
Operational
Trunking Encapsulation: native
Negotiation
of Trunking: Off
Access Mode VLAN: 10 (Inactive)
Trunking
Native Mode VLAN: 1 (default)
Administrative
Native VLAN tagging: enabled
Voice
VLAN: none