Skip to content

Commit

Permalink
BugFix: IOS - show ip bgp summary: Added new field ADDR_FAMILY for an…
Browse files Browse the repository at this point in the history
…y that may have an address family (#679)
  • Loading branch information
FragmentedPacket authored May 19, 2020
1 parent 5bb82ba commit 591c23e
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/cisco_ios_show_ip_bgp_summary.textfsm
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
Value Filldown,Required ROUTER_ID ([0-9a-f:\.]+)
Value Filldown LOCAL_AS (\d+)
Value Filldown ADDR_FAMILY (.+?)
Value BGP_NEIGH (\d+?\.\d+?\.\d+?\.\d+?)
Value NEIGH_AS (\d+)
Value UP_DOWN (\S+?)
Value STATE_PFXRCD (\S+?\s+\S+?|\S+?)

Start
^For\s+address\s+family:\s+${ADDR_FAMILY}$$
^BGP\s+router\s+identifier\s+${ROUTER_ID},\s+local\s+AS\s+number\s+${LOCAL_AS}\s*$$
^${BGP_NEIGH}\s+\S+\s+${NEIGH_AS}(\s+\d+?){5}\s+${UP_DOWN}\s+${STATE_PFXRCD}\s*$$ -> Record
# Capture time-stamp if vty line has command time-stamping turned on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,70 @@
parsed_sample:
- router_id: "10.0.0.0"
local_as: "65000"
addr_family: ""
bgp_neigh: "10.0.0.1"
neigh_as: "65000"
up_down: "3w0d"
state_pfxrcd: "558720"
- router_id: "10.0.0.0"
local_as: "65000"
addr_family: ""
bgp_neigh: "10.0.0.2"
neigh_as: "65001"
up_down: "3w0d"
state_pfxrcd: "558720"
- router_id: "10.0.0.0"
local_as: "65000"
addr_family: ""
bgp_neigh: "10.0.0.3"
neigh_as: "65002"
up_down: "1y10w"
state_pfxrcd: "0"
- router_id: "10.0.0.0"
local_as: "65000"
addr_family: ""
bgp_neigh: "10.0.0.4"
neigh_as: "65003"
up_down: "1y50w"
state_pfxrcd: "1351"
- router_id: "10.0.0.0"
local_as: "65000"
addr_family: ""
bgp_neigh: "10.0.0.5"
neigh_as: "65004"
up_down: "19w5d"
state_pfxrcd: "558720"
- router_id: "10.0.0.0"
local_as: "65000"
addr_family: ""
bgp_neigh: "10.0.0.6"
neigh_as: "65005"
up_down: "19w5d"
state_pfxrcd: "558720"
- router_id: "10.0.0.0"
local_as: "65000"
addr_family: ""
bgp_neigh: "10.0.0.7"
neigh_as: "65006"
up_down: "1y10w"
state_pfxrcd: "82"
- router_id: "10.0.0.0"
local_as: "65000"
addr_family: ""
bgp_neigh: "10.0.0.8"
neigh_as: "65007"
up_down: "1y10w"
state_pfxrcd: "82"
- router_id: "10.0.0.0"
local_as: "65000"
addr_family: ""
bgp_neigh: "10.0.0.9"
neigh_as: "65008"
up_down: "22w0d"
state_pfxrcd: "0"
- router_id: "10.0.0.0"
local_as: "65000"
addr_family: ""
bgp_neigh: "10.0.0.10"
neigh_as: "65009"
up_down: "1y10w"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
For address family: IPv4 Unicast
BGP router identifier 1.1.1.1, local AS number 65000
BGP table version is 9, main routing table version 9
8 network entries using 1152 bytes of memory
9 path entries using 720 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
2 BGP extended community entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2216 total bytes of memory
BGP activity 24/0 prefixes, 25/0 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.14.4 4 65001 26 27 9 0 0 00:20:06 7

For address family: VPNv4 Unicast
BGP router identifier 2.2.2.2, local AS number 65010
BGP table version is 17, main routing table version 17
16 network entries using 2496 bytes of memory
16 path entries using 1280 bytes of memory
4/3 BGP path/bestpath attribute entries using 576 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
2 BGP extended community entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 4424 total bytes of memory
BGP activity 24/0 prefixes, 25/0 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.10.13.3 4 65001 48 48 17 0 0 00:40:00 5
10.10.14.4 4 65001 0 0 1 0 0 never Idle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
parsed_sample:
- router_id: "1.1.1.1"
local_as: "65000"
addr_family: "IPv4 Unicast"
bgp_neigh: "10.0.14.4"
neigh_as: "65001"
up_down: "00:20:06"
state_pfxrcd: "7"
- router_id: "2.2.2.2"
local_as: "65010"
addr_family: "VPNv4 Unicast"
bgp_neigh: "10.10.13.3"
neigh_as: "65001"
up_down: "00:40:00"
state_pfxrcd: "5"
- router_id: "2.2.2.2"
local_as: "65010"
addr_family: "VPNv4 Unicast"
bgp_neigh: "10.10.14.4"
neigh_as: "65001"
up_down: "never"
state_pfxrcd: "Idle"

0 comments on commit 591c23e

Please # to comment.