CMU-SNMP Ұ 

   
 
ѱ װ б װа п

http://esc.cl.hangkong.ac.kr/~hmask

hmask@esc.cl.hangkong.ac.kr

CMU-SNMP īױ    п   SNMP    α׷̴. 
CMU-SNMP SNMP Ʈ   SNMP  α׷ 
 , SNMPv1 SNMPv2 Ѵ(SNMPv2  ذ  
ʱ  SNMPv2party    ʰ SNMPv2usec  
Ѵ).
  ֽ  3.6̸   Ŀ v2.0.35, Ŀ v2.1.125 
libc v5.4.38̻󿡼 Ѵ.   3.4 ̻ ū ̰ Ƿ 
  ص . CMU SNMP ϴ MIB  .

- MIB-2(RFC 1213)
- Identification MIB(RFC 1414)
- Host Resources MIB(RFC 1514)
- TUBS Linux MIB( 翡 ´  MIB)

1. ġ

CMU-SNMP  site   ִ.

Main ftp site
 ftp://ftp.ibr.cs.tu-bs.de/pub/local/linux-cmu-snmp/

Mirror
ftp://sunsite.unc.edu/pub/Linux/system/network/admin()
ftp://ftp.kreonet.re.kr/pub/Linux/sunsite/system/network/admin()

 ҽ  ̳ʸ     , 3.4   
 ϰ Ѵ.  ̸  .

- cmu-snmp-linux-3.4-src.tar.gz(ҽ )
- cmu-snmp-linux-3.4-bin.tar.gz(̳ʸ )

ġ 
ġϴ  ̳ʸ  ġϴ  ҽ ؼ  ġ
     ִ.

(1) ̳ʸ ġ
̳ʸ  ġϱ ؼ   ý ELF  ؾ 
Ѵ(ELF libc, ELF kernel). ׸   snmpd ̳ snmplib 
ϰ    ġؾ Ѵ. ġ   .
- root login
- cd /(root 丮 ̵Ѵ.)
- tar xvzf .../cmu-snmp-linux-3.4-bin.tar.gz ( Ǭ.)
- cd /tmp/cmu-snmp-linux/etc
- ./installconf -mini <password> (agent н带 Ѵ.)
- /etc/rc.local Ͽ   snmpd  ߰Ѵ.
- /usr/sbin/snmpd -f ; echo snmpd

(2) ҽ ġ 
- root login
- tar xvzf .../cmu-snmp-linux-3.4-src.tar.gz 
  ( 丮 ҽ Ǭ.)
- cd cmu-snmp-linux-3.4
- ./configure
- make( Ѵ.)
- make install
- cd ./etc
- ./installconf -mini <password>(agent н带 Ѵ.)
- /etc/rc.local Ͽ   snmpd  ߰Ѵ.
  /usr/sbin/snmpd -f ; echo snmpd

ġ     snmpwalk α׷ Ͽ ׽Ʈ غ
. ׸ 1 snmpwalk Ͽ ý ̺ 캻   
Ǿ ִ ý  Ȯ  ִ.


2.  α׷

(1) snmpd
CMU SNMP Ʈμ SNMPv1 SNMP 2usec ǿ   
ش. ȯ  snmpd.conf Ͽ  ؼ ̷ ڴ system 
.sysName, system.sysLocation system.sys Contact      
 ִ.
SNMPv1 ǿ   community  ̸ ⺻   public̸, 
host  ̺   SNMPv2usec    Ǵ     뿡    ٸ 
community Ѵ. ɼ  .

- d : SNMP Ŷ  ؼ ش.
- f :   ׶忡 ϰ Ѵ.
- c <config file > : ࿡ ʿ   ҷδ.
- a <agent info> : ࿡ ʿ agent   ҷδ.

(2) snmpd.conf
snmpd  ̴.    view user, community  
 κа Ʈ, ̽    κ   .   
  ؼ       еȴ.

switch security posture
- mini  internet subtree ؼ read-only θ  
   ִ.
- semi  system subtree agent 迡 ؼ read-only 
     ִ.
- very  agent 迡 ؼ read-only    ִ.

ó ġ(installconf)   ġ  н带    ִ. 
  ٸ   Ű Ķʹ   . ̸   
snmpd.conf    .

̸   snmpd.conf    .

(3) snmpget
SNMP Ʈ Get Request ؼ Response ޾ƿ α׷̴.
 : snmpget host community variable
COMMUNITY Argument
snmpget α׷ SNMPv1/SNMPv2c/SNMPv2u sec  ϱ 
, ̵ argument ؼ Ѵ.

- community    ڿ    ù   ڰ    +    ۵Ǹ    SNMPv2c 
(cmomunity-based SNMPv2) νѴ.
- community ڿ   ù ڰ  -  ۵Ǹ  SNMPv2u(User-based 
- security model) νѴ.
-   ٸ community ڿ  SNMPv1 νѴ.

SNMPv2u ü communityڿ  .

/userName/[authenticationKey]/[privacyKey]/[contextSelector]
⼭ Ű  ڿ hex ڵ带   , hex ڵ带  
 ݵ  տ 0x ߰ؾ Ѵ.    .

/joy : QoS = noAuth/noPriv, userName = "joe"
/boneless/chicken/ranch : QoS = auth/priv, userName 
         ="boneless", authKey ="chicken", privKey ="ranch"
/maplesyrup/sugarbush//  : QoS = auth/noPriv, context 
         ="other", userName ="maplesyrup" authKey 
         ="sugarbush"
/glenn/0x4ca25023b00a6689ef21cb1b6fa9cb0e
        : QoS = auth/noPriv, context="", userName ="glenn"
        authKey ="0x4ca25023b00a6689ef21cb1b6fa9cb0e"
+public : SNMPv2c
public  : SNMPv1

(4) snmpgetnext
SNMP Ʈ Get Next Request Ͽ   Response 
 ޴´.

 : snmpgetnext host community variable-name [variable-name] . . .
(5) snmptrap
SNMP Ʈ ޽  ȣƮ Ѵ.

    : 
   snmptrap    host    community    trap-type    specific-type 
device-description

device description
Ʈ ޽  ġ    system. sysDescr.0  Ǵ 
 ̴.

# snmptrap nic.andrew.cmu.edu public 0 0 SUN 3/60: SUNOS 4.0
# 
(nic.andrew.cmu.edu ýۿ coldStart Ʈ Ѵ)

(6) snmptrapd
ܺο ޵ SNMP Ʈ  ޽ 162 Ʈ ؼ  ޴´. ɼ 
 .

- p : ޽ ȭ鿡 Ѵ.
- s : syslog Ͽ ޽ Ѵ. ̷ syslog ޽ 
       LOG_WARNING  ޵ȴ.
- v 1 : SNMPv1 Ʈ ޽ ޴´.
- d : Ŷ Ͽ Ѵ.

snmptrapd ۽Ű snmptrap Ͽ localhost Ʈ ޽ 
 .

snmpd.conf 
# snmpd.conf - created Mon Aug 30 16:26:04 KST 1999 
 # view configuration
 #       viewName        OID                          included/excluded
 # internet
 view    all             .1.3.6.1                 included
 # internet
 view    mini            .1.3.6.1                 included

 # for v1 public exclude exclude mib-2.ident.identInfo
 # and mib-2.host.hrSWRun in the mini view:
 view    xmini           .1.3.6.1                 included
 view    xmini           .1.3.6.1.2.1.24.1                  excluded
 view    xmini           .1.3.6.1.2.1.25.4                  excluded         
 # system, snmp, usecAgent, usecStats
 view    semi            .1.3.6.1.2.1.1            included
 view    semi            .1.3.6.1.2.1.11           included
 view    semi            .1.3.6.1.6.3.6.1.1                 included
 view    semi            .1.3.6.1.6.3.6.1.2                 included   

 # . . . ߷
# community configuration
 #         commName      readV   writeV
 community public        xmini   -
 ## uncomment for private entry:
 # community private     mini    mini
 
 ## port to use (default is 161):
 # port:         161
 
 ## the entry of system.Contact and system.Location:
 sysContact:             Not Configured                 
 sysLocation:            Not Configured
 ## the system name is per default determined from the hostname:
 # sysName:              chappell
 
 ## trap sink address and community string. (passed to 
    snmptrap(1)utility).
 ## authentraps contains the value of snmpEnableAuthenTraps; 
    (default is `disabled).
 trap sink:              localhost
 trap community:         public
 snmpEnableAuthenTraps:  disabled
 ## specify type and speed of interfaces: if the last char is an 
    asterisk, any suffix will match.
 interface:      lo0     24       20000000
 interface:      eth*     6       10000000
 interface:      sl*     28       28800
 interface:      ppp*    23       28800 
