-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Template: cisco_ios_show_crypto_session_details (#947)
- Loading branch information
1 parent
8db6b20
commit 7578d4a
Showing
4 changed files
with
170 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
ntc_templates/templates/cisco_ios_show_crypto_session_detail.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,46 @@ | ||
Value Required INTERFACE (\S+) | ||
Value Required SESSION_STATUS (\S+) | ||
Value UPTIME (\S+) | ||
Value Required PEER (\S+) | ||
Value PORT (\d+) | ||
Value FVRF (\S+) | ||
Value IVRF (\S+) | ||
Value DESC (\S+) | ||
Value PHASE1_ID (\S+) | ||
Value SESSION_ID (\d+) | ||
Value LOCAL_IP (\S+) | ||
Value LOCAL_PORT (\d+) | ||
Value REMOTE_IP (\S+) | ||
Value REMOTE_PORT (\S+) | ||
Value IKEV1_STATUS (\S+) | ||
Value CAPABILITIES (\S+) | ||
Value CONN_ID (\d+) | ||
Value LIFETIME (\S+) | ||
Value PERMIT (\S+) | ||
Value SRC_HOST (\S+) | ||
Value DST_HOST (\S+) | ||
Value ACTIVE_SA (\d+) | ||
Value ORIGIN (.+) | ||
|
||
Start | ||
^Crypto\s+.* | ||
^Code: | ||
^K\s+- | ||
^X\s+- | ||
^R\s+- | ||
^Interface: -> Continue.Record | ||
^Interface:\s+${INTERFACE} | ||
^Session\s+status:\s+${SESSION_STATUS} | ||
^Uptime:\s+${UPTIME} | ||
^Peer:\s+${PEER}\s+port\s+${PORT}\s+fvrf:\s+${FVRF}\s+ivrf:\s+${IVRF} | ||
^\s+Desc:\s+${DESC} | ||
^\s+Phase1_id:\s+${PHASE1_ID} | ||
^\s+Session\s+ID:\s+${SESSION_ID} | ||
^\s+IKEv1\s+SA:\s+local\s+${LOCAL_IP}/${LOCAL_PORT}\s+remote\s+${REMOTE_IP}/${REMOTE_PORT}\s+${IKEV1_STATUS} | ||
^\s+Capabilities:${CAPABILITIES}\s+connid:${CONN_ID}\s+lifetime:${LIFETIME} | ||
^\s+IPSEC\s+FLOW:\s+permit\s+${PERMIT}\s+host\s+${SRC_HOST}\s+host\s+${DST_HOST} | ||
^\s+Active\s+SAs:\s+${ACTIVE_SA},\s+origin:\s+${ORIGIN} | ||
^\s+Inbound:\s+#.* | ||
^\s+Outbound:\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
52 changes: 52 additions & 0 deletions
52
tests/cisco_ios/show_crypto_session_detail/cisco_ios_show_crypto_session_detail.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,52 @@ | ||
Crypto session current status | ||
|
||
Code: C - IKE Configuration mode, D - Dead Peer Detection | ||
K - Keepalives, N - NAT-traversal, T - cTCP encapsulation | ||
X - IKE Extended Authentication, F - IKE Fragmentation | ||
R - IKE Auto Reconnect | ||
|
||
Interface: Tunnel1201 | ||
Session status: DOWN-NEGOTIATING | ||
Peer: 10.161.255.14 port 500 fvrf: (none) ivrf: (none) | ||
Desc: (none) | ||
Phase1_id: (none) | ||
Session ID: 0 | ||
IKEv1 SA: local 10.175.200.116/500 remote 10.161.255.14/500 Inactive | ||
Capabilities:(none) connid:0 lifetime:0 | ||
Session ID: 0 | ||
IKEv1 SA: local 10.175.200.116/500 remote 10.161.255.14/500 Inactive | ||
Capabilities:(none) connid:0 lifetime:0 | ||
IPSEC FLOW: permit 47 host 10.175.200.116 host 10.161.255.14 | ||
Active SAs: 0, origin: crypto map | ||
Inbound: #pkts dec'ed 0 drop 0 life (KB/Sec) 0/0 | ||
Outbound: #pkts enc'ed 0 drop 0 life (KB/Sec) 0/0 | ||
|
||
Interface: Tunnel1101 | ||
Uptime: 7w0d | ||
Session status: UP-ACTIVE | ||
Peer: 192.168.0.1 port 4500 fvrf: (none) ivrf: (none) | ||
Phase1_id: SOME_DEVICE1234.1pc.com | ||
Desc: (none) | ||
Session ID: 0 | ||
IKEv1 SA: local 169.0.1.1/4500 remote 192.168.0.1/4500 Active | ||
Capabilities:DN connid:2913 lifetime:09:03:41 | ||
IPSEC FLOW: permit 47 host 169.0.1.1 host 192.168.0.1 | ||
Active SAs: 2, origin: crypto map | ||
Inbound: #pkts dec'ed 15344097 drop 0 life (KB/Sec) 4236992/615 | ||
Outbound: #pkts enc'ed 18074395 drop 0 life (KB/Sec) 4236962/615 | ||
|
||
Interface: Tunnel2201 | ||
Session status: DOWN-NEGOTIATING | ||
Peer: 10.163.255.14 port 500 fvrf: (none) ivrf: (none) | ||
Desc: (none) | ||
Phase1_id: (none) | ||
Session ID: 0 | ||
IKEv1 SA: local 10.175.200.116/500 remote 10.163.255.14/500 Inactive | ||
Capabilities:(none) connid:0 lifetime:0 | ||
Session ID: 0 | ||
IKEv1 SA: local 10.175.200.116/500 remote 10.163.255.14/500 Inactive | ||
Capabilities:(none) connid:0 lifetime:0 | ||
IPSEC FLOW: permit 47 host 10.175.200.116 host 10.163.255.14 | ||
Active SAs: 0, origin: crypto map | ||
Inbound: #pkts dec'ed 0 drop 0 life (KB/Sec) 0/0 | ||
Outbound: #pkts enc'ed 0 drop 0 life (KB/Sec) 0/0 |
71 changes: 71 additions & 0 deletions
71
tests/cisco_ios/show_crypto_session_detail/cisco_ios_show_crypto_session_detail.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,71 @@ | ||
--- | ||
parsed_sample: | ||
- interface: "Tunnel1201" | ||
session_status: "DOWN-NEGOTIATING" | ||
uptime: "" | ||
peer: "10.161.255.14" | ||
port: "500" | ||
fvrf: "(none)" | ||
ivrf: "(none)" | ||
desc: "(none)" | ||
phase1_id: "(none)" | ||
session_id: "0" | ||
local_ip: "10.175.200.116" | ||
local_port: "500" | ||
remote_ip: "10.161.255.14" | ||
remote_port: "500" | ||
ikev1_status: "Inactive" | ||
capabilities: "(none)" | ||
conn_id: "0" | ||
lifetime: "0" | ||
permit: "47" | ||
src_host: "10.175.200.116" | ||
dst_host: "10.161.255.14" | ||
active_sa: "0" | ||
origin: "crypto map" | ||
- interface: "Tunnel1101" | ||
session_status: "UP-ACTIVE" | ||
uptime: "7w0d" | ||
peer: "192.168.0.1" | ||
port: "4500" | ||
fvrf: "(none)" | ||
ivrf: "(none)" | ||
desc: "(none)" | ||
phase1_id: "SOME_DEVICE1234.1pc.com" | ||
session_id: "0" | ||
local_ip: "169.0.1.1" | ||
local_port: "4500" | ||
remote_ip: "192.168.0.1" | ||
remote_port: "4500" | ||
ikev1_status: "Active" | ||
capabilities: "DN" | ||
conn_id: "2913" | ||
lifetime: "09:03:41" | ||
permit: "47" | ||
src_host: "169.0.1.1" | ||
dst_host: "192.168.0.1" | ||
active_sa: "2" | ||
origin: "crypto map" | ||
- interface: "Tunnel2201" | ||
session_status: "DOWN-NEGOTIATING" | ||
uptime: "" | ||
peer: "10.163.255.14" | ||
port: "500" | ||
fvrf: "(none)" | ||
ivrf: "(none)" | ||
desc: "(none)" | ||
phase1_id: "(none)" | ||
session_id: "0" | ||
local_ip: "10.175.200.116" | ||
local_port: "500" | ||
remote_ip: "10.163.255.14" | ||
remote_port: "500" | ||
ikev1_status: "Inactive" | ||
capabilities: "(none)" | ||
conn_id: "0" | ||
lifetime: "0" | ||
permit: "47" | ||
src_host: "10.175.200.116" | ||
dst_host: "10.163.255.14" | ||
active_sa: "0" | ||
origin: "crypto map" |