Data loss when parsing ASA `show route` output
See original GitHub issueHello,
I’m parsing some show route
output out in the wild, and I stumbled across what seems like a limitation of the schema.
This is an excerpt from show route
on “device-a”:
S* 0.0.0.0 0.0.0.0 [1/0] via 192.2.0.1, Outside-Port-Channel
...
S 0.0.0.0 0.0.0.0 [255/0] via 10.98.126.1, Inside-Port-Channel tunneled
The parsed output from this config omits the top row because the CIDR coincides with the bottom row:
...
"routes": {
"0.0.0.0/0": {
"candidate_default": false,
"active": true,
"route": "0.0.0.0/0",
"source_protocol_codes": "S",
"source_protocol": "static",
"metric": 0,
"route_preference": 255,
"next_hop": {
"next_hop_list": {
1: {
"index": 1,
"next_hop": "10.98.126.1",
"outgoing_interface_name": "Inside-Port-Channel"
}
}
}
},
...
}
...
I propose that the schema for ASA’s show route (and possibly others) be updated to support plural routes:
...
"routes": {
"0.0.0.0/0": {
1: {
"candidate_default": true,
"active": true,
"route": "0.0.0.0/0",
"source_protocol_codes": "S",
"source_protocol": "static",
"metric": 0,
"route_preference": 1,
"next_hop": {
"next_hop_list": {
"1": {
"index": 1,
"next_hop": "192.2.0.1",
"outgoing_interface_name": "Outside-Port-Channel"
}
}
}
}
},
2: {
"candidate_default": false,
"active": true,
"route": "0.0.0.0/0",
"source_protocol_codes": "S",
"source_protocol": "static",
"metric": 0,
"route_preference": 255,
"next_hop": {
"next_hop_list": {
1: {
"index": 1,
"next_hop": "10.98.126.1",
"outgoing_interface_name": "Inside-Port-Channel"
}
}
}
}
}
}
...
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Analyze Firepower Firewall Captures to Effectively ... - Cisco
This document describes various packet capture analysis techniques that aim to effectively troubleshoot network issues.
Read more >Troubleshooting BGP - Cisco Live
Corrupt UPDATE, bad OPEN message, etc. • View the message that triggered the NOTIFICATION – in syslog or per-neighbor logs show ip bgp...
Read more >Trace route based on Cisco routing table text output
Files are parsed and initialized into Python data structures before search. Subnet tree is built based on each routing table (using SubnetTree ...
Read more >Configure Static Routing on Cisco ASA Firewall
So we need to configure two static routes. One Default Static route for Internet access, and one internal static route to reach network...
Read more >CLI Commands for Troubleshooting FortiGate Firewalls
It is “get router info6 routing-table” to show the routing table but “diagnose firewall proute6 list” for the PBF rules.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @tahigash
Thank you for those insights! I agree completely about the approach of adding a key for
tunneled_routes
.@thismatters as you suggested on https://github.com/CiscoTestAutomation/genieparser/pull/582, please open new PR with above schema. thanks for your contribution again! closing this issue since discussion was closed.