Skip to content

Commit

Permalink
New Template: cisco_nxos_show_forwarding_adjacency (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakuza-UA authored Jun 1, 2020
1 parent b1faded commit 9a77c39
Show file tree
Hide file tree
Showing 8 changed files with 482 additions and 0 deletions.
42 changes: 42 additions & 0 deletions templates/cisco_nxos_show_forwarding_adjacency.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Nexus 7k have multiple slots
Value Filldown SLOT (\d+)
Value Required NEXTHOP ((?:\d{1,3}\.){3}\d{1,3})
Value Required REWRITE (\S+)
Value Required INTERFACE (\S+)
Value ORIGIN_AS (\S+)
Value PEER_AS (\S+)
Value NEIGHBOR (\S+)

Start
# Extract slot #, if available (Nexus 7k)
^slot\s+${SLOT}
^====
# Match headers
^IPv4\s+adjacency\s+information
^next-hop\s+rewrite\s+info\s+interface\s*$$ -> Entries
^next-hop\s+rewrite\s+info\s+interface\s+Origin\s+AS\s+Peer\s+AS\s+Neighbor -> EntriesDetail
# Empty and unknowns lines
^\s*$$
^. -> Error

Entries
# Ignore delimiter
^--------
# Match single adjacency entry (brief view)
^${NEXTHOP}\s+${REWRITE}\s+${INTERFACE} -> Record
# New slot?
^slot\s+${SLOT} -> Start
# Empty and unknowns lines
^\s*$$
^. -> Error

EntriesDetail
# Ignore delimiter
^--------
# Match single adjacency entry (detailed view)
^${NEXTHOP}\s+${REWRITE}\s+${INTERFACE}\s*(?:${ORIGIN_AS}\s+${PEER_AS}\s+${NEIGHBOR})? -> Record
# New slot?
^slot\s+${SLOT} -> Start
# Empty and unknowns lines
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ cisco_nxos_show_interfaces_switchport.textfsm, .*, cisco_nxos, sh[[ow]] int[[erf
cisco_nxos_show_ip_dhcp_relay_address.textfsm, .*, cisco_nxos, sh[[ow]] ip dh[[cp]] r[[elay]] a[[ddress]]
cisco_nxos_show_lldp_neighbors_detail.textfsm, .*, cisco_nxos, sh[[ow]] ll[[dp]] nei[[ghbors]] d[[etail]]
cisco_nxos_show_cdp_neighbors_detail.textfsm, .*, cisco_nxos, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]]
cisco_nxos_show_forwarding_adjacency.textfsm, .*, cisco_nxos, sh[[ow]] fo[[rwarding]] (?:ipv4 )?ad[[jacency]]
cisco_nxos_show_ipv6_interface_brief.textfsm, .*, cisco_nxos, sh[[ow]] ipv[[6]] interf[[ace]] b[[rief]]
cisco_nxos_show_port-channel_summary.textfsm, .*, cisco_nxos, sh[[ow]] po[[rt-channel]] sum[[mary]]
cisco_nxos_show_cts_interface_brief.textfsm, .*, cisco_nxos, sh[[ow]] cts inte[[rface]] br[[ief]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
IPv4 adjacency information

next-hop rewrite info interface Origin AS Peer AS Neighbor
-------------- --------------- ------------- ---------- --------- --------------
10.111.1.3 cc16.7c1f.9852 Vlan10
10.111.1.4 cc16.7c1f.6900 Vlan10
10.111.1.5 84b8.025a.f786 Vlan10
10.111.1.6 a89d.2121.bc7b Vlan10
10.5.111.213 0050.528c.5b4c Vlan182
10.5.111.221 002a.6312.6ac1 Vlan182
10.111.254.6 002a.6312.6ac1 Vlan254
10.6.140.234 000e.b6b2.ff01 Ethernet1/16
10.6.140.238 54a2.72da.b651 Ethernet1/16
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
parsed_sample:
- slot: ""
nexthop: "10.111.1.3"
rewrite: "cc16.7c1f.9852"
interface: "Vlan10"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.111.1.4"
rewrite: "cc16.7c1f.6900"
interface: "Vlan10"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.111.1.5"
rewrite: "84b8.025a.f786"
interface: "Vlan10"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.111.1.6"
rewrite: "a89d.2121.bc7b"
interface: "Vlan10"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.5.111.213"
rewrite: "0050.528c.5b4c"
interface: "Vlan182"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.5.111.221"
rewrite: "002a.6312.6ac1"
interface: "Vlan182"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.111.254.6"
rewrite: "002a.6312.6ac1"
interface: "Vlan254"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.6.140.234"
rewrite: "000e.b6b2.ff01"
interface: "Ethernet1/16"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.6.140.238"
rewrite: "54a2.72da.b651"
interface: "Ethernet1/16"
origin_as: ""
peer_as: ""
neighbor: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
IPv4 adjacency information

next-hop rewrite info interface
-------------- --------------- -------------
10.111.1.3 cc16.7c1f.9852 Vlan10
10.111.1.4 cc16.7c1f.6900 Vlan10
10.111.1.5 84b8.025a.f786 Vlan10
10.111.1.6 a89d.2121.bc7b Vlan10
10.5.111.213 0050.528c.5b4c Vlan182
10.5.111.221 002a.6312.6ac1 Vlan182
10.111.254.6 002a.6312.6ac1 Vlan254
10.6.140.234 000e.b6b2.ff01 Ethernet1/16
10.6.140.238 54a2.72da.b651 Ethernet1/16
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
parsed_sample:
- slot: ""
nexthop: "10.111.1.3"
rewrite: "cc16.7c1f.9852"
interface: "Vlan10"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.111.1.4"
rewrite: "cc16.7c1f.6900"
interface: "Vlan10"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.111.1.5"
rewrite: "84b8.025a.f786"
interface: "Vlan10"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.111.1.6"
rewrite: "a89d.2121.bc7b"
interface: "Vlan10"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.5.111.213"
rewrite: "0050.528c.5b4c"
interface: "Vlan182"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.5.111.221"
rewrite: "002a.6312.6ac1"
interface: "Vlan182"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.111.254.6"
rewrite: "002a.6312.6ac1"
interface: "Vlan254"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.6.140.234"
rewrite: "000e.b6b2.ff01"
interface: "Ethernet1/16"
origin_as: ""
peer_as: ""
neighbor: ""
- slot: ""
nexthop: "10.6.140.238"
rewrite: "54a2.72da.b651"
interface: "Ethernet1/16"
origin_as: ""
peer_as: ""
neighbor: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

slot 1
=======


IPv4 adjacency information

next-hop rewrite info interface Origin AS Peer AS Neighbor
-------------- --------------- ------------- ---------- --------- --------------
172.17.1.2 001c.b0c9.6b80 Ethernet1/1
100.120.0.2 00de.fb5a.2c47 Ethernet1/2
100.64.1.6 00a3.8eb7.6f29 Ethernet1/4
100.100.59.10 286f.7feb.1947 Ethernet1/7
100.111.0.2 00de.fb5a.2c46 Ethernet1/11
100.100.59.2 286f.7feb.1940 Ethernet1/14
100.89.1.6 b4de.3141.af12 Ethernet1/15
100.99.1.2 84b2.61d4.357f Ethernet1/22
100.99.1.10 2cab.eb4f.2f46 Ethernet1/23
100.100.59.14 00d7.8f7f.edcb Ethernet2/7
100.100.59.6 00d7.8f7f.edc4 Ethernet2/14
100.89.1.2 b4de.3141.af10 Ethernet2/15
100.126.255.2 00a3.d186.4141 Ethernet2/16
100.99.1.6 84b2.61d4.357f Ethernet2/22
100.99.1.14 2cab.eb4f.2f48 Ethernet2/23
100.127.253.1 00de.fb5a.2c45 Ethernet2/24

slot 2
=======


IPv4 adjacency information

next-hop rewrite info interface Origin AS Peer AS Neighbor
-------------- --------------- ------------- ---------- --------- --------------
172.17.1.2 001c.b0c9.6b80 Ethernet1/1
100.120.0.2 00de.fb5a.2c47 Ethernet1/2
100.64.1.6 00a3.8eb7.6f29 Ethernet1/4
100.100.59.10 286f.7feb.1947 Ethernet1/7
100.111.0.2 00de.fb5a.2c46 Ethernet1/11
100.100.59.2 286f.7feb.1940 Ethernet1/14
100.89.1.6 b4de.3141.af12 Ethernet1/15
100.99.1.2 84b2.61d4.357f Ethernet1/22
100.99.1.10 2cab.eb4f.2f46 Ethernet1/23
100.100.59.14 00d7.8f7f.edcb Ethernet2/7
100.100.59.6 00d7.8f7f.edc4 Ethernet2/14
100.89.1.2 b4de.3141.af10 Ethernet2/15
100.126.255.2 00a3.d186.4141 Ethernet2/16
100.99.1.6 84b2.61d4.357f Ethernet2/22
100.99.1.14 2cab.eb4f.2f48 Ethernet2/23
100.127.253.1 00de.fb5a.2c45 Ethernet2/24

slot 5
=======


slot 6
=======
Loading

0 comments on commit 9a77c39

Please sign in to comment.