ios-config
A Cisco IOS show running-config parser that produces a typed intermediate
representation (IR) covering interfaces, routing (OSPF, BGP, static),
ACLs, NAT, VLANs, SNMP, AAA, STP, and more.
Quick start
use parse;
let raw = r#"
hostname CORE-RTR-01
!
interface GigabitEthernet0/0
description WAN
ip address 203.0.113.1 255.255.255.252
no shutdown
!
router ospf 1
router-id 1.1.1.1
network 203.0.113.0 0.0.0.3 area 0
"#;
let config = parse.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
What gets parsed
| Section | Types |
|---|---|
| Interfaces | GigabitEthernet, FastEthernet, TenGigabitEthernet, Loopback, Vlan, Tunnel, Serial |
| L2 | switchport access/trunk, voice vlan, storm-control, STP per-interface |
| Routing | static routes, OSPF (multi-process), BGP (neighbors, peer-groups, address-families), EIGRP |
| ACL | standard and extended, named and numbered |
| NAT | dynamic, PAT/overload, static |
| Management | NTP, DNS, SNMP, AAA, SSH, line vty, local users, banner |
| Global STP | mode, loopguard, portfast/bpduguard defaults, per-VLAN priority |
| Unknown | unrecognized commands preserved in unknown_blocks |