genieparser icon indicating copy to clipboard operation
genieparser copied to clipboard

[IOS-XE] show ip route {prefix}

Open dmychepk opened this issue 1 year ago • 4 comments

if output of show ip route {prefix} contains BGP from as with dot notation. like "bgp 1.1" parser fails

dmychepk avatar Aug 29 '24 19:08 dmychepk

Hello @dmychepk,

Can you please let us know what error you are seeing for this command? Also, kindly provide us the raw device output as well.

Thank you.

SohanTirpude avatar Aug 30 '24 12:08 SohanTirpude

Hello @dmychepk,

Thank you for the output. With this output I was able to reproduce the issues as well as I found the solution. Now, the parsed output looks like this:

{
    "entry": {
        "0.0.0.0/0": {
            "ip": "0.0.0.0",
            "mask": "0",
            "net": "supernet",
            "known_via": "bgp 100.1",
            "distance": "20",
            "metric": "0",
            "type": "default path",
            "tag_name": "65637",
            "tag_type": "external",
            "update": {
                "from": "100.101.0.12",
                "age": "00:16:36"
            },
            "paths": {
                1: {
                    "nexthop": "100.101.0.12",
                    "from": "100.101.0.12",
                    "age": "00:16:36",
                    "prefer_non_rib_labels": False,
                    "merge_labels": False,
                    "metric": "0",
                    "share_count": "1",
                    "as_hops": "5",
                    "route_tag": "65637",
                    "mpls_label": "none",
                    "mpls_flags": "NSF"
                },
                2: {
                    "nexthop": "100.101.0.8",
                    "from": "100.101.0.8",
                    "age": "00:16:36",
                    "prefer_non_rib_labels": False,
                    "merge_labels": False,
                    "metric": "0",
                    "share_count": "1",
                    "as_hops": "5",
                    "route_tag": "65637",
                    "mpls_label": "none",
                    "mpls_flags": "NSF"
                },
                3: {
                    "nexthop": "100.101.0.4",
                    "from": "100.101.0.4",
                    "age": "00:16:36",
                    "prefer_non_rib_labels": False,
                    "merge_labels": False,
                    "metric": "0",
                    "share_count": "1",
                    "as_hops": "5",
                    "route_tag": "65637",
                    "mpls_label": "none",
                    "mpls_flags": "NSF"
                }
            }
        }
    },
    "total_prefixes": 3
}

Kindly check and confirm if everything is correct or not.

Thank you.

SohanTirpude avatar Aug 30 '24 13:08 SohanTirpude

looks good

dmychepk avatar Aug 30 '24 13:08 dmychepk

Hello @dmychepk,

The PR got merged and the fix will be available in the upcoming pyats 24.9 version. Kindly try and let me know if you still see this issue with pyats 24.9 version.

Meanwhile, I am closing this ticket. If you are facing any other issues, kindly open a new ticket.

Thank you.

SohanTirpude avatar Sep 06 '24 11:09 SohanTirpude