Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add cisco_ios_show_ip_route_summary #635

Merged
merged 3 commits into from Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 34 additions & 0 deletions templates/cisco_ios_show_ip_route_summary.textfsm
@@ -0,0 +1,34 @@
Value Required ROUTE_SOURCE ([^\s][\S ]+?)
Value Filldown NAME (.*)
Value NETWORKS (\d*)
Value SUBNETS (\d*)
Value REPLICATES (\d*)
Value OVERHEAD (\d*)
Value MEMORY (\d*)

Start
# Checking for header
^IP\s+routing\s+table\s+name\s+is\s+${NAME}\s*$$
^IP\s+routing\s+table\s+maximum-paths\s+is\s+\d+\s*$$
^Route\s+Source\s+Networks\s+Subnets\s+Overhead\s+Memory\s+\(bytes\)\s*$$ -> RouteData1
^Route\s+Source\s+Networks\s+Subnets\s+Replicates\s+Overhead\s+Memory\s+\(bytes\)\s*$$ -> RouteData2
^\s*$$
^. -> Error

RouteData1
^${ROUTE_SOURCE}\s{2,16}${NETWORKS}\s{1,12}${SUBNETS}\s{1,12}${OVERHEAD}\s{1,12}${MEMORY}\s*$$ -> Record
^\s+External:\s+\d+\s+Internal:\s+\d+\s+Local:\s+\d+\s*$$
^\s+Level\s+1:\s+\d+\s+Level\s+2:\s+\d+\s+Inter-area:\s+\d+\s*$$
^\s+Intra-area:\s+\d+\s+Inter-area:\s+\d+\s+External-1:\s+\d+\s+External-2:\s+\d+\s*$$
^\s+NSSA\s+External-1:\s+\d+\s+NSSA\s+External-2:\s+\d+\s*$$
^\s*$$
^. -> Error

RouteData2
^${ROUTE_SOURCE}\s{2,16}${NETWORKS}\s{1,12}${SUBNETS}\s{1,12}${REPLICATES}\s{1,12}${OVERHEAD}\s{1,12}${MEMORY}\s*$$ -> Record
^\s+External:\s+\d+\s+Internal:\s+\d+\s+Local:\s+\d+\s*$$
^\s+Level\s+1:\s+\d+\s+Level\s+2:\s+\d+\s+Inter-area:\s+\d+\s*$$
^\s+Intra-area:\s+\d+\s+Inter-area:\s+\d+\s+External-1:\s+\d+\s+External-2:\s+\d+\s*$$
^\s+NSSA\s+External-1:\s+\d+\s+NSSA\s+External-2:\s+\d+\s*$$
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions templates/index
Expand Up @@ -165,6 +165,7 @@ cisco_ios_show_mac-address-table.textfsm, .*, cisco_ios, sh[[ow]] mac[[-address-
cisco_ios_show_ip_bgp_neighbors.textfsm, .*, cisco_ios, sh[[ow]] ip bgp nei[[ghbors]]
cisco_ios_show_ip_ospf_database.textfsm, .*, cisco_ios, sh[[ow]] ip ospf data[[base]]
cisco_ios_show_ip_ospf_neighbor.textfsm, .*, cisco_ios, sh[[ow]] ip ospf nei[[ghbor]]
cisco_ios_show_ip_route_summary.textfsm, .*, cisco_ios, sh[[ow]] ip ro[[ute]] sum[[mary]]
cisco_ios_show_ip_access-lists.textfsm, .*, cisco_ios, sh[[ow]] ip acce[[ss-lists]]
cisco_ios_show_mpls_interfaces.textfsm, .*, cisco_ios, sh[[ow]] mpls interfa[[ces]]
cisco_ios_show_power_available.textfsm, .*, cisco_ios, sh[[ow]] pow[[er]] a[[vailable]]
Expand Down
@@ -0,0 +1,13 @@
IP routing table name is default (0x0)
IP routing table maximum-paths is 32
Route Source Networks Subnets Replicates Overhead Memory (bytes)
connected 0 41 0 3936 11808
static 0 3 0 288 864
application 0 0 0 0 0
nhrp 0 0 0 0 0
eigrp 65329 3 3013 0 481920 868608
ospf 20 1 0 0 384 292
Intra-area: 0 Inter-area: 0 External-1: 0 External-2: 1
NSSA External-1: 0 NSSA External-2: 0
internal 24 240672
Total 28 3057 0 486528 1122244
@@ -0,0 +1,58 @@
---
parsed_sample:
- route_source: "connected"
name: "default (0x0)"
networks: "0"
subnets: "41"
replicates: "0"
overhead: "3936"
memory: "11808"
- route_source: "static"
name: "default (0x0)"
networks: "0"
subnets: "3"
replicates: "0"
overhead: "288"
memory: "864"
- route_source: "application"
name: "default (0x0)"
networks: "0"
subnets: "0"
replicates: "0"
overhead: "0"
memory: "0"
- route_source: "nhrp"
name: "default (0x0)"
networks: "0"
subnets: "0"
replicates: "0"
overhead: "0"
memory: "0"
- route_source: "eigrp 65329"
name: "default (0x0)"
networks: "3"
subnets: "3013"
replicates: "0"
overhead: "481920"
memory: "868608"
- route_source: "ospf 20"
name: "default (0x0)"
networks: "1"
subnets: "0"
replicates: "0"
overhead: "384"
memory: "292"
- route_source: "internal"
name: "default (0x0)"
networks: "24"
subnets: ""
replicates: ""
overhead: ""
memory: "240672"
- route_source: "Total"
name: "default (0x0)"
networks: "28"
subnets: "3057"
replicates: "0"
overhead: "486528"
memory: "1122244"
@@ -0,0 +1,14 @@
Route Source Networks Subnets Replicates Overhead Memory (bytes)
connected 0 6 0 408 1080
static 0 0 0 0 0
application 0 0 0 0 0
eigrp 100 0 0 0 0 0
bgp 65001 0 0 0 0 0
External: 0 Internal: 0 Local: 0
isis test1 0 0 0 0 0
Level 1: 0 Level 2: 0 Inter-area: 0
ospf 188 0 0 0 0 0
Intra-area: 0 Inter-area: 0 External-1: 0 External-2: 0
NSSA External-1: 0 NSSA External-2: 0
internal 2 920
Total 2 6 0 408 2000
@@ -0,0 +1,65 @@
---
parsed_sample:
- route_source: "connected"
name: ""
networks: "0"
subnets: "6"
replicates: "0"
overhead: "408"
memory: "1080"
- route_source: "static"
name: ""
networks: "0"
subnets: "0"
replicates: "0"
overhead: "0"
memory: "0"
- route_source: "application"
name: ""
networks: "0"
subnets: "0"
replicates: "0"
overhead: "0"
memory: "0"
- route_source: "eigrp 100"
name: ""
networks: "0"
subnets: "0"
replicates: "0"
overhead: "0"
memory: "0"
- route_source: "bgp 65001"
name: ""
networks: "0"
subnets: "0"
replicates: "0"
overhead: "0"
memory: "0"
- route_source: "isis test1"
name: ""
networks: "0"
subnets: "0"
replicates: "0"
overhead: "0"
memory: "0"
- route_source: "ospf 188"
name: ""
networks: "0"
subnets: "0"
replicates: "0"
overhead: "0"
memory: "0"
- route_source: "internal"
name: ""
networks: "2"
subnets: ""
replicates: ""
overhead: ""
memory: "920"
- route_source: "Total"
name: ""
networks: "2"
subnets: "6"
replicates: "0"
overhead: "408"
memory: "2000"
@@ -0,0 +1,7 @@
IP routing table name is Default-IP-Routing-Table(0)
IP routing table maximum-paths is 16
Route Source Networks Subnets Overhead Memory (bytes)
connected 0 4 288 544
static 1 2 216 408
internal 3 3468
Total 4 6 504 4420
@@ -0,0 +1,30 @@
---
parsed_sample:
- route_source: "connected"
name: "Default-IP-Routing-Table(0)"
networks: "0"
subnets: "4"
replicates: ""
overhead: "288"
memory: "544"
- route_source: "static"
name: "Default-IP-Routing-Table(0)"
networks: "1"
subnets: "2"
replicates: ""
overhead: "216"
memory: "408"
- route_source: "internal"
name: "Default-IP-Routing-Table(0)"
networks: "3"
subnets: ""
replicates: ""
overhead: ""
memory: "3468"
- route_source: "Total"
name: "Default-IP-Routing-Table(0)"
networks: "4"
subnets: "6"
replicates: ""
overhead: "504"
memory: "4420"