forked from networktocode/ntc-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added few more comments - Adjusted INDEX file to make sure templates are only used when applicable - Templates are no longer compatible with 'show ip cef 1.1.1.1', or 'show ip cef Vlan100'. Usage of 'detail' keyword is mandatory, such as 'show ip cef 1.1.1.1 detail'
- Loading branch information
1 parent
b3ed26a
commit d0f5a68
Showing
15 changed files
with
228 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,43 @@ | ||
# | ||
# This template is only compatible with the following command | ||
# - show ip cef [vrf NAME] | ||
# This is enforced by INDEX file | ||
# Check cisco_ios_show_ip_cef_detail.textfsm for more details | ||
# | ||
Value Required PREFIX ((?:\d{1,3}\.){3}\d{1,3}\/\d{1,2}) | ||
Value ETYPE ((?:no\s)?(?:[a-z]+)) | ||
# Nexthop and Interface are lists to support ECMP | ||
# Usually these will be single item lists | ||
Value TYPE ((?:no\s)?(?:[a-z]+)) | ||
# To support ECMP, NEXTHOP and INTERFACE are defined as lists | ||
# When no ECMP is available, these will be single item lists | ||
# However, if there are multiple paths available | ||
# these will contain one items per route/path | ||
# then expect to see one item per route/path | ||
Value List NEXTHOP ((?:\d{1,3}\.){3}\d{1,3}) | ||
Value List INTERFACE ([A-Za-z][A-Za-z0-9\.\/-]+) | ||
|
||
# --- HEAD and DETAILED ENTRIES --- | ||
# e.g. show ip cef detail, show ip cef 10.0.0.1, etc | ||
Start | ||
# >>> Parse EXCEPTIONS | ||
# CEF is not enabled | ||
^%IPv4\s+CEF\s+not\s+running$$ -> End | ||
# Invalid prefix | ||
^\s+Invalid\s+prefix/mask -> End | ||
# | ||
# >>> Parse HEADING | ||
^Prefix\s+Next\s+Hop\s+Interface$$ -> Entries | ||
|
||
# --- BRIEF ENTRIES | ||
# e.g. show ip cef, or show ip cef vrf <name> | ||
Entries | ||
# >>> Parse CEF ENTRIES | ||
# Entry detected | ||
^(?:\d{1,3}\.){3}\d{1,3}\/\d{1,2} -> Continue.Record | ||
^${PREFIX}\s+${ETYPE}\s*$$ | ||
# Parse prefix/type | ||
^${PREFIX}\s+${TYPE}\s*$$ | ||
# Parse prefix/nexthop | ||
^${PREFIX}\s+${NEXTHOP}\s*$$ | ||
^${PREFIX}\s+${ETYPE}\s+${INTERFACE}$$ | ||
# Parse prefix, type and interface | ||
^${PREFIX}\s+${TYPE}\s+${INTERFACE}$$ | ||
# Parse prefix, nexthop and interface | ||
^${PREFIX}\s+${NEXTHOP}\s+${INTERFACE}$$ | ||
# Parse nexthop and interface for ECMP prefixes | ||
^\s+${NEXTHOP}\s+${INTERFACE}$$ | ||
# | ||
# >>> Parse SPECIAL | ||
^\s*$$ | ||
^. -> Error | ||
^. -> Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,59 @@ | ||
--- | ||
parsed_sample: | ||
- prefix: "0.0.0.0/0" | ||
etype: "" | ||
type: "" | ||
nexthop: | ||
- "172.17.40.1" | ||
interface: | ||
- "Tunnel0" | ||
- prefix: "0.0.0.0/8" | ||
etype: "drop" | ||
type: "drop" | ||
nexthop: [] | ||
interface: [] | ||
- prefix: "0.0.0.0/32" | ||
etype: "receive" | ||
type: "receive" | ||
nexthop: [] | ||
interface: [] | ||
- prefix: "10.0.0.0/16" | ||
etype: "" | ||
type: "" | ||
nexthop: | ||
- "172.17.40.1" | ||
interface: | ||
- "Tunnel0" | ||
- prefix: "10.0.120.0/24" | ||
etype: "" | ||
type: "" | ||
nexthop: | ||
- "172.17.40.1" | ||
interface: | ||
- "Tunnel0" | ||
- prefix: "10.191.64.0/24" | ||
etype: "attached" | ||
type: "attached" | ||
nexthop: [] | ||
interface: | ||
- "GigabitEthernet0/0" | ||
- prefix: "10.191.64.0/32" | ||
etype: "receive" | ||
type: "receive" | ||
nexthop: [] | ||
interface: | ||
- "GigabitEthernet0/0" | ||
- prefix: "10.191.64.2/32" | ||
etype: "attached" | ||
type: "attached" | ||
nexthop: [] | ||
interface: | ||
- "GigabitEthernet0/0" | ||
- prefix: "224.0.0.0/4" | ||
etype: "drop" | ||
type: "drop" | ||
nexthop: [] | ||
interface: [] | ||
- prefix: "224.0.0.0/24" | ||
etype: "receive" | ||
type: "receive" | ||
nexthop: [] | ||
interface: [] | ||
- prefix: "240.0.0.0/4" | ||
etype: "drop" | ||
type: "drop" | ||
nexthop: [] | ||
interface: [] | ||
- prefix: "255.255.255.255/32" | ||
etype: "receive" | ||
type: "receive" | ||
nexthop: [] | ||
interface: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,64 @@ | ||
--- | ||
parsed_sample: | ||
- prefix: "0.0.0.0/0" | ||
etype: "" | ||
type: "" | ||
nexthop: | ||
- "192.168.0.181" | ||
interface: | ||
- "GigabitEthernet0/1" | ||
- prefix: "0.0.0.0/8" | ||
etype: "drop" | ||
type: "drop" | ||
nexthop: [] | ||
interface: [] | ||
- prefix: "0.0.0.0/32" | ||
etype: "receive" | ||
type: "receive" | ||
nexthop: [] | ||
interface: [] | ||
- prefix: "10.0.0.0/16" | ||
etype: "" | ||
type: "" | ||
nexthop: | ||
- "192.168.0.181" | ||
interface: | ||
- "GigabitEthernet0/1" | ||
- prefix: "10.158.0.0/19" | ||
etype: "" | ||
type: "" | ||
nexthop: | ||
- "0.0.0.0" | ||
interface: | ||
- "Null0" | ||
- prefix: "10.158.0.192/29" | ||
etype: "" | ||
type: "" | ||
nexthop: | ||
- "10.158.0.209" | ||
interface: | ||
- "GigabitEthernet0/0.1821" | ||
- prefix: "10.158.0.208/29" | ||
etype: "attached" | ||
type: "attached" | ||
nexthop: [] | ||
interface: | ||
- "GigabitEthernet0/0.1821" | ||
- prefix: "10.158.0.208/32" | ||
etype: "receive" | ||
type: "receive" | ||
nexthop: [] | ||
interface: [] | ||
- prefix: "192.168.0.180/30" | ||
etype: "attached" | ||
type: "attached" | ||
nexthop: [] | ||
interface: | ||
- "GigabitEthernet0/1" | ||
- prefix: "224.0.0.0/4" | ||
etype: "drop" | ||
type: "drop" | ||
nexthop: [] | ||
interface: [] | ||
- prefix: "224.0.0.0/24" | ||
etype: "receive" | ||
type: "receive" | ||
nexthop: [] | ||
interface: [] | ||
- prefix: "240.0.0.0/4" | ||
etype: "drop" | ||
type: "drop" | ||
nexthop: [] | ||
interface: [] | ||
- prefix: "255.255.255.255/32" | ||
etype: "receive" | ||
type: "receive" | ||
nexthop: [] | ||
interface: [] |
Oops, something went wrong.