layer2-discovery
БесплатноБез исполняемых скриптовНе проверенLayer 2 device discovery and topology mapping. Use when finding switch port assignments, enumerating hosts via ARP, or identifying unknown devices by MAC…
от laurigates★ 61 звезда на GitHubОб этом скилле
Layer 2 Network Discovery
When to Use This Skill
| Scenario | Use this skill | Alternative |
|---|---|---|
| Find which switch port a server is connected to | Yes | |
| Enumerate hosts on the local segment via ARP | Yes | |
| Identify unknown devices by MAC vendor | Yes | |
| Map physical network topology (LLDP/CDP) | Yes | |
| Check if a host is alive when ICMP is blocked | Yes (arping) | |
| Detect duplicate IP addresses | Yes (arping -D) | |
| Scan for open TCP/UDP ports on remote hosts | network-discovery (RustScan, nmap) | |
| Trace the network path to a remote host | network-diagnostics (trippy) | |
| Look up DNS records for a domain | dns-tools (dog, dig) | |
| Load test an HTTP endpoint | http-load-testing (oha) | |
| Monitor per-process bandwidth usage | network-monitoring (bandwhich) | |
| Inspect or configure the host's own IPs, links, or routes | interface-state (ip) |
Expert knowledge for Layer 2 network topology discovery and neighbor detection, operating below the IP layer for direct link-level visibility.
Core Expertise
Layer 2 vs Layer 3 Discovery
| Layer | Protocol | Information | Use Case |
|---|---|---|---|
| L2 | LLDP/CDP | Switch ports, VLANs, neighbors | Topology mapping |
| L2 | ARP | MAC-to-IP mappings | Local host discovery |
| L3 | ICMP/TCP | IP reachability, ports | Remote host scanning |
Why L2 matters:
- Operates without IP routing - works on isolated networks
- Reveals physical topology (which port connects where)
- Identifies network equipment (switches, routers, phones)
- No firewall interference - L2 frames aren't filtered like IP packets
LLDP/CDP Topology Discovery
lldpd Overview
lldpd is an IEEE 802.1AB (LLDP) implementation that also supports:
- CDP - Cisco Discovery Protocol
- EDP - Extreme Discovery Protocol
- FDP - Foundry Discovery Protocol
- SONMP - SynOptics Network Management Protocol
Architecture:
lldpd- Daemon that sends/receives LLDP frameslldpcli- CLI to query daemon and configure settings
Installation
# Debian/Ubuntu
sudo apt install lldpd
# macOS (for development/testing)
brew install lldpd
# Start daemon
sudo systemctl enable --now lldpd
Essential lldpcli Commands
# Show discovered neighbors (most common)
lldpcli show neighbors
# Detailed neighbor info with all TLVs
lldpcli show neighbors details
# Show local chassis information
lldpcli show chassis
# Show interface statistics
lldpcli show statistics
# Show all interfaces lldpd is monitoring
lldpcli show interfaces
# Show running configuration
lldpcli show configuration
Neighbor Output Interpretation
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface: eth0, via: LLDP, RID: 1, Time: 0 day, 00:05:32
Chassis:
ChassisID: mac 00:1a:2b:3c:4d:5e
SysName: switch-core-01
SysDescr: Cisco IOS Software, C3750 Software
MgmtIP: 10.0.0.1
Capability: Bridge, on
Capability: Router, off
Port:
PortID: ifname GigabitEthernet0/1
PortDescr: Server Room Rack A
TTL: 120
VLAN: 100, pvid: yes
Key fields:
- ChassisID - Unique switch identifier (usually MAC)
- SysName - Switch hostname
- PortID/PortDescr - Which port you're connected to
- VLAN - VLAN assignment on that port
Configuration
# Enable CDP reception (for Cisco environments)
lldpcli configure lldp portidsubtype ifname
lldpcli configure cdp status rx-only
# Set system description
lldpcli configure system description "Application Server"
# Set interface description
lldpcli configure ports eth0 lldp portdescription "Primary uplink"
# Disable LLDP on specific interface
lldpcli configure ports eth1 lldp status disabled
Configuration file: /etc/lldpd.conf or /etc/lldpd.d/*.conf
# /etc/lldpd.conf
configure system description "Production Web Server"
configure lldp portidsubtype ifname
configure cdp status rx-only
ARP Scanning for Host Discovery
arp-scan-rs
Fast, Rust-based ARP scanner for local network host discovery.
# Install
cargo install arp-scan
# Basic scan (default interface)
arp-scan -l
# Specify interface
arp-scan -i en0 -l
# Scan specific subnet
arp-scan -i eth0 192.168.1.0/24
# Fast profile (less accuracy, more speed)
arp-scan -p fast -l
# Stealth profile (slower, harder to detect)
arp-scan -p stealth -l
# JSON output for parsing
arp-scan -l --json
# Show only responding hosts
arp-scan -l --alive-only
Scan Profiles
| Profile | Timing | Retries | Use Case |
|---|---|---|---|
default |
Balanced | 2 | General use |
fast |
Aggressive | 1 | Quick enumeration |
stealth |
Slow | 1 | Minimize detection |
Output Parsing
# Get IPs only
arp-
Установить layer2-discovery в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(arp *)Bash(ip *)Bash(bridge *)Bash(ethtool *)ReadWriteEditGrepGlobFAQ
Что делает скилл layer2-discovery?
Layer 2 device discovery and topology mapping. Use when finding switch port assignments, enumerating hosts via ARP, or identifying unknown devices by MAC vendor.
Как установить скилл layer2-discovery?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл layer2-discovery запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic