Anda di halaman 1dari 15

Asignatura Gestin de Redes Actividad SNMPv1

ndice:
Objetivos Herramientas de gestin Prctica Instalacin de los agentes Comandos SNMP Programa ActiveSNMP

1. Objetivos
Los principales objetivos de esta prctica son: La gestin de dispositivos que incorporan agentes, utilizando el protocolo SNMP (Simple Network Management Protocol). Analizar la estructura de la MIB-2 (Management Information Base) para acceder a las instancias de la MIB, tanto instancias de objetos escalares como a instancias de objetos tabla. Repasar conceptos relacionados con la gestin de red SNMP, como por ejemplo, "la poltica de acceso" o "la definicin de objetos". Como conocimientos previos, es necesario estar familiarizado con los conceptos de la SMI (Structure Management Information), MIB-2 y el protocolo SNMP.

2. Herramientas
Teniendo en cuenta el entorno de trabajo que se aparece en la siguiente figura, las herramientas y programas que se van a utilizar se enumeran a continuacin:

Figura 1. Entorno de trabajo


Estacin de gestin: PC (vlido con cualquier sistema operativo) Agentes SNMP: Agente Windows instalado en un PC y Agente instalado en un Switch Comandos SNMP: snmpget, snmpnext, snmpset, snmptrap Aplicacin SNMP: ActiveSNMP

3. Prctica
La prctica consistir en la instalacin de los agentes (en el caso en que an no lo estn) y monitorizarlos mediante el uso de comando o aplicaciones que utilizan el protocolo SNMP. La configuracin del Switch se debe realizar adicionalmente utilizando una aplicacin de gestin propietaria cuyo acceso se realizar a travs de la red va telnet. En la presente prctica, dicha configuracin ya se ha realizado convenientemente.

3.1 Instalacin de los agentes


Durante la prctica se van a utilizar 2 programas agentes SNMP. El primero (Agente Windows) se ejecuta sobre PC, y deberemos instalarlo antes de poder acceder al mismo. El otro agente disponible se est ejecutando en un Switch y como paso previo a la realizacin de la prctica, ha sido activado a travs de los comandos especficos de configuracin del dispositivo. Como comentario indicar que ambos agentes utilizan los puertos asignados al protocolo SNMP para recibir mensajes Get, GetNext y Set (puerto 161) y transmitir Trap (puerto 162).

Agente Windows
La instalacin del agente para Windows se realiza a travs del Panel de Control tal y como aparece en las siguientes pantallas (en las diferentes versiones del sistema operativo pueden encontrarse ventanas de configuracin similares).

Figura 2. Instalacin del Agente Windows

Agente Switch
El Switch que se utilizar durante la prctica, tiene instalado un Mdulo de Gestin que soporta el protocolo SNMP. La configuracin del agente SNMP se ha llevado a cabo mediante los comandos: 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 eng group Define a User Security Model group host Specify hosts to receive SNMP notifications ifindex Enable ifindex persistence inform Configure SNMP Informs options ip IP ToS configuration for SNMP traffic location Text for mib object sysLocation manager Modify SNMP manager parameters packetsize Largest SNMP packet size queue-length Message queue length for each TRAP host system-shutdown Enable use of tftp-server-list Limit TFTP servers used via SNMP trap SNMP trap options 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 Switch(config)#snmp-server community public ? <1-99> Std IP accesslist allowing access with this community string <1300-1999> Expanded IP accesslist allowing access with this community string ro Read-only access with this community string rw Read-write access with this community string view Restrict this community to a named MIB view Switch(config)#snmp-server community public ro

Figura 3. Configuracin Switch

Prctica 1:
- Averiguar la direccin IP del PC a monitorizar ejecutando la instruccin ipconfig de Windows (o el comando correspondiente del sistema operativo en el que se haya instalado el agente SNMP). - Instalar el Agente Windows (o el agente SNMP del sistema operativo utilizado) y crear 2 comunidades (COM1 (RO), COM2 (RW)). Indicar las pantallas o comando necesarios (segn el sistema operativo) para la instalacin y configuracin del agente SNMP. - Ejecutar un ping a las direcciones IP de los PC's, as como a la direccin 158.42.188.145 (Switch) para comprobar que estn activos (comunidad creada: public1 (RO)).

3.2 Comandos SNMP


Las funciones que se utilizarn para realizar esta prctica consiste en una serie de comandos que se ejecutan desde la consola del sistema operativo y que se explican a continuacin y que implementan las fuciones Get y Set del protocolo SNMP. Existen muchos comandos disponibles en Internet. En la prctica utilizaremos son los comandos disponibles en http://www.net-snmp.org/. Para conocer la sintaxis basta con ejecutar el comando sin parmetros. snmpGet: aplicacin SNMP que utiliza un mensaje del tipo GetRequest para interrogar a un dispositivo de la red. Este comando permite obtener el valor de una nica variable de la MIB del agente interrogado, siempre y cuando se conozca el identificador exacto de la instancia. snmpGetNext: aplicacin SNMP que utiliza un mensaje del tipo GetNextRequest para interrogar a un dispositivo de la red. Permite obtener el valor de la siguiente instancia vlida a partir de la instancia indicada en el comando. A diferencia del caso anterior, no es necesario conocer el valor exacto de la instancia a interrogar. snmpSet: aplicacin SNMP que utiliza un mensaje del tipo SetRequest. Este comando permite modificar el valor de una variable de la MIB. Al ejecutar el comando, nos indicar el tipo de la instancia y solicitar el valor con el que queremos que se modifica la instancia. snmpTrap: aplicacin SNMP que utiliza un mensaje del tipo Trap. Este comando permite generar un Trap a un host. La direccin de destino que se debe especificar, debe corresponder con la direccin de un host que est ejecutando una aplicacin de gestin.

Prctica 2:
- Utilizando el comando snmpget obtener los valores de las instancias asociadas a los siguientes objetos escalares: Windows sysDescr: sysUpTime: sysContact: sysName: sysLocation: sysServices: Switch sysDescr: sysUpTime: sysContact: sysName: sysLocation: sysServices:

- Qu ocurre si se ejecuta el comando snmpset sobre el objeto sysUpTime del agente del PC y community name com2? y se ejecuta pero con un community name com3? - Qu significado tiene el valor de la instancia sysServices devuelto por el Agente Switch? y el por el PC?

Prctica 3:
- Utilizando el comando snmpget obtener los valores del nmero de interfaces del Agente Windows XP. - Utilizando el comando los comandos snmpget y snmpnext obtener los valores de los objetos ifIndex, ifType, ifSpeed e ifInOctets de la interfaz de red del dispositivo PC donde est instalado el Agente Windows. - Averiguar el nmero total de mensajes ICMP que ha enviado el PC, as como el nmero total de mensajes ICMP recibidos por el Switch. - Averiguar el nmero total de mensajes SNMP que ha enviado el PC, as como el nmero total de mensajes SNMP recibidos por el Agente Switch. Cuntos mensajes SNMP con el error "NoSuchName" ha enviado el Agente Switch? - El Agente Switch est configurado para generar un trap si se intenta acceder con un "community name" errneo? Por qu? (Sugerencia: buscar en el grupo snmp de la MIB-2)

Prctica 4:
- Acceda a la informacin del grupo host del Agente Windows. Cul es el identificador del nodo host? Y de la primera instancia vlida del grupo host? - Obtener la informacin sobre los dispositivos de almacenamiento tipo disco duro, CD, etc..

3.3 Programa ActiveSNMP


El programa Active SNMP (http://www.cscare.com/ ) es un gestor SNMP basado en la interfaz Web y escrita en Java. En esta prctica se utilizar una versin Demo que nos permitir movernos por la MIB de los dispositivos gestionados de forma sencilla y llevar a cabo acciones del tipo Get y Set. En la versin Demo nicamente podemos acceder con el usuario Administrador o Guest (limitando algunas de las acciones de gestin). Para ejecutar la aplicacin tambin hace falta la instalacin de una JVM (por ejemplo, jdk1.2.2) o la proporcionada por los navegadores.

Figura 20. Programa Active SNMP

Prctica 5:
- Instalar y utilizar el programa Active SNMP para monitorizar los diferentes dispositivos. - Incorporar la MIB asociada a HostResources y copiar las pantallas donde se observe el acceso a algunos objetos de dicho grupo. - Realizar la monitorizacin de una variable en funcin del tiempo.

4. Anexo MIB-2
-- mgmt ::= 1.3.6.1.2 -- object definitions compiled from RFC1213-MIB mib-2 mgmt.1 system interfaces at ip icmp tcp udp egp transmission snmp dot1dBridge sysDescr sysObjectID sysUpTime sysContact sysName sysLocation sysServices ifNumber ifTable ifEntry ifIndex ifDescr ifType ifMtu ifSpeed ifPhysAddress ifAdminStatus ifOperStatus ifLastChange ifInOctets ifInUcastPkts ifInNUcastPkts ifInDiscards mib-2.1 mib-2.2 mib-2.3 mib-2.4 mib-2.5 mib-2.6 mib-2.7 mib-2.8 mib-2.10 mib-2.11 mib-2.17 system.1 system.2 system.3 system.4 system.5 system.6 system.7 interfaces.1 interfaces.2 ifTable.1 ifEntry.1 ifEntry.2 ifEntry.3 ifEntry.4 ifEntry.5 ifEntry.6 ifEntry.7 ifEntry.8 ifEntry.9 ifEntry.10 ifEntry.11 ifEntry.12 ifEntry.13 OctetString ObjectID TimeTicks OctetString OctetString OctetString INTEGER INTEGER Aggregate Aggregate INTEGER OctetString INTEGER INTEGER Gauge OctetString INTEGER INTEGER TimeTicks Counter Counter Counter Counter read-only read-only read-only read-write read-write read-write read-only read-only not-accessible not-accessible read-only read-only read-only read-only read-only read-only read-write read-only read-only read-only read-only read-only read-only mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory

10

ifInErrors ifInUnknownProtos ifOutOctets ifOutUcastPkts ifOutNUcastPkts ifOutDiscards ifOutErrors ifOutQLen ifSpecific atTable atEntry atIfIndex atPhysAddress atNetAddress

ifEntry.14 ifEntry.15 ifEntry.16 ifEntry.17 ifEntry.18 ifEntry.19 ifEntry.20 ifEntry.21 ifEntry.22 at.1 atTable.1 atEntry.1 atEntry.2 atEntry.3

Counter Counter Counter Counter Counter Counter Counter Gauge ObjectID Aggregate Aggregate INTEGER OctetString NetworkAddress

read-only read-only read-only read-only read-only read-only read-only read-only read-only not-accessible not-accessible read-write read-write read-write

mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory deprecated deprecated deprecated deprecated deprecated

ipForwarding ipDefaultTTL ipInReceives ipInHdrErrors ipInAddrErrors ipForwDatagrams ipInUnknownProtos ipInDiscards ipInDelivers ipOutRequests ipOutDiscards ipOutNoRoutes ipReasmTimeout ipReasmReqds ipReasmOKs ipReasmFails ipFragOKs ipFragFails ipFragCreates ipAddrTable ipAddrEntry ipAdEntAddr ipAdEntIfIndex ipAdEntNetMask ipAdEntBcastAddr ipAdEntReasmMaxSize ipRouteTable

ip.1 ip.2 ip.3 ip.4 ip.5 ip.6 ip.7 ip.8 ip.9 ip.10 ip.11 ip.12 ip.13 ip.14 ip.15 ip.16 ip.17 ip.18 ip.19 ip.20 ipAddrTable.1 ipAddrEntry.1 ipAddrEntry.2 ipAddrEntry.3 ipAddrEntry.4 ipAddrEntry.5 ip.21

INTEGER INTEGER Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter INTEGER Counter Counter Counter Counter Counter Counter Aggregate Aggregate IpAddress INTEGER IpAddress INTEGER INTEGER Aggregate

read-write read-write read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only not-accessible not-accessible read-only read-only read-only read-only read-only not-accessible

mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory

11

ipRouteEntry ipRouteDest ipRouteIfIndex ipRouteMetric1 ipRouteMetric2 ipRouteMetric3 ipRouteMetric4 ipRouteNextHop ipRouteType ipRouteProto ipRouteAge ipRouteMask ipRouteMetric5 ipRouteInfo ipNetToMediaTable ipNetToMediaEntry ipNetToMediaIfIndex

ipRouteTable.1 ipRouteEntry.1 ipRouteEntry.2 ipRouteEntry.3 ipRouteEntry.4 ipRouteEntry.5 ipRouteEntry.6 ipRouteEntry.7 ipRouteEntry.8 ipRouteEntry.9 ipRouteEntry.10 ipRouteEntry.11 ipRouteEntry.12 ipRouteEntry.13 ip.22

Aggregate IpAddress INTEGER INTEGER INTEGER INTEGER INTEGER IpAddress INTEGER INTEGER INTEGER IpAddress INTEGER ObjectID Aggregate

not-accessible read-write read-write read-write read-write read-write read-write read-write read-write read-only read-write read-write read-write read-only not-accessible not-accessible read-write read-write read-write read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only

mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory

ipNetToMediaTable.1 Aggregate ipNetToMediaEntry.1 INTEGER

ipNetToMediaPhysAddress ipNetToMediaEntry.2 OctetStringread-write ipNetToMediaNetAddress ipNetToMediaEntry.3 IpAddress ipNetToMediaType ipRoutingDiscards icmpInMsgs icmpInErrors icmpInDestUnreachs icmpInTimeExcds icmpInParmProbs icmpInSrcQuenchs icmpInRedirects icmpInEchos icmpInEchoReps icmpInTimestamps icmpInTimestampReps icmpInAddrMasks icmpInAddrMaskReps icmpOutMsgs icmpOutErrors icmpOutDestUnreachs icmpOutTimeExcds icmpOutParmProbs icmpOutSrcQuenchs icmpOutRedirects icmpOutEchos icmpOutEchoReps ipNetToMediaEntry.4 INTEGER ip.23 icmp.1 icmp.2 icmp.3 icmp.4 icmp.5 icmp.6 icmp.7 icmp.8 icmp.9 icmp.10 icmp.11 icmp.12 icmp.13 icmp.14 icmp.15 icmp.16 icmp.17 icmp.18 icmp.19 icmp.20 icmp.21 icmp.22 Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter

12

icmpOutTimestamps icmpOutAddrMasks icmpOutAddrMaskReps tcpRtoAlgorithm tcpRtoMin tcpRtoMax tcpMaxConn tcpActiveOpens tcpPassiveOpens tcpAttemptFails tcpEstabResets tcpCurrEstab tcpInSegs tcpOutSegs tcpRetransSegs tcpConnTable tcpConnEntry tcpConnState tcpConnLocalAddress tcpConnLocalPort tcpConnRemAddress tcpConnRemPort tcpInErrs tcpOutRsts udpInDatagrams udpNoPorts udpInErrors udpOutDatagrams udpTable udpEntry udpLocalAddress udpLocalPort snmpInPkts snmpOutPkts snmpInBadVersions

icmp.23 icmp.25 icmp.26 tcp.1 tcp.2 tcp.3 tcp.4 tcp.5 tcp.6 tcp.7 tcp.8 tcp.9 tcp.10 tcp.11 tcp.12 tcp.13 tcpConnTable.1 tcpConnEntry.1 tcpConnEntry.2 tcpConnEntry.3 tcpConnEntry.4 tcpConnEntry.5 tcp.14 tcp.15 udp.1 udp.2 udp.3 udp.4 udp.5 udpTable.1 udpEntry.1 udpEntry.2 snmp.1 snmp.2 snmp.3

Counter Counter Counter Counter INTEGER INTEGER INTEGER INTEGER Counter Counter Counter Counter Gauge Counter Counter Counter Aggregate Aggregate INTEGER IpAddress INTEGER IpAddress INTEGER Counter Counter Counter Counter Counter Counter Aggregate Aggregate IpAddress INTEGER Counter Counter Counter Counter Counter Counter Counter Counter

read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only not-accessible not-accessible read-write read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only not-accessible not-accessible read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only

mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory

icmpOutTimestampReps icmp.24

snmpInBadCommunityNames snmp.4 snmpInBadCommunityUses snmp.5 snmpInASNParseErrs snmpInTooBigs snmpInNoSuchNames snmp.6 snmp.8 snmp.9

13

snmpInBadValues snmpInReadOnlys snmpInGenErrs snmpInTotalReqVars snmpInTotalSetVars snmpInGetRequests snmpInGetNexts snmpInSetRequests snmpInGetResponses snmpInTraps snmpOutTooBigs snmpOutNoSuchNames snmpOutBadValues snmpOutGenErrs snmpOutGetRequests snmpOutGetNexts snmpOutSetRequests snmpOutGetResponses snmpOutTraps

snmp.10 snmp.11 snmp.12 snmp.13 snmp.14 snmp.15 snmp.16 snmp.17 snmp.18 snmp.19 snmp.20 snmp.21 snmp.22 snmp.24 snmp.25 snmp.26 snmp.27 snmp.28 snmp.29

Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter Counter INTEGER

read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-only read-write

mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory mandatory

snmpEnableAuthenTraps snmp.30

HOST
Ver el contenido del fichero HOST-RESOURCES-MIB.MIB

14

Anda mungkin juga menyukai