Lessons · Network switches · a port in the wrong VLAN
The desk that cannot see the server
A port in the wrong VLAN behaves exactly like a broken cable: link light on, no addresses, nothing reachable.
Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.
What it is for
It is the most common ticket on the list. Nothing is faulty, the wiring is fine, and the fix is one line, but only once you know where to look.
How to think about it
Check the VLAN before checking anything physical. `show vlan brief` tells you what the port is in; compare it with what the desk beside it is in.
Worked example
enableThe # prompt.
configure terminalInto configuration mode.
vlan 10The VLAN the office should be in.
name STAFFNamed.
exitOut.
interface gi0/6The port that is not working.
switchport mode accessIt is an access port, which is correct.
switchport access vlan 99And it is in VLAN 99, which is not. This is the fault, reproduced.
switchport access vlan 10The fix. One line, and the desk is back on the office network.
endOut.
show vlan briefGi0/6 is against STAFF now. Confirmed, rather than assumed.
Your turn
Move this port to VLAN 10.
switchport access vlan
Console into a switch
The trap
Replacing the patch lead first. A wrong VLAN and a bad cable look identical from the desk, but only one of them shows up in `show vlan brief`, so look there before you walk to the rack.