← Networkingthe vtp misconfig that can wipe every vlan on your network

the vtp misconfig that can wipe every vlan on your network

$vtp mode transparent

the switch you just plugged in can nuke every vlan in the building

this one is a classic network horror story for a reason. no exploit, no malware, no fancy tooling. someone plugs in a switch that used to live on a lab bench somewhere, it happens to share the same vtp domain name, and within seconds every vlan on your production network is gone. not hacked. just... overwritten. by design. that's the scary part.

what vtp is actually doing behind the scenes

vtp stands for vlan trunking protocol. its whole job is to keep vlan databases in sync across a bunch of switches so you don't have to manually type vlan 10, vlan 20, vlan 30 on every single device. one switch makes a change, it advertises that change, everyone else updates to match. sounds convenient. it is convenient, right up until it isn't.

every time a vlan change happens on a switch running vtp in server mode, that switch bumps something called the configuration revision number. it's just a counter. every change, plus one.

the part that actually causes the disaster

here's the rule that trips people up: when two switches in the same vtp domain talk to each other, the one with the higher revision number always wins. always. it doesn't matter if that switch is brand new, unconfigured, or just came out of a storage closet after six years. if its revision number is higher than what's currently running on your live network, your switches will happily throw away their own vlan database and adopt whatever that old switch is carrying. including nothing. plenty of networks have gone dark because someone plugged in a switch that had an empty vlan list but a sky-high revision number from years of old lab testing.

the only thing standing between "normal switch" and "accidental network wipe" is a matching vtp domain name and that one number.

the fix: stop participating in vtp entirely

the real defense isn't "be more careful with revision numbers." it's removing the blast radius. that means putting switches into transparent mode so they never accept or advertise vtp updates in the first place.

enable
configure terminal
vtp mode transparent
end

breaking that down:

enable gets you into privileged mode so you can actually make changes.
configure terminal puts you into global config mode.
vtp mode transparent tells the switch to forward vtp advertisements along the trunk if needed, but never apply them to its own vlan database and never send its own updates that could overwrite someone else. it just keeps its local vlan config exactly as you set it.

check your current mode first so you know what you're dealing with:

show vtp status

look at the "vtp operating mode" line and the "configuration revision" number. if you see a mode of server and a revision number that's higher than zero on a switch you're about to introduce to a live network, stop and reset it before it ever touches a trunk port.

resetting the revision before you plug anything in

the caption tip is the right instinct: reset the revision before you plug in any switch you didn't build fresh yourself. the cleanest way to zero out the revision counter is to temporarily change the vtp domain name to something else and then change it back, or switch the device to transparent mode and back to server mode. either action resets the revision counter to zero. do this on the bench, before it ever sees a trunk cable, not after.

the safest move for most networks

honestly, a lot of experienced network folks just don't run vtp at all anymore. it saves a little typing but the risk of one misconfigured or forgotten device silently overwriting a production vlan table isn't worth the convenience. transparent mode across the board, with vlans configured manually or through automation you control, removes this entire failure mode from the table.

the takeaway

vtp isn't malicious, it's just doing exactly what it was told to do, sync the vlan database, highest revision wins. the danger is that it trusts any switch that shows up with the right domain name, no questions asked. protect your network by setting switches to transparent mode as a default habit, checking show vtp status before adding any new hardware, and resetting the revision on unknown switches before they ever touch a live trunk. five seconds of checking beats an afternoon rebuilding every vlan from memory.

watch the reel ↗
the weekly drop

one command a week that makes you harder to hack.

a single tool, explained in plain english, every week. straight to your inbox.

no spam. one email a week. unsubscribe anytime.