Skip to content

Commit

Permalink
Adding cisco nxos show interface snmp-ifindex. (networktocode#1569)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicholas Nelson - 10105570 <[email protected]>
  • Loading branch information
2 people authored and mjbear committed Jan 7, 2024
1 parent f84de78 commit 0e0c3d4
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Value PORT (\S+)
Value IFMIB (\S+)
Value IFINDEX_HEX (\S+)

Start
^Port\s+IFMIB\s+Ifindex\s+\(hex\)\s*$$
^${PORT}\s+${IFMIB}\s+\(${IFINDEX_HEX}\s*\)\s*$$ -> Record
^-*$$
^\s*$$
^. -> Error

EOF
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ cisco_nxos_show_environment_temperature.textfsm, .*, cisco_nxos, sh[[ow]] env[[i
cisco_nxos_show_ip_msdp_summary_vrf_all.textfsm, .*, cisco_nxos, sh[[ow]] ip msdp summary vrf all
cisco_nxos_show_ip_ospf_interface_brief.textfsm, .*, cisco_nxos, sh[[ow]] ip ospf int[[erface]] b[[rief]](?: vrf \S+)?\s*$
cisco_nxos_show_ip_pim_neighbor_vrf_all.textfsm, .*, cisco_nxos, sh[[ow]] ip pim nei[[ghbor]] vrf all
cisco_nxos_show_interface_snmp-ifindex.textfsm, .*, cisco_nxos, sh[[ow]] int[[erface]] sn[[mp-ifindex]]
cisco_nxos_show_forwarding_ipv4_route.textfsm, .*, cisco_nxos, sh[[ow]] fo[[rwarding]] ipv4 ro[[ute]]
cisco_nxos_show_interface_description.textfsm, .*, cisco_nxos, sh[[ow]] int[[erface]] desc[[ription]]
cisco_nxos_show_interface_transceiver.textfsm, .*, cisco_nxos, sh[[ow]] int[[erface]] tra[[nsceiver]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

--------------------------------------------------------------------------------
Port IFMIB Ifindex (hex)
--------------------------------------------------------------------------------
mgmt0 83886080 (0x5000000 )
Eth9/1 440401920 (0x1a400000)
Eth9/2 440406016 (0x1a401000)
Eth9/3 440410112 (0x1a402000)
Eth9/4 440414208 (0x1a403000)
Eth9/4.10 440414218 (0x1a40300a)
Eth9/5/1 960659456 (0x39428000)
Eth9/5/2 960663552 (0x39429000)
Eth9/5/3 960667648 (0x3942a000)
Eth9/5/4 960671744 (0x3942b000)
Eth9/6/1 960700416 (0x39432000)
Eth9/6/2 960704512 (0x39433000)
Eth9/6/3 960708608 (0x39434000)
Eth9/6/4 960712704 (0x39435000)
Eth9/7 440426496 (0x1a406000)
Eth9/8 440430592 (0x1a407000)
Eth9/9 440434688 (0x1a408000)
Eth9/10 440438784 (0x1a409000)
Eth9/11 440442880 (0x1a40a000)
Eth9/12 440446976 (0x1a40b000)
Po1 369098752 (0x16000000)
Lo0 335544320 (0x14000000)
Vlan1 151126017 (0x9020001)
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
parsed_sample:
- port: "mgmt0"
ifmib: "83886080"
ifindex_hex: "0x5000000"
- port: "Eth9/1"
ifmib: "440401920"
ifindex_hex: "0x1a400000"
- port: "Eth9/2"
ifmib: "440406016"
ifindex_hex: "0x1a401000"
- port: "Eth9/3"
ifmib: "440410112"
ifindex_hex: "0x1a402000"
- port: "Eth9/4"
ifmib: "440414208"
ifindex_hex: "0x1a403000"
- port: "Eth9/4.10"
ifmib: "440414218"
ifindex_hex: "0x1a40300a"
- port: "Eth9/5/1"
ifmib: "960659456"
ifindex_hex: "0x39428000"
- port: "Eth9/5/2"
ifmib: "960663552"
ifindex_hex: "0x39429000"
- port: "Eth9/5/3"
ifmib: "960667648"
ifindex_hex: "0x3942a000"
- port: "Eth9/5/4"
ifmib: "960671744"
ifindex_hex: "0x3942b000"
- port: "Eth9/6/1"
ifmib: "960700416"
ifindex_hex: "0x39432000"
- port: "Eth9/6/2"
ifmib: "960704512"
ifindex_hex: "0x39433000"
- port: "Eth9/6/3"
ifmib: "960708608"
ifindex_hex: "0x39434000"
- port: "Eth9/6/4"
ifmib: "960712704"
ifindex_hex: "0x39435000"
- port: "Eth9/7"
ifmib: "440426496"
ifindex_hex: "0x1a406000"
- port: "Eth9/8"
ifmib: "440430592"
ifindex_hex: "0x1a407000"
- port: "Eth9/9"
ifmib: "440434688"
ifindex_hex: "0x1a408000"
- port: "Eth9/10"
ifmib: "440438784"
ifindex_hex: "0x1a409000"
- port: "Eth9/11"
ifmib: "440442880"
ifindex_hex: "0x1a40a000"
- port: "Eth9/12"
ifmib: "440446976"
ifindex_hex: "0x1a40b000"
- port: "Po1"
ifmib: "369098752"
ifindex_hex: "0x16000000"
- port: "Lo0"
ifmib: "335544320"
ifindex_hex: "0x14000000"
- port: "Vlan1"
ifmib: "151126017"
ifindex_hex: "0x9020001"

0 comments on commit 0e0c3d4

Please sign in to comment.