Skip to content

Commit

Permalink
New Template: cisco_ios_show_bfd_neighbors_details.textfsm
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbear authored and jvanderaa committed Apr 24, 2021
1 parent 8546d47 commit 32009df
Show file tree
Hide file tree
Showing 8 changed files with 956 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
Value OUR_ADDR (\S+)
Value NEIGHBOR_ADDR (\S+)
Value LOCAL_DISCRIM (\d+)
Value REMOTE_DISCRIM (\d+)
Value REMOTE_HEARD (\S+)
Value HOLDDOWN (\d+)
Value MULTIPLIER (\d{1,2})
Value STATE (\w+)
Value IFACE (\S+)
Value ECHO_FUNCTION ((?:\w+\s+)?\w+\s+echo\s+function)
Value ECHO_INTERVAL (\d+)
Value DIAGNOSTIC_BIT (\d)
Value DEMAND_BIT (\d)
Value POLL_BIT (\d)
Value MIN_TX_INTERVAL (\d+)
Value MIN_RX_INTERVAL (\d+)
Value RECEIVED_MIN_RX_INTERVAL (\d+)
Value RECEIVED_MULTIPLIER (\d{1,2})
Value HOLDDOWN_HITS (\d+)
Value HELLO_INTERVAL (\d+)
Value HELLO_HITS (\d+)
Value RX_COUNT (\d+)
Value RX_LAST (\d+)
Value TX_COUNT (\d+)
Value TX_LAST (\d+)
Value REGISTERED_PROTOCOLS (\S+(?:\s+\S+)*)
Value TEMPLATE (\S+)
Value UPTIME (\S+)
Value VERSION (\d+)

Start
^\s*IPv\d+\s+Sessions\s*$$
^\s*(?:\S+\s+)?NeighAddr.*$$ -> BFD
#
# Capture time-stamp if vty line has command time-stamping turned on
^Load\s+for\s+
^Time\s+source\s+is
^\s*$$
^. -> Error

BFD
^\s*${OUR_ADDR}\s*${NEIGHBOR_ADDR}\s+${LOCAL_DISCRIM}\/${REMOTE_DISCRIM}\s+${REMOTE_HEARD}\s+\d+\s+\(\s*\d+\s*\)\s+${STATE}\s+${IFACE}\s*$$
#
^\s*${NEIGHBOR_ADDR}\s+${LOCAL_DISCRIM}\/${REMOTE_DISCRIM}\s+${REMOTE_HEARD}\s+${STATE}\s+${IFACE}\s*$$
^\s*OurAddr:\s+${OUR_ADDR}\s*$$
#
# common BFD details
^\s*Session\s+state\s+is\s+\S+\s+and\s+${ECHO_FUNCTION}(?:\s+with\s+${ECHO_INTERVAL}\s+)?.*$$
^\s*Local\s+Diag:\s+${DIAGNOSTIC_BIT},\s+Demand\s+mode:\s+${DEMAND_BIT},\s+Poll\s+bit:\s+${POLL_BIT}\s*$$
^\s*MinTxInt:\s+${MIN_TX_INTERVAL},\s+MinRxInt:\s+${MIN_RX_INTERVAL},\s+Multiplier:\s+${MULTIPLIER}\s*$$
^\s*Received\s+MinRxInt:\s+${RECEIVED_MIN_RX_INTERVAL},\s+Received Multiplier:\s+${RECEIVED_MULTIPLIER}\s*$$
#
# some legacy output spells holddown with one d
^\s*Holdd?own\s+\(hits\):\s+${HOLDDOWN}\(${HOLDDOWN_HITS}\),\s+Hello\s+\(hits\):\s+${HELLO_INTERVAL}\(${HELLO_HITS}\)\s*$$
#
^\s*Rx\s+Count:\s+${RX_COUNT},(?:\s+\S+){6}\s+${RX_LAST}(?:\s+\S+){2}\s*$$
^\s*Tx\s+Count:\s+${TX_COUNT},(?:\s+\S+){6}\s+${TX_LAST}(?:\s+\S+){2}\s*$$
^\s*Registered\s+protocols:\s+${REGISTERED_PROTOCOLS}\s*$$
^\s*Template:\s+${TEMPLATE}\s*$$
^\s*Uptime:\s+${UPTIME}\s*$$
^\s*Last\s+packet:\s+Version:\s+${VERSION}\s+.*$$ -> Record
#
# lines of no interest for the time being
#
^\s*Session\s+Host.*$$
^\s*Handle.*$$
^\s*Elapsed\s+time\s+watermarks.*$$
^\s+(?:\S+\s+){1,3}bit.*$$
^\s+Multiplier.*$$
^\s+My\s+Discr.*$$
^\s+Min\s+\S+\s+interval.*$$
#
^\s*$$ -> Start
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ cisco_ios_show_ip_ospf_interface_brief.textfsm, .*, cisco_ios, sh[[ow]] ip ospf
cisco_ios_show_processes_memory_sorted.textfsm, .*, cisco_ios, sh[[ow]] pro[[cesses]] mem[[ory]] so[[rted]]
cisco_ios_show_interfaces_description.textfsm, .*, cisco_ios, sh[[ow]] int[[erfaces]] des[[cription]]
cisco_ios_show_ip_device_tracking_all.textfsm, .*, cisco_ios, sh[[ow]] ip de[[vice]] t[[racking]] a[[ll]]
cisco_ios_show_bfd_neighbors_details.textfsm, .*, cisco_ios, sh[[ow]] bf[[d]] n[[eighbors]] (?:(?:ipv\d+|client \S+) )?de[[tails]]
cisco_ios_show_environment_power_all.textfsm, .*, cisco_ios, sh[[ow]] envi[[ronment]] p[[ower]] a[[ll]]
cisco_ios_show_interface_transceiver.textfsm, .*, cisco_ios, sh[[ow]] int[[erface]] trans[[ceiver]]
cisco_ios_show_interfaces_switchport.textfsm, .*, cisco_ios, sh[[ow]] int[[erfaces]] sw[[itchport]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@

IPv4 Sessions
NeighAddr LD/RD RH/RS State Int
192.168.10.2 3/8 Up Up Gi0/1.10
Session state is UP and using echo function with 50 ms interval.
Session Host: Software
OurAddr: 192.168.10.1
Handle: 3
Local Diag: 0, Demand mode: 0, Poll bit: 0
MinTxInt: 1000000, MinRxInt: 1000000, Multiplier: 3
Received MinRxInt: 1000000, Received Multiplier: 3
Holddown (hits): 0(0), Hello (hits): 1000(4427)
Rx Count: 4428, Rx Interval (ms) min/max/avg: 1/1676/880 last: 316 ms ago
Tx Count: 4435, Tx Interval (ms) min/max/avg: 1/1296/876 last: 852 ms ago
Elapsed time watermarks: 0 0 (last: 0)
Registered protocols: CEF EIGRP
Uptime: 01:02:56
Last packet: Version: 1 - Diagnostic: 0
State bit: Up - Demand bit: 0
Poll bit: 0 - Final bit: 0
C bit: 0
Multiplier: 3 - Length: 24
My Discr.: 8 - Your Discr.: 3
Min tx interval: 1000000 - Min rx interval: 1000000
Min Echo interval: 50000

IPv4 Sessions
NeighAddr LD/RD RH/RS State Int
192.168.12.2 4/4 Up Up Gi0/1.12
Session state is UP and using echo function with 999 ms interval.
Session Host: Software
OurAddr: 192.168.12.1
Handle: 4
Local Diag: 0, Demand mode: 0, Poll bit: 0
MinTxInt: 1000000, MinRxInt: 1000000, Multiplier: 3
Received MinRxInt: 1000000, Received Multiplier: 3
Holddown (hits): 0(0), Hello (hits): 1000(4423)
Rx Count: 4434, Rx Interval (ms) min/max/avg: 1/1004/875 last: 508 ms ago
Tx Count: 4424, Tx Interval (ms) min/max/avg: 756/1184/880 last: 804 ms ago
Elapsed time watermarks: 0 0 (last: 0)
Registered protocols: EIGRP CEF BGP OSPF
Template: BFD-TEST
Uptime: 01:04:45
Last packet: Version: 1 - Diagnostic: 0
State bit: Up - Demand bit: 0
Poll bit: 0 - Final bit: 0
C bit: 0
Multiplier: 3 - Length: 24
My Discr.: 4 - Your Discr.: 4
Min tx interval: 1000000 - Min rx interval: 1000000
Min Echo interval: 999000

IPv4 Sessions
NeighAddr LD/RD RH/RS State Int
192.168.14.253 8/6 Up Up Gi0/1.14
Session state is UP and not using echo function.
Session Host: Software
OurAddr: 192.168.14.254
Handle: 8
Local Diag: 0, Demand mode: 0, Poll bit: 0
MinTxInt: 999000, MinRxInt: 999000, Multiplier: 3
Received MinRxInt: 999000, Received Multiplier: 3
Holddown (hits): 2309(0), Hello (hits): 999(4383)
Rx Count: 4381, Rx Interval (ms) min/max/avg: 4/1112/878 last: 496 ms ago
Tx Count: 4386, Tx Interval (ms) min/max/avg: 1/1504/878 last: 408 ms ago
Elapsed time watermarks: 0 0 (last: 0)
Registered protocols: OSPF CEF
Uptime: 01:04:03
Last packet: Version: 1 - Diagnostic: 0
State bit: Up - Demand bit: 0
Poll bit: 0 - Final bit: 0
C bit: 0
Multiplier: 3 - Length: 24
My Discr.: 6 - Your Discr.: 8
Min tx interval: 999000 - Min rx interval: 999000
Min Echo interval: 0

IPv4 Sessions
NeighAddr LD/RD RH/RS State Int
192.168.16.253 5/0 Down Down Gi0/1.16
Session Host: Software
OurAddr: 192.168.16.254
Handle: 5
Local Diag: 0, Demand mode: 0, Poll bit: 0
MinTxInt: 1000000, MinRxInt: 1000000, Multiplier: 3
Received MinRxInt: 0, Received Multiplier: 0
Holddown (hits): 0(0), Hello (hits): 1000(4369)
Rx Count: 0, Rx Interval (ms) min/max/avg: 0/0/0 last: 3939644 ms ago
Tx Count: 4369, Tx Interval (ms) min/max/avg: 756/1220/879 last: 836 ms ago
Elapsed time watermarks: 0 0 (last: 0)
Registered protocols: OSPF CEF
Template: BFD-TEST
Last packet: Version: 1 - Diagnostic: 0
State bit: AdminDown - Demand bit: 0
Poll bit: 0 - Final bit: 0
C bit: 0
Multiplier: 0 - Length: 0
My Discr.: 0 - Your Discr.: 0
Min tx interval: 0 - Min rx interval: 0
Min Echo interval: 0

IPv6 Sessions
NeighAddr LD/RD RH/RS State Int
2001::7357:2 11/9 Up Up Gi0/1.12
Session state is UP and not using echo function.
Session Host: Software
OurAddr: 2001::7357:1
Handle: 9
Local Diag: 0, Demand mode: 0, Poll bit: 0
MinTxInt: 999000, MinRxInt: 999000, Multiplier: 3
Received MinRxInt: 999000, Received Multiplier: 3
Holddown (hits): 2585(0), Hello (hits): 999(82)
Rx Count: 85, Rx Interval (ms) min/max/avg: 1/996/868 last: 116 ms ago
Tx Count: 86, Tx Interval (ms) min/max/avg: 1/996/859 last: 64 ms ago
Elapsed time watermarks: 0 0 (last: 0)
Registered protocols: BGP CEF
Template: BFD-TEST
Uptime: 00:01:13
Last packet: Version: 1 - Diagnostic: 0
State bit: Up - Demand bit: 0
Poll bit: 0 - Final bit: 0
C bit: 0
Multiplier: 3 - Length: 24
My Discr.: 9 - Your Discr.: 11
Min tx interval: 999000 - Min rx interval: 999000
Min Echo interval: 0

IPv6 Sessions
NeighAddr LD/RD RH/RS State Int
FE80:A::DAD 1/7 Up Up Gi0/1.10
Session state is UP and not using echo function.
Session Host: Software
OurAddr: FE80:A::CAB
Handle: 1
Local Diag: 0, Demand mode: 0, Poll bit: 0
MinTxInt: 50000, MinRxInt: 50000, Multiplier: 3
Received MinRxInt: 50000, Received Multiplier: 3
Holddown (hits): 114(1), Hello (hits): 50(85054)
Rx Count: 49417, Rx Interval (ms) min/max/avg: 1/56/45 last: 28 ms ago
Tx Count: 49445, Tx Interval (ms) min/max/avg: 1/80/46 last: 32 ms ago
Elapsed time watermarks: 2 2 (last: 2)
Registered protocols: CEF EIGRP
Uptime: 00:37:27
Last packet: Version: 1 - Diagnostic: 0
State bit: Up - Demand bit: 0
Poll bit: 0 - Final bit: 0
C bit: 0
Multiplier: 3 - Length: 24
My Discr.: 7 - Your Discr.: 1
Min tx interval: 50000 - Min rx interval: 50000
Min Echo interval: 0

IPv6 Sessions
NeighAddr LD/RD RH/RS State Int
FE80:C::BAD 2/11 Up Up Gi0/1.12
Session state is UP and not using echo function.
Session Host: Software
OurAddr: FE80:C::CAFE
Handle: 2
Local Diag: 0, Demand mode: 0, Poll bit: 0
MinTxInt: 999000, MinRxInt: 999000, Multiplier: 3
Received MinRxInt: 999000, Received Multiplier: 3
Holddown (hits): 2641(1), Hello (hits): 999(4416)
Rx Count: 100, Rx Interval (ms) min/max/avg: 1/992/866 last: 112 ms ago
Tx Count: 101, Tx Interval (ms) min/max/avg: 1/1000/856 last: 776 ms ago
Elapsed time watermarks: 3 3 (last: 3)
Registered protocols: OSPFv3 CEF EIGRP
Template: BFD-TEST
Uptime: 00:01:26
Last packet: Version: 1 - Diagnostic: 0
State bit: Up - Demand bit: 0
Poll bit: 0 - Final bit: 0
C bit: 0
Multiplier: 3 - Length: 24
My Discr.: 11 - Your Discr.: 2
Min tx interval: 999000 - Min rx interval: 999000
Min Echo interval: 0

IPv6 Sessions
NeighAddr LD/RD RH/RS State Int
FE80:E::BEAD 6/5 Up Up Gi0/1.14
Session state is UP and not using echo function.
Session Host: Software
OurAddr: FE80:E::BEEF
Handle: 6
Local Diag: 0, Demand mode: 0, Poll bit: 0
MinTxInt: 999000, MinRxInt: 999000, Multiplier: 3
Received MinRxInt: 999000, Received Multiplier: 3
Holddown (hits): 2865(1), Hello (hits): 999(4375)
Rx Count: 2568, Rx Interval (ms) min/max/avg: 1/1000/878 last: 716 ms ago
Tx Count: 2569, Tx Interval (ms) min/max/avg: 1/1000/877 last: 452 ms ago
Elapsed time watermarks: 3 3 (last: 3)
Registered protocols: CEF OSPFv3
Uptime: 00:37:30
Last packet: Version: 1 - Diagnostic: 0
State bit: Up - Demand bit: 0
Poll bit: 0 - Final bit: 0
C bit: 0
Multiplier: 3 - Length: 24
My Discr.: 5 - Your Discr.: 6
Min tx interval: 999000 - Min rx interval: 999000
Min Echo interval: 0

IPv6 Sessions
NeighAddr LD/RD RH/RS State Int
FE80:10::AAB 7/0 Down Down Gi0/1.16
Session Host: Software
OurAddr: FE80:10::AAA
Handle: 7
Local Diag: 0, Demand mode: 0, Poll bit: 0
MinTxInt: 1000000, MinRxInt: 1000000, Multiplier: 3
Received MinRxInt: 0, Received Multiplier: 0
Holddown (hits): 0(0), Hello (hits): 1000(4354)
Rx Count: 0, Rx Interval (ms) min/max/avg: 0/0/0 last: 3946664 ms ago
Tx Count: 4354, Tx Interval (ms) min/max/avg: 756/13196/882 last: 168 ms ago
Elapsed time watermarks: 0 0 (last: 0)
Registered protocols: OSPFv3 CEF
Template: BFD-TEST
Last packet: Version: 1 - Diagnostic: 0
State bit: AdminDown - Demand bit: 0
Poll bit: 0 - Final bit: 0
C bit: 0
Multiplier: 0 - Length: 0
My Discr.: 0 - Your Discr.: 0
Min tx interval: 0 - Min rx interval: 0
Min Echo interval: 0
Loading

0 comments on commit 32009df

Please sign in to comment.