Debian Codegraph @

ntc_templates/templates/cisco_ios_show_ip_cef.textfsm

raw
1 #
2 # This template is only compatible with the following command
3 # - show ip cef [vrf NAME]
4 # This is enforced by INDEX file
5 # Check cisco_ios_show_ip_cef_detail.textfsm for more details
6 #
7 Value Required PREFIX ((?:\d{1,3}\.){3}\d{1,3}\/\d{1,2})
8 # To support ECMP, NEXTHOP and INTERFACE are defined as lists
9 # When no ECMP is available, these will be single item lists
10 # However, if there are multiple paths available
11 # then expect to see one item per route/path
12 Value List NEXTHOP ((?:no\s)?(?:\S+))
13 Value List INTERFACE ([A-Za-z][A-Za-z0-9\.\/-]+)
14
15 Start
16 # >>> Parse EXCEPTIONS
17 # CEF is not enabled
18 ^%IPv4\s+CEF\s+not\s+running$$ -> End
19 # Invalid prefix
20 ^\s+Invalid\s+prefix/mask -> End
21 #
22 # >>> Parse HEADING
23 ^Prefix\s+Next\s+Hop\s+Interface$$ -> Entries
24 #
25 # >>> Parse SPECIAL
26 ^\s*$$
27 ^. -> Error
28
29 Entries
30 # >>> Parse CEF ENTRIES
31 # Entry detected
32 ^(?:\d{1,3}\.){3}\d{1,3}\/\d{1,2} -> Continue.Record
33 # Parse prefix/nexthop
34 ^${PREFIX}\s+${NEXTHOP}\s*$$
35 # Parse prefix, nexthop and interface
36 ^${PREFIX}\s+${NEXTHOP}\s+${INTERFACE}$$
37 # Parse nexthop and interface for ECMP prefixes
38 ^\s+${NEXTHOP}\s+${INTERFACE}$$
39 #
40 # >>> Parse SPECIAL
41 ^\s*$$
42 ^. -> Error