Skip to content

[help] show ip route vrf and non vrf #129

@network-shark

Description

@network-shark

Hi ,

I try to parse output of cisco boxes , but one patter I can't solve is this one.

Parsing one or the other is easy , but parsing both .... .
In my example vrf does not match , because the line is missing, but I really don't know how to work around this.

myrouter#show ip route vrf myvrf 0.0.0.0 0.0.0.0

Routing Table: myvrf
Routing entry for 0.0.0.0/0, supernet


myrouter#show ip route 0.0.0.0 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
<group record="vrf" set="vrf, default='default' " >
Routing Table: {{vrf}}
<group name = "{{ip_prefix}}" >
Routing entry for {{ip_prefix | PREFIX | _start_}}, supernet
Routing entry for {{ip_prefix | PREFIX | _start_}}
</group>
</group>

thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions