Port Count

looking for a way to gather used port count information over a large network with multiple sites. We have Cisco Works 2000 running and a working knowledge of snmp gets.

Thanks

Reply to
darrelle
Loading thread data ...

Not meaning to be at all snide or whatever, but first you need a really solid definition of what a "used port" is -- one that takes into account that any given connected host might be turned off for the night, or rebooting, or the user might be on vacation...

Cisco switches (and switch cards in routers) usually do not record a "last I/O time" per ethernet port -- just the time that the port last changed state, and whether the port is currently up or not.

Reply to
Walter Roberson

there are a couple of things you might be able to do:

  1. develop a script that will telnet to each swtch and issue a "clear counters" command

  1. after a sufficient period of time, sh interface counters, counting anyphysical interface (not VLAN interface) for which input count is greater than zero

  2. capture the output of "show cam dynamic" and /or "show mac-address-table" and exact the unique phsical interfaces
Reply to
Merv

I like the CAM/MAC table idea ... that wouldnt be too hard to script. With Ciscoworks theres a report you can run that will tell you how many open slots there are in a chassie and how many cards you currently have in it, but it doesnt have anything for port usage. Basicly we are looking for a way to run a report at several differnt times per a day and make some type of weekly report to say how many used network ports we have on our switches throughout our network. We proabaly have about

1000 or more switches ranging from 4503 - 4506 and 5000 serices Cat OS switches.

Thanks for your replies, Ive only been in networking for about 4 years and this is my first job at a large company. I have my CCNA and working on my CCNP

Reply to
darrelle

If you use the sh cam / show mac-address-table make sure you eliminate trunk ports form you counts if you are after "end-user " ports

Reply to
Merv

There is a more accurate way to determine if/when a port was used last.

This is what I've done with a Perl script: Scan all the ports on a switch (via SNMP) for ifStatus Filter for any that are not being used at that time. Then query those ports for ifLastChange (1.3.6.1.2.1.2.2.1.9) - that will report the value of sysUpTime at the time the interface entered its current operational (down) state. Subtract that from the the current sysUpTime and you'll get the amount of time that interface has been down.

If you've done what Walter (above) says about defining what is considered an "unused port" then you'll be able to identify those ports with this method. The method I like to use is: if it's been over 3 months down, then it's not used.

Good luck. J.Cottingim

Reply to
J.Cottingim

To reduce consistancy problems and to improve efficiency, I suggest using an snmp bulkwalk to pull in most of the interfaces tree at one time (unless, that is, that one has a big device which is sparsely populated.)

When you do individual polls, by the time you look at the second piece of information, the validity of the first (the oper-status) might have changed, leading to problems.

If you are producing reports about which ports are used or not, then you are probably going to want additional information from the interfaces tree anyhow, such as the port name and description.

Reply to
Walter Roberson

Just incase some else was wondering about this. We are going to try using a program called switchmap.

Its free and uses perl and snmp gets.

formatting link

Thanks

Reply to
darrelle

I installed SwitchMap. It's interesting but does have a few problems... The "Days Inactive" column (the reason you wanted to use this in the first place) doesn't work. It also reports the switch's own switchport MAC address for any port that's active.

With a little tweaking, I think it'll probably work for you. But I still think a small Perl program that only does what you want would be a better solution.

Good luck.

J.Cottingim

Reply to
J.Cottingim

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.