-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ios show ip dhcp snooping binding (#1751)
* Create cisco_ios_show_ip_dhcp_snooping_binding.textfsm * Add IOS show ip dhcp snooping binding --------- Co-authored-by: Ivan Shires <[email protected]>
- Loading branch information
1 parent
3bfcf6e
commit b3c9445
Showing
4 changed files
with
209 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
ntc_templates/templates/cisco_ios_show_ip_dhcp_snooping_binding.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 Required IP_ADDRESS ((?:[0-9]{1,3}\.){3}[0-9]{1,3}) | ||
Value Required MAC_ADDRESS ([0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}) | ||
Value Required VLAN ([0-9]+) | ||
Value Required INTERFACE (\S+) | ||
Value Required TYPE (\S+) | ||
Value Required LEASE (\S+) | ||
|
||
Start | ||
^\s*M[Aa][Cc]\s*Address\s+I[Pp]\s*Address\s+Lease\(sec\)\s+Type\s+VLAN\s+Interface\s*$$ | ||
^\s*-+\s+-+ | ||
^\s*${MAC_ADDRESS}\s+${IP_ADDRESS}\s+${LEASE}\s+${TYPE}\s+${VLAN}\s+${INTERFACE} -> Record | ||
^\s*Total\s+number\s+of\s+bindings | ||
^\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
30 changes: 30 additions & 0 deletions
30
tests/cisco_ios/show_ip_dhcp_snooping_binding/provided_output.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,30 @@ | ||
MacAddress IpAddress Lease(sec) Type VLAN Interface | ||
------------------ --------------- ---------- ------------- ---- -------------------- | ||
4A:20:93:E5:FA:23 172.16.92.198 1512 dhcp-snooping 1 GigabitEthernet0/5 | ||
14:21:4E:F4:87:5B 172.16.92.217 1765 dhcp-snooping 1 GigabitEthernet0/24 | ||
B8:6E:07:ED:86:55 172.16.92.209 1598 dhcp-snooping 1 GigabitEthernet0/16 | ||
E9:DD:6C:F8:D1:DE 172.16.92.197 1520 dhcp-snooping 1 GigabitEthernet0/4 | ||
5E:00:34:5E:16:E7 172.16.92.206 1767 dhcp-snooping 1 GigabitEthernet0/13 | ||
0E:46:62:44:76:AB 172.16.92.199 1572 dhcp-snooping 1 GigabitEthernet0/6 | ||
08:00:E1:75:DF:68 172.16.92.211 1569 dhcp-snooping 1 GigabitEthernet0/18 | ||
B2:D4:79:F2:DE:9A 172.16.92.195 1703 dhcp-snooping 1 GigabitEthernet0/2 | ||
8A:8B:5E:72:2D:D4 172.16.92.212 1766 dhcp-snooping 1 GigabitEthernet0/19 | ||
52:6F:62:C9:56:76 172.16.92.201 1706 dhcp-snooping 1 GigabitEthernet0/8 | ||
82:8E:29:BC:11:90 172.16.92.196 1514 dhcp-snooping 1 GigabitEthernet0/3 | ||
D2:DC:D1:80:D0:E6 172.16.92.213 1569 dhcp-snooping 1 GigabitEthernet0/20 | ||
5E:CB:5B:39:98:29 172.16.92.216 1575 dhcp-snooping 1 GigabitEthernet0/23 | ||
DA:C3:77:3F:E3:36 172.16.92.202 1653 dhcp-snooping 1 GigabitEthernet0/9 | ||
3E:20:22:8A:7C:A2 172.16.92.205 1766 dhcp-snooping 1 GigabitEthernet0/12 | ||
B0:B8:68:1B:22:D9 172.16.92.210 1653 dhcp-snooping 1 GigabitEthernet0/17 | ||
E2:2A:F2:38:EF:68 172.16.92.220 1765 dhcp-snooping 1 GigabitEthernet0/27 | ||
38:25:96:B4:88:22 172.16.92.200 1767 dhcp-snooping 1 GigabitEthernet0/7 | ||
54:36:63:96:D7:4C 172.16.92.204 1686 dhcp-snooping 1 GigabitEthernet0/11 | ||
1A:AD:FE:27:06:F8 172.16.92.214 1571 dhcp-snooping 1 GigabitEthernet0/21 | ||
8C:A9:83:87:FD:6A 172.16.92.207 1766 dhcp-snooping 1 GigabitEthernet0/14 | ||
73:73:60:35:EC:65 172.16.92.194 1687 dhcp-snooping 1 GigabitEthernet0/1 | ||
FC:AA:2D:97:0A:95 172.16.92.215 1569 dhcp-snooping 1 GigabitEthernet0/22 | ||
8C:13:7D:5C:24:AA 172.16.92.203 1571 dhcp-snooping 1 GigabitEthernet0/10 | ||
AA:3B:E3:12:41:9B 172.16.92.218 1688 dhcp-snooping 1 GigabitEthernet0/25 | ||
BA:DF:39:2C:9A:85 172.16.92.208 1768 dhcp-snooping 1 GigabitEthernet0/15 | ||
10:85:9B:DA:04:09 172.16.92.219 1765 dhcp-snooping 1 GigabitEthernet0/26 | ||
Total number of bindings: 27 |
164 changes: 164 additions & 0 deletions
164
tests/cisco_ios/show_ip_dhcp_snooping_binding/provided_output.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,164 @@ | ||
--- | ||
parsed_sample: | ||
- interface: "GigabitEthernet0/5" | ||
ip_address: "172.16.92.198" | ||
lease: "1512" | ||
mac_address: "4A:20:93:E5:FA:23" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/24" | ||
ip_address: "172.16.92.217" | ||
lease: "1765" | ||
mac_address: "14:21:4E:F4:87:5B" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/16" | ||
ip_address: "172.16.92.209" | ||
lease: "1598" | ||
mac_address: "B8:6E:07:ED:86:55" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/4" | ||
ip_address: "172.16.92.197" | ||
lease: "1520" | ||
mac_address: "E9:DD:6C:F8:D1:DE" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/13" | ||
ip_address: "172.16.92.206" | ||
lease: "1767" | ||
mac_address: "5E:00:34:5E:16:E7" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/6" | ||
ip_address: "172.16.92.199" | ||
lease: "1572" | ||
mac_address: "0E:46:62:44:76:AB" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/18" | ||
ip_address: "172.16.92.211" | ||
lease: "1569" | ||
mac_address: "08:00:E1:75:DF:68" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/2" | ||
ip_address: "172.16.92.195" | ||
lease: "1703" | ||
mac_address: "B2:D4:79:F2:DE:9A" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/19" | ||
ip_address: "172.16.92.212" | ||
lease: "1766" | ||
mac_address: "8A:8B:5E:72:2D:D4" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/8" | ||
ip_address: "172.16.92.201" | ||
lease: "1706" | ||
mac_address: "52:6F:62:C9:56:76" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/3" | ||
ip_address: "172.16.92.196" | ||
lease: "1514" | ||
mac_address: "82:8E:29:BC:11:90" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/20" | ||
ip_address: "172.16.92.213" | ||
lease: "1569" | ||
mac_address: "D2:DC:D1:80:D0:E6" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/23" | ||
ip_address: "172.16.92.216" | ||
lease: "1575" | ||
mac_address: "5E:CB:5B:39:98:29" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/9" | ||
ip_address: "172.16.92.202" | ||
lease: "1653" | ||
mac_address: "DA:C3:77:3F:E3:36" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/12" | ||
ip_address: "172.16.92.205" | ||
lease: "1766" | ||
mac_address: "3E:20:22:8A:7C:A2" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/17" | ||
ip_address: "172.16.92.210" | ||
lease: "1653" | ||
mac_address: "B0:B8:68:1B:22:D9" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/27" | ||
ip_address: "172.16.92.220" | ||
lease: "1765" | ||
mac_address: "E2:2A:F2:38:EF:68" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/7" | ||
ip_address: "172.16.92.200" | ||
lease: "1767" | ||
mac_address: "38:25:96:B4:88:22" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/11" | ||
ip_address: "172.16.92.204" | ||
lease: "1686" | ||
mac_address: "54:36:63:96:D7:4C" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/21" | ||
ip_address: "172.16.92.214" | ||
lease: "1571" | ||
mac_address: "1A:AD:FE:27:06:F8" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/14" | ||
ip_address: "172.16.92.207" | ||
lease: "1766" | ||
mac_address: "8C:A9:83:87:FD:6A" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/1" | ||
ip_address: "172.16.92.194" | ||
lease: "1687" | ||
mac_address: "73:73:60:35:EC:65" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/22" | ||
ip_address: "172.16.92.215" | ||
lease: "1569" | ||
mac_address: "FC:AA:2D:97:0A:95" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/10" | ||
ip_address: "172.16.92.203" | ||
lease: "1571" | ||
mac_address: "8C:13:7D:5C:24:AA" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/25" | ||
ip_address: "172.16.92.218" | ||
lease: "1688" | ||
mac_address: "AA:3B:E3:12:41:9B" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/15" | ||
ip_address: "172.16.92.208" | ||
lease: "1768" | ||
mac_address: "BA:DF:39:2C:9A:85" | ||
type: "dhcp-snooping" | ||
vlan: "1" | ||
- interface: "GigabitEthernet0/26" | ||
ip_address: "172.16.92.219" | ||
lease: "1765" | ||
mac_address: "10:85:9B:DA:04:09" | ||
type: "dhcp-snooping" | ||
vlan: "1" |