Cisco Support Community
Community Member

Commands to allow MRTG to graph WAN port.

How do I setup up the CISCO 1605R router so that MRTG is able to calculate the WAN port traffic. What commands/syntax do I need to type in and where. Please give me the commands and all the steps to allow MRTG to graph the WAN port. I am a newbie to MRTG, thanks.

VIP Purple

Re: Commands to allow MRTG to graph WAN port.


assuming that you have MRTG and Perl installed on your machine, the first thing to do is to configure your Cisco 1605R with an SNMP community string:

1605#conf t

1605(config)#snmp-server community PRIVATE ro


Now that you have set the SNMP community string, create the .CFG file for the router (in this example I am assuming that the address of the router that is reachable from the machine where MRTG is installed on is, this is the Ethernet address of your 1605R):

perl cfgmaker PRIVATE@ --global "WorkDir: c:\www\mrtg" --output 1605R.cfg

Now open the file that has been created, 1605R.cfg, with a text editor like Wordpad. You will find an entry for every interface on the router. This is how your entry for Serial0 should look like:

Target[]: 1:PRIVATE@

MaxBytes1[]: 16000

MaxBytes2[]: 16000

Options[]: growright, bits

Title[]: : Serial0


Traffic Analysis for Serial0

Options[]: growright, bits

System:Interface Serial0
Interface:Serial0 (1)
IP:local-gw (
Max Speed:

The three lines:

MaxBytes1[]: 16000

MaxBytes2[]: 16000

Options[]: growright, bits

are not in there by default. When you put in these lines, you get two graphs, one for inbound and one for outbound traffic. The third line lets the graph run from left to right, and displays the traffic in bits rather than bytes. Make sure that you divide the actual bandwidth parameters by 8, e.g. a 128K link would be represented as 16000 bits in and outbound, as in the above configuration example.

At the end of your .CFG file, put in the statement:

RunAsDaemon: yes

to make sure that the file runs permanently (update default is every 5 minutes).



Community Member

Re: Commands to allow MRTG to graph WAN port.

Thanks Georg, at long last I've got the MRTG to graph my WAN port which is a good start. But what I really wanted is for a SNMP software such as MRTG to present the traffic as Megabytes every five minutes, 1 hour, 1 day, 1 week, 1 months interval. At the moment MRTG only graphs these intervals but not present the actual figures, is there a MRTG command that allows me to do this??? Or can MRTG be tuned to do it? Or is there other SNMP software that present the figures??

VIP Purple

Re: Commands to allow MRTG to graph WAN port.


I think I understand what you are saying, and I think you can tune MRTG to present the figures, by setting the interval value to five minutes (which is actually the default), 60 minutes (1 hour), 1440 minutes (1 day), 10080 minutes (1 week), and 43200 minutes (1 month, or 30 days).

So you would make 4 .cfg files and leave out the day/week/month/year according to what you want to see, and add the value interval to the .cfg file.

Here is an example:


### Interface 2 >> Descr: 'Serial0/0' | Name: 'Se0/0' | Ip: '' | Eth: '' ###

Target[]: 2:snmpread@

SetEnv[]: MRTG_INT_IP="" MRTG_INT_DESCR="Serial0/0"

MaxBytes1[]: 20000000

MaxBytes2[]: 20000000

Suppress[]: w,m

Options[]: growright

Title[]: Traffic Analysis for Router


Traffic Analysis for Router

System: Router
Maintainer: Network Management
Description:Serial0/0 Connection to Location 1
ifType: ppp (23)
ifName: Se0/0
Max Speed: 2Mbit/s

In this example, the weekly and monthly graphics are suppressed. You want to see the bytes per hour, so add the following to the end of your .cfg file:

interval: 60



CreatePlease to create content