Hone

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

enable
The # prompt.
configure terminal
Into configuration mode.
vlan 10
The VLAN the office should be in.
name STAFF
Named.
exit
Out.
interface gi0/6
The port that is not working.
switchport mode access
It is an access port, which is correct.
switchport access vlan 99
And it is in VLAN 99, which is not. This is the fault, reproduced.
switchport access vlan 10
The fix. One line, and the desk is back on the office network.
end
Out.
show vlan brief
Gi0/6 is against STAFF now. Confirmed, rather than assumed.

Your turn

Move this port to VLAN 10.

switchport access vlan 

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.

Practise a port in the wrong VLAN on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.