cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1826
Views
0
Helpful
6
Replies

Commands to allow MRTG to graph Wan Port

huytuan
Level 1
Level 1

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.

6 Replies 6

r.wilcox
Level 1
Level 1

Hi,

I am not aware of any special command that you need to enable on the router in order to capture and graph wan utilization. MRTG queries the router using SNMP to get stats on the interfaces at intervals you setup within MRTG. As long as the system you have MRTG running on can accsess/query the router, you should be able to get the information you need.

Setting up MRTG can be the tricky part sometimes. But there are several good references on the internet, starting with the MRTG website: http://people.ee.ethz.ch/~oetiker/webtools/mrtg/

Have you setup MRTG yet and tried to query the router?

Thanks,

Robert

I am still trying to set it up. That means I need to create a public community SMNP on the Wan interface. What SMNP syntax commands do I need to type on the WAN interface would you know.

eg smnp interface e 0 ???

Hi

I don't believe you have to specify a community SNMP on the wan interface. As long as the snmp settings are part of the global router config you should be fine. You do need to know what the public community string is however (usually "Public" by default).

For example, on one of our 1602 routers we have the following:

snmp-server community public RO 1

snmp-server community password xxxx

snmp-server trap-authentication

snmp-server contact me@domain.com

snmp-server system-shutdown

snmp-server enable traps config

snmp-server enable traps frame-relay

snmp-server enable traps isdn call-information

snmp-server host 10.0.0.20 public

You don't have to have all of these settings to run MRTG, however.

When configuring your MRTG, you should only have to enter this at a command prompt:

perl cfgmaker public@x.x.x.x --global 'WorkDir: D:\Inetpub\wwwroot\mrtg' --output mymrtgfile.cfg

Where x.x.x.x is the IP address of your router and the path following WorkDir: is were you want your graphs to be saved. The mymrtgfile.cfg is the file that contains all the information MRTG will need to update your graphs and query your router interfaces.

I run MRTG on Window 2000, if you are running it on Linux, it will be slightly different as far as the path location.

Does this help at all?

Thanks,

Robert

Thanks Robert, 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??

Hi,

I not sure I understand what you are asking. Are you indicating that the MRTG just made one set of graphs and stopped? And you would like it to update all the time, right?

If so, yes, MRTG can do that. There are several ways you can get MRTG to update the graphs and provide you with up to the minute information.

What I have done is this:

I added the following lines to the top of my mrtg.cfg file (under the global defaults section):

RunAsDaemon: yes

Interval: 5

Options[_]: growright, bits

This will make MRTG run as a service (a daemon) and update the graphs at 5 minute intervals. The last option will have the graph grow from left to right instead of the reverse (just my own preference). The "bits" part will make the graphs scale to bits. I find this better because it's easier to use when talking about bandwidth, for example a T1 is 1.544 Mega bits/second.

The next thing I did was to schedule a task (using the Microsoft task scheduler), which makes the MRTG script run whenever the system is restarted. This works out nice because it doesn't require anyone to login to the system to make it work.

You could also put a short-cut to the script in the start up folder and that would start it provided someone logged in.

There are a few other free apps out there that can be used to do the same things. You can find links to the others on the MRTG homepage.

I hope this helps.

Thanks,

Robert

Hi Robert, what I mean is MRTG only shows the graph of the traffic at the set time intervals of 5min, 1hour, 1 day, 1month, 1year. The graph of the traffic is not really what I wanted. I need the figures at these time intervals 5min, 1hour, 1day, 1month, 1year, eg at 5min 15MB - at 10min 34MB - at 30min 89MB - at 1day 467MB inflow into the WAN port and 20MB outflow of the WAN ports. I need figures presentation of traffic flow not the graph presentation.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: