vlanrecon

Layer 2 VLAN security assessment — Cisco IOS / Arista EOS / Juniper Junos

v1.1.1
Linux

Quick Start

Install via jcli (recommended)

jcli install vlanrecon

If you don't have jcli yet, install it first with curl -fsSL https://cli.johlem.net/tools/jcli/install.sh | bash.

Audit a switch config

# Cisco IOS / Arista EOS — auto-detected from a `show running-config` dump
vlanrecon analyze   switch_config.txt
vlanrecon assess    switch_config.txt --baseline hardened --output markdown
vlanrecon topology  switch_config.txt
vlanrecon check-config switch_config.txt --output json --strict

# Juniper Junos — pass the `show | display set` form
vlanrecon --vendor junos analyze junos_set_config.txt

What it does

vlanrecon is an offline Layer 2 switch-config security analyzer. Feed it a switch config and it surfaces VLAN, STP, DTP, port-security, CDP/LLDP, and VTP misconfigurations against IEEE 802.1Q / 802.1D and vendor best practices. No packets are sent; no network access is required.

What it catches

CategoryExamples
VLAN hoppingNative VLAN 1 on trunk, implicit native VLAN, missing vlan dot1q tag native
DTP attacksdynamic auto / desirable, implicit mode (Cisco default), missing nonegotiate
STP manipulationAccess port without BPDU guard, trunk without root guard, BPDU filter on access (silent disable), portfast on trunk
Per-VLAN priority conflicts NEWSame VLAN configured with different STP priorities in one config
Port securityUnused active port, missing port-security, suspiciously high MAC max, no 802.1X
CDP/LLDP leakage NEWAccess ports broadcasting CDP / LLDP — leaks hostname / IOS version to neighbours
VTP risk NEWvtp mode server (rogue-rev wipe risk), vtp mode client, legacy version 1
Trunk pruningTrunk allowing all VLANs, no switchport trunk allowed vlan restriction

CLI

Subcommand / flagWhat it does
analyze <FILE>VLAN + STP + DTP + port + CDP/LLDP + VTP findings
check-config <FILE>Same checks, framed as a baseline-compliance pass
topology <FILE>ASCII Layer 2 topology (VLANs, trunks, access ports)
assess <FILE>Full report + per-attack-vector vulnerability assessments + topology
--vendor <V>auto (default) / cisco / arista / junos
--baseline <B>hardened (upgrades MEDIUM→HIGH) / standard / legacy (downgrades LOW→INFO)
--output <FMT>human / json / csv / markdown
--strictExit 1 on LOW+ instead of MEDIUM+ — useful for CI gates
--no-colorDisable ANSI colors

Design choices

Authorisation: vlanrecon performs no network activity — only file parsing. Still, the input config may contain sensitive infrastructure details (interface descriptions, management IPs, hostnames). Treat output files accordingly and review before sharing externally.