Skip to content

Commit

Permalink
BugFix: IOS - show_ip_bgp - Account for VRF info within routing table (
Browse files Browse the repository at this point in the history
  • Loading branch information
FragmentedPacket authored May 19, 2020
1 parent 73cabea commit 881d5e4
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/cisco_ios_show_ip_bgp.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions tests/cisco_ios/show_ip_bgp/cisco_ios_show_ip_bgp_vpn.raw
Original file line number Diff line number Diff line change
@@ -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
52 changes: 52 additions & 0 deletions tests/cisco_ios/show_ip_bgp/cisco_ios_show_ip_bgp_vpn.yml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 881d5e4

Please sign in to comment.