SNMP Labs SNMP Agent snmpd - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

SNMP Labs SNMP Agent snmpd

Description:

a possibility to interface system functions to SNMP. e.g. one can run system scripts or programs with snmpget ... snmpwalk localhost public | more ... – PowerPoint PPT presentation

Number of Views:161
Avg rating:3.0/5.0
Slides: 13
Provided by: cee3
Category:
Tags: snmp | agent | labs | localhost | snmpd

less

Transcript and Presenter's Notes

Title: SNMP Labs SNMP Agent snmpd


1
SNMP LabsSNMP Agent - snmpd
  • snmpd - listens to SNMP queries, answers them
  • extensible agent
  • a possibility to interface system functions to
    SNMPe.g. one can run system scripts or programs
    with snmpget
  • possibility to monitor system functions that are
    not covered by MIBII by creation of a private MIB
  • configuration of snmpd
  • system information location, contact, name
  • access control community name

2
SNMP LabsInstallation of CMUSNMP package
  • ftp sun-ultra
    get UCD package user snmp passwd
    snmpbinget ucd_snmp.tar
  • tar -xvf ucd-snmp.tar
    untar it
  • cd ucd-snmp-3.5.xx
  • more INSTALL it
    is good to read documentation
  • ./configure
  • Answer questionssystem contact,
    location
  • make
  • su -
    become root
  • make install

3
SNMP LabsBasic configuration of snmpd
  • ftp sun-ultra
    get snmpd.conf file user snmp passwd
    snmpasciiget snmpd.conf
  • pico snmpd.conf
  • Set syslocation syscontact
  • cp snmpd.conf /usr/local/share/snmp/snmpd.conf
  • snmpd
    run snmpd

4
SNMP LabsBasic commands snmpwalk, snmpget,
snmpnetstat
  • man snmpwalk
    read documentation..
  • snmpwalk qqqq public more qqqq is a
    name of your neighbours station
  • man snmpget
  • snmpget .. do
    it yourself..
  • snmpnetstat
    do it yourself

5
SNMPGetting information with snmpget, snmpwalk
  • To see what-s available on local Linux station
  • snmpwalk localhost public more
  • (will show all MIB variables supported by snmpd
    public is a community name)
  • To see a single variable or a set of variables
  • snmpget host_name community_name
    object_identifier
  • To see all variables down in the OID tree from a
    variable variable
  • snmpwalk host_name community_name variable
  • (without variable the whole MIB is shown)

6
SNMPHow to address MIB entities
  • OID can be given in numerical or mnemonic form
  • It can be given starting from the Internet leaf,
    e.g.
  • .1.3.6.1.2.1.0 (check meanings
    of all numbers, translate
    it into mnemonic form)
  • ( . (dot)
    at the beginning is IMPORTANT)
  • Or in a short form starting from the MIB-II leaf,
    e.g.
  • 2.1.0 or
    interfaces.ifIndex.0
  • Translation between numerical and mnemonic form
    can be done e.g. by tkined (tkined - Tools -
    SNMP tree - click on an entity describe see
    further labs), or using lecture handouts (a
    painful way)

7
SNMPHow to address MIB entities?
  • OID
  • scalar objects
  • e.g. .1.3.6.1.2.1.0 - 0 is also
    important, it denotes an object instance
  • tables
  • e.g. .1.3.6.1.2.2.1.2.2 - rightmost 2 is
    a row index in a table of interfaces table
    indexes generally start at 1 !!

8
SNMPexercises - snmpwalk, snmpget
  • Using snmpwalk see descriptions of interfaces of
    your workstation (OID of interfaces.ifTable.ifEntr
    y.ifDescr is 2.2.1.2)
  • Using only snmpwalk and snmpget find the MAC
    address of Ethernet interface of your neighbours
    workstation
  • Using snmpwalk and snmpget find the number of
    output octets on an Eth interface of a default
    router to which this LAN is connected check this
    number in approx. 1 minute interval - what is the
    minute average of a traffic on this interface?

9
SNMPexercises - snmpwalk, snmpget
  • Also on Cisco - using snmpwalk and snmpget find
    to which Ethernet interface this LAN is connected
    (eth0 or eth1 or eth2 or )
  • Try to run snmpwalk on some locations in your
    country are system contact and system location
    meaningful?

10
SNMP Labs MRTG - installation and introduction
  • ftp sun-ultra
    get packages user snmp
    passwd snmp
  • bin
  • get gd1.3.tar
  • get mrtg-2.5.3.tar
  • quit
  • tar -xvt gd1.3.tar
  • tar -xvf mrtg-2.5.3.tar
  • cd mrtg-2.5.3
  • more INSTALL
    do what they say

11
SNMP Labs MRTG - installation and introduction
  • Install GD library first - go to gd1.3 directory
  • make
    just write make - it really works!!!
  • cp libgd.a /usr/local/lib
  • mkdir /usr/local/include/gd
  • cp .h /usr/local/include/gd
  • That is it..
  • Go back to mrtg-2.5.3 directory
  • Edit Makefile - correct a path to GD library and
    includes, correct a path to PERL - it should be
    /usr/bin/perl
  • make rateup
  • make substitute
  • cp mrtg /usr/local/bin cp rateup /usr/local/bin
    cp .pm /usr/local/bin

12
SNMP Labs MRTG - installation and introduction
  • cat WorkDir /usr/local/mrtg gt mrtg.conf
  • cfgmaker public_at_qqq qqq is a name
    of your naighbours workstation
  • read about preparing mrtg.conf in readme.html
  • cfgmaker public_at_qqq gtgt mrtg.conf
  • cp mrtg.conf /usr/local/mrtg
  • Now you can run mrtg
  • mrtg /usr/local/mrtg/mrtg.conf
  • The results can be found in /usr/local/mrtg/qqq.h
    tml
Write a Comment
User Comments (0)
About PowerShow.com