Cisco traffic gen
Nine Claude Code skills for Cisco network automation: backup, config gen, discovery, QoS testing, security audit.
npx -y skills add bradmccloskey/claude-cisco-skills --skill cisco-traffic-genAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 16 days oldThe repository was created 16 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Generate Python scripts that create network traffic and load for testing Cisco QoS policies, bandwidth, and network performance. Use when the user wants to generate test traffic, simulate load, validate QoS markings, or stress test network links.
SKILL.md
7.7 KB, ~1.9k tokens by cl100k_base, as published. Nobody here has run it
Cisco Network Traffic Generation & QoS Testing Scripts
Write Python scripts that generate controlled network traffic for testing QoS policies and network performance. Follow these standards:
Traffic Types
TCP Traffic
- Bulk data transfers (saturate a link to test bandwidth shaping)
- Multiple parallel TCP streams (simulate many users)
- Configurable payload size and duration
- HTTP/HTTPS traffic simulation
- FTP-like large file transfers
- Configurable TCP window size for throughput control
UDP Traffic
- Constant bitrate (CBR) streams at specified rates (e.g., 1 Mbps, 10 Mbps, 100 Mbps)
- Variable bitrate (VBR) with configurable burst patterns
- Configurable packet size (64 byte small packets to 9000 byte jumbo)
- Adjustable packets-per-second rate
- Multi-stream generation to different destinations
Voice (VoIP) Simulation
- G.711 profile: 64 kbps, 160 byte payload, 20ms interval, UDP
- G.729 profile: 8 kbps, 20 byte payload, 20ms interval, UDP
- RTP-like headers with sequence numbers and timestamps
- Simulate multiple concurrent calls (e.g., 50 calls = ~5 Mbps G.711)
- Jitter injection for realistic voice patterns
- Mark with DSCP EF (46) to test priority queue
Video Simulation
- Constant bitrate video: 2-10 Mbps sustained UDP streams
- Bursty video: I-frame bursts followed by smaller P/B frames
- Configurable resolution profiles (720p ~5 Mbps, 1080p ~10 Mbps, 4K ~25 Mbps)
- Mark with DSCP AF41 (34) to test video queue
Signaling / Control Traffic
- Small periodic packets (SIP, SCCP-like signaling patterns)
- Mark with DSCP CS3 (24) for call signaling class
- Low bandwidth, latency-sensitive patterns
Scavenger / Bulk Data
- Large sustained transfers marked DSCP CS1 (8)
- Test that scavenger class gets deprioritized under congestion
- Peer-to-peer style traffic patterns
Background / Best Effort
- Mixed traffic patterns at DSCP 0 (default)
- Web browsing simulation (short bursts, variable intervals)
- Simulate realistic background network noise
DSCP Marking Reference
| Class | DSCP Name | DSCP Value | Per-Hop Behavior | Typical Use |
|---|---|---|---|---|
| EF | EF | 46 | Expedited Forwarding | Voice RTP |
| CS5 | CS5 | 40 | Signaling | Call signaling (SIP/SCCP) |
| AF41 | AF41 | 34 | Assured Forwarding | Video conferencing |
| AF31 | AF31 | 26 | Assured Forwarding | Streaming video |
| AF21 | AF21 | 18 | Assured Forwarding | Transactional data (ERP, CRM) |
| AF11 | AF11 | 10 | Assured Forwarding | Bulk data |
| CS3 | CS3 | 24 | Call signaling | Broadcast video |
| CS1 | CS1 | 8 | Scavenger | Backup, P2P |
| DF | DF | 0 | Default / Best Effort | Web, email |
Traffic Profiles (Presets)
Enterprise QoS Test Suite
profiles:
voice:
protocol: udp
codec: g711
dscp: 46
streams: 20 # 20 concurrent calls
duration: 120s
video:
protocol: udp
rate_mbps: 10
dscp: 34
burst_size: 15000 # bytes
duration: 120s
signaling:
protocol: udp
rate_kbps: 50
dscp: 24
packet_size: 200
duration: 120s
data_critical:
protocol: tcp
streams: 5
dscp: 18
duration: 120s
bulk:
protocol: tcp
streams: 20
dscp: 0
duration: 120s
scavenger:
protocol: tcp
streams: 10
dscp: 8
duration: 120s
Link Saturation Profile
# Fill a link to test queuing behavior under congestion
saturate:
protocol: udp
rate_mbps: 100 # adjust to match link speed
dscp: 0
packet_size: 1400
duration: 60s
QoS Validation (Collect from Devices)
After generating traffic, collect QoS stats from Cisco devices to validate policy behavior:
# Interface queuing stats
show policy-map interface {interface}
# Class-map match counters
show policy-map interface {interface} | include Class|packets|bytes|rate|drops
# DSCP marking verification
show ip nbar protocol-discovery
show mls qos interface {interface} statistics
# Queue drops and tail drops
show platform hardware fed switch active qos queue stats interface {interface}
What to Validate
- Priority queue (EF/voice): zero drops, low latency, low jitter
- Video class (AF41): minimal drops, bandwidth guarantee met
- Data classes (AF21/AF11): fair bandwidth allocation
- Best effort (DF): gets remaining bandwidth after guaranteed classes
- Scavenger (CS1): first to be dropped under congestion
- Policing: traffic exceeding rate is remarked or dropped as configured
- Shaping: output rate matches configured shaper
Script Architecture
# Traffic generator scripts should follow this pattern:
# 1. Parse traffic profile (YAML or CLI args)
# 2. Set up sender/receiver pairs
# 3. Open sockets with DSCP marking
# 4. Generate traffic at specified rates
# 5. Measure: throughput, packet loss, latency, jitter
# 6. Optionally collect QoS counters from devices via SSH (before/after)
# 7. Report results: per-class throughput, loss, latency, jitter
# Sender sets DSCP via socket option:
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
# Set DSCP EF (46) - shift left 2 bits for TOS field
sock.setsockopt(socket.IPPROTO_IP, socket.IP_TOS, 46 << 2)
Measurement & Reporting
Per-Stream Metrics
- Throughput (bps) achieved vs target
- Packet loss percentage
- One-way latency (requires clock sync or estimation)
- Jitter (inter-packet delay variation)
- Out-of-order packets
QoS Policy Report
- Per-class bandwidth allocation (expected vs actual)
- Drop counts per class under congestion
- Priority queue behavior (EF should have zero loss)
- Policing/shaping conformance
Output Formats
- Real-time console output with
rich(live updating tables) - CSV export of per-second measurements
- JSON summary report
- Before/after comparison of device QoS counters
Libraries to Use
socketfor raw TCP/UDP traffic with DSCP markingscapyfor crafted packets with full header controlasynciofor concurrent stream managementiperf3Python wrapper (iperf3library) as an alternative to raw socketsnetmikofor collecting QoS counters from devicespyats+geniefor parsingshow policy-mapoutputrichfor live traffic dashboardsnumpyfor jitter/latency statisticsyamlfor traffic profile definitionsconcurrent.futures/threadingfor multi-stream generationtime/structfor packet timestamps and sequencing
Receiver Script
Always generate a paired receiver script that:
- Listens on the target port(s)
- Tracks sequence numbers for loss detection
- Measures inter-packet arrival time for jitter
- Calculates throughput per second
- Reports summary stats when traffic stops
Safety & Best Practices
- Always require explicit target IP/port (never broadcast/multicast by default)
- Include a
--max-ratesafety cap to prevent accidental link flooding - Default duration should have a sane limit (e.g., 60 seconds)
- Support graceful stop via Ctrl+C with summary output
- Log all traffic parameters used
- Warn if generating traffic to production networks
- Include
--dry-runflag that shows what would be generated without sending - Require
--confirmflag when rate exceeds 50% of a specified link speed - NEVER generate traffic intended for denial-of-service; these scripts are for legitimate QoS testing in controlled lab and production environments with authorization
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.