Page 1 of 2
How to check the number of ports on Cisco devices
Posted: Thu Sep 06, 2012 6:47 am
by trungleviet
Dear all,
Is there anyway to check the number of ports on Cisco devices (including up & down ports)?
I would like to know how many ports on a Cisco switch or router?
Many thanks for your supports,
Trung Le Viet
Re: How to check the number of ports on Cisco devices
Posted: Thu Sep 06, 2012 7:42 am
by inventsekar
i assume your question is - how to check the number of ports on cisco devices thru nagios?
ok, let us know how to check it on a usual method, then we can find out how to get that information thru nagios.
i am not sure of this approach, but i believe this would work - googled and found about a command "show interfaces". in that case, i think its like nagios server can run this command and on a remotely monitored cisco device and get the output.
i assume cisco devices can be managed(monitored) easily.
Re: How to check the number of ports on Cisco devices
Posted: Thu Sep 06, 2012 6:28 pm
by jsmurphy
Trung let me introduce you to one of my favourite little unknown gems of Nagios monitoring:
http://exchange.nagios.org/directory/Pl ... 3t/details
This plugin is mostly useful from an informational perspective, it will tell you anything you could possibly want to know about the interfaces on your network gear.
Re: How to check the number of ports on Cisco devices
Posted: Thu Sep 06, 2012 10:14 pm
by trungleviet
Many thanks jsmurphy and inventsekar,
Yes, sure that i would like to use nagios to mornitor the number of cisco devices (including switches, router and firewall).
In my case, because my company is out of Vietnam (i am working at a branch in Vietnam) and all of cisco devices is managing by another team.
When i deployed NagiosXi, i requested to enable SNMP on all cisco devices and used Network Switch / Router Monitoring wizard to monitor these devices with option PortNumber. So, could you please let me know what kind of ports NagiosXi will monitor? Does this include sub-interfaces on a real port, up|down status of that port?
Thanks for your supports so much,
Best Regards,
Trung Le Viet
Re: How to check the number of ports on Cisco devices
Posted: Sun Sep 09, 2012 5:35 pm
by jsmurphy
That's a pretty good question... I like good questions. I ran a quick test and it looks like it captures both physical and sub-ints, though it captures the sub-interfaces as a completely separate entity. That is to say it doesn't appear to recognize the relationship between a physical port and a virtual one.
Now in my case the sub-interface is connected to a vlan and that is how it's recognized... I'm not sure if it would still be recognized if you configure it as a tunnel or something else, though I assume it should show up as a tunnel port or whatever it happens to be. The XI wizard however won't show the interface administrative up/down status it will just simply ping that interface to see if it is alive.
Re: How to check the number of ports on Cisco devices
Posted: Sun Sep 09, 2012 9:53 pm
by trungleviet
Many thanks for you reply, Jsmurphy.
I am not sure my question is pretty good but .. sometimes i still asked silly questions. Haha
Do you have other way(s) to monitoring the number physical ports? I read this article (
http://exchange.nagios.org/directory/Pl ... 3t/details). I look like good but it seems i had some problems in installing and configuring thereforce it did not work.
Many thanks for your support,
Trung Le Viet
Re: How to check the number of ports on Cisco devices
Posted: Mon Sep 10, 2012 7:40 pm
by jsmurphy
If you want to monitor all ports then the XI wizard is the best alternative way to go. There are other plugins like check_snmp_int.pl that I use though that plugin was designed for monitoring specific sets of interfaces rather than all of them... There are many, many more interface monitoring plugins out there, but none that I am familiar with.
Re: How to check the number of ports on Cisco devices
Posted: Mon Sep 10, 2012 10:04 pm
by trungleviet
Yes, i used Xi wizard to check my cisco devices. Below is the result of a Cisco Switch:
Could you please tell me how to count the number of physical ports on this device. Pls see:
Many thanks for your help, jsmurphy.
Service Status Duration Attemp Last Check Status Information
Free Interfaces Ok 16h 21m 24s 1/5 2012-09-11 12:49:52 Interface GigabitEthernet0/13 is free for 137 days.
GigabitEthernet0_1 Bandwidth Ok 233d 22h 11m 24s 1/5 2012-09-11 12:48:35 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_1 Status Ok 64d 22h 43m 37s 1/5 2012-09-11 12:50:50 OK: Interface GigabitEthernet0/1 (index 10101) is up.
GigabitEthernet0_10 Bandwidth Ok 233d 22h 10m 48s 1/5 2012-09-11 12:51:04 OK - Current BW in: 1.72Mbps Out: .64Mbps
GigabitEthernet0_10 Status Ok 12d 23h 0m 20s 1/5 2012-09-11 12:49:33 OK: Interface GigabitEthernet0/10 (index 10110) is up.
GigabitEthernet0_11 Bandwidth Ok 233d 22h 10m 13s 1/5 2012-09-11 12:50:31 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_11 Status Ok 64d 22h 43m 54s 1/5 2012-09-11 12:46:30 OK: Interface GigabitEthernet0/11 (index 10111) is up.
GigabitEthernet0_12 Bandwidth Ok 117d 23h 46m 13s 1/5 2012-09-11 12:49:17 OK - Current BW in: .01Mbps Out: 0Mbps
GigabitEthernet0_12 Status Ok 64d 22h 42m 34s 1/5 2012-09-11 12:47:25 OK: Interface GigabitEthernet0/12 (index 10112) is up.
GigabitEthernet0_13 Bandwidth Ok 233d 22h 14m 4s 1/5 2012-09-11 12:48:23 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_13 Status Critical 64d 22h 24m 55s 5/5 2012-09-11 12:26:28 CRITICAL: Interface GigabitEthernet0/13 (index 10113) is down.
GigabitEthernet0_14 Bandwidth Ok 233d 22h 13m 29s 1/5 2012-09-11 12:49:50 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_14 Status Critical 187d 20h 9m 43s 5/5 2012-09-11 12:31:05 CRITICAL: Interface GigabitEthernet0/14 (index 10114) is down.
GigabitEthernet0_15 Bandwidth Ok 233d 22h 12m 53s 1/5 2012-09-11 12:49:20 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_15 Status Critical 187d 20h 15m 14s 5/5 2012-09-11 12:07:02 CRITICAL: Interface GigabitEthernet0/15 (index 10115) is down.
GigabitEthernet0_16 Bandwidth Ok 233d 22h 12m 17s 1/5 2012-09-11 12:50:25 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_16 Status Critical 187d 20h 3m 42s 5/5 2012-09-11 12:40:25 CRITICAL: Interface GigabitEthernet0/16 (index 10116) is down.
GigabitEthernet0_17 Bandwidth Ok 233d 22h 11m 42s 1/5 2012-09-11 12:46:27 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_17 Status Critical 65d 11h 21m 36s 5/5 2012-09-11 12:42:20 CRITICAL: Interface GigabitEthernet0/17 (index 10117) is down.
GigabitEthernet0_18 Bandwidth Ok 233d 22h 11m 6s 1/5 2012-09-11 12:47:58 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_18 Status Critical 187d 20h 9m 1s 5/5 2012-09-11 12:19:22 CRITICAL: Interface GigabitEthernet0/18 (index 10118) is down.
GigabitEthernet0_19 Bandwidth Ok 233d 22h 10m 30s 1/5 2012-09-11 12:48:10 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_19 Status Critical 65d 11h 27m 14s 5/5 2012-09-11 12:24:02 CRITICAL: Interface GigabitEthernet0/19 (index 10119) is down.
GigabitEthernet0_2 Bandwidth Ok 233d 22h 9m 55s 1/5 2012-09-11 12:49:52 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_2 Status Ok 1d 11h 36m 16s 1/5 2012-09-11 12:50:00 OK: Interface GigabitEthernet0/2 (index 10102) is up.
GigabitEthernet0_20 Bandwidth Ok 233d 22h 14m 22s 1/5 2012-09-11 12:50:18 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_20 Status Critical 187d 20h 15m 17s 5/5 2012-09-11 12:50:43 CRITICAL: Interface GigabitEthernet0/20 (index 10120) is down.
GigabitEthernet0_21 Bandwidth Ok 233d 22h 13m 46s 1/5 2012-09-11 12:49:04 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_21 Status Critical 187d 20h 10m 16s 5/5 2012-09-11 12:30:36 CRITICAL: Interface GigabitEthernet0/21 (index 10121) is down.
GigabitEthernet0_22 Bandwidth Ok 233d 22h 13m 11s 1/5 2012-09-11 12:47:04 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_22 Status Critical 64d 22h 38m 53s 5/5 2012-09-11 12:22:36 CRITICAL: Interface GigabitEthernet0/22 (index 10122) is down.
GigabitEthernet0_3 Bandwidth Ok 233d 22h 12m 35s 1/5 2012-09-11 12:47:58 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_3 Status Ok 64d 22h 49m 35s 1/5 2012-09-11 12:51:04 OK: Interface GigabitEthernet0/3 (index 10103) is up.
GigabitEthernet0_4 Bandwidth Ok 233d 22h 11m 59s 1/5 2012-09-11 12:49:03 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_4 Status Ok 12d 23h 0m 21s 1/5 2012-09-11 12:46:50 OK: Interface GigabitEthernet0/4 (index 10104) is up.
GigabitEthernet0_5 Bandwidth Ok 233d 22h 11m 24s 1/5 2012-09-11 12:48:55 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_5 Status Ok 40d 2h 40m 32s 1/5 2012-09-11 12:46:34 OK: Interface GigabitEthernet0/5 (index 10105) is up.
GigabitEthernet0_6 Bandwidth Ok 233d 22h 10m 48s 1/5 2012-09-11 12:49:53 OK - Current BW in: 0Mbps Out: 0Mbps
GigabitEthernet0_6 Status Ok 64d 22h 50m 14s 1/5 2012-09-11 12:51:04 OK: Interface GigabitEthernet0/6 (index 10106) is up.
GigabitEthernet0_7 Bandwidth Ok 233d 22h 10m 12s 1/5 2012-09-11 12:46:46 OK - Current BW in: .05Mbps Out: .05Mbps
GigabitEthernet0_7 Status Ok 26d 11h 29m 1s 1/5 2012-09-11 12:47:45 OK: Interface GigabitEthernet0/7 (index 10107) is up.
GigabitEthernet0_8 Bandwidth Ok 233d 22h 9m 36s 1/5 2012-09-11 12:49:16 OK - Current BW in: 0Mbps Out: .05Mbps
GigabitEthernet0_8 Status Ok 64d 22h 39m 3s 1/5 2012-09-11 12:46:50 OK: Interface GigabitEthernet0/8 (index 10108) is up.
GigabitEthernet0_9 Bandwidth Ok 233d 22h 14m 4s 1/5 2012-09-11 12:47:45 OK - Current BW in: 0Mbps Out: .04Mbps
GigabitEthernet0_9 Status Ok 64d 22h 47m 53s 1/5 2012-09-11 12:47:31 OK: Interface GigabitEthernet0/9 (index 10109) is up.
Internode_ADSL2_data_centre_link Bandwidth Ok 165d 23h 46m 55s 1/5 2012-09-11 12:17:07 OK - Current BW in: .01Mbps Out: .02Mbps
Ping Ok 9d 8h 11m 46s 1/5 2012-09-11 12:48:54 OK - 192.168.123.12: rta 232.954ms, lost 0%
TO_sw1_dc2 Bandwidth Ok 233d 22h 13m 10s 1/5 2012-09-11 12:48:43 OK - Current BW in: .47Mbps Out: 1.70Mbps
TO_sw1_dc2 Status Ok 12d 23h 0m 7s 1/5 2012-09-11 12:49:16 OK: Interface GigabitEthernet0/23 (index 10123) is up.
TO_sw2_dc2 Bandwidth Ok 233d 22h 12m 35s 1/5 2012-09-11 12:49:58 OK - Current BW in: 2.07Mbps Out: 1.86Mbps
TO_sw2_dc2 Status Ok 26d 11h 30m 31s 1/5 2012-09-11 12:49:48 OK: Interface GigabitEthernet0/24 (index 10124) is up.
Vlan1 Bandwidth Ok 233d 22h 11m 59s 1/5 2012-09-11 12:51:04 OK - Current BW in: 0Mbps Out: 0Mbps
Vlan1 Status Ok 12d 23h 0m 21s 1/5 2012-09-11 12:51:04 OK: Interface Vlan1 (index 1) is up.
Vlan66 Bandwidth Ok 233d 22h 11m 23s 1/5 2012-09-11 12:46:29 OK - Current BW in: 0Mbps Out: 0Mbps
Vlan66 Status Ok 26d 11h 29m 11s 1/5 2012-09-11 12:49:04 OK: Interface Vlan66 (index 66) is up.
Page of 1
Last Updated: 2012-09-11 12:51:16
Re: How to check the number of ports on Cisco devices
Posted: Mon Sep 10, 2012 10:06 pm
by trungleviet
are there 22 physical ports on this switch device? And there are 10 port in free status? I think so

Re: How to check the number of ports on Cisco devices
Posted: Mon Sep 10, 2012 11:12 pm
by trungleviet
Dear Jsmurphy,
I used Xi Winzard and one plugin: check_snmp_free_interfaces.pl
Then i could detecte the number of physical interfaces on the Cisco devices
Many thanks for your supports,
Wish Best Regards,
Trung Le Viet