From 9280b73d0d6d50feacaa04a7c2457e7000974359 Mon Sep 17 00:00:00 2001 From: Olof Lundgren <28050577+lundgrenolof@users.noreply.github.com> Date: Fri, 20 Mar 2026 15:10:47 +0100 Subject: [PATCH 1/6] Add ipv6 support for paloalto panos show routing route --- .../paloalto_panos_show_routing_route.textfsm | 4 +- .../paloalto_panos_show_routing_route2.raw | 129 +++ .../paloalto_panos_show_routing_route2.yml | 930 ++++++++++++++++++ 3 files changed, 1061 insertions(+), 2 deletions(-) create mode 100644 tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route2.raw create mode 100644 tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route2.yml diff --git a/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm b/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm index ec2c8540fc..5be1021902 100644 --- a/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm +++ b/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm @@ -1,5 +1,5 @@ -Value NETWORK (\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}) -Value PREFIX_LENGTH (\d{1,2}) +Value NETWORK ([^/\s]+) +Value PREFIX_LENGTH (\d{1,3}) Value NEXTHOP_IP (\S+) Value METRIC (\d*|) Value FLAGS ((?:A|C|H|S|~|R|O|B|Oi|Oo|O1|O2|E|M)(?:[\s?]+(?:A|C|H|S|~|R|O|B|Oi|Oo|O1|O2|E|M))?) diff --git a/tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route2.raw b/tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route2.raw new file mode 100644 index 0000000000..96ec2fdbe2 --- /dev/null +++ b/tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route2.raw @@ -0,0 +1,129 @@ +flags: A:active, ?:loose, C:connect, H:host, S:static, ~:internal, R:rip, O:ospf, B:bgp, + Oi:ospf intra-area, Oo:ospf inter-area, O1:ospf ext-type-1, O2:ospf ext-type-2, E:ecmp, M:multicast + + +VIRTUAL ROUTER: default (id 1) + ========== +destination nexthop metric flags age interface next-AS +0.0.0.0/0 198.18.27.241 10 A S ethernet1/15 +10.6.15.0/24 10.6.15.1 0 A C ae1.15 +10.6.15.1/32 0.0.0.0 0 A H +10.6.16.0/24 10.6.16.1 0 A C ae1.16 +10.6.16.1/32 0.0.0.0 0 A H +10.6.51.0/24 10.6.51.1 0 A C ae1.51 +10.6.51.1/32 0.0.0.0 0 A H +10.6.52.0/24 10.6.52.1 0 A C ae1.52 +10.6.52.1/32 0.0.0.0 0 A H +10.6.69.0/24 10.6.69.1 0 A C ae1.69 +10.6.69.1/32 0.0.0.0 0 A H +10.6.80.0/24 10.6.80.1 0 A C ae1.80 +10.6.80.1/32 0.0.0.0 0 A H +10.6.81.0/24 10.6.81.1 0 A C ae1.81 +10.6.81.1/32 0.0.0.0 0 A H +10.6.82.0/24 10.6.82.1 0 A C ae1.82 +10.6.82.1/32 0.0.0.0 0 A H +10.6.100.2/32 0.0.0.0 0 A H +10.6.100.2/32 0.0.0.0 1 ~ +10.6.100.3/32 0.0.0.0 0 A H +10.6.100.3/32 0.0.0.0 1 ~ +10.6.100.4/32 0.0.0.0 0 A H +10.6.100.4/32 0.0.0.0 1 ~ +10.6.100.5/32 0.0.0.0 0 A H +10.6.100.5/32 0.0.0.0 1 ~ +10.6.100.18/32 0.0.0.0 0 A H +10.6.182.0/24 10.6.182.1 0 A C ae1.182 +10.6.182.1/32 0.0.0.0 0 A H +10.6.183.0/24 10.6.183.1 0 A C ae1.183 +10.6.183.1/32 0.0.0.0 0 A H +10.6.184.0/24 10.6.184.1 0 A C ae1.184 +10.6.184.1/32 0.0.0.0 0 A H +10.6.208.0/24 10.6.208.1 0 A C ae1.208 +10.6.208.1/32 0.0.0.0 0 A H +10.6.209.0/24 10.6.209.1 0 A C ae1.209 +10.6.209.1/32 0.0.0.0 0 A H +10.6.210.0/24 10.6.210.1 0 A C ae1.210 +10.6.210.1/32 0.0.0.0 0 A H +10.6.211.0/24 10.6.211.1 0 A C ae1.211 +10.6.211.1/32 0.0.0.0 0 A H +10.6.254.0/24 10.6.254.18 0 A C ae1.254 +10.6.254.18/32 0.0.0.0 0 A H +10.6.255.0/24 10.6.255.11 0 A C ae1.255 +10.6.255.11/32 0.0.0.0 0 A H +10.8.0.0/16 0.0.0.0 10 A S tunnel.30 +10.9.91.0/24 10.9.91.1 0 A C ae1.91 +10.9.91.1/32 0.0.0.0 0 A H +10.9.255.0/24 10.9.255.1 0 A C ae1.1010 +10.9.255.1/32 0.0.0.0 0 A H +10.250.1.0/24 0.0.0.0 10 A S tunnel.41 +169.254.40.184/30 169.254.40.186 0 A C tunnel.33 +169.254.40.186/32 0.0.0.0 0 A H +169.254.73.252/30 169.254.73.254 0 A C tunnel.43 +169.254.73.254/32 0.0.0.0 0 A H +169.254.103.96/30 169.254.103.98 0 A C tunnel.32 +169.254.103.98/32 0.0.0.0 0 A H +169.254.130.156/30 169.254.130.158 0 A C tunnel.44 +169.254.130.158/32 0.0.0.0 0 A H +172.16.8.8/30 172.16.8.9 0 A C tunnel.1 +172.16.8.9/32 0.0.0.0 0 A H +172.20.17.0/30 172.20.17.1 0 A C tunnel.4 +172.20.17.1/32 0.0.0.0 0 A H +172.20.17.4/30 172.20.17.5 0 A C tunnel.8 +172.20.17.5/32 0.0.0.0 0 A H +172.20.17.8/30 172.20.17.9 0 A C tunnel.5 +172.20.17.9/32 0.0.0.0 0 A H +172.20.17.12/30 172.20.17.13 0 A C tunnel.7 +172.20.17.13/32 0.0.0.0 0 A H +172.20.17.20/30 172.20.17.21 0 A C tunnel.26 +172.20.17.21/32 0.0.0.0 0 A H +172.20.17.28/30 172.20.17.29 0 A C tunnel.3 +172.20.17.29/32 0.0.0.0 0 A H +172.20.17.36/30 172.20.17.37 0 A C tunnel.9 +172.20.17.37/32 0.0.0.0 0 A H +172.20.17.48/30 172.20.17.49 0 A C tunnel.14 +172.20.17.49/32 0.0.0.0 0 A H +172.20.17.52/30 172.20.17.53 0 A C tunnel.6 +172.20.17.53/32 0.0.0.0 0 A H +172.20.17.56/30 172.20.17.57 0 A C tunnel.16 +172.20.17.57/32 0.0.0.0 0 A H +172.20.17.60/30 172.20.17.61 0 A C tunnel.17 +172.20.17.61/32 0.0.0.0 0 A H +172.20.17.72/30 172.20.17.73 0 A C tunnel.20 +172.20.17.73/32 0.0.0.0 0 A H +172.20.17.76/30 172.20.17.77 0 A C tunnel.21 +172.20.17.77/32 0.0.0.0 0 A H +172.20.17.88/30 172.20.17.89 0 A C tunnel.24 +172.20.17.89/32 0.0.0.0 0 A H +172.20.17.96/30 172.20.17.97 0 A C tunnel.27 +172.20.17.97/32 0.0.0.0 0 A H +172.20.17.100/30 172.20.17.101 0 A C tunnel.28 +172.20.17.101/32 0.0.0.0 0 A H +172.20.17.112/30 172.20.17.113 0 A C tunnel.35 +172.20.17.113/32 0.0.0.0 0 A H +172.20.17.116/30 172.20.17.117 0 A C tunnel.36 +172.20.17.117/32 0.0.0.0 0 A H +172.21.0.0/23 0.0.0.0 10 A S tunnel.30 +198.18.24.0/24 198.18.24.1 0 A C ae1.72 +198.18.24.1/32 0.0.0.0 0 A H +198.18.25.0/27 198.18.25.1 0 A C ae1.70 +198.18.25.1/32 0.0.0.0 0 A H +198.18.25.32/27 198.18.25.33 0 A C ae1.71 +198.18.25.33/32 0.0.0.0 0 A H +198.18.25.128/25 198.18.25.129 0 A C ae1.73 +198.18.25.129/32 0.0.0.0 0 A H +198.18.27.240/28 198.18.27.244 0 A C ethernet1/15 +198.18.27.244/32 0.0.0.0 0 A H +::/0 2001:db8:0:1::1 10 A S ethernet1/15 +2001:db8:0:1::/124 2001:db8:0:1::4 0 A C ethernet1/15 +2001:db8:0:1::4/128 :: 0 A H +2001:db8:1:1::2/128 :: 0 A H +2001:db8:1:1::3/128 :: 0 A H +2001:db8:1:69::/64 2001:db8:1:69:: 0 A C ae1.69 +2001:db8:1:69::/128 :: 0 A H +2001:db8:1:73::/64 2001:db8:1:73::1 0 A C ae1.73 +2001:db8:1:73::1/128 :: 0 A H +total routes shown: 116 + +VIRTUAL ROUTER: blackhole (id 2) + ========== +destination nexthop metric flags age interface next-AS +total routes shown: 0 diff --git a/tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route2.yml b/tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route2.yml new file mode 100644 index 0000000000..d53bbfb083 --- /dev/null +++ b/tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route2.yml @@ -0,0 +1,930 @@ +--- +parsed_sample: + - age: "" + flags: "A S" + metric: "10" + network: "0.0.0.0" + next_as: "" + nexthop_if: "ethernet1/15" + nexthop_ip: "198.18.27.241" + prefix_length: "0" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.15.0" + next_as: "" + nexthop_if: "ae1.15" + nexthop_ip: "10.6.15.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.15.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.16.0" + next_as: "" + nexthop_if: "ae1.16" + nexthop_ip: "10.6.16.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.16.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.51.0" + next_as: "" + nexthop_if: "ae1.51" + nexthop_ip: "10.6.51.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.51.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.52.0" + next_as: "" + nexthop_if: "ae1.52" + nexthop_ip: "10.6.52.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.52.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.69.0" + next_as: "" + nexthop_if: "ae1.69" + nexthop_ip: "10.6.69.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.69.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.80.0" + next_as: "" + nexthop_if: "ae1.80" + nexthop_ip: "10.6.80.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.80.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.81.0" + next_as: "" + nexthop_if: "ae1.81" + nexthop_ip: "10.6.81.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.81.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.82.0" + next_as: "" + nexthop_if: "ae1.82" + nexthop_ip: "10.6.82.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.82.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.100.2" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "~" + metric: "1" + network: "10.6.100.2" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.100.3" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "~" + metric: "1" + network: "10.6.100.3" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.100.4" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "~" + metric: "1" + network: "10.6.100.4" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.100.5" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "~" + metric: "1" + network: "10.6.100.5" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.100.18" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.182.0" + next_as: "" + nexthop_if: "ae1.182" + nexthop_ip: "10.6.182.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.182.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.183.0" + next_as: "" + nexthop_if: "ae1.183" + nexthop_ip: "10.6.183.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.183.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.184.0" + next_as: "" + nexthop_if: "ae1.184" + nexthop_ip: "10.6.184.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.184.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.208.0" + next_as: "" + nexthop_if: "ae1.208" + nexthop_ip: "10.6.208.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.208.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.209.0" + next_as: "" + nexthop_if: "ae1.209" + nexthop_ip: "10.6.209.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.209.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.210.0" + next_as: "" + nexthop_if: "ae1.210" + nexthop_ip: "10.6.210.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.210.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.211.0" + next_as: "" + nexthop_if: "ae1.211" + nexthop_ip: "10.6.211.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.211.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.254.0" + next_as: "" + nexthop_if: "ae1.254" + nexthop_ip: "10.6.254.18" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.254.18" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.6.255.0" + next_as: "" + nexthop_if: "ae1.255" + nexthop_ip: "10.6.255.11" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.6.255.11" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A S" + metric: "10" + network: "10.8.0.0" + next_as: "" + nexthop_if: "tunnel.30" + nexthop_ip: "0.0.0.0" + prefix_length: "16" + - age: "" + flags: "A C" + metric: "0" + network: "10.9.91.0" + next_as: "" + nexthop_if: "ae1.91" + nexthop_ip: "10.9.91.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.9.91.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "10.9.255.0" + next_as: "" + nexthop_if: "ae1.1010" + nexthop_ip: "10.9.255.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "10.9.255.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A S" + metric: "10" + network: "10.250.1.0" + next_as: "" + nexthop_if: "tunnel.41" + nexthop_ip: "0.0.0.0" + prefix_length: "24" + - age: "" + flags: "A C" + metric: "0" + network: "169.254.40.184" + next_as: "" + nexthop_if: "tunnel.33" + nexthop_ip: "169.254.40.186" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "169.254.40.186" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "169.254.73.252" + next_as: "" + nexthop_if: "tunnel.43" + nexthop_ip: "169.254.73.254" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "169.254.73.254" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "169.254.103.96" + next_as: "" + nexthop_if: "tunnel.32" + nexthop_ip: "169.254.103.98" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "169.254.103.98" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "169.254.130.156" + next_as: "" + nexthop_if: "tunnel.44" + nexthop_ip: "169.254.130.158" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "169.254.130.158" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.16.8.8" + next_as: "" + nexthop_if: "tunnel.1" + nexthop_ip: "172.16.8.9" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.16.8.9" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.0" + next_as: "" + nexthop_if: "tunnel.4" + nexthop_ip: "172.20.17.1" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.4" + next_as: "" + nexthop_if: "tunnel.8" + nexthop_ip: "172.20.17.5" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.5" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.8" + next_as: "" + nexthop_if: "tunnel.5" + nexthop_ip: "172.20.17.9" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.9" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.12" + next_as: "" + nexthop_if: "tunnel.7" + nexthop_ip: "172.20.17.13" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.13" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.20" + next_as: "" + nexthop_if: "tunnel.26" + nexthop_ip: "172.20.17.21" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.21" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.28" + next_as: "" + nexthop_if: "tunnel.3" + nexthop_ip: "172.20.17.29" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.29" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.36" + next_as: "" + nexthop_if: "tunnel.9" + nexthop_ip: "172.20.17.37" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.37" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.48" + next_as: "" + nexthop_if: "tunnel.14" + nexthop_ip: "172.20.17.49" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.49" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.52" + next_as: "" + nexthop_if: "tunnel.6" + nexthop_ip: "172.20.17.53" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.53" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.56" + next_as: "" + nexthop_if: "tunnel.16" + nexthop_ip: "172.20.17.57" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.57" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.60" + next_as: "" + nexthop_if: "tunnel.17" + nexthop_ip: "172.20.17.61" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.61" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.72" + next_as: "" + nexthop_if: "tunnel.20" + nexthop_ip: "172.20.17.73" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.73" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.76" + next_as: "" + nexthop_if: "tunnel.21" + nexthop_ip: "172.20.17.77" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.77" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.88" + next_as: "" + nexthop_if: "tunnel.24" + nexthop_ip: "172.20.17.89" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.89" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.96" + next_as: "" + nexthop_if: "tunnel.27" + nexthop_ip: "172.20.17.97" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.97" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.100" + next_as: "" + nexthop_if: "tunnel.28" + nexthop_ip: "172.20.17.101" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.101" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.112" + next_as: "" + nexthop_if: "tunnel.35" + nexthop_ip: "172.20.17.113" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.113" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "172.20.17.116" + next_as: "" + nexthop_if: "tunnel.36" + nexthop_ip: "172.20.17.117" + prefix_length: "30" + - age: "" + flags: "A H" + metric: "0" + network: "172.20.17.117" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A S" + metric: "10" + network: "172.21.0.0" + next_as: "" + nexthop_if: "tunnel.30" + nexthop_ip: "0.0.0.0" + prefix_length: "23" + - age: "" + flags: "A C" + metric: "0" + network: "198.18.24.0" + next_as: "" + nexthop_if: "ae1.72" + nexthop_ip: "198.18.24.1" + prefix_length: "24" + - age: "" + flags: "A H" + metric: "0" + network: "198.18.24.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "198.18.25.0" + next_as: "" + nexthop_if: "ae1.70" + nexthop_ip: "198.18.25.1" + prefix_length: "27" + - age: "" + flags: "A H" + metric: "0" + network: "198.18.25.1" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "198.18.25.32" + next_as: "" + nexthop_if: "ae1.71" + nexthop_ip: "198.18.25.33" + prefix_length: "27" + - age: "" + flags: "A H" + metric: "0" + network: "198.18.25.33" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "198.18.25.128" + next_as: "" + nexthop_if: "ae1.73" + nexthop_ip: "198.18.25.129" + prefix_length: "25" + - age: "" + flags: "A H" + metric: "0" + network: "198.18.25.129" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A C" + metric: "0" + network: "198.18.27.240" + next_as: "" + nexthop_if: "ethernet1/15" + nexthop_ip: "198.18.27.244" + prefix_length: "28" + - age: "" + flags: "A H" + metric: "0" + network: "198.18.27.244" + next_as: "" + nexthop_if: "" + nexthop_ip: "0.0.0.0" + prefix_length: "32" + - age: "" + flags: "A S" + metric: "10" + network: "::" + next_as: "" + nexthop_if: "ethernet1/15" + nexthop_ip: "2001:db8:0:1::1" + prefix_length: "0" + - age: "" + flags: "A C" + metric: "0" + network: "2001:db8:0:1::" + next_as: "" + nexthop_if: "ethernet1/15" + nexthop_ip: "2001:db8:0:1::4" + prefix_length: "124" + - age: "" + flags: "A H" + metric: "0" + network: "2001:db8:0:1::4" + next_as: "" + nexthop_if: "" + nexthop_ip: "::" + prefix_length: "128" + - age: "" + flags: "A H" + metric: "0" + network: "2001:db8:1:1::2" + next_as: "" + nexthop_if: "" + nexthop_ip: "::" + prefix_length: "128" + - age: "" + flags: "A H" + metric: "0" + network: "2001:db8:1:1::3" + next_as: "" + nexthop_if: "" + nexthop_ip: "::" + prefix_length: "128" + - age: "" + flags: "A C" + metric: "0" + network: "2001:db8:1:69::" + next_as: "" + nexthop_if: "ae1.69" + nexthop_ip: "2001:db8:1:69::" + prefix_length: "64" + - age: "" + flags: "A H" + metric: "0" + network: "2001:db8:1:69::" + next_as: "" + nexthop_if: "" + nexthop_ip: "::" + prefix_length: "128" + - age: "" + flags: "A C" + metric: "0" + network: "2001:db8:1:73::" + next_as: "" + nexthop_if: "ae1.73" + nexthop_ip: "2001:db8:1:73::1" + prefix_length: "64" + - age: "" + flags: "A H" + metric: "0" + network: "2001:db8:1:73::1" + next_as: "" + nexthop_if: "" + nexthop_ip: "::" + prefix_length: "128" From 5e606b93db5a995d311686894086cf70b0412fbb Mon Sep 17 00:00:00 2001 From: Olof Lundgren <28050577+lundgrenolof@users.noreply.github.com> Date: Fri, 20 Mar 2026 16:16:47 +0100 Subject: [PATCH 2/6] Fix palo alto panos show routing route flags --- .../paloalto_panos_show_routing_route.textfsm | 10 +++- .../paloalto_panos_show_routing_route3.raw | 13 +++++ .../paloalto_panos_show_routing_route3.yml | 50 +++++++++++++++++++ 3 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route3.raw create mode 100644 tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route3.yml diff --git a/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm b/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm index 5be1021902..050abece55 100644 --- a/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm +++ b/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm @@ -2,7 +2,7 @@ Value NETWORK ([^/\s]+) Value PREFIX_LENGTH (\d{1,3}) Value NEXTHOP_IP (\S+) Value METRIC (\d*|) -Value FLAGS ((?:A|C|H|S|~|R|O|B|Oi|Oo|O1|O2|E|M)(?:[\s?]+(?:A|C|H|S|~|R|O|B|Oi|Oo|O1|O2|E|M))?) +Value FLAGS ((?:\?|Oi|Oo|O1|O2|A|C|H|S|~|R|O|B|E|M)(?:\s*(?:\?|Oi|Oo|O1|O2|A|C|H|S|~|R|O|B|E|M))*) Value AGE (\d*|) Value NEXTHOP_IF ([a-zA-Z][a-zA-Z0-9_/.\-]*|) Value NEXT_AS (\d*|) @@ -13,7 +13,13 @@ Start ^VIRTUAL\s+ROUTER:.* ^\s*==+ ^destination\s+nexthop\s+metric\s+flags\s+age\s+interface\s+next-AS - ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${AGE}\s+${NEXTHOP_IF}\s+${NEXT_AS} -> Record + ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${AGE}\s+${NEXTHOP_IF}\s+${NEXT_AS}\s*$$ -> Record + ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${AGE}\s+${NEXT_AS}\s*$$ -> Record + ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${AGE}\s+${NEXTHOP_IF}\s*$$ -> Record + ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${NEXTHOP_IF}\s+${NEXT_AS}\s*$$ -> Record + ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${NEXTHOP_IF}\s*$$ -> Record + ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${AGE}\s*$$ -> Record + ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s*$$ -> Record ^total\s+routes\s+shown:.* -> End ^\s*$$ ^. -> Error diff --git a/tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route3.raw b/tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route3.raw new file mode 100644 index 0000000000..063ac52de3 --- /dev/null +++ b/tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route3.raw @@ -0,0 +1,13 @@ +flags: A:active, ?:loose, C:connect, H:host, S:static, ~:internal, R:rip, O:ospf, B:bgp, + Oi:ospf intra-area, Oo:ospf inter-area, O1:ospf ext-type-1, O2:ospf ext-type-2, E:ecmp, M:multicast + +VIRTUAL ROUTER: default (id 1) + ========== +destination nexthop metric flags age interface next-AS +10.7.4.0/24 172.20.17.118 A?B 3509239 65201 +10.7.7.0/24 10.6.255.25 10 A O2 3474418 ae1.255 +10.8.0.0/16 0.0.0.0 10 A S tunnel.30 +10.9.1.0/24 10.6.100.16 0 ?B 1030201 0 +10.9.1.0/24 10.6.255.16 50 A Oi 1030301 ae1.255 +10.9.4.0/24 10.6.100.16 0 ?B 1030201 0 +total routes shown: 6 diff --git a/tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route3.yml b/tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route3.yml new file mode 100644 index 0000000000..2c216d0512 --- /dev/null +++ b/tests/paloalto_panos/show_routing_route/paloalto_panos_show_routing_route3.yml @@ -0,0 +1,50 @@ +--- +parsed_sample: + - age: "3509239" + flags: "A?B" + metric: "" + network: "10.7.4.0" + next_as: "65201" + nexthop_if: "" + nexthop_ip: "172.20.17.118" + prefix_length: "24" + - age: "3474418" + flags: "A O2" + metric: "10" + network: "10.7.7.0" + next_as: "" + nexthop_if: "ae1.255" + nexthop_ip: "10.6.255.25" + prefix_length: "24" + - age: "" + flags: "A S" + metric: "10" + network: "10.8.0.0" + next_as: "" + nexthop_if: "tunnel.30" + nexthop_ip: "0.0.0.0" + prefix_length: "16" + - age: "1030201" + flags: "?B" + metric: "0" + network: "10.9.1.0" + next_as: "0" + nexthop_if: "" + nexthop_ip: "10.6.100.16" + prefix_length: "24" + - age: "1030301" + flags: "A Oi" + metric: "50" + network: "10.9.1.0" + next_as: "" + nexthop_if: "ae1.255" + nexthop_ip: "10.6.255.16" + prefix_length: "24" + - age: "1030201" + flags: "?B" + metric: "0" + network: "10.9.4.0" + next_as: "0" + nexthop_if: "" + nexthop_ip: "10.6.100.16" + prefix_length: "24" From 566202a326e8351516611bd1c4d348131013bc14 Mon Sep 17 00:00:00 2001 From: Olof Lundgren <28050577+lundgrenolof@users.noreply.github.com> Date: Fri, 20 Mar 2026 16:31:26 +0100 Subject: [PATCH 3/6] Palo alto panos show routing route: removed checks that doesnt exist. --- .../templates/paloalto_panos_show_routing_route.textfsm | 2 -- 1 file changed, 2 deletions(-) diff --git a/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm b/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm index 050abece55..f2cb91907f 100644 --- a/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm +++ b/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm @@ -16,9 +16,7 @@ Start ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${AGE}\s+${NEXTHOP_IF}\s+${NEXT_AS}\s*$$ -> Record ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${AGE}\s+${NEXT_AS}\s*$$ -> Record ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${AGE}\s+${NEXTHOP_IF}\s*$$ -> Record - ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${NEXTHOP_IF}\s+${NEXT_AS}\s*$$ -> Record ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${NEXTHOP_IF}\s*$$ -> Record - ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${AGE}\s*$$ -> Record ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s*$$ -> Record ^total\s+routes\s+shown:.* -> End ^\s*$$ From abbf3f9f8dea275f7a353be0e6ad75ca0b8bad13 Mon Sep 17 00:00:00 2001 From: Michael Bear <38406045+mjbear@users.noreply.github.com> Date: Mon, 30 Mar 2026 20:39:35 -0400 Subject: [PATCH 4/6] Consolidate the OSPF related flags regex --- .../templates/paloalto_panos_show_routing_route.textfsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm b/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm index f2cb91907f..6865ecf2cf 100644 --- a/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm +++ b/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm @@ -2,7 +2,7 @@ Value NETWORK ([^/\s]+) Value PREFIX_LENGTH (\d{1,3}) Value NEXTHOP_IP (\S+) Value METRIC (\d*|) -Value FLAGS ((?:\?|Oi|Oo|O1|O2|A|C|H|S|~|R|O|B|E|M)(?:\s*(?:\?|Oi|Oo|O1|O2|A|C|H|S|~|R|O|B|E|M))*) +Value FLAGS ((?:\?|A|C|H|S|~|R|O[io12]?|B|E|M)(?:\s*(?:\?|A|C|H|S|~|R|O[io12]?|B|E|M))*) Value AGE (\d*|) Value NEXTHOP_IF ([a-zA-Z][a-zA-Z0-9_/.\-]*|) Value NEXT_AS (\d*|) From 9afe91aada1f77b9bbcf244e9b517ef9d296ed34 Mon Sep 17 00:00:00 2001 From: Michael Bear <38406045+mjbear@users.noreply.github.com> Date: Mon, 30 Mar 2026 20:47:10 -0400 Subject: [PATCH 5/6] Consolidate the flags regex further Use pattern repetition to consolidate the flags regex further. From the test data there can be up to three flag characters. The white space regex is made non-greedy so it does not capture a bunch of trailing white space. --- .../templates/paloalto_panos_show_routing_route.textfsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm b/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm index 6865ecf2cf..ba14bd5390 100644 --- a/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm +++ b/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm @@ -2,7 +2,7 @@ Value NETWORK ([^/\s]+) Value PREFIX_LENGTH (\d{1,3}) Value NEXTHOP_IP (\S+) Value METRIC (\d*|) -Value FLAGS ((?:\?|A|C|H|S|~|R|O[io12]?|B|E|M)(?:\s*(?:\?|A|C|H|S|~|R|O[io12]?|B|E|M))*) +Value FLAGS (((?:\?|A|C|H|S|~|R|O[io12]?|B|E|M)\s*?)+) Value AGE (\d*|) Value NEXTHOP_IF ([a-zA-Z][a-zA-Z0-9_/.\-]*|) Value NEXT_AS (\d*|) From 6cb9113f67b9445c7369cd53acac7e1eb7785264 Mon Sep 17 00:00:00 2001 From: Michael Bear <38406045+mjbear@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:12:17 -0400 Subject: [PATCH 6/6] Change multiple regex ending in pipe symbol The regex is a bit odd that it ends in a pipe symbol with no other characters on the other side of the pipe (boolean or). Change regex for: - metric - age - nexthop_if - next_as --- .../paloalto_panos_show_routing_route.textfsm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm b/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm index ba14bd5390..3246558b66 100644 --- a/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm +++ b/ntc_templates/templates/paloalto_panos_show_routing_route.textfsm @@ -1,11 +1,11 @@ Value NETWORK ([^/\s]+) Value PREFIX_LENGTH (\d{1,3}) Value NEXTHOP_IP (\S+) -Value METRIC (\d*|) +Value METRIC (\d+) Value FLAGS (((?:\?|A|C|H|S|~|R|O[io12]?|B|E|M)\s*?)+) -Value AGE (\d*|) -Value NEXTHOP_IF ([a-zA-Z][a-zA-Z0-9_/.\-]*|) -Value NEXT_AS (\d*|) +Value AGE (\d+) +Value NEXTHOP_IF ([a-zA-Z][a-zA-Z0-9_/.\-]+) +Value NEXT_AS (\d+) Start ^\s*flags:\s+A:active,\s+\?:loose,\s+C:connect,\s+H:host,\s+S:static,\s+~:internal,\s+R:rip,\s+O:ospf,\s+B:bgp, @@ -13,11 +13,11 @@ Start ^VIRTUAL\s+ROUTER:.* ^\s*==+ ^destination\s+nexthop\s+metric\s+flags\s+age\s+interface\s+next-AS - ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${AGE}\s+${NEXTHOP_IF}\s+${NEXT_AS}\s*$$ -> Record - ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${AGE}\s+${NEXT_AS}\s*$$ -> Record - ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${AGE}\s+${NEXTHOP_IF}\s*$$ -> Record - ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s+${NEXTHOP_IF}\s*$$ -> Record - ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}\s+${FLAGS}\s*$$ -> Record + ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}?\s+${FLAGS}\s+${AGE}?\s+${NEXTHOP_IF}?\s+${NEXT_AS}?\s*$$ -> Record + ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}?\s+${FLAGS}\s+${AGE}?\s+${NEXT_AS}?\s*$$ -> Record + ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}?\s+${FLAGS}\s+${AGE}?\s+${NEXTHOP_IF}?\s*$$ -> Record + ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}?\s+${FLAGS}\s+${NEXTHOP_IF}?\s*$$ -> Record + ^\s*${NETWORK}/${PREFIX_LENGTH}\s+${NEXTHOP_IP}\s+${METRIC}?\s+${FLAGS}\s*$$ -> Record ^total\s+routes\s+shown:.* -> End ^\s*$$ ^. -> Error