From 196833a3c598870b7d2c72dda4bb265a19ef2eb2 Mon Sep 17 00:00:00 2001 From: Mikhail Yohman Date: Sun, 3 May 2020 08:34:52 -0600 Subject: [PATCH] Account for VRF info within routing table --- templates/cisco_ios_show_ip_bgp.textfsm | 2 + .../show_ip_bgp/cisco_ios_show_ip_bgp_vpn.raw | 16 ++++++ .../show_ip_bgp/cisco_ios_show_ip_bgp_vpn.yml | 52 +++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 tests/cisco_ios/show_ip_bgp/cisco_ios_show_ip_bgp_vpn.raw create mode 100644 tests/cisco_ios/show_ip_bgp/cisco_ios_show_ip_bgp_vpn.yml diff --git a/templates/cisco_ios_show_ip_bgp.textfsm b/templates/cisco_ios_show_ip_bgp.textfsm index 2c0c9085c2..2c90dda23a 100644 --- a/templates/cisco_ios_show_ip_bgp.textfsm +++ b/templates/cisco_ios_show_ip_bgp.textfsm @@ -17,6 +17,8 @@ Start ^Time\s+source\s+is Bgp_table + # Account for show ip bgp vpnv4 vrf command + ^Route\s+Distinguisher # # # Match if subnet is 17,18 characters long, creates two lines diff --git a/tests/cisco_ios/show_ip_bgp/cisco_ios_show_ip_bgp_vpn.raw b/tests/cisco_ios/show_ip_bgp/cisco_ios_show_ip_bgp_vpn.raw new file mode 100644 index 0000000000..41ba1baf3e --- /dev/null +++ b/tests/cisco_ios/show_ip_bgp/cisco_ios_show_ip_bgp_vpn.raw @@ -0,0 +1,16 @@ +BGP table version is 17, local router ID is 1.1.1.1 +Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, + r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, + x best-external, a additional-path, c RIB-compressed, +Origin codes: i - IGP, e - EGP, ? - incomplete +RPKI validation codes: V valid, I invalid, N Not found + + Network Next Hop Metric LocPrf Weight Path +Route Distinguisher: 100:100 (default for vrf part) + *> 11.11.11.11/32 0.0.0.0 0 32768 i + *> 11.11.11.12/32 0.0.0.0 0 32768 i + *> 11.11.11.13/32 0.0.0.0 0 32768 i + *> 11.11.11.14/32 0.0.0.0 0 32768 i + *> 11.11.11.15/32 0.0.0.0 0 32768 i + +Total number of prefixes 5 diff --git a/tests/cisco_ios/show_ip_bgp/cisco_ios_show_ip_bgp_vpn.yml b/tests/cisco_ios/show_ip_bgp/cisco_ios_show_ip_bgp_vpn.yml new file mode 100644 index 0000000000..cf106d8dad --- /dev/null +++ b/tests/cisco_ios/show_ip_bgp/cisco_ios_show_ip_bgp_vpn.yml @@ -0,0 +1,52 @@ +--- +parsed_sample: + - status: "*" + path_selection: ">" + route_source: " " + network: "11.11.11.11/32" + next_hop: "0.0.0.0" + metric: "0" + local_pref: "" + weight: "32768" + as_path: "" + origin: "i" + - status: "*" + path_selection: ">" + route_source: " " + network: "11.11.11.12/32" + next_hop: "0.0.0.0" + metric: "0" + local_pref: "" + weight: "32768" + as_path: "" + origin: "i" + - status: "*" + path_selection: ">" + route_source: " " + network: "11.11.11.13/32" + next_hop: "0.0.0.0" + metric: "0" + local_pref: "" + weight: "32768" + as_path: "" + origin: "i" + - status: "*" + path_selection: ">" + route_source: " " + network: "11.11.11.14/32" + next_hop: "0.0.0.0" + metric: "0" + local_pref: "" + weight: "32768" + as_path: "" + origin: "i" + - status: "*" + path_selection: ">" + route_source: " " + network: "11.11.11.15/32" + next_hop: "0.0.0.0" + metric: "0" + local_pref: "" + weight: "32768" + as_path: "" + origin: "i"