-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Fortinet exec traceroute template (#1485)
Co-authored-by: pskliarenko <“[email protected]”> Co-authored-by: Jacob McGill <[email protected]>
- Loading branch information
1 parent
5b7d09f
commit e16348e
Showing
6 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
ntc_templates/templates/fortinet_execute_traceroute.textfsm
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Value DESTINATION_ADDRESS (\S+) | ||
Value HOPS_MAX (\d+) | ||
Value PACKETS_PER_HOP (\d+) | ||
Value PACKET_SIZE (\d+) | ||
Value HOP_NUM (\d+) | ||
Value ADDRESS ((?!\*(?:\s+\*)*)\S+) | ||
Value DETAILS (.*) | ||
|
||
Start | ||
^\s*traceroute\s+to\s+${DESTINATION_ADDRESS}\s+\(.*?\),\s+${HOPS_MAX}\s+hops\s+max,\s+${PACKETS_PER_HOP}\s+probe\s+packets\s+per\s+hop,\s+${PACKET_SIZE}\s+byte\s+packets\s*$$ | ||
^\s*${HOP_NUM}(?:\s+${ADDRESS})?\s+${DETAILS}\s*$$ -> Record | ||
^\s*\*\s*$$ | ||
^\s*$$ | ||
^. -> 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
3 changes: 3 additions & 0 deletions
3
tests/fortinet/execute_traceroute/fortinet_execute_traceroute1.raw
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
traceroute to 8.8.8.8 (8.8.8.8), 32 hops max, 10 probe packets per hop, 84 byte packets | ||
1 1.2.3.4 0.454 ms 0.503 ms 0.262 ms 0.191 ms 0.187 ms 0.191 ms 0.191 ms 0.192 ms 0.193 ms 0.185 ms | ||
2 5.6.7.8 1.225 ms * * * |
17 changes: 17 additions & 0 deletions
17
tests/fortinet/execute_traceroute/fortinet_execute_traceroute1.yml
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
parsed_sample: | ||
- address: "1.2.3.4" | ||
destination_address: "8.8.8.8" | ||
details: "0.454 ms 0.503 ms 0.262 ms 0.191 ms 0.187 ms 0.191 ms 0.191 ms\ | ||
\ 0.192 ms 0.193 ms 0.185 ms" | ||
hop_num: "1" | ||
hops_max: "32" | ||
packet_size: "84" | ||
packets_per_hop: "10" | ||
- address: "5.6.7.8" | ||
destination_address: "" | ||
details: "1.225 ms * * *" | ||
hop_num: "2" | ||
hops_max: "" | ||
packet_size: "" | ||
packets_per_hop: "" |
7 changes: 7 additions & 0 deletions
7
tests/fortinet/execute_traceroute/fortinet_execute_traceroute2.raw
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
traceroute to 8.8.8.8 (8.8.8.8), 32 hops max, 3 probe packets per hop, 84 byte packets | ||
1 1.2.3.4 0.423 ms 2.123 ms 0.274 ms | ||
2 5.6.7.8 0.389 ms 0.445 ms 0.178 ms | ||
3 * * * | ||
4 * * * | ||
5 * * * | ||
6 8.8.8.8 15.494 ms 15.488 ms 15.469 ms |
44 changes: 44 additions & 0 deletions
44
tests/fortinet/execute_traceroute/fortinet_execute_traceroute2.yml
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
parsed_sample: | ||
- address: "1.2.3.4" | ||
destination_address: "8.8.8.8" | ||
details: "0.423 ms 2.123 ms 0.274 ms" | ||
hop_num: "1" | ||
hops_max: "32" | ||
packet_size: "84" | ||
packets_per_hop: "3" | ||
- address: "5.6.7.8" | ||
destination_address: "" | ||
details: "0.389 ms 0.445 ms 0.178 ms" | ||
hop_num: "2" | ||
hops_max: "" | ||
packet_size: "" | ||
packets_per_hop: "" | ||
- address: "" | ||
destination_address: "" | ||
details: "* * *" | ||
hop_num: "3" | ||
hops_max: "" | ||
packet_size: "" | ||
packets_per_hop: "" | ||
- address: "" | ||
destination_address: "" | ||
details: "* * *" | ||
hop_num: "4" | ||
hops_max: "" | ||
packet_size: "" | ||
packets_per_hop: "" | ||
- address: "" | ||
destination_address: "" | ||
details: "* * *" | ||
hop_num: "5" | ||
hops_max: "" | ||
packet_size: "" | ||
packets_per_hop: "" | ||
- address: "8.8.8.8" | ||
destination_address: "" | ||
details: "15.494 ms 15.488 ms 15.469 ms" | ||
hop_num: "6" | ||
hops_max: "" | ||
packet_size: "" | ||
packets_per_hop: "" |