11-23-2003 08:42 PM - edited 03-02-2019 11:55 AM
As you know, we can get the 5 min average packet rate of an interface by using the "sh interface" command. Can I get this statistic using SNMP ? If so, what is the MIB and the MIB object ?
11-24-2003 07:21 AM
You can use the ifInOctets/ifOutOctets (32-bit) and IfHCInOctects/IfHCOutOctets (64-bit) from IF-MIB for this. Also can look at MRTG (www.mrtg.org)
11-24-2003 02:28 PM
I know that MRTG can get the plot of packet rate by reading subsequent values of packet counter at 5min interval and then calculate the average value. However, I want to get the instant 5min packet rate by reading a MIB object (get the result similar to sh interface command). In some DoS cases, it is important for me to get the instant packet rate of each switch port.
Thanks
11-25-2003 08:07 AM
You will get the same value if you look at the MIBs ifInUcastPkts + ifInNUcastPkts and ifOutUcastPkts + ifOutNUcastPkts at a five minute interval. Take reading, subtract previous reading, divide by 300 seconds ((Reading2 - Reading1)/Seconds). You figure you would have to look at the packet rate every five minutes anyway (if it is only a five minute average) so you are not going to be doing much extra work. Also, by reporting the packet counter instead of an average over time, you can get more granular results (just read the value every minute and divide by 60 and you get average over a minute).
11-26-2003 05:54 AM
Our University has more than 20,000 ports. It is not pratical to keep track the byte counts of each port and then calculate the packet rate. We monitor the uplink port of each wirig closet by MRTG only. In case of abnormal traffic like very very high packet rate at the uplink, I want to find out the user port with the highest packet rate by snmp at that time. I prefer to use snmp since it is simple. However, if there is no such MIB available, I will consider to use TELNET moudle of perl to extract the interface statistic directly.
12-02-2003 03:11 AM
Here's a cisco URL which will help you further.
http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a008009496e.shtml
The MIB will differ as per the configuration of your router.
For example :
.1.3.6.1.2.1.2.2.1.16
or
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutOctets
Will give you Outgoing octets on a serial interface.
You can fetch this using MRTG 5 min SNMP scan and get this plotted.
In case you still need live stats I would suggest http://www.paessler.com/index_eng.html.
Hope this is of help.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide