Lessons · Network switches · VLANs for a cell
Designing VLANs for a production cell
The cell gets its own VLAN, with one controlled way in and out, so office traffic can never reach it and its own traffic never leaves.
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
Control traffic has a deadline. A broadcast storm from a printer must not be able to arrive at a drive, and a VLAN is the only wall that guarantees it cannot.
How to think about it
One VLAN per cell, not one per device. The cell talks to itself constantly and to the outside rarely, and that is exactly the shape a VLAN fits.
Worked example
enableThe # prompt.
configure terminalInto configuration mode.
vlan 60The cell.
name CELL7Named.
exitOut.
vlan 99And management, separate from both the cell and the office.
name MGMTNamed.
exitOut.
interface gi0/4The controller.
switchport mode accessAccess.
switchport access vlan 60In the cell.
spanning-tree portfastOne device on the end.
spanning-tree bpduguard enableAnd if that turns out to be false, the port goes down rather than the line.
exitOut.
interface gi0/1The uplink.
switchport mode trunkA trunk.
switchport trunk allowed vlan 60,99Only the two VLANs that belong here cross it. The office VLAN cannot reach this switch at all.
endOut.
show vlan briefTwo VLANs, the cell ports in one, and a trunk carrying only what was allowed.
Your turn
Let only VLANs 60 and 99 across the uplink.
switchport trunk vlan 60,99
Console into a switch
The trap
Leaving the trunk carrying everything because it works. It does work, right up until the day something on the office VLAN misbehaves and the cell is in its broadcast domain after all.