question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Data loss when parsing ASA `show route` output

See original GitHub issue

Hello,

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:closed
  • Created 2 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
thismatterscommented, Dec 3, 2021

Hi @tahigash

Thank you for those insights! I agree completely about the approach of adding a key for tunneled_routes.

0reactions
tahigashcommented, Dec 7, 2021

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found