agentleFS
anderson-c-santosanderson-c-santos/claude-skills-network/skills/network-engineer/SKILL.md

network-engineer

Skill1 starsChanged 5 months agoMITView on GitHub

Use this skill for enterprise network engineering — OSI-layer troubleshooting methodology, BGP state machine diagnosis, Cisco IOS/IOS-XE configuration and show commands, interface health counters, VLAN design, spine-leaf DC fabric, OSPF/BGP routing, config validation pre-deploy checklist, and Python/Netmiko automation. Activate for any network device config, routing protocol issue, or infrastructure design question.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use IS-IS for large DC fabrics.

    line 176
  2. Distinctive:

    Never route between zones without stateful firewall.

    line 183
  3. Very specific:

    Always use context manager (with) — never leave connections open.

    line 246
  4. Distinctive:

    Never hardcode credentials — use environment variables or a vault.

    line 248

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Network Engineering

OSI-Layer Troubleshooting Methodology

Start diagnosis by symptom:

SymptomStart layerFirst command
No link light / port downL1 PhysicalCheck cable, SFP, show interfaces
Link up, no trafficL2 Data LinkCheck VLAN, STP, duplex show interfaces
Can't ping gatewayL3 Networkshow ip route, check ACL
BGP/OSPF neighbor downL3 + routingshow bgp summary, show ip ospf neighbor
DNS failingL7 Applicationdig @8.8.8.8 domain vs dig domain
Slow / packet lossL1–L3Interface error counters, QoS drops

L1 — Physical:

CRC errors → bad cable, bad SFP, duplex mismatch (CRC is on receive side of fault)

L2 — Data Link:

Duplex mismatch = CRC + collisions + 30-50% throughput loss
Never mix auto-negotiation on one side and fixed on other
STP blocking state = silent L2 black hole — check with show spanning-tree

L3 — Network:

Source ping from right interface: ping 8.8.8.8 source Gi0/0
ACL hit counting: show ip access-lists (add log keyword for new hits)

Cisco IOS / IOS-XE

Mode hierarchy:

Router>          # user exec
Router# enable   # privileged exec
Router(config)#  # global config
Router(config-if)# interface sub-mode
Router(config-router)# routing protocol sub-mode
end              # jump back to privileged exec from any sub-mode

Essential show commands:

show interfaces Gi0/0                   ! counters, speed/duplex, errors
show ip interface brief                 ! all interfaces — up/down/IP
show ip route 8.8.8.8                  ! routing table lookup
show ip ospf neighbor                   ! OSPF adjacency table
show bgp summary                        ! BGP session table
show vlan brief                         ! VLAN database
show spanning-tree                      ! STP state per VLAN
show ip access-lists                    ! ACL + hit counters
show logging                            ! syslog buffer
show running-config | section ospf      ! filter config

Save config (running-config is RAM only, lost on reload):

write memory
! or:
copy running-config startup-config

Wildcard masks (inverse of subnet mask):

/24  → 0.0.0.255
/30  → 0.0.0.3
/32  → 0.0.0.0    (single host)
any  → 255.255.255.255

Common gotchas:

  • OSPF network uses wildcard, not subnet mask: network 10.0.0.0 0.0.0.255 area 0 ✓
  • enable password = weak MD5; use enable secret (SHA-256) instead.
  • no ip domain-lookup prevents CLI hangs when typing typos that look like hostnames.
  • exec-timeout 15 0 on VTY lines prevents idle admin lockout.

Interface Health — Counter Reference

show interfaces Gi0/0
CounterRoot Cause
CRCBad cable, duplex mismatch, failing SFP
Runts (<64B)Duplex mismatch, collisions
Giants (>MTU)Jumbo frames not supported end-to-end
Input dropsInbound oversubscription; increase hold-queue
Output dropsEgress congestion; needs QoS
Interface resetsFlapping link, keepalive failure
CollisionsHalf-duplex operation

Flapping diagnosis:

show logging | include Gi0/0|changed state

BGP

State machine:

StateMeaningFix
IdleNot tryingCheck neighbor X shutdown, AS mismatch
ActiveTCP SYN failingCheck reachability, update-source, ACL blocking 179
ConnectSYN sent, no SYN-ACKFirewall, peer not configured
OpenSent/ConfirmNegotiatingMTU, capability mismatch
EstablishedWorkingCheck prefix count

Always use soft reset — hard reset drops the session:

clear ip bgp 203.0.113.1 soft in
clear ip bgp 203.0.113.1 soft out

BGP config (eBGP):

router bgp 65001
 neighbor 203.0.113.1 remote-as 64500
 neighbor 203.0.113.1 update-source Loopback0
 neighbor 203.0.113.1 ebgp-multihop 2
 neighbor 203.0.113.1 soft-reconfiguration inbound  ! to see received-routes
 !
 address-family ipv4 unicast
  neighbor 203.0.113.1 activate
  neighbor 203.0.113.1 prefix-list FILTER-IN in

Best path selection order:

WEIGHT → LOCAL_PREF → AS_PATH length → ORIGIN → MED → eBGP>iBGP → IGP metric → Router-ID

OSPF

router ospf 1
 router-id 10.0.0.1
 network 192.168.1.0 0.0.0.255 area 0
 network 10.0.0.0 0.0.0.255 area 0
 passive-interface Gi0/1     ! suppress hellos on LAN segments

DR/BDR election: set ip ospf network point-to-point on routed point-to-point links to skip DR election.

Area types:

  • Backbone (0.0.0.0) — required; all other areas must connect to it.
  • Stub — no external routes (type-5 LSA blocked).
  • Totally stubby — no external + no inter-area routes (default route only).
  • NSSA — external routes as type-7 LSA (converts to type-5 at ABR).

Enterprise Network Design

Campus / branch topology:

  • Hub-and-spoke: <50 branches, central apps, simple management.
  • SD-WAN overlay: multi-transport (MPLS + internet + LTE), cloud-friendly.
  • Full mesh: low-latency branch-to-branch, expensive, complex.

DC fabric (spine-leaf / Clos):

[Server] ─┬─ [ToR Leaf A] ─┬─ [Spine 1] ─┬─ [ToR Leaf B] ─┬─ [Server]
           └─ [ToR Leaf A] ─┘─ [Spine 2] ─┘─ [ToR Leaf B] ─┘
  • VXLAN/EVPN overlay — replaces STP-dependent L2 stretching.
  • BGP unnumbered on spine-leaf links.
  • Dual-attach every server to two ToR leaves (MLAG/LACP).
  • Use IS-IS for large DC fabrics; OSPF for campus/branch.

Segmentation zones:

CORP (trusted PCs) → SERVERS → DMZ (public services) → GUEST
MGMT (OOB, never VLAN 1) → OT/IoT (isolated)

Never route between zones without stateful firewall. VRF-Lite for hardware-enforced separation.

Security audit checklist:

! CRITICAL — immediately fix:
show snmp community           ! 'public'/'private' = publicly scanned
show line vty 0 4             ! no access-class = anyone can SSH in
show running | include ^enable password  ! should be 'enable secret'

! Best practices must-haves:
ntp server NTP_SERVER_IP
logging host SYSLOG_SERVER
service timestamps log datetime msec
banner login ^AUTHORIZED ACCESS ONLY^
no ip domain-lookup
exec-timeout 15 0
ip ssh version 2

Python Netmiko Automation

Device types: cisco_ios, cisco_nxos, juniper_junos, arista_eos, mikrotik_routeros, paloalto_panos, fortinet, linux

Basic pattern:

from netmiko import ConnectHandler

device = {
    "device_type": "cisco_ios",
    "host": "192.0.2.1",
    "username": "admin",
    "password": "PASSWORD",
    "secret": "ENABLE_SECRET",
}

with ConnectHandler(**device) as conn:
    conn.enable()
    output = conn.send_command("show ip route", use_textfsm=True)  # returns list[dict]
    conn.send_config_set([
        "interface Gi0/1",
        "description UPDATED",
    ])
    conn.save_config()

Batch with parallel execution:

from concurrent.futures import ThreadPoolExecutor
from netmiko import ConnectHandler, NetmikoAuthenticationException, NetmikoTimeoutException

def run_on_device(device):
    try:
        with ConnectHandler(**device) as conn:
            return conn.send_command("show version", use_textfsm=True)
    except (NetmikoAuthenticationException, NetmikoTimeoutException) as e:
        return {"error": str(e), "host": device["host"]}

with ThreadPoolExecutor(max_workers=10) as pool:
    results = list(pool.map(run_on_device, device_list))

Rules:

  • Limit concurrent SSH to 10–20 max (most platforms have session limits).
  • Always use context manager (with) — never leave connections open.
  • use_textfsm=True returns structured list[dict]; without it returns raw string.
  • Never hardcode credentials — use environment variables or a vault.

VLAN Design Checklist

VLANPurposeNotes
10Trusted (PCs, laptops)Full internet, internal access
20IoT / Smart devicesInternet only; no RFC1918 access
30Servers / homelabRestricted inbound from CORP
40GuestInternet only; client isolation
99Management (OOB)SSH/SNMP only; no user traffic

Anti-patterns:

  • VLAN 1 for anything production → VLAN hopping risk.
  • Native VLAN = Management VLAN → first thing attackers try.
  • VLANs without firewall rules between them → isolation theater.
  • Trunk all VLANs everywhere → limit trunk allowed-vlan to only needed VLANs.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.