Web Hosting Talk







View Full Version : Overview of MRTG and CISCO switch


Fremont Servers
11-11-2001, 09:07 PM
Hello,

Can someone give me an overview of setting up MRTG and monitor each port on a cisco switch?

I just want to know what I need to focus on learning.

Here is what I think. If you see that I miss some steps or something is wrong, please point it out. I just purchased Essential SNMP from O'Reilly just to help me with SNMP.

Here are the steps that I think.

1. Download the latest version of MRTG at mrtg.org.
2. Download 95.pl (for 95th percentile measurement purpose)
3. Assign an IP address, mask, and gateway to the cisco switch.
4. Enable/setup SNMP on the switch. (Do I need to do the same to the server?)

That's it?

:confused:

RackMy.com
11-11-2001, 11:34 PM
Glad to see you bought a book, but you will not need it.

Once you have MRTG installed (no, you do not need SNMP on the server as it will poll the graph) you will need to make a config file that MRTG/rateup will use. Follow the directions at http://people.ee.ethz.ch/~oetiker/webtools/mrtg/unix-guide.html (I asume you are installing MRTG on a *nix system). It's pretty easy from here.

Let us know how it goes.

Fremont Servers
11-11-2001, 11:38 PM
So I don't need to configure/setup SNMP on the server or the switch if I install MRTG?

Thanks for the link.

I will take a look at it.

I purchased the book because it talks about MRTG on chapter 13.

Nice to hear that SNMP is not needed. :D

Planet Z
11-12-2001, 12:21 AM
Originally posted by Asia
Nice to hear that SNMP is not needed. :D

SNMP is most certainly needed. However, most SNMP-enabled switches (which would probably include your Cisco switch) come with it already enabled and configured. All you need to do is setup MRTG.

Fremont Servers
11-12-2001, 12:48 AM
Planet Z,

Is there anyway or command to test if SNMP is enabled on the switch?

I purchased this switch used, so I am not sure if SNMP has been altered.

allan
11-12-2001, 01:29 AM
What kind of Cisco switch is it? I think with most of the lower end switches (1900 and 2900) you need to have the Enterprise Software to use SNMP.

There is an easy way to tell, for IOS based switches, telnet or console to the switch and type:

Router>ena

Router#config t

Router(config)#snmp-server ?

If you get an error it is not enabled.

If you are using a CATOS-based switch, type the following in privileged mode:

Console> (enable) set snmp ?

Again, if an error is returned, you do not have SNMP.

taz0
11-12-2001, 01:33 AM
Originally posted by Asia
Planet Z,

Is there anyway or command to test if SNMP is enabled on the switch?

I purchased this switch used, so I am not sure if SNMP has been altered.


On the Cisco, you can type
# show running-config

Or on a Unix shell, type
snmpwalk 10.1.1.1 yourcommunitystring

where 10.1.1.1 is the IP of your switch.

Fremont Servers
11-12-2001, 01:44 AM
I will test it right now.

By the way, it is a cisco catalyst 2924-xl-en switch.

Fremont Servers
11-12-2001, 01:51 AM
uuallan,

After I executed 'snmp-server ?', I got the below output.
I copy&paste to let you see. I didn't get any error.

Switch(config)#snmp-server ?
chassis-id String to uniquely identify this chassis
community Enable SNMP; set community string and access privs
contact Text for mib object sysContact
enable Enable SNMP Traps or Informs
engineID Configure a local or remote SNMPv3 engineID
group Define a User Security Model group
host Specify hosts to receive SNMP notificationbs
location Text for mib object sysLocation
packetsize Largest SNMP packet size
queue-length Message queue length for each TRAP host
system-shutdown Enable use of the SNMP reload command
tftp-server-list Limit TFTP servers used via SNMP
trap-source Assign an interface for the source address of all traps
trap-timeout Set timeout for TRAP message retransmissions
user Define a user who can access the SNMP engine
view Define an SNMPv2 MIB view

Fremont Servers
11-12-2001, 01:56 AM
taz0,

I got the output below after I executed "show running-config" command.

Switch#show running-config
Building configuration...

Current configuration:
!
version 12.0
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
!
!
!
!
!
!
ip subnet-zero
!
!
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEt
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface VLAN1
no ip directed-broadcast
no ip route-cache
!
!
line con 0
transport input none
stopbits 1
line vty 5 15
!
end

Switch#

allan
11-12-2001, 08:02 AM
Originally posted by Asia

After I executed 'snmp-server ?', I got the below output.
I copy&paste to let you see. I didn't get any error.



That means the switch is SNMP-enabled

RackMy.com
11-12-2001, 09:43 AM
Sorry for the confusion, but when I said you do not need SNMP I said:no, you do not need SNMP on the server as it will poll the graph(you do not need SNMP installed on the server that MRTG will be running on. You will need SNMP enabled on the device(s) that MRTG will poll).

If you run the cfgmaker using the IP & community name of the switch, it will tell you if everything is a'ok as that file will generate the config file used by MRTG. If you get errors when you run cfgmaker, there is a problem.

Hope that helps,