Skip to content

Commit

Permalink
enhancement: cisco_ios_show_ip_eigrp_topology - Added source
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasbridge74 authored and FragmentedPacket committed Oct 7, 2019
1 parent 7fc09b6 commit ca10687
Show file tree
Hide file tree
Showing 4 changed files with 190 additions and 1 deletion.
6 changes: 5 additions & 1 deletion templates/cisco_ios_show_ip_eigrp_topology.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ Value Required CODE (\S+)
Value ROUTE (\d+\.\d+\.\d+\.\d+)
Value MASK (\d+)
Value SUCCESSORS (\d+)
Value FD (\d+)
Value FD (\d+|Inaccessible)
Value TAG (\d+)
Value List ADV_ROUTER (\d+\.\d+\.\d+\.\d+|\w+)
Value List OUT_INTERFACE (\S+)
Value SOURCE (R\S+)

Start
# Captures Process ID and Router ID
Expand All @@ -28,6 +29,8 @@ Start
Gateway
# This captures the advertising router and outgoing interface
^\s+via\s+${ADV_ROUTER},\s+${OUT_INTERFACE}
# This captures the scenarion where the route is injected via Redistribution.
^\s+via\s+${SOURCE}
# This will not capture anything but if it encounters another route, it will continue and record what it already captured
^\S+\s+(?:\d+(?:\.|)){4}/\d+,\s+\d+\s+successors -> Continue.Record
# These are the same as above and capture the next set of routes
Expand All @@ -44,3 +47,4 @@ Gateway
^\s*$$
# This will throw an error if there are no matches
^. -> Error

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ parsed_sample:
fd: "264448"
tag: ""
successors: "2"
source: ""

- router_id: "10.255.11.6"
code: "P"
Expand All @@ -22,6 +23,7 @@ parsed_sample:
fd: "1024"
tag: ""
successors: "1"
source: ""

- router_id: "10.255.11.6"
code: "P"
Expand All @@ -33,6 +35,7 @@ parsed_sample:
fd: "5632"
tag: "53471"
successors: "2"
source: ""

- router_id: "10.255.11.6"
code: "P"
Expand All @@ -44,6 +47,7 @@ parsed_sample:
fd: "130816"
tag: ""
successors: "1"
source: ""

- router_id: "10.255.11.6"
code: "P"
Expand All @@ -55,6 +59,7 @@ parsed_sample:
fd: "128768"
tag: ""
successors: "1"
source: ""

- router_id: "10.255.11.6"
code: "P"
Expand All @@ -66,6 +71,7 @@ parsed_sample:
fd: "768"
tag: ""
successors: "1"
source: ""

- router_id: "10.255.11.6"
code: "P"
Expand All @@ -77,3 +83,4 @@ parsed_sample:
fd: "128768"
tag: ""
successors: "4"
source: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
parsed_sample:

- router_id: "10.255.11.6"
code: "P"
out_interface: ['TenGigabitEthernet1/1', 'TenGigabitEthernet2/1']
route: "66.128.208.232"
mask: "32"
adv_router: ['10.254.11.9', '10.254.11.33']
process_id: "100"
fd: "264448"
tag: ""
successors: "2"
source: ""

- router_id: "10.255.11.6"
code: "P"
out_interface: ['Port-channel10']
route: "10.254.6.8"
mask: "30"
adv_router: ['10.254.6.14']
process_id: "100"
fd: "1024"
tag: ""
successors: "1"
source: ""

- router_id: "10.255.11.6"
code: "P"
out_interface: ['TenGigabitEthernet1/1', 'TenGigabitEthernet2/1']
route: "67.230.223.128"
mask: "28"
adv_router: ['10.254.11.9', '10.254.11.33']
process_id: "100"
fd: "5632"
tag: "53471"
successors: "2"
source: ""

- router_id: "10.255.11.6"
code: "P"
out_interface: ['GigabitEthernet9/29']
route: "10.255.10.5"
mask: "32"
adv_router: ['10.254.10.34']
process_id: "100"
fd: "130816"
tag: ""
successors: "1"
source: ""

- router_id: "10.255.11.6"
code: "P"
out_interface: ['Port-channel3']
route: "10.255.1.14"
mask: "32"
adv_router: ['10.254.1.34']
process_id: "100"
fd: "128768"
tag: ""
successors: "1"
source: ""

- router_id: "10.255.11.6"
code: "P"
out_interface: ['TenGigabitEthernet3/3']
route: "10.254.2.12"
mask: "30"
adv_router: ['10.254.2.22']
process_id: "100"
fd: "768"
tag: ""
successors: "1"
source: ""

- router_id: "10.255.11.6"
code: "P"
out_interface: ['TenGigabitEthernet1/4', 'TenGigabitEthernet1/6', 'TenGigabitEthernet2/1', 'TenGigabitEthernet1/1', 'TenGigabitEthernet1/5', 'TenGigabitEthernet4/4', 'TenGigabitEthernet4/5', 'TenGigabitEthernet1/3']
route: "10.255.11.4"
mask: "32"
adv_router: ['10.254.56.6', '10.254.55.6', '10.254.11.33', '10.254.11.9', '10.254.52.6', '10.254.4.10', '10.254.4.14', '10.254.54.6']
process_id: "100"
fd: "128768"
tag: ""
successors: "4"
source: ""

- router_id: "10.2.0.1"
code: "P"
out_interface: ['GigabitEthernet1/1', 'GigabitEthernet1/2']
route: "10.50.20.4"
mask: "32"
adv_router: ['10.4.0.1', '10.4.0.2']
process_id: "65000"
fd: "128039168"
tag: ""
successors: "2"
source: ""

- router_id: "10.2.0.1"
code: "P"
out_interface: ['GigabitEthernet1/1', 'GigabitEthernet1/2']
route: "10.50.21.0"
mask: "27"
adv_router: ['10.4.0.1', '10.4.0.2']
process_id: "65000"
fd: "Inaccessible"
tag: "6508497"
successors: "0"
source: ""

- router_id: "10.2.0.1"
code: "P"
out_interface: []
route: "10.50.75.0"
mask: "24"
adv_router: []
process_id: "65000"
fd: "2816"
tag: ""
successors: "1"
source: "Rstatic"

- router_id: "10.2.0.1"
code: "P"
out_interface: []
route: "10.50.23.92"
mask: "30"
adv_router: []
process_id: "65000"
fd: "3840256"
tag: "5507497"
successors: "1"
source: "Redistributed"
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
IP-EIGRP Topology Table for AS(100)/ID(10.255.11.6)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status

P 66.128.208.232/32, 2 successors, FD is 264448
via 10.254.11.9, TenGigabitEthernet1/1
via 10.254.11.33, TenGigabitEthernet2/1
P 10.254.6.8/30, 1 successors, FD is 1024
via 10.254.6.14, Port-channel10
P 67.230.223.128/28, 2 successors, FD is 5632, tag is 53471
via 10.254.11.9, TenGigabitEthernet1/1
via 10.254.11.33, TenGigabitEthernet2/1
P 10.255.10.5/32, 1 successors, FD is 130816
via 10.254.10.34, GigabitEthernet9/29
P 10.255.1.14/32, 1 successors, FD is 128768
via 10.254.1.34, Port-channel3
P 10.254.2.12/30, 1 successors, FD is 768
via 10.254.2.22, TenGigabitEthernet3/3
P 10.255.11.4/32, 4 successors, FD is 128768
via 10.254.56.6, TenGigabitEthernet1/4
via 10.254.55.6, TenGigabitEthernet1/6
via 10.254.11.33, TenGigabitEthernet2/1
via 10.254.11.9, TenGigabitEthernet1/1
via 10.254.52.6, TenGigabitEthernet1/5
via 10.254.4.10, TenGigabitEthernet4/4
via 10.254.4.14, TenGigabitEthernet4/5
via 10.254.54.6, TenGigabitEthernet1/3

IP-EIGRP Topology Table for AS(65000)/ID(10.2.0.1)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status

P 10.50.20.4/32, 2 successors, FD is 128039168
via 10.4.0.1, GigabitEthernet1/1
via 10.4.0.2, GigabitEthernet1/2
P 10.50.21.0/27, 0 successors, FD is Inaccessible, tag is 6508497
via 10.4.0.1, GigabitEthernet1/1
via 10.4.0.2, GigabitEthernet1/2
P 10.50.75.0/24, 1 successors, FD is 2816
via Rstatic
P 10.50.23.92/30, 1 successors, FD is 3840256, tag is 5507497
via Redistributed

0 comments on commit ca10687

Please sign in to comment.