Repository: networktocode/ntc-templates

Issue:
cisco_ios_show_bfd_neighbors_details.textfsm - Not Parsing BFD Echo Mode Output
<!---
NOTE: The following are not considered and will be immediately closed:
* Request for new templates.
* Request for adding data captured in an existing template.
* Request for help with building a TextFSM template, please use the #networktocode channel, on [Slack](http://slack.networktocode.com/).
* Request for Template issues without both the included error and raw data.
* Feature Requests in the form of a Bug.
* ISSUES raised without following instructions.

Please see README for more information.
-->


<!---
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release, and master branch are affected too.
-->

##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Template Issue with error and raw data

**NTC Version**
$ pip list | grep ntc
ntc_templates 7.9.0

**Error Message** 
`"State Error raised. Rule Line: 76. Input Line: Echo Rx Count: 156257, Echo Rx Interval (ms) min/max/avg: 377/505/439 last: 436 ms ago"`
##### TEMPLATE USING
<!---
Please paste the entire template that you are using
-->

```
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 INTERFACE (\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+${INTERFACE}\s*$$
  #
  ^\s*${NEIGHBOR_ADDR}\s+${LOCAL_DISCRIM}\/${REMOTE_DISCRIM}\s+${REMOTE_HEARD}\s+${STATE}\s+${INTERFACE}\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+){5}\s*$$
  ^\s*Tx\s+Count:\s+${TX_COUNT},(?:\s+\S+){5}\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
```

##### SAMPLE COMMAND OUTPUT
<!---
Please paste the raw output of the show command your are you using.
-->

```
IPv4 Sessions
NeighAddr                              LD/RD         RH/RS     State     Int
10.103.45.4                             1/4344       Up        Up        Twe1/0/1
Session state is UP and using echo function with 500 ms interval.
Session Host: Software
OurAddr: 10.103.45.5    
Handle: 1
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(78231)
Rx Count: 78237, Rx Interval (ms) min/max/avg: 2/1004/875 last: 657 ms ago
Tx Count: 78233, Tx Interval (ms) min/max/avg: 2/1004/877 last: 703 ms ago
Echo Rx Count: 156257, Echo Rx Interval (ms) min/max/avg: 377/505/439 last: 436 ms ago
Echo Tx Count: 156257, Echo Tx Interval (ms) min/max/avg: 378/505/439 last: 437 ms ago
Elapsed time watermarks: 0 0 (last: 0)
Registered protocols: OSPF CEF 
Uptime: 19:03:41
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.: 4344             - Your Discr.: 1
             Min tx interval: 1000000    - Min rx interval: 1000000
             Min Echo interval: 100000  

```

##### SUMMARY
<!--- Explain the problem briefly -->
The current template to parse the output of "show bfd neighbor details" doesn't take into account devices running **BFD Echo Mode**.
When devices are running BFD ECHO Mode, there is additional lines in the output that reflect the counters and timers of the BFD Echo probes

> Echo Rx Count: 156257, Echo Rx Interval (ms) min/max/avg: 377/505/439 last: 436 ms ago
> Echo Tx Count: 156257, Echo Tx Interval (ms) min/max/avg: 378/505/439 last: 437 ms ago

Since there are no regex rules that these lines match, we are received the above error message.

##### STEPS To Fix

I have added Capture Groups and Regex Rules to account for these lines as well as capture the counters/timers, and will be submitting a PR (once it goes through my company's approval process

1) Add the Following Capture Groups, since we want to capture the counters/timers just like the capture groups for non-echo mode:

> Value RX_COUNT (\d+)
> Value RX_LAST (\d+)
> Value TX_COUNT (\d+)
> Value TX_LAST (\d+)
> **Value ECHO_RX_COUNT (\d+)**
> **Value ECHO_RX_LAST (\d+)**
> **Value ECHO_TX_COUNT (\d+)**
> **Value ECHO_TX_LAST (\d+)**

2) Account for the new lines that mention "Echo" by using the regex pattern for the non-echo, but adjusting it appropriately

>   ^\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*Echo\s+Rx\s+Count:\s+${ECHO_RX_COUNT},(?:\s+\S+){7}\s+${ECHO_RX_LAST}(?:\s+\S+){2}\s*$$**
>   **^\s*Echo\s+Tx\s+Count:\s+${ECHO_TX_COUNT},(?:\s+\S+){7}\s+${ECHO_TX_LAST}(?:\s+\S+){2}\s*$$**


##### Evidence of Template Working on BFD Echo Mode Data

<img width="1851" height="748" alt="Image" src="https://github.com/user-attachments/assets/2279938d-ce38-401d-ad8c-8b17691de560" />
cisco_ios_show_bfd_neighbors_details.textfsm - Not Parsing When BFD Neighbor Is Down due to missing rules for "Downtime"
<!---
NOTE: The following are not considered and will be immediately closed:
* Request for new templates.
* Request for adding data captured in an existing template.
* Request for help with building a TextFSM template, please use the #networktocode channel, on [Slack](http://slack.networktocode.com/).
* Request for Template issues without both the included error and raw data.
* Feature Requests in the form of a Bug.
* ISSUES raised without following instructions.

Please see README for more information.
-->


<!---
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release, and master branch are affected too.
-->

##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Template Issue with error and raw data

**NTC Version**
$ pip list | grep ntc
ntc_templates 7.9.0

**Error Message** 
`"State Error raised. Rule Line: 76. Input Line: Downtime: 02:11:53"`


##### TEMPLATE USING
<!---
Please paste the entire template that you are using
-->

```
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 INTERFACE (\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+${INTERFACE}\s*$$
  #
  ^\s*${NEIGHBOR_ADDR}\s+${LOCAL_DISCRIM}\/${REMOTE_DISCRIM}\s+${REMOTE_HEARD}\s+${STATE}\s+${INTERFACE}\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+){5}\s*$$
  ^\s*Tx\s+Count:\s+${TX_COUNT},(?:\s+\S+){5}\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
```

##### SAMPLE COMMAND OUTPUT

```
IPv4 Sessions
NeighAddr                              LD/RD         RH/RS     State     Int
192.168.100.3                           2/0          Down      Down      Tu100
Session Host: Hardware
OurAddr: 192.168.100.11 
Handle: 2
Local Diag: 1, Demand mode: 0, Poll bit: 0
MinTxInt: 1000000, MinRxInt: 1000000, Multiplier: 3
Received MinRxInt: 500000, Received Multiplier: 3
Holddown (hits): 0(0), Hello (hits): 1000(0)
Rx Count: 0, Rx Interval (ms) min/max/avg: 0/0/0
Tx Count: 8439, Tx Interval (ms) min/max/avg: 873/1000/1032
Elapsed time watermarks: 0 0 (last: 0)
Registered protocols: NHRP CEF 
Template: GlobalWan
Downtime: 02:11:53
Last packet: Version: 1                  - Diagnostic: 0
             State bit: Up               - Demand bit: 0
             Poll bit: 0                 - Final bit: 0
             C bit: 1                                   
             Multiplier: 3               - Length: 24
             My Discr.: 245              - Your Discr.: 2
             Min tx interval: 500000     - Min rx interval: 500000
             Min Echo interval: 0      
``` 


##### SUMMARY
The current template to parse the output of "show bfd neighbor details" doesn't take into account when neighbors are in the down state. Whenever  the BFD neighbor is down, there is a "Downtime" counter that the current textFSM doesn't have a rule for. The current textFSM template accounts for **Uptime** but not **Downtime**

##### STEPS To Fix

I have added Capture Groups and Regex Rules to account for this, which will match the same behavior in how textFSM is treating **Uptime**

1) Add the Following Capture Group to store Downtime, since we want to capture the counters/timers just like the template is doing for Uptime

> Value TEMPLATE (\S+)
> Value UPTIME (\S+)
> **Value DOWNTIME (\S+)**
> Value VERSION (\d+)

2) Add the following regular expression 

> 
>   ^\s*Uptime:\s+${UPTIME}\s*$$
>   **^\s*Downtime:\s+${DOWNTIME}\s*$$**


##### Evidence of Template Working 

<img width="392" height="581" alt="Image" src="https://github.com/user-attachments/assets/6dd9648f-0fc0-4110-ab9b-abed9519d86e" />


Discussion:
@mjbear - FYI, I'll submitting a PR for this, but (just like in the past), it takes a week or so for it to get through Fidelity's internal approval process.  Will submit test data with my PR as well.

Thanks
> ##### SUMMARY
> 
> The current template to parse the output of "show bfd neighbor details" doesn't take into account devices running **BFD Echo Mode**. When devices are running BFD ECHO Mode, there is additional lines in the output that reflect the counters and timers of the BFD Echo probes
> 
> > Echo Rx Count: 156257, Echo Rx Interval (ms) min/max/avg: 377/505/439 last: 436 ms ago
> > Echo Tx Count: 156257, Echo Tx Interval (ms) min/max/avg: 378/505/439 last: 437 ms ago

Understood.
Thank you. :+1:
FYI - discovered another issue with the current template where it doesn't have the regex line to account for if the Nieghbor is down.

I'll create a separate issue for this to track it separately... but my PR (already approved internally, so will be submitted later this afternoon) will fix both

<img width="599" height="862" alt="Image" src="https://github.com/user-attachments/assets/e7f43e38-5ff5-4e1c-991c-758273001be5" />

<img width="501" height="87" alt="Image" src="https://github.com/user-attachments/assets/2f301f0e-3000-483e-a8e4-bb0839bb249b" />

FYI - my PR that will resolve this issue and #2159 



Patch:
diff --git a/ntc_templates/templates/cisco_ios_show_bfd_neighbors_details.textfsm b/ntc_templates/templates/cisco_ios_show_bfd_neighbors_details.textfsm
index 8dde4256ee..e98899c6c5 100644
--- a/ntc_templates/templates/cisco_ios_show_bfd_neighbors_details.textfsm
+++ b/ntc_templates/templates/cisco_ios_show_bfd_neighbors_details.textfsm
@@ -23,9 +23,14 @@ Value RX_COUNT (\d+)
 Value RX_LAST (\d+)
 Value TX_COUNT (\d+)
 Value TX_LAST (\d+)
+Value ECHO_RX_COUNT (\d+)
+Value ECHO_RX_LAST (\d+)
+Value ECHO_TX_COUNT (\d+)
+Value ECHO_TX_LAST (\d+)
 Value REGISTERED_PROTOCOLS (\S+(?:\s+\S+)*)
 Value TEMPLATE (\S+)
 Value UPTIME (\S+)
+Value DOWNTIME (\S+)
 Value VERSION (\d+)
 
 Start
@@ -57,9 +62,12 @@ BFD
   ^\s*Tx\s+Count:\s+${TX_COUNT},(?:\s+\S+){5}\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*Echo\s+Rx\s+Count:\s+${ECHO_RX_COUNT},(?:\s+\S+){7}\s+${ECHO_RX_LAST}(?:\s+\S+){2}\s*$$
+  ^\s*Echo\s+Tx\s+Count:\s+${ECHO_TX_COUNT},(?:\s+\S+){7}\s+${ECHO_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*Downtime:\s+${DOWNTIME}\s*$$
   ^\s*Last\s+packet:\s+Version:\s+${VERSION}\s+.*$$ -> Record
   #
   # lines of no interest for the time being


Test patch:
diff --git a/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-echo-mode.raw b/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-echo-mode.raw
new file mode 100644
index 0000000000..ba3352261b
--- /dev/null
+++ b/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-echo-mode.raw
@@ -0,0 +1,51 @@
+IPv4 Sessions
+NeighAddr                              LD/RD         RH/RS     State     Int
+10.103.45.4                             1/4344       Up        Up        Twe1/0/1
+Session state is UP and using echo function with 500 ms interval.
+Session Host: Software
+OurAddr: 10.103.45.5    
+Handle: 1
+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(78231)
+Rx Count: 78237, Rx Interval (ms) min/max/avg: 2/1004/875 last: 657 ms ago
+Tx Count: 78233, Tx Interval (ms) min/max/avg: 2/1004/877 last: 703 ms ago
+Echo Rx Count: 156257, Echo Rx Interval (ms) min/max/avg: 377/505/439 last: 436 ms ago
+Echo Tx Count: 156257, Echo Tx Interval (ms) min/max/avg: 378/505/439 last: 437 ms ago
+Elapsed time watermarks: 0 0 (last: 0)
+Registered protocols: OSPF CEF 
+Uptime: 19:03:41
+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.: 4344             - Your Discr.: 1
+             Min tx interval: 1000000    - Min rx interval: 1000000
+             Min Echo interval: 100000  
+
+IPv4 Sessions
+NeighAddr                              LD/RD         RH/RS     State     Int
+192.168.100.3                           2/0          Down      Down      Tu100
+Session Host: Hardware
+OurAddr: 192.168.100.11 
+Handle: 2
+Local Diag: 1, Demand mode: 0, Poll bit: 0
+MinTxInt: 1000000, MinRxInt: 1000000, Multiplier: 3
+Received MinRxInt: 500000, Received Multiplier: 3
+Holddown (hits): 0(0), Hello (hits): 1000(0)
+Rx Count: 0, Rx Interval (ms) min/max/avg: 0/0/0
+Tx Count: 8439, Tx Interval (ms) min/max/avg: 873/1000/1032
+Elapsed time watermarks: 0 0 (last: 0)
+Registered protocols: NHRP CEF 
+Template: GlobalWan
+Downtime: 02:11:53
+Last packet: Version: 1                  - Diagnostic: 0
+             State bit: Up               - Demand bit: 0
+             Poll bit: 0                 - Final bit: 0
+             C bit: 1                                   
+             Multiplier: 3               - Length: 24
+             My Discr.: 245              - Your Discr.: 2
+             Min tx interval: 500000     - Min rx interval: 500000
+             Min Echo interval: 0       
diff --git a/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-echo-mode.yml b/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-echo-mode.yml
new file mode 100644
index 0000000000..cb181a793d
--- /dev/null
+++ b/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-echo-mode.yml
@@ -0,0 +1,70 @@
+---
+parsed_sample:
+  - demand_bit: "0"
+    diagnostic_bit: "0"
+    downtime: ""
+    echo_function: "using echo function"
+    echo_interval: "500"
+    echo_rx_count: "156257"
+    echo_rx_last: "436"
+    echo_tx_count: "156257"
+    echo_tx_last: "437"
+    hello_hits: "78231"
+    hello_interval: "1000"
+    holddown: "0"
+    holddown_hits: "0"
+    interface: "Twe1/0/1"
+    local_discrim: "1"
+    min_rx_interval: "1000000"
+    min_tx_interval: "1000000"
+    multiplier: "3"
+    neighbor_addr: "10.103.45.4"
+    our_addr: "10.103.45.5"
+    poll_bit: "0"
+    received_min_rx_interval: "1000000"
+    received_multiplier: "3"
+    registered_protocols: "OSPF CEF"
+    remote_discrim: "4344"
+    remote_heard: "Up"
+    rx_count: "78237"
+    rx_last: "657"
+    state: "Up"
+    template: ""
+    tx_count: "78233"
+    tx_last: "703"
+    uptime: "19:03:41"
+    version: "1"
+  - demand_bit: "0"
+    diagnostic_bit: "1"
+    downtime: "02:11:53"
+    echo_function: ""
+    echo_interval: ""
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
+    hello_hits: "0"
+    hello_interval: "1000"
+    holddown: "0"
+    holddown_hits: "0"
+    interface: "Tu100"
+    local_discrim: "2"
+    min_rx_interval: "1000000"
+    min_tx_interval: "1000000"
+    multiplier: "3"
+    neighbor_addr: "192.168.100.3"
+    our_addr: "192.168.100.11"
+    poll_bit: "0"
+    received_min_rx_interval: "500000"
+    received_multiplier: "3"
+    registered_protocols: "NHRP CEF"
+    remote_discrim: "0"
+    remote_heard: "Down"
+    rx_count: "0"
+    rx_last: ""
+    state: "Down"
+    template: "GlobalWan"
+    tx_count: "8439"
+    tx_last: ""
+    uptime: ""
+    version: "1"
diff --git a/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-includes-ipv6.yml b/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-includes-ipv6.yml
index 542a5ed8cc..8684a04bc3 100644
--- a/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-includes-ipv6.yml
+++ b/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-includes-ipv6.yml
@@ -2,8 +2,13 @@
 parsed_sample:
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "using echo function"
     echo_interval: "50"
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "4427"
     hello_interval: "1000"
     holddown: "0"
@@ -31,8 +36,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "using echo function"
     echo_interval: "999"
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "4423"
     hello_interval: "1000"
     holddown: "0"
@@ -60,8 +70,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "not using echo function"
     echo_interval: ""
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "4383"
     hello_interval: "999"
     holddown: "2309"
@@ -89,8 +104,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: ""
     echo_interval: ""
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "4369"
     hello_interval: "1000"
     holddown: "0"
@@ -118,8 +138,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "not using echo function"
     echo_interval: ""
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "82"
     hello_interval: "999"
     holddown: "2585"
@@ -147,8 +172,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "not using echo function"
     echo_interval: ""
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "85054"
     hello_interval: "50"
     holddown: "114"
@@ -176,8 +206,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "not using echo function"
     echo_interval: ""
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "4416"
     hello_interval: "999"
     holddown: "2641"
@@ -205,8 +240,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "not using echo function"
     echo_interval: ""
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "4375"
     hello_interval: "999"
     holddown: "2865"
@@ -234,8 +274,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: ""
     echo_interval: ""
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "4354"
     hello_interval: "1000"
     holddown: "0"
diff --git a/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-version0.yml b/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-version0.yml
index 6c9b6cacc4..9398594014 100644
--- a/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-version0.yml
+++ b/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-version0.yml
@@ -2,8 +2,13 @@
 parsed_sample:
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "not using echo function"
     echo_interval: ""
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "1364284"
     hello_interval: "50"
     holddown: "150"
@@ -31,8 +36,13 @@ parsed_sample:
     version: "0"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "using echo function"
     echo_interval: "50"
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "317"
     hello_interval: "1000"
     holddown: "3000"
diff --git a/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-without-last.yml b/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-without-last.yml
index 43a7eccd33..2166a841af 100644
--- a/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-without-last.yml
+++ b/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details-without-last.yml
@@ -2,8 +2,13 @@
 parsed_sample:
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "not using echo function"
     echo_interval: ""
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "0"
     hello_interval: "50"
     holddown: "0"
@@ -31,8 +36,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "not using echo function"
     echo_interval: ""
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "0"
     hello_interval: "50"
     holddown: "0"
@@ -60,8 +70,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "not using echo function"
     echo_interval: ""
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "0"
     hello_interval: "50"
     holddown: "0"
diff --git a/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details.yml b/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details.yml
index 125a7d3b06..1c51aa00fa 100644
--- a/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details.yml
+++ b/tests/cisco_ios/show_bfd_neighbors_details/cisco_ios_show_bfd_neighbors_details.yml
@@ -2,8 +2,13 @@
 parsed_sample:
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "using echo function"
     echo_interval: "999"
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "7034"
     hello_interval: "1000"
     holddown: "0"
@@ -31,8 +36,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "using echo function"
     echo_interval: "999"
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "108712"
     hello_interval: "1000"
     holddown: "0"
@@ -60,8 +70,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "using echo function"
     echo_interval: "999"
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "198289"
     hello_interval: "1000"
     holddown: "0"
@@ -89,8 +104,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "using echo function"
     echo_interval: "999"
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "195048"
     hello_interval: "1000"
     holddown: "0"
@@ -118,8 +138,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "using echo function"
     echo_interval: "999"
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "195388"
     hello_interval: "1000"
     holddown: "0"
@@ -147,8 +172,13 @@ parsed_sample:
     version: "1"
   - demand_bit: "0"
     diagnostic_bit: "0"
+    downtime: ""
     echo_function: "using echo function"
     echo_interval: "999"
+    echo_rx_count: ""
+    echo_rx_last: ""
+    echo_tx_count: ""
+    echo_tx_last: ""
     hello_hits: "196435"
     hello_interval: "1000"
     holddown: "0"