'Management Information Base'에 해당되는 글 2건

  1. 2010.03.18 MIB Browser와 STG를 이용한 Traffic Monitorring
  2. 2009.03.10 Net-SNMP Distributed MIBs
2010.03.18 09:31

MIB Browser와 STG를 이용한 Traffic Monitorring

SNMP(Simple Network Management Protocol) 는 간단한 네트워크 관리를 위한 규약인데, 말 그대로 네트워크 관리를 위한 용도로 사용되는 프로토콜 입니다.

SNMP로 할 수 있는 것들은 네트워크 구성관리, 성능관리, 장비관리, 보안관리 등이 있습니다.

 

l        기본구성

 

SNMP 프로토콜을 활용해서 실제 네트워크 관리 정보를 얻어오기 위해서는 응용 어플리케이션이 준비되어 있어야만 합니다.

보통의 네트워크 프로토콜을 사용하는 어플리케이션이 서버/클라이언트 모델로 구성 되듯이, SNMP 역시 서버와 클라이언트로 구성이 됩니다.

SNMP agent는 관리대상이 되는 시스템에 설치되어서 필요한 정보(네트워크 혹은 시스템)를 수집하기 위한 SNMP 모듈이며, SNMP manager SNMP agent가 설치된 시스템에 필요한 정보를 요청하는 SNMP 모듈입니다.

SNMP agent는 서버, SNMP manager는 클라이언트로 생각하면 이해가 좀 더 수월할 것입니다.

 

l         MIB 에 대해서

 

SNMP는 네트워크를 관리하기 위한 프로토콜 입니다. 그렇다면 무엇을 관리할 것인가를 결정해야 합니다. 관리객체를 결정했다면, 이러한 관리객체를 효과적으로 관리하기 위해서 이를 분류해야 할 것입니다. 이것이 바로 MIB 입니다.

MIB Management Information Base의 줄임 말 인데, 관리되어야 할 자원 객체의 분류된 정보를 말합니다. 관리되어야 할 객체는 시스템정보, 네트워크 사용량, 네트워크 인터페이스 정보 등이 됩니다.

MIB는 계층 구조를 가지게 되며, 예를 들어서 agent가 설치되어 있는 시스템으로부터 시스템부가정보를 얻어오길 원한다면, manager에서 데이터를 요청하면 됩니다.

MIB 계층 구조를 보면 각 MIB 옆에 숫자가 있는 것을 볼 수 있으며, 이 숫자가 OID 번호입니다.

 

l         동작 및 구성

 

SNMP는 기본적으로 네트워크 정보를 수집하는데 그 목적이 있는데, 수집하는 몇 가지 각각 다른 방법이 있습니다.

- GET manager에서 agent로 특정 정보를 요청하기 위해서 사용합니다.

- SET manager에서 agent로 특정 값을 설정하기 위해서 사용합니다.

- TRAP agent 에서 통보해야 될 어떤 정보가 발생했을 때 manager 에게 해당 사항을 알리기 위해서 사용합니다.

- SNMP 메시지

Version

Community NAME

SNMP PDU

Community NAME : manager agent 간의 관계를 나타내며, 인증, 접근통제 등의 목적으로 사용됩니다. 보통은 간단하게 public을 사용합니다.

PDU : Physical Data Unit 의 줄임말로, 실제 전송되는 필요한 정보들을 담고 있는 Unit 입니다. PDU PUD 타입과 (GET, SET, TRAP) Request-id, 실제 보내고자 하는 데이터 등으로 구성되어 있습니다.

 

l         구성방식(MIB Browser STG를 이용한 Traffic Monitoring)

 

ü         SNMP agent 설치

- SNMP을 사용하기 위한 agent 환경을 구축합니다.

 

ü         MIB 값 구하기

 

       MIB Browser를 이용하여 MIB 값 구하기
- Community NAME을 연동할 agent의 값과 동일하게 적어줍니다. (기본 public)


       agent IP를 넣고 모니터링 하고자 하는 정보(, CPU 사용량) OID를 검색합니다.

ü         SNMP manager 설치

 

       관리할 정보(, CPU 사용량) OID 값을 STG(SNMP manager)에 설정합니다.


       STG 서버에는 해당 agent의 정보 확인이 가능합니다.



출처 : http://support.oullim.co.kr/

Trackback 0 Comment 0
2009.03.10 11:46

Net-SNMP Distributed MIBs

Net-SNMP Distributed MIBs (Management Information Base)

SMI(Structure and identification of Management Information)

The following are the MIB files distributed with Net-SNMP. Note that because they are distributed with Net-SNMP does not mean the agent implements them all. Another good place for finding other MIB definitions can be found at the MIB depot.

MIBRFCDescription
SNMPv2-TM
[mib file]
rfc3417
The MIB module for SNMP transport mappings.

Copyright (C) The Internet Society (2002). This

version of this MIB module is part of RFC 3417;

see the RFC itself for full legal notices.

SNMPv2-MIB
[mib file]
rfc3418
The MIB module for SNMP entities.

Copyright (C) The Internet Society (2002). This

version of this MIB module is part of RFC 3418;

see the RFC itself for full legal notices.

SNMP-FRAMEWORK-MIB
[mib file]
rfc3411
The SNMP Management Architecture MIB

Copyright (C) The Internet Society (2002). This

version of this MIB module is part of RFC 3411;

see the RFC itself for full legal notices.

SNMP-MPD-MIB
[mib file]
rfc3412
The MIB for Message Processing and Dispatching

Copyright (C) The Internet Society (2002). This

version of this MIB module is part of RFC 3412;

see the RFC itself for full legal notices.

SNMP-TARGET-MIB
[mib file]
rfc3413
This MIB module defines MIB objects which provide

mechanisms to remotely configure the parameters used

by an SNMP entity for the generation of SNMP messages.


Copyright (C) The Internet Society (2002). This

version of this MIB module is part of RFC 3413;

see the RFC itself for full legal notices.

SNMP-NOTIFICATION-MIB
[mib file]
rfc3413
This MIB module defines MIB objects which provide

mechanisms to remotely configure the parameters

used by an SNMP entity for the generation of

notifications.


Copyright (C) The Internet Society (2002). This

version of this MIB module is part of RFC 3413;

see the RFC itself for full legal notices.

SNMP-PROXY-MIB
[mib file]
rfc3413
This MIB module defines MIB objects which provide

mechanisms to remotely configure the parameters

used by a proxy forwarding application.


Copyright (C) The Internet Society (2002). This

version of this MIB module is part of RFC 3413;

see the RFC itself for full legal notices.

SNMP-USER-BASED-SM-MIB
[mib file]
rfc3414
The management information definitions for the

SNMP User-based Security Model.


Copyright (C) The Internet Society (2002). This

version of this MIB module is part of RFC 3414;

see the RFC itself for full legal notices.

SNMP-VIEW-BASED-ACM-MIB
[mib file]
rfc3415
The management information definitions for the

View-based Access Control Model for SNMP.


Copyright (C) The Internet Society (2002). This

version of this MIB module is part of RFC 3415;

see the RFC itself for full legal notices.

SNMP-COMMUNITY-MIB
[mib file]
rfc2576
This MIB module defines objects to help support coexistence

between SNMPv1, SNMPv2c, and SNMPv3.
TRANSPORT-ADDRESS-MIB
[mib file]
rfc3419
This MIB module provides commonly used transport

address definitions.


Copyright (C) The Internet Society (2002). This version of

this MIB module is part of RFC 3419; see the RFC itself for

full legal notices.
IF-MIB
[mib file]
rfc2863
The MIB module to describe generic objects for network

interface sub-layers. This MIB is an updated version of

MIB-II's ifTable, and incorporates the extensions defined in

RFC 1229.
IF-INVERTED-STACK-MIB
[mib file]
rfc2864
The MIB module which provides the Inverted Stack Table for

interface sub-layers.
EtherLike-MIB
[mib file]
rfc3635
The MIB module to describe generic objects for

ethernet-like network interfaces.


The following reference is used throughout this

MIB module:


[IEEE 802.3 Std] refers to:

IEEE Std 802.3, 2002 Edition: 'IEEE Standard


for Information technology -

Telecommunications and information exchange

between systems - Local and metropolitan

area networks - Specific requirements -

Part 3: Carrier sense multiple access with

collision detection (CSMA/CD) access method

and physical layer specifications', as

amended by IEEE Std 802.3ae-2002:

'Amendment: Media Access Control (MAC)

Parameters, Physical Layer, and Management

Parameters for 10 Gb/s Operation', August,

2002.


Of particular interest is Clause 30, '10 Mb/s,

100 Mb/s, 1000 Mb/s, and 10 Gb/s Management'.


Copyright (C) The Internet Society (2003). This

version of this MIB module is part of RFC 3635;

see the RFC itself for full legal notices.
IP-MIB
[mib file]
rfc4293
The MIB module for managing IP and ICMP implementations, but

excluding their management of IP routes.


Copyright (C) The Internet Society (2006). This version of

this MIB module is part of RFC 4293; see the RFC itself for

full legal notices.
IP-FORWARD-MIB
[mib file]
rfc4292
The MIB module for the management of CIDR multipath IP

Routes.


Copyright (C) The Internet Society (2006). This version

of this MIB module is a part of RFC 4292; see the RFC

itself for full legal notices.
IANA-RTPROTO-MIB
[mib file]
 
This MIB module defines the IANAipRouteProtocol and

IANAipMRouteProtocol textual conventions for use in MIBs

which need to identify unicast or multicast routing

mechanisms.


Any additions or changes to the contents of this MIB module

require either publication of an RFC, or Designated Expert

Review as defined in RFC 2434, Guidelines for Writing an

IANA Considerations Section in RFCs. The Designated Expert

will be selected by the IESG Area Director(s) of the Routing

Area.
TCP-MIB
[mib file]
rfc4022
The MIB module for managing TCP implementations.

Copyright (C) The Internet Society (2005). This version

of this MIB module is a part of RFC 4022; see the RFC

itself for full legal notices.
UDP-MIB
[mib file]
rfc4113
The MIB module for managing UDP implementations.

Copyright (C) The Internet Society (2005). This

version of this MIB module is part of RFC 4113;

see the RFC itself for full legal notices.
INET-ADDRESS-MIB
[mib file]
rfc4001
This MIB module defines textual conventions for

representing Internet addresses. An Internet

address can be an IPv4 address, an IPv6 address,

or a DNS domain name. This module also defines

textual conventions for Internet port numbers,

autonomous system numbers, and the length of an

Internet address prefix.


Copyright (C) The Internet Society (2005). This version

of this MIB module is part of RFC 4001, see the RFC

itself for full legal notices.
HCNUM-TC
[mib file]
rfc2856
A MIB module containing textual conventions

for high capacity data types. This module

addresses an immediate need for data types not directly

supported in the SMIv2. This short-term solution

is meant to be deprecated as a long-term solution

is deployed.
HOST-RESOURCES-MIB
[mib file]
rfc2790
This MIB is for use in managing host systems. The term

`host' is construed to mean any computer that communicates

with other similar computers attached to the internet and

that is directly used by one or more human beings. Although

this MIB does not necessarily apply to devices whose primary

function is communications services (e.g., terminal servers,

routers, bridges, monitoring equipment), such relevance is

not explicitly precluded. This MIB instruments attributes

common to all internet hosts including, for example, both

personal computers and systems that run variants of Unix.
HOST-RESOURCES-TYPES
[mib file]
rfc2790
This MIB module registers type definitions for

storage types, device types, and file system types.


After the initial revision, this module will be

maintained by IANA.
RMON-MIB
[mib file]
rfc2819
Remote network monitoring devices, often called

monitors or probes, are instruments that exist for

the purpose of managing a network. This MIB defines

objects for managing remote network monitoring devices.
IPV6-MIB
[mib file]
rfc2465
The MIB module for entities implementing the IPv6

protocol.
IPV6-ICMP-MIB
[mib file]
rfc2466
The MIB module for entities implementing

the ICMPv6.
IPV6-TCP-MIB
[mib file]
rfc2452
The MIB module for entities implementing TCP over IPv6.
IPV6-UDP-MIB
[mib file]
rfc2454
The MIB module for entities implementing UDP over IPv6.
DISMAN-EVENT-MIB
[mib file]
rfc2981
The MIB module for defining event triggers and actions

for network management purposes.
DISMAN-SCRIPT-MIB
[mib file]
rfc3165
This MIB module defines a set of objects that allow to

delegate management scripts to distributed managers.
DISMAN-SCHEDULE-MIB
[mib file]
rfc3231
This MIB module defines a MIB which provides mechanisms to

schedule SNMP set operations periodically or at specific

points in time.
NOTIFICATION-LOG-MIB
[mib file]
rfc3014
The MIB module for logging SNMP Notifications, that is, Traps

and Informs.
SNMP-USM-AES-MIB
[mib file]
rfc3826
Definitions of Object Identities needed for

the use of AES by SNMP's User-based Security

Model.


Copyright (C) The Internet Society (2004).


This version of this MIB module is part of RFC 3826;

see the RFC itself for full legal notices.

Supplementary information may be available on

http://www.ietf.org/copyrights/ianamib.html.
SNMP-USM-DH-OBJECTS-MIB
[mib file]
rfc2786
The management information definitions for providing forward

secrecy for key changes for the usmUserTable, and for providing a

method for 'kickstarting' access to the agent via a Diffie-Helman

key agreement.
AGENTX-MIB
[mib file]
rfc2742
This is the MIB module for the SNMP Agent Extensibility

Protocol (AgentX). This MIB module will be implemented by

the master agent.

IANAifType-MIB
[mib file]
 
This MIB module defines the IANAifType Textual

Convention, and thus the enumerated values of

the ifType object defined in MIB-II's ifTable.
IANA-LANGUAGE-MIB
[mib file]
 
The MIB module registers object identifier values for

well-known programming and scripting languages. Every

language registration MUST describe the format used

when transferring scripts written in this language.


Any additions or changes to the contents of this MIB

module require Designated Expert Review as defined in

the Guidelines for Writing IANA Considerations Section

document. The Designated Expert will be selected by

the IESG Area Director of the OPS Area.


Note, this module does not have to register all possible

languages since languages are identified by object

identifier values. It is therefore possible to registered

languages in private OID trees. The references given below are not

normative with regard to the language version. Other

references might be better suited to describe some newer

versions of this language. The references are only

provided as `a pointer into the right direction'.
IANA-ADDRESS-FAMILY-NUMBERS-MIB
[mib file]
 
The MIB module defines the AddressFamilyNumbers

textual convention.
NET-SNMP-TC
[mib file]
 
Textual conventions and enumerations for the Net-SNMP project
NET-SNMP-MIB
[mib file]
 
Top-level infrastructure of the Net-SNMP project enterprise MIB tree
NET-SNMP-AGENT-MIB
[mib file]
 
Defines control and monitoring structures for the Net-SNMP agent.
NET-SNMP-EXAMPLES-MIB
[mib file]
 
Example MIB objects for agent module example implementations
NET-SNMP-EXTEND-MIB
[mib file]
 
Defines a framework for scripted extensions for the Net-SNMP agent.
UCD-SNMP-MIB
[mib file]
 
Clarify behaviour of objects in the memory & systemStats groups

(including updated versions of malnamed mem*Text objects).

Define suitable TCs to describe error reporting/fix behaviour.
UCD-DEMO-MIB
[mib file]
 
The UCD-SNMP Demonstration MIB.
UCD-IPFWACC-MIB
[mib file]
 
This module defines MIB components for reading information

from the accounting rules IP Firewall. This would typically

let you read the rules and the counters. I did not include

some flags and fields that I considered irrelevant for the

accounting rules. Resetting the counters of the rules by SNMP

would be simple, but I don't consider it so useful. I gave no

consideration to implementing write access for allowing

modification of the accounting rules.


Cristian.Estan@net.utcluj.ro
UCD-DLMOD-MIB
[mib file]
 
This file defines the MIB objects for dynamic 

loadable MIB modules.
UCD-DISKIO-MIB
[mib file]
 
This MIB module defines objects for disk IO statistics.
NET-SNMP-VACM-MIB
[mib file]
 
Defines Net-SNMP extensions to the standard VACM view table.

http://www.net-snmp.org/


테스트
snmptest로 접속해보면 다음과 같다.
[root@ns ucd-snmp-4.2.1]# snmptest localhost public
Variable: sysLocation.0
Variable: sysServices.0
Variable: sysContact.0
Variable: 엔터
Received Get Response from 127.0.0.1
requestid 0x78794697 errstat 0x0 errindex 0x0
system.sysLocation.0 = "Seoul Korea"
system.sysServices.0 = 76
system.sysContact.0 = "kang myung gyu, kang@dbakorea.pe.kr"


보통 라우터의 경우 자체OS에 snmp agent가 심어져 있지만, 일반 호스트서버의 경우,
위와 같이(snmpd) agnet를 실행해줘야 한다.

사용된 변수(udpInDatagrams)의 이름은 대소문자를 구분함
테이블이 아닌 일반변수의 경우, 마지막에 .0을 붙여서 질의한다.


snmp application의 사용예

snmpget
[kang@ns kang]$ snmpget localhost public udpInDatagrams.0

snmpwalk
[kang@ns kang]$ snmpwalk localhost public udpInDatagrams.0
[kang@ns kang]# snmpwalk localhost public interface
[kang@ns mrtg]$ snmpwalk -Of localhost private memory (full oid output)
[kang@ns mrtg]$ snmpwalk -On localhost private memory (oid를 숫자형식으로 출력)

snmpgetnext
[kang@ns kang]$ snmpget localhost public udpInDatagrams.0
udp.udpInDatagrams.0 = Counter32: 3404
[kang@ns kang]$ snmpgetnext localhost public udpInDatagrams.0
udp.udpNoPorts.0 = Counter32: 285
[kang@ns kang]$ snmpgetnext localhost public udpNoPorts.0
udp.udpInErrors.0 = Counter32: 0
[kang@ns kang]$ snmpgetnext localhost public udpInErrors.0
udp.udpOutDatagrams.0 = Counter32: 3594


snmptest
[root@ns ucd-snmp-4.2.1]# snmptest localhost public
Variable: sysDescr.0
Variable: sysObjectID.0
Variable: sysUpTime.0
Variable: sysContact.0
Variable: sysName.0
Variable: sysLocation.0
Variable: sysServices.0
Variable:
Received Get Response from 127.0.0.1
requestid 0x449D7035 errstat 0x0 errindex 0x0
system.sysDescr.0 = Linux ns.dbakorea.pe.kr 2.4.4 #2 Wed May 2 11:52:31 KST 2001 i586
system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.linux
system.sysUpTime.0 = Timeticks: (23439) 0:03:54.39
system.sysContact.0 = "kang myung gyu, kang@dbakorea.pe.kr"
system.sysName.0 = ns.dbakorea.pe.kr
system.sysLocation.0 = "Seoul Korea"
system.sysServices.0 = 76
Variable:

snmptranslate
[kang@ns mrtg]$ snmptranslate .1.3.6.1.4.enterprises.ucdavis.dskTable.dskEntry.dskPercent.1
.1.3.6.1.4.1.2021.9.1.9.1


SNMP MIB관계


UCD-SNMP AGENT
ucd-snmp AGENT는 대부분의 정보를 mib tree중 .1.3.6.1.4.1.2021섹션에 질의하여 REPORT한다.

.iso.org.dod.internet.private.enterprises.ucdavis (.1.3.6.1.4.1.2021)



161은 snmp, 162번 포트는 snmp-trap이 사용하는 포트이다.
company.com에 snmp agent가 동작중인가는 다음과 같이 파악할 수 있다.
nmap -sU -p 161,162 company.com

MRTG 리소스모니터링 예제
/usr/local/src/mrtg-2.9.10/contrib/

SNMP에 관한 링크
http://www.ieng.com/univercd/cc/td/doc/cisintwk/ito_doc/snmp.htm
http://net-snmp.sourceforge.net/tutorial/mrtg/index.html

MIB 목록
/usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt

참고 매뉴얼 페이지
snmpd.conf, snmp.conf, snmptrapd.conf, snmp_config

Trackback 0 Comment 0