Skip to content

Commit

Permalink
Cisco ios show interfaces switchport (#433)
Browse files Browse the repository at this point in the history
New template: cisco_ios_show_interfaces_switchport
  • Loading branch information
dainok authored and FragmentedPacket committed Jul 25, 2019
1 parent 86de7a4 commit 61cf56c
Show file tree
Hide file tree
Showing 4 changed files with 204 additions and 0 deletions.
20 changes: 20 additions & 0 deletions templates/cisco_ios_show_interfaces_switchport.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Value Required INTERFACE (\S+)
Value SWITCHPORT (.+)
Value SWITCHPORT_MONITOR (.+)
Value SWITCHPORT_NEGOTIATION (.+)
Value MODE (.+)
Value ACCESS_VLAN (\d+)
Value NATIVE_VLAN (\d+)
Value TRUNKING_VLANS (.+)

Start
^Name: ${INTERFACE}
^\s*Switchport: ${SWITCHPORT}
^\s*Switchport Monitor: ${SWITCHPORT_MONITOR}
^\s*Operational Mode: ${MODE}
^\s*Negotiation of Trunking: ${SWITCHPORT_NEGOTIATION}
^\s*Access Mode VLAN: ${ACCESS_VLAN}
^\s*Trunking Native Mode VLAN: ${NATIVE_VLAN}
^\s*Trunking VLANs Enabled: ${TRUNKING_VLANS} -> Record
^.+$$
^. -> Error
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ cisco_ios_show_interfaces_description.template, .*, cisco_ios, sh[[ow]] int[[erf
cisco_ios_show_ip_device_tracking_all.template, .*, cisco_ios, sh[[ow]] ip de[[vice]] t[[racking]] a[[ll]]
cisco_ios_show_environment_power_all.template, .*, cisco_ios, sh[[ow]] envi[[ronment]] p[[ower]] a[[ll]]
cisco_ios_show_interface_transceiver.template, .*, cisco_ios, sh[[ow]] int[[erface]] trans[[ceiver]]
cisco_ios_show_interfaces_switchport.template, .*, cisco_ios, sh[[ow]] int[[erfaces]] sw[[itchport]]
cisco_ios_show_lldp_neighbors_detail.template, .*, cisco_ios, sh[[ow]] lld[[p]] neig[[hbors]] det[[ail]]
cisco_ios_show_cdp_neighbors_detail.template, .*, cisco_ios, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]]
cisco_ios_show_ipv6_interface_brief.template, .*, cisco_ios, sh[[ow]] ipv[[6]] i[[nterface]] b[[rief]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
parsed_sample:

- access_vlan: '1'
interface: Gi0/1
mode: trunk
native_vlan: '1'
switchport: Enabled
switchport_negotiation: 'Off'
switchport_monitor: ''
trunking_vlans: ALL
- access_vlan: '100'
interface: Gi0/2
mode: static access
native_vlan: '1'
switchport: Enabled
switchport_negotiation: 'On'
switchport_monitor: ''
trunking_vlans: ALL
- access_vlan: '101'
interface: Gi0/3
mode: static access
native_vlan: '1'
switchport: Enabled
switchport_negotiation: 'On'
switchport_monitor: ''
trunking_vlans: ALL
- access_vlan: '110'
interface: Gi1/0
mode: static access
native_vlan: '1'
switchport: Enabled
switchport_negotiation: 'On'
switchport_monitor: ''
trunking_vlans: ALL
- access_vlan: '111'
interface: Gi1/1
mode: static access
native_vlan: '1'
switchport: Enabled
switchport_negotiation: 'On'
switchport_monitor: ''
trunking_vlans: ALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@

Name: Gi0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: Off
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Appliance trust: none

Name: Gi0/2
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 100 (PLC1)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Appliance trust: none

Name: Gi0/3
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 101 (HMI1)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Appliance trust: none

Name: Gi1/0
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 110 (PLC2)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Appliance trust: none

Name: Gi1/1
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 111 (HMI2)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Appliance trust: none

0 comments on commit 61cf56c

Please sign in to comment.