This is a disclaimer: Using the notes below is dangerous for both your sanity and peace of mind. If you still want to read them beware of the fact that they may be "not even wrong". Everything I write in there is just a mnemonic device to give me a chance to fix things I badly broke because I'm bloody stupid and think I can tinker with stuff that is way above my head and go away with it. It reminds me of Gandalf's warning: "Perilous to all of us are the devices of an art deeper than we ourselves possess." Moreover, a lot of it I blatantly stole on the net from other obviously cleverer persons than me -- not very hard. Forgive me. My bad. Please consider it and go away. You have been warned!
MRTG (Multi Router Traffic Grapher) Setup at the BIC
(:toc:)
Introduction
- The BIC has acquired 4 Cisco switches, model SB300–52 — Small Business Switch with 52x 1000Gibs ports.
- Those switched are manageable, can be used as L2 or L3 switches (L2 as we speak) and are SNMP aware.
- We want to collect statistics on their performance and throughputs.
- We will use the current NMS system to probe their SNMP agents.
- 20150416: Added the Cisco 10 Gigabit Ethernet switch Nexus-5000 to the MRTG setup.
Software Base
The following pieces of software are installed on the current NMS system:
ii mrtg 2.16.3-3 multi router traffic grapher ii mrtg-contrib 2.16.3-3 multi router traffic grapher (contributed files) ii mrtg-rrd 0.7-3 The script for generating graphs for MRTG statistics ii mrtgutils 0.7 Utilities to generate statistics for mrtg
Also required along those are the RRD tools and utilities, perl, zlib, libpng, libgd2, etc, and obviously the whole suite of SNMP tools:
ii librrd4 1.4.3-1 time-series data storage and display system (runtime library) ii librrds-perl 1.4.3-1 time-series data storage and display system (Perl interface, s ii mrtg-rrd 0.7-3 The script for generating graphs for MRTG statistics ii rrdtool 1.4.3-1 time-series data storage and display system (programs) ii libnet-snmp-perl 5.2.0-4 Script SNMP connections ii libsnmp-base 5.4.3~dfsg-2+squeeze1 SNMP (Simple Network Management Protocol) MIBs and documentation ii libsnmp-perl 5.4.3~dfsg-2+squeeze1 SNMP (Simple Network Management Protocol) Perl5 support ii libsnmp-session-perl 1.13-1 Perl support for accessing SNMP-aware devices ii libsnmp15 5.4.3~dfsg-2+squeeze1 SNMP (Simple Network Management Protocol) library ii nagios-snmp-plugins 1.1.1-7 SNMP Plugins for nagios ii snmp 5.4.3~dfsg-2+squeeze1 SNMP (Simple Network Management Protocol) applications ii snmp-mibs-downloader 1.1 Install and manage Management Information Base (MIB) files ii snmpd 5.4.3~dfsg-2+squeeze1 SNMP (Simple Network Management Protocol) agents ii snmptrapfmt 1.14 A configurable snmp trap handler daemon for snmpd ii snmptt 1.3-1 SNMP trap handler for use with snmptrapd
MRTG Config
- Check that SNMPV2 is enabled on the switch with the proper community name.
- Allow SNMP access from the
NMS
to the switchsw-b4-u35
. - The use of
public
as the community name is not recommanded: this is only meant as an example. - Test SNMPV2 access from the
NMS
withsnmpwalk
for example. Lets query the objectsystem
in SNMPv2-MIB:
matsya:~# snmpwalk -Os -c public -v 2c sw-b4-u35 system SNMPv2-MIB::sysDescr.0 = STRING: 52-Port Gigabit Managed Switch SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.9.6.1.83.52.1 SNMPv2-MIB::sysUpTime.0 = Timeticks: (59447800) 6 days, 21:07:58.00 SNMPv2-MIB::sysContact.0 = STRING: bicadmin@bic.mni.mcgill.ca SNMPv2-MIB::sysName.0 = STRING: sw-b4-u35 SNMPv2-MIB::sysLocation.0 = STRING: WB212 Rack B4-U35 SNMPv2-MIB::sysServices.0 = INTEGER: 2 SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00 SNMPv2-MIB::sysORID.1 = OID: SNMPv2-SMI::enterprises.89.73 SNMPv2-MIB::sysORDescr.1 = STRING: RS capabilities SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
- The MRTG will run as user and group
www-data
so/var/www/mrtg
must belong towww-data
. - A few other files (pid, etc) and directories ownerships and permissions will have to be modified.
chown www-data.www-data /var/log/mrtg/* chgrp -R www-data /var/www/mrtg chmod g+w -R /var/www/mrtg chgrp www-data /var/lock/mrtg chown www-data /var/lock/mrtg chmod g+w /var/lock/mrtg chmod g+s /var/lock/mrtg chown www-data.www-data /var/lib/mrtg chown www-data.www-data /etc/mrtg
- Use the utility
cfgmaker
to create a starting config. It will be fine-tuned later:
/usr/bin/cfgmaker --global "WorkDir: /var/www/mrtg" --global "Options[_]: bits,growright" --output /etc/mrtg/mrtg.cfg public@sw-b4-u35
- The ouput file
/etc/mrtg/mrtg.cfg
will contain a run-of-mill config. - A few errors will be produced the first 2 time the command
/usr/bin/mrtg —user www-data —group www-data /etc/mrtg/mrtg.cfg
. - Satisfy yourself that the log and png files are correctly created.
- Modify
/etc/mrtg/mrtg.cfg
to runmrtg
as a daemon and uses RRD tools rather than text logfiles. - Insert an
Include
directive for thesw-b4-u35
targets.
# Created by # /usr/bin/cfgmaker --global "WorkDir: /var/www/mrtg" --global "Options[_]: bits,growright" --output /etc/mrtg/mrtg.cfg public@sw-b4-u35 ### Global Config Options # for Debian WorkDir: /var/www/mrtg ### Global Defaults # to get bits instead of bytes and graphs growing to the right # Options[_]: growright, bits EnableIPv6: no Options[_]: bits,growright LogFormat: rrdtool IconDir: /mrtg/ RunAsDaemon: Yes Interval: 5 Include: /etc/mrtg/sw-b4-u35.cfg
/etc/mrtg/sw-b4-u35.cfg
##################################################################### # System: sw-b4-u35 # Description: 52-Port Gigabit Managed Switch # Contact: bicadmin@bic.mni.mcgill.ca # Location: WB212 Rack B4-U35 ###################################################################### ### Interface 70 >> Descr: 'gigabitethernet22' | Name: 'gi22' | Ip: '' | Eth: '30-78-33-34-61-38-34-65-30-36-65-64-61-65' ### Target[sw-b4-u35_70]: 70:public@sw-b4-u35:::::2 SetEnv[sw-b4-u35_70]: MRTG_INT_IP="" MRTG_INT_DESCR="gigabitethernet22" MaxBytes[sw-b4-u35_70]: 125000000 Title[sw-b4-u35_70]: Traffic Analysis for 70 -- sw-b4-u35 PageTop[sw-b4-u35_70]: <h1>Traffic Analysis for 70 -- sw-b4-u35</h1> <div id="sysdetails"> <table> <tr> <td>System:</td> <td>sw-b4-u35 in WB212 Rack B4-U35</td> </tr> <tr> <td>Maintainer:</td> <td>bicadmin@bic.mni.mcgill.ca</td> </tr> <tr> <td>Description:</td> <td>gigabitethernet22 </td> </tr> <tr> <td>ifType:</td> <td>ethernetCsmacd (6)</td> </tr> <tr> <td>ifName:</td> <td>gi22</td> </tr> <tr> <td>Max Speed:</td> <td>1000.0 Mbits/s</td> </tr> </table> </div> #---%<----%<-----
- Cisco switches SGx00 SNMP implementation offsets switchport numbers by 48.
- The directive
Target[sw-b4-u35_70]: 70:public@sw-b4-u35:::::2
specifies to query gigabit ethernet port 22 (70 = 22 + 48
). - Counters will be returned as 32bit numbers and wrap-around will probably occur in 5 minutes for gigabit interface. SNMPV2C uses 64 bits counters.
:::::2
specifies to use SNMPV2c to query the agent.- It can added automatically using the option
—snmp-options=:::::2
when usingcfgmaker
Unicasts, Broadcasts and Multicasts Statistics
- The Cisco switch SB300–52 doesn’t seem to return any 64bit counters for the delivered and transmitted packets.
- Use the 32bit counters defined in the MIB IF-MIB::ifMIB
# Those are all 32bit counters. XX is the port number to query. # # IF-MIB::ifInUcastPkts.XX (.1.3.6.1.2.1.2.2.1.11.XX) # IF-MIB::ifInBroadcastPkts.XX (.1.3.6.1.2.1.31.1.1.1.3.XX) # IF-MIB::ifInMulticastPkts.XX (.1.3.6.1.2.1.31.1.1.1.2.XX) # IF-MIB::ifInDiscards (.1.3.6.1.2.1.2.2.1.13.XX) # IF-MIB::ifInErrors (.1.3.6.1.2.1.2.2.1.14.XX) # IF-MIB::ifOutUcastPkts.XX (.1.3.6.1.2.1.2.2.1.17.XX) # IF-MIB::ifOutBroadcastPkts.XX (.1.3.6.1.2.1.31.1.1.1.5.XX) # IF-MIB::ifOutMulticastPkts.XX (.1.3.6.1.2.1.31.1.1.1.4.XX) # IF-MIB::ifOutDiscards (.1.3.6.1.2.1.2.2.1.19.XX) # IF-MIB::ifOutErrors (.1.3.6.1.2.1.2.2.1.20.XX)
- A generic, template definition for Unicast packets.
- Use the fact that MRTG knows a number of symbolic OIDs by name.
- RTFM
man mrtg-mibhelp
for all the details.
# Unicast Packets # Replace XX by the switchport number and YY by XX+48. Target[sw-b4-u35_YY_unicast]: ifInUcastPkts.YY&ifOutUcastPkts.YY:cisc0cisc0@sw-b4-u35 MaxBytes[sw-b4-u35_YY_unicast]: 125000000 Title[sw-b4-u35_YY_unicast]: Unicast Traffic Analysis for port XX -- sw-b4-u35 ShortLegend[sw-b4-u35_YY_unicast]: Packet/s YLegend[sw-b4-u35_YY_unicast]: Packet/s Legend1[sw-b4-u35_YY_unicast]: Delivered Packets/s Legend2[sw-b4-u35_YY_unicast]: Transmited Packets/s LegendI[sw-b4-u35_YY_unicast]: Delivered Packets/s LegendO[sw-b4-u35_YY_unicast]: Transmitted Packets/s PageTop[sw-b4-u35_YY_unicast]: <h1>Unicast Traffic Analysis for port XX -- sw-b4-u35</h1> <div id="sysdetails"> <table> <tr> <td>System:</td> <td>sw-b4-u35 in WB212 Rack B4-U35</td> </tr> <tr> <td>Maintainer:</td> <td>bicadmin@bic.mni.mcgill.ca</td> </tr> <tr> <td>Description:</td> <td>gigabitethernetXX </td> </tr> <tr> <td>ifName:</td> <td>giXX</td> </tr> </table> </div>
- You want broadcast traffic? Just
s/unicast/broadcast/gc
in the above. - Replace
ifInUcastPkts.YY
byifInBroadcastPkts.YY
andifOutUcastPkts.YY
byifOutBroadcastPkts.YY
Switch CPU utilization
- OID
.1.3.6.1.4.1.9.6.1.101.1.8
is defined in the MIB rlCpuUtilDuringLastMinute
~# snmptranslate -Of CISCOSB-rndMng::rndMng.rlCpuUtilDuringLastMinute .iso.org.dod.internet.private.enterprises.9.6.1.switch001.rndMng.rlCpuUtilDuringLastMinute ~# snmptranslate -Ofn CISCOSB-rndMng::rndMng.rlCpuUtilDuringLastMinute .1.3.6.1.4.1.9.6.1.101.1.8
- Use
rlCpuUtilDuringLast5Minutes
(OID.1.3.6.1.4.1.9.6.1.101.1.9
) for the last 5 minutes usage. - The switch CPU usage in percent can can be plotted with the following target definition:
#/JF/ 20150320. Stolen from http://pmoghadam.com/homepage/HTML/MRTG-cpu-mem-cisco.html with a few mods. Target[sw-b4-u35_cpu]: .1.3.6.1.4.1.9.6.1.101.1.8.0&.1.3.6.1.4.1.9.6.1.101.1.9.0:public@sw-b4-u35:::::2 Title[sw-b4-u35_cpu]: CPU Utilization for sw-b4-u35 MaxBytes[sw-b4-u35_cpu]: 100 ShortLegend[sw-b4-u35_cpu]: % YLegend[sw-b4-u35_cpu]: % of CPU Load Legend1[sw-b4-u35_cpu]: CPU Utilization LegendI[sw-b4-u35_cpu]: CPU Load : LegendO[sw-b4-u35_cpu]: Options[sw-b4-u35_cpu]: nopercent, gauge, integer, growright, derive, pngdate Unscaled[sw-b4-u35_cpu]: ymwd PageTop[sw-b4-u35_cpu]: <h1>CPU Utilization for sw-b4-u35</h1> <div id="sysdetails"> <table> <tr> <td>System:</td> <td>sw-b4-u35 in WB212 Rack B4-U35</td> </tr> <tr> <td>Maintainer:</td> <td>bicadmin@bic.mni.mcgill.ca</td> </tr> </table> </div>
Web Config
- The package
mrtg-rrd
provides a cgi-bin perl executable/usr/lib/cgi-bin/mrtg-rrd.cgi
that will do all the jobs. - Only thing required is to allow access the cgi-bin directory and the MRTG working directory specified with the directive
WorkDir=/var/www/mrtg
in its config file/etc/mrtg/mrtg.cfg
.
<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order Deny,Allow Deny from all Allow from 132.206.178. Allow from 65.94.233.61 # JF at home Allow from 172.16.50.44 # OpenVPN access from mobile devices. </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order Deny,Allow Deny from all Allow from 132.206.178. Allow from 65.94.233.61 # JF at home Allow from 172.16.50.44 # OpenVPN access from mobile devices. </Directory>
MRTG Init Script
- Create the file
/etc/default/mrtg
that will contains options to be passed tomrtg
>
NAME=mrtg PIDFILE=/etc/mrtg/$NAME.pid CONFIG=/etc/mrtg/mrtg.cfg #DAEMON_ARGS="--user www-data --group www-data --debug=base,tarp,snpo,snpo2 --logging /var/log/mrtg/mrtg.log --pid-file=$PIDFILE" DAEMON_ARGS="--user www-data --group www-data --pid-file=$PIDFILE"
- I stole an init script and modified it to fit with Debian LSB:
#! /bin/sh ### BEGIN INIT INFO # Provides: mrtg # Required-Start: # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: mrtg init script # Description: This file is used to start, stop, restart, # and determined status of the mrtg daemon. # Author: iasptk.com ; ### END INIT INFO ### START OF SCRIPT set -e # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="mrtg" NAME=mrtg DAEMON=/usr/bin/$NAME DAEMON_ARGS="/etc/mrtg/mrtg.cfg" PIDFILE=/etc/mrtg/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME # Reads config file (will override defaults above) [ -r /etc/default/mrtg ] && . /etc/default/mrtg # Exit if the mrtg package is not installed [ -x "$DAEMON" ] || exit 0 # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions # Function that starts the mrtg daemon start() { env LANG=C start-stop-daemon --start --quiet \ --exec $DAEMON -- $DAEMON_ARGS $CONFIG } # Function that stops the mrtg daemon stop() { start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 \ --pidfile $PIDFILE } case "$1" in start) log_daemon_msg "Starting $DESC" start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; esac ;; stop) log_daemon_msg "Stopping $DESC" stop case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; esac ;; restart|force-reload) log_daemon_msg "Restarting $DESC" stop case "$?" in 0|1) start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; esac ;; esac ;; status) status_of_proc "$DAEMON" "$NAME" ;; *) echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" ;; esac exit 0 ### END OF SCRIPT
- Create the init scripts for different run-levels:
update-rc.d mrtg defaults
Cisco Nexus-5010 20 ports 10GbE Switch
- Open a ssh session to the switch and through the CLI:
- Create a SNMP v2c community on the switch that belongs to the group
network-operator
(read-only). - Don’t forget to copy the running config to the startup one!
- This shows some snmp roles defined on the switch by default.
sw10-xge# show snmp group Role: network-admin Description: Predefined network admin role has access to all commands on the switch ------------------------------------------------------------------- Rule Perm Type Scope Entity ------------------------------------------------------------------- 1 permit read-write Role: network-operator Description: Predefined network operator role has access to all read commands on the switch ------------------------------------------------------------------- Rule Perm Type Scope Entity ------------------------------------------------------------------- 1 permit read ...
- Create the commnunity and save the switch running config to the startup config.
- Please don’t use
public
as the community name!
sw10-xge# configure terminal Enter configuration commands, one per line. End with CNTL/Z. sw10-xge(config)# snmp community <community> group network-operator sw10-xge(config)# exit sw10-xge# copy running-config startup-config [########################################] 100%
- Test if one can SNMP walk the system MIB
matsya:~# snmpwalk -Os -v 2c -c <community> sw10-xge SNMPv2-MIB::system sysDescr.0 = STRING: Cisco NX-OS(tm) n5000, Software (n5000-uk9), Version 5.0(2)N2(1), RELEASE SOFTWARE Copyright (c) 2002-2010 by Cisco Systems, Inc. Device Manager Version 5.0(4a), Compiled 12/18/2010 23:00:00 sysObjectID.0 = OID: enterprises.9.12.3.1.3.798 sysUpTime.0 = Timeticks: (920561360) 106 days, 13:06:53.60 sysContact.0 = STRING: bicadmin@bic.mni.mcgill.ca sysName.0 = STRING: sw10-xge sysLocation.0 = STRING: Room-WB212-Rack-B3-U36 sysServices.0 = INTEGER: 70 sysORLastChange.0 = Timeticks: (2) 0:00:00.02 sysORID.1 = OID: snmpMIB sysORID.2 = OID: snmpModules.16.2.2.1 sysORID.3 = OID: snmpModules.10.3.1.1 sysORID.4 = OID: snmpModules.11.3.1.1 sysORID.5 = OID: snmpModules.15.2.1.1 sysORDescr.1 = STRING: The MIB module for SNMPv2 entities sysORDescr.2 = STRING: View-based Access Control Model for SNMP. sysORDescr.3 = STRING: The SNMP Management Architecture MIB. sysORDescr.4 = STRING: The MIB for Message Processing and Dispatching. sysORDescr.5 = STRING: The management information definitions for the SNMP User-based Security Model. sysORUpTime.1 = Timeticks: (1) 0:00:00.01 sysORUpTime.2 = Timeticks: (1) 0:00:00.01 sysORUpTime.3 = Timeticks: (2) 0:00:00.02 sysORUpTime.4 = Timeticks: (2) 0:00:00.02 sysORUpTime.5 = Timeticks: (2) 0:00:00.02
- Awesome!
- Test if one can walk the ifMIB MIB (needed to get conters and traffic statistics on the switch).
- We are not interested in the 32bit counters so I omit them from the output.
- Note the numbering scheme for interface names
ifName
- Ethernet1/1 starts at 436207616 (416*1024^2) and interleaved by 96. No clue why.
matsya:~# snmpwalk -Os -v 2c -c <community> sw10-xge IF-MIB::ifMIB ifName.83886080 = STRING: mgmt0 ifName.436207616 = STRING: Ethernet1/1 ifName.436211712 = STRING: Ethernet1/2 ifName.436215808 = STRING: Ethernet1/3 ifName.436219904 = STRING: Ethernet1/4 ifName.436224000 = STRING: Ethernet1/5 ifName.436228096 = STRING: Ethernet1/6 ifName.436232192 = STRING: Ethernet1/7 ifName.436236288 = STRING: Ethernet1/8 ifName.436240384 = STRING: Ethernet1/9 ifName.436244480 = STRING: Ethernet1/10 ifName.436248576 = STRING: Ethernet1/11 ifName.436252672 = STRING: Ethernet1/12 ifName.436256768 = STRING: Ethernet1/13 ifName.436260864 = STRING: Ethernet1/14 ifName.436264960 = STRING: Ethernet1/15 ifName.436269056 = STRING: Ethernet1/16 ifName.436273152 = STRING: Ethernet1/17 ifName.436277248 = STRING: Ethernet1/18 ifName.436281344 = STRING: Ethernet1/19 ifName.436285440 = STRING: Ethernet1/20 ifHCInOctets.83886080 = Counter64: 24095998233 ifHCInOctets.436207616 = Counter64: 0 ifHCInOctets.436211712 = Counter64: 531886488970 ifHCInOctets.436215808 = Counter64: 56677308013362 ifHCInOctets.436219904 = Counter64: 157489219794760 ifHCInOctets.436224000 = Counter64: 29582256630506 ifHCInOctets.436228096 = Counter64: 14566289217649 ifHCInOctets.436232192 = Counter64: 1533894220208 ifHCInOctets.436236288 = Counter64: 1478222692402 ifHCInOctets.436240384 = Counter64: 2179048175843 ifHCInOctets.436244480 = Counter64: 1996717222694 ifHCInOctets.436248576 = Counter64: 60311781562 ifHCInOctets.436252672 = Counter64: 14072983023906 ifHCInOctets.436256768 = Counter64: 0 ifHCInOctets.436260864 = Counter64: 0 ifHCInOctets.436264960 = Counter64: 23666501100676 ifHCInOctets.436269056 = Counter64: 0 ifHCInOctets.436273152 = Counter64: 0 ifHCInOctets.436277248 = Counter64: 0 ifHCInOctets.436281344 = Counter64: 1500106395099 ifHCInOctets.436285440 = Counter64: 71007589203221 ifHCInUcastPkts.83886080 = Counter64: 574848 ifHCInUcastPkts.436207616 = Counter64: 0 ifHCInUcastPkts.436211712 = Counter64: 1888857611 ifHCInUcastPkts.436215808 = Counter64: 6916055039 ifHCInUcastPkts.436219904 = Counter64: 19839825674 ifHCInUcastPkts.436224000 = Counter64: 3530789605 ifHCInUcastPkts.436228096 = Counter64: 11318722543 ifHCInUcastPkts.436232192 = Counter64: 399756295 ifHCInUcastPkts.436236288 = Counter64: 458673381 ifHCInUcastPkts.436240384 = Counter64: 548373956 ifHCInUcastPkts.436244480 = Counter64: 478106430 ifHCInUcastPkts.436248576 = Counter64: 860106035 ifHCInUcastPkts.436252672 = Counter64: 1978600912 ifHCInUcastPkts.436256768 = Counter64: 0 ifHCInUcastPkts.436260864 = Counter64: 0 ifHCInUcastPkts.436264960 = Counter64: 3057843282 ifHCInUcastPkts.436269056 = Counter64: 0 ifHCInUcastPkts.436273152 = Counter64: 0 ifHCInUcastPkts.436277248 = Counter64: 0 ifHCInUcastPkts.436281344 = Counter64: 652402408 ifHCInUcastPkts.436285440 = Counter64: 8825169883 ifHCInMulticastPkts.83886080 = Counter64: 38767617 ifHCInMulticastPkts.436207616 = Counter64: 0 ifHCInMulticastPkts.436211712 = Counter64: 28 ifHCInMulticastPkts.436215808 = Counter64: 1653979 ifHCInMulticastPkts.436219904 = Counter64: 5234 ifHCInMulticastPkts.436224000 = Counter64: 151404 ifHCInMulticastPkts.436228096 = Counter64: 593 ifHCInMulticastPkts.436232192 = Counter64: 2773 ifHCInMulticastPkts.436236288 = Counter64: 50 ifHCInMulticastPkts.436240384 = Counter64: 7152 ifHCInMulticastPkts.436244480 = Counter64: 3227 ifHCInMulticastPkts.436248576 = Counter64: 0 ifHCInMulticastPkts.436252672 = Counter64: 3393 ifHCInMulticastPkts.436256768 = Counter64: 0 ifHCInMulticastPkts.436260864 = Counter64: 0 ifHCInMulticastPkts.436264960 = Counter64: 92 ifHCInMulticastPkts.436269056 = Counter64: 0 ifHCInMulticastPkts.436273152 = Counter64: 0 ifHCInMulticastPkts.436277248 = Counter64: 0 ifHCInMulticastPkts.436281344 = Counter64: 5055591 ifHCInMulticastPkts.436285440 = Counter64: 384623 ifHCInBroadcastPkts.83886080 = Counter64: 133111220 ifHCInBroadcastPkts.436207616 = Counter64: 0 ifHCInBroadcastPkts.436211712 = Counter64: 53018 ifHCInBroadcastPkts.436215808 = Counter64: 16329 ifHCInBroadcastPkts.436219904 = Counter64: 6201 ifHCInBroadcastPkts.436224000 = Counter64: 138443 ifHCInBroadcastPkts.436228096 = Counter64: 17748 ifHCInBroadcastPkts.436232192 = Counter64: 6989 ifHCInBroadcastPkts.436236288 = Counter64: 6928 ifHCInBroadcastPkts.436240384 = Counter64: 8472 ifHCInBroadcastPkts.436244480 = Counter64: 6998 ifHCInBroadcastPkts.436248576 = Counter64: 24 ifHCInBroadcastPkts.436252672 = Counter64: 6841 ifHCInBroadcastPkts.436256768 = Counter64: 0 ifHCInBroadcastPkts.436260864 = Counter64: 0 ifHCInBroadcastPkts.436264960 = Counter64: 8045 ifHCInBroadcastPkts.436269056 = Counter64: 0 ifHCInBroadcastPkts.436273152 = Counter64: 0 ifHCInBroadcastPkts.436277248 = Counter64: 0 ifHCInBroadcastPkts.436281344 = Counter64: 143669 ifHCInBroadcastPkts.436285440 = Counter64: 106470 ifHCOutOctets.83886080 = Counter64: 64615251 ifHCOutOctets.436207616 = Counter64: 0 ifHCOutOctets.436211712 = Counter64: 48584788050200 ifHCOutOctets.436215808 = Counter64: 1653596676786 ifHCOutOctets.436219904 = Counter64: 11513140108771 ifHCOutOctets.436224000 = Counter64: 1206972592544 ifHCOutOctets.436228096 = Counter64: 259437494302170 ifHCOutOctets.436232192 = Counter64: 2425366689487 ifHCOutOctets.436236288 = Counter64: 4090446528831 ifHCOutOctets.436240384 = Counter64: 3725205319188 ifHCOutOctets.436244480 = Counter64: 2966674818256 ifHCOutOctets.436248576 = Counter64: 23881602844951 ifHCOutOctets.436252672 = Counter64: 3041149199131 ifHCOutOctets.436256768 = Counter64: 0 ifHCOutOctets.436260864 = Counter64: 0 ifHCOutOctets.436264960 = Counter64: 350282697042 ifHCOutOctets.436269056 = Counter64: 0 ifHCOutOctets.436273152 = Counter64: 0 ifHCOutOctets.436277248 = Counter64: 0 ifHCOutOctets.436281344 = Counter64: 11825164244753 ifHCOutOctets.436285440 = Counter64: 1638273038079 ifHCOutUcastPkts.83886080 = Counter64: 2257 ifHCOutUcastPkts.436207616 = Counter64: 0 ifHCOutUcastPkts.436211712 = Counter64: 5810491999 ifHCOutUcastPkts.436215808 = Counter64: 3047405341 ifHCOutUcastPkts.436219904 = Counter64: 7095830910 ifHCOutUcastPkts.436224000 = Counter64: 1096418902 ifHCOutUcastPkts.436228096 = Counter64: 31685328775 ifHCOutUcastPkts.436232192 = Counter64: 402406053 ifHCOutUcastPkts.436236288 = Counter64: 588081729 ifHCOutUcastPkts.436240384 = Counter64: 567670742 ifHCOutUcastPkts.436244480 = Counter64: 472007286 ifHCOutUcastPkts.436248576 = Counter64: 2890109434 ifHCOutUcastPkts.436252672 = Counter64: 933532412 ifHCOutUcastPkts.436256768 = Counter64: 0 ifHCOutUcastPkts.436260864 = Counter64: 0 ifHCOutUcastPkts.436264960 = Counter64: 1033893545 ifHCOutUcastPkts.436269056 = Counter64: 0 ifHCOutUcastPkts.436273152 = Counter64: 0 ifHCOutUcastPkts.436277248 = Counter64: 0 ifHCOutUcastPkts.436281344 = Counter64: 1448405970 ifHCOutUcastPkts.436285440 = Counter64: 3680986590 ifHCOutMulticastPkts.83886080 = Counter64: 398021 ifHCOutMulticastPkts.436207616 = Counter64: 0 ifHCOutMulticastPkts.436211712 = Counter64: 3161106 ifHCOutMulticastPkts.436215808 = Counter64: 3041626 ifHCOutMulticastPkts.436219904 = Counter64: 4595586 ifHCOutMulticastPkts.436224000 = Counter64: 4585539 ifHCOutMulticastPkts.436228096 = Counter64: 4478062 ifHCOutMulticastPkts.436232192 = Counter64: 4761853 ifHCOutMulticastPkts.436236288 = Counter64: 4452934 ifHCOutMulticastPkts.436240384 = Counter64: 4811734 ifHCOutMulticastPkts.436244480 = Counter64: 4811730 ifHCOutMulticastPkts.436248576 = Counter64: 372758 ifHCOutMulticastPkts.436252672 = Counter64: 4809261 ifHCOutMulticastPkts.436256768 = Counter64: 0 ifHCOutMulticastPkts.436260864 = Counter64: 0 ifHCOutMulticastPkts.436264960 = Counter64: 4504457 ifHCOutMulticastPkts.436269056 = Counter64: 0 ifHCOutMulticastPkts.436273152 = Counter64: 0 ifHCOutMulticastPkts.436277248 = Counter64: 0 ifHCOutMulticastPkts.436281344 = Counter64: 4551587 ifHCOutMulticastPkts.436285440 = Counter64: 4884394 ifHCOutBroadcastPkts.83886080 = Counter64: 3305 ifHCOutBroadcastPkts.436207616 = Counter64: 0 ifHCOutBroadcastPkts.436211712 = Counter64: 345277 ifHCOutBroadcastPkts.436215808 = Counter64: 252789 ifHCOutBroadcastPkts.436219904 = Counter64: 479616 ifHCOutBroadcastPkts.436224000 = Counter64: 362355 ifHCOutBroadcastPkts.436228096 = Counter64: 489952 ifHCOutBroadcastPkts.436232192 = Counter64: 498760 ifHCOutBroadcastPkts.436236288 = Counter64: 453929 ifHCOutBroadcastPkts.436240384 = Counter64: 504689 ifHCOutBroadcastPkts.436244480 = Counter64: 506198 ifHCOutBroadcastPkts.436248576 = Counter64: 59663 ifHCOutBroadcastPkts.436252672 = Counter64: 505940 ifHCOutBroadcastPkts.436256768 = Counter64: 0 ifHCOutBroadcastPkts.436260864 = Counter64: 0 ifHCOutBroadcastPkts.436264960 = Counter64: 456464 ifHCOutBroadcastPkts.436269056 = Counter64: 0 ifHCOutBroadcastPkts.436273152 = Counter64: 0 ifHCOutBroadcastPkts.436277248 = Counter64: 0 ifHCOutBroadcastPkts.436281344 = Counter64: 322039 ifHCOutBroadcastPkts.436285440 = Counter64: 395107 ifLinkUpDownTrapEnable.83886080 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436207616 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436211712 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436215808 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436219904 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436224000 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436228096 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436232192 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436236288 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436240384 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436244480 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436248576 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436252672 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436256768 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436260864 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436264960 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436269056 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436273152 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436277248 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436281344 = INTEGER: enabled(1) ifLinkUpDownTrapEnable.436285440 = INTEGER: enabled(1) ifHighSpeed.83886080 = Gauge32: 1000 ifHighSpeed.436207616 = Gauge32: 10000 ifHighSpeed.436211712 = Gauge32: 10000 ifHighSpeed.436215808 = Gauge32: 10000 ifHighSpeed.436219904 = Gauge32: 10000 ifHighSpeed.436224000 = Gauge32: 10000 ifHighSpeed.436228096 = Gauge32: 10000 ifHighSpeed.436232192 = Gauge32: 10000 ifHighSpeed.436236288 = Gauge32: 10000 ifHighSpeed.436240384 = Gauge32: 10000 ifHighSpeed.436244480 = Gauge32: 10000 ifHighSpeed.436248576 = Gauge32: 10000 ifHighSpeed.436252672 = Gauge32: 10000 ifHighSpeed.436256768 = Gauge32: 10000 ifHighSpeed.436260864 = Gauge32: 10000 ifHighSpeed.436264960 = Gauge32: 10000 ifHighSpeed.436269056 = Gauge32: 10000 ifHighSpeed.436273152 = Gauge32: 10000 ifHighSpeed.436277248 = Gauge32: 10000 ifHighSpeed.436281344 = Gauge32: 10000 ifHighSpeed.436285440 = Gauge32: 10000 ifPromiscuousMode.83886080 = INTEGER: false(2) ifPromiscuousMode.436207616 = INTEGER: false(2) ifPromiscuousMode.436211712 = INTEGER: false(2) ifPromiscuousMode.436215808 = INTEGER: false(2) ifPromiscuousMode.436219904 = INTEGER: false(2) ifPromiscuousMode.436224000 = INTEGER: false(2) ifPromiscuousMode.436228096 = INTEGER: false(2) ifPromiscuousMode.436232192 = INTEGER: false(2) ifPromiscuousMode.436236288 = INTEGER: false(2) ifPromiscuousMode.436240384 = INTEGER: false(2) ifPromiscuousMode.436244480 = INTEGER: false(2) ifPromiscuousMode.436248576 = INTEGER: false(2) ifPromiscuousMode.436252672 = INTEGER: false(2) ifPromiscuousMode.436256768 = INTEGER: false(2) ifPromiscuousMode.436260864 = INTEGER: false(2) ifPromiscuousMode.436264960 = INTEGER: false(2) ifPromiscuousMode.436269056 = INTEGER: false(2) ifPromiscuousMode.436273152 = INTEGER: false(2) ifPromiscuousMode.436277248 = INTEGER: false(2) ifPromiscuousMode.436281344 = INTEGER: false(2) ifPromiscuousMode.436285440 = INTEGER: false(2) ifConnectorPresent.83886080 = INTEGER: false(2) ifConnectorPresent.436207616 = INTEGER: true(1) ifConnectorPresent.436211712 = INTEGER: true(1) ifConnectorPresent.436215808 = INTEGER: true(1) ifConnectorPresent.436219904 = INTEGER: true(1) ifConnectorPresent.436224000 = INTEGER: true(1) ifConnectorPresent.436228096 = INTEGER: true(1) ifConnectorPresent.436232192 = INTEGER: true(1) ifConnectorPresent.436236288 = INTEGER: true(1) ifConnectorPresent.436240384 = INTEGER: true(1) ifConnectorPresent.436244480 = INTEGER: true(1) ifConnectorPresent.436248576 = INTEGER: true(1) ifConnectorPresent.436252672 = INTEGER: true(1) ifConnectorPresent.436256768 = INTEGER: false(2) ifConnectorPresent.436260864 = INTEGER: false(2) ifConnectorPresent.436264960 = INTEGER: false(2) ifConnectorPresent.436269056 = INTEGER: false(2) ifConnectorPresent.436273152 = INTEGER: false(2) ifConnectorPresent.436277248 = INTEGER: false(2) ifConnectorPresent.436281344 = INTEGER: false(2) ifConnectorPresent.436285440 = INTEGER: true(1) ifAlias.83886080 = STRING: ifAlias.436207616 = STRING: port1 ifAlias.436211712 = STRING: ifAlias.436215808 = STRING: ifAlias.436219904 = STRING: ifAlias.436224000 = STRING: ifAlias.436228096 = STRING: ifAlias.436232192 = STRING: ifAlias.436236288 = STRING: ifAlias.436240384 = STRING: ifAlias.436244480 = STRING: ifAlias.436248576 = STRING: ifAlias.436252672 = STRING: ifAlias.436256768 = STRING: ifAlias.436260864 = STRING: ifAlias.436264960 = STRING: ifAlias.436269056 = STRING: ifAlias.436273152 = STRING: ifAlias.436277248 = STRING: ifAlias.436281344 = STRING: ifAlias.436285440 = STRING: ifCounterDiscontinuityTime.83886080 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436207616 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436211712 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436215808 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436219904 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436224000 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436228096 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436232192 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436236288 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436240384 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436244480 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436248576 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436252672 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436256768 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436260864 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436264960 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436269056 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436273152 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436277248 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436281344 = Timeticks: (0) 0:00:00.00 ifCounterDiscontinuityTime.436285440 = Timeticks: (0) 0:00:00.00 ifTableLastChange.0 = Timeticks: (6608) 0:01:06.08 ifStackLastChange.0 = Timeticks: (0) 0:00:00.00
- The interfaces summary from the switch console.
sw10-xge# show interface brief -------------------------------------------------------------------------------- Ethernet VLAN Type Mode Status Reason Speed Port Interface Ch # -------------------------------------------------------------------------------- Eth1/1 1 eth access down Link not connected 10G(D) -- Eth1/2 1 eth access up none 10G(D) -- Eth1/3 1 eth access up none 10G(D) -- Eth1/4 1 eth access up none 10G(D) -- Eth1/5 1 eth access up none 10G(D) -- Eth1/6 1 eth access up none 10G(D) -- Eth1/7 1 eth access up none 10G(D) -- Eth1/8 1 eth access up none 10G(D) -- Eth1/9 1 eth access up none 10G(D) -- Eth1/10 1 eth access up none 10G(D) -- Eth1/11 1 eth access up none 10G(D) -- Eth1/12 1 eth access up none 10G(D) -- Eth1/13 1 eth access down SFP not inserted 10G(D) -- Eth1/14 1 eth access down SFP not inserted 10G(D) -- Eth1/15 1 eth access down SFP not inserted 10G(D) -- Eth1/16 1 eth access down SFP not inserted 10G(D) -- Eth1/17 1 eth access down SFP not inserted 10G(D) -- Eth1/18 1 eth access down SFP not inserted 10G(D) -- Eth1/19 1 eth access down SFP not inserted 10G(D) -- Eth1/20 1 eth access up none 10G(D) -- -------------------------------------------------------------------------------- Port VRF Status IP Address Speed MTU -------------------------------------------------------------------------------- mgmt0 -- up 172.16.10.3 1000 1500
MRTG tweeks for 10GbE
- There are a few tweeks to be done to the MRTG config when using
cfgmaker
. - The
MaxBytes
is out of whack. - Manually edit the line
MaxBytes[sw10-xge_436211712]: 536870911
toMaxBytes[sw10-xge_436211712]: 1250000000
- The internal interface numbering scheme is also very weird but that depends on the internal SNMP implementation on the switch.
- The following uses
public
as the SNMPv2c community name to protect the innocent.
# Created by # /usr/bin/cfgmaker --global "WorkDir: /var/www/mrtg" --global "Options[_]: bits,growright" --output /etc/mrtg/sw10-xge.cfg public@sw10-xge ###################################################################### # System: sw10-xge # Description: Cisco NX-OS(tm) n5000, Software (n5000-uk9), Version 5.0(2)N2(1), RELEASE SOFTWARE Copyright (c) 2002-2010 by Cisco Systems, Inc. Device Manager Version 5.0(4a), Compiled 12/18/2010 23:00:00 # Contact: bicadmin@bic.mni.mcgill.ca # Location: Room-WB212-Rack-B3-U36 ###################################################################### ### Interface 83886080 >> Descr: 'mgmt0' | Name: 'mgmt0' | Ip: '' | Eth: '30-78-30-30-30-35-37-33-64-34-30-31-38-30' ### Target[sw10-xge_83886080]: 83886080:public@sw10-xge:::::2 SetEnv[sw10-xge_83886080]: MRTG_INT_IP="" MRTG_INT_DESCR="mgmt0" MaxBytes[sw10-xge_83886080]: 125000000 Title[sw10-xge_83886080]: Traffic Analysis for mgmt0 -- sw10-xge PageTop[sw10-xge_83886080]: <h1>Traffic Analysis for mgmt0 -- sw10-xge</h1> <div id="sysdetails"> <table> <tr> <td>System:</td> <td>sw10-xge in Room-WB212-Rack-B3-U36</td> </tr> <tr> <td>Maintainer:</td> <td>bicadmin@bic.mni.mcgill.ca</td> </tr> <tr> <td>Description:</td> <td>mgmt0 </td> </tr> <tr> <td>ifType:</td> <td>ethernetCsmacd (6)</td> </tr> <tr> <td>ifName:</td> <td>mgmt0</td> </tr> <tr> <td>Max Speed:</td> <td>1000.0 Mbits/s</td> </tr> </table> </div> ### Interface 436207616 >> Descr: 'Ethernet1/1' | Name: 'Ethernet1/1' | Ip: '' | Eth: '30-78-30-30-30-35-37-33-64-34-30-31-38-38' ### ### The following interface is commented out because: ### * it is operationally DOWN # # Target[sw10-xge_436207616]: 436207616:public@sw10-xge:::::2 # SetEnv[sw10-xge_436207616]: MRTG_INT_IP="" MRTG_INT_DESCR="Ethernet1/1" # MaxBytes[sw10-xge_436207616]: 536870911 # Title[sw10-xge_436207616]: Traffic Analysis for 436207616 -- sw10-xge # PageTop[sw10-xge_436207616]: <h1>Traffic Analysis for 436207616 -- sw10-xge</h1> # <div id="sysdetails"> # <table> # <tr> # <td>System:</td> # <td>sw10-xge in Room-WB212-Rack-B3-U36</td> # </tr> # <tr> # <td>Maintainer:</td> # <td>bicadmin@bic.mni.mcgill.ca</td> # </tr> # <tr> # <td>Description:</td> # <td>Ethernet1/1 port1 </td> # </tr> # <tr> # <td>ifType:</td> # <td>ethernetCsmacd (6)</td> # </tr> # <tr> # <td>ifName:</td> # <td>Ethernet1/1</td> # </tr> # <tr> # <td>Max Speed:</td> # <td>4295.0 Mbits/s</td> # </tr> # </table> # </div> ### Interface 436211712 >> Descr: 'Ethernet1/2' | Name: 'Ethernet1/2' | Ip: '' | Eth: '30-78-30-30-30-35-37-33-64-34-30-31-38-39' ### Target[sw10-xge_436211712]: 436211712:public@sw10-xge:::::2 SetEnv[sw10-xge_436211712]: MRTG_INT_IP="" MRTG_INT_DESCR="Ethernet1/2" MaxBytes[sw10-xge_436211712]: 536870911 Title[sw10-xge_436211712]: Traffic Analysis for Ethernet1/2 -- sw10-xge PageTop[sw10-xge_436211712]: <h1>Traffic Analysis for Ethernet1/2 -- sw10-xge</h1> <div id="sysdetails"> <table> <tr> <td>System:</td> <td>sw10-xge in Room-WB212-Rack-B3-U36</td> </tr> <tr> <td>Maintainer:</td> <td>bicadmin@bic.mni.mcgill.ca</td> </tr> <tr> <td>Description:</td> <td>Ethernet1/2 </td> </tr> <tr> <td>ifType:</td> <td>ethernetCsmacd (6)</td> </tr> <tr> <td>ifName:</td> <td>Ethernet1/2</td> </tr> <tr> <td>Max Speed:</td> <td>4295.0 Mbits/s</td> </tr> </table> </div> ...