Protocole SNMP

SNMP:

 ________________________________________

Follow us on Facebook

Follow us on Google+

________________________________________

Objectives SNMP:


* Automate the process of monitoring the use and performance of the network* Automate the process of configuration and control of network elements* Automate Fault Management* Without overloading the network* Allow access to remote devices on different physical networks

Examples:


* Detection of an interface or a falling rate inabituel error.* Detection surcharg'e link to change the architecture* Detection of frequent route changes (route flapping) indicates a misconfigured router* Checking Service Level Agreement* Intrusion Detection

History:


Early 1980 by IETFSeveral initial proposals
          
* Simple Gateway Management Protocol
          
* OSI Common Management Information Services and Protocol (CMIS and CMIP)SNMP
          
* Extended version of SGMP

          
* Short-term solution
          
* CMIS / CMIP over TCP (CMOT) is too complicated

Standardization:

* SNMPv1: RFC 1155 1156 1157 (1990)* Protocol simple
        
-Easy to implement: small embedded software
        
-Simple messages

        
Soon-to-costSNMPv2: RFC 1902 1903 1904 1905 1906 1907 (1996)
                
-4 1 compatible formats including diff'erents v1 (v2c)SNMPv3: RFC 3411 3412 3413 3414 3415 3416 3417 3418 (2002)

          -Adds security: authentication, integrity, replay prevention and data privacy

Components:

Management station
          
* NMS (Network Management System)
          
* SNMP ClientAgents on 'equipment
          
* SNMP ServersSNMP relay
          
* To another protocol
          
* Between versions (v2! V1)Communication protocol
       
* Above UDP
             
Server-port 161
             
Client port 162
* Data Base objects supervis'es
              
-MIB (Management Information Base)
                      
Collection of objects (Managed Objects)
                      
In writings in ASN-1 (Abstract Syntax Notation One)
                      
Structur'ee by SMI (Structure of Management Information)
              
Organization-tree objects
                      
Branches = cat'egorie logic
                      
Leaves = information about objectsAlarms (Traps)
                      
In writings in ASN-1

Protocol:

posts: 


commands
                -GetRequest: request info.
                -GetNextRequest: request info. follows (sequences are useful for / lists)
                -SetRequest: assignment
                -GetBulk: request more info. at the same time (SNMPv2)
Replies
               -GetResponse: response to a get or set (SNMPv2 Response)
Unsolicited Message
                Trap: alarm (Trapv2 SNMPv2)
                -InformRequest: info. paid between MNS (SNMPv2)


Format datagrams SNMPv1/v2:

Format commands / responses:


* Version: 0 for SNMPv1, 1 for SNMPv2c* Communaut'e: password (clear!)* Type:
             
0: GetRequest
             
1: GetNextRequest
             
2: Response
             
3: SetRequest
             
4: Trapv1
             
5: GetBulkRequest
             
6: InformRequest
             
7: Trapv2* ID: Identifier for association request / response* Error Status (0 in queries)
             
0: no error
             
1: too
             
2: unknown
             
3: bad value
             
4: Read-only
             
other: 18 SNMPv2 errors* Index error: index of the variable that caused the error
             
-0 In queries* Keys / Values: List association object name / value
             
-NULL values ​​in queries

Format SNMPv1 trap:


* Company: Type of agent equipment* Generic alarm
                
1 start
                
2 restart
                
3 link down
                
4 link up
                
5 authentication problem
                
6 loss of neighbor
                
7 company-specific* Alarm sp'ecifique: li'ee to a seller * Various keys / values

developments:


SNMPv3 added safety with change header
        
SNMPv2-mixing and SNMPv2 *
        
-authentification/intégrité based on HMAC and secret key
        
With replay-prevention maintains reboot / date
        
Confidentialit'e bas'ee-DES encryption
        
-Control of accesses are by main (different levels of access ala MIB)RMON traffic monitoring and real-time probe
        
-Adding a MIB

        
Gilles Roussel

MIB / SMI:


SMI describes the structure of the MIB objectsEach object:
          
-Name (OID)
          
SMI-syntax (ASN-1) which defines the:
                  
its type
                  
its coding
          
-Right to access read / writeName
          
-Continued integers separated by dots

          
Internet-prefix managed by IANA: .1.3.6.1
          
Symbolic-name written in SMI & MIB. Iso.org.dod.internet.

Abrorescence:

ASN-1:


* Standard ISO* Allows description ind'ependante vendors (similar to XML DTD)* Language description standard types* Encoding standard Basic Encoding Rules (BER)
            
Encod'ees triplet-values ​​(type, size, value)* Predefined types (INTEGER, etc ...)* Types users
            
-SMI type definition

Example 1:


Tree node

system OBJECT IDENTIFIER :: = {mib-2 1}

Example 2:

Simple object in the MIBsysDescr OBJECT-TYPESYNTAX DisplayString (SIZE (0 .. 255))MAX-ACCESS read-onlySTATUS currentDESCRIPTION"A textual description of the entity. Shoulds This value include the full name and version identification of the system's hardware type, software operating-system, and networking software."System :: = {1}

Example 3:

Table of MIB objectsifTable OBJECT-TYPESYNTAX SEQUENCE OF IfEntryMAX-ACCESS not-accessibleSTATUS currentDESCRIPTION"A list of interface entries. The number of entries is Given by the value of ifNumber."Interfaces :: = {2}

Example 4:

Content of table objectsifEntry OBJECT-TYPESYNTAX IfEntryMAX-ACCESS not-accessibleSTATUS currentDESCRIPTION"An entry Containing management information applicable to a Particular interface."INDEX {ifIndex}:: = {1} ifTable

Example 5:

Type of table objectsIfEntry :: =SEQUENCE {InterfaceIndex ifIndex,ifDescr DisplayString,IANAifType ifType,ifMtu Integer32,ifSpeed ​​Gauge32,ifPhysAddress PhysAddress,ifAdminStatus INTEGER,...}

Example 6:

Objects to the sequenceifDescr OBJECT-TYPESYNTAX DisplayString (SIZE (0 .. 255))MAX-ACCESS read-onlySTATUS currentDESCRIPTION"A textual string Containing information about the interface. Shoulds This string include the name of the manufacturer, the product name and the version of the interface hardware / software."IfEntry :: = {2}

Example 7:

ModulesciscoConfigManMIB MODULE-IDENTITYLAST UPDATED-"9511280000Z"ORGANIZATION "Cisco Systems, Inc.."CONTACT INFO...DESCRIPTION"Configuration Management MIB."...REVISION "9511280000Z"DESCRIPTION"Initial version of this MIB module."CiscoMgmt :: = {43}

Tools:

* Tools to modular r'eseau and management system
              
-HP Openview
              
-IBM Tivoli Netwiew
              
-Sun Enterprise Manager
              
EvidianOpenMaster-
              
- ...Simple tools SNMP
              
-Net-SNMP

              -Various API

Net-SNMP:

*snmptranslate  
# Snmptranslate .1.3.6.1.2.1.1.3.0 
*SNMPv2-MIB :: sysUpTime.0# Snmptranslate-On SNMPv2-MIB :: system.sysUpTime.0 .1.3.6.1.2.1.1.3.0# Snmptranslate-IR sysUpTime.0
SNMPv2-MIB :: sysUpTime.0*snmpget# Snmpget-v 2c-c public localhost system.sysUpTime.0SNMPv2-MIB :: sysUpTime.0 TimeTicks = (586 731 977) 67 days, 21:48:39.77# Snmpget-v 2c-c public localhost system.sysUpTimeSNMPv2-MIB :: sysUpTime = No Such Instance currentlyexists at this OID*snmpgetnextsnmpgetnext-v 2c-c public localhost system.sysUpTime.0SNMPv2-MIB :: sysContact.0 = STRING: Root <root@localhost>(Configure / etc / snmp / snmp.local.conf)*snmpwalk# Snmpwalk-v 2c-c public localhost systemSNMPv2-MIB :: sysDescr.0 = STRING: Linux 6.2.10 Machine # 3Fri January 14 9:31:45 p.m. CET 2005 i686SNMPv2-MIB :: sysObjectID.0 = OID: NET-SNMP-TC :: linuxSNMPv2-MIB :: = sysUpTime.0 TimeTicks: (484897) 1:20:48.97SNMPv2-MIB :: sysContact.0 = STRING: Root <root@localhost>(Configure / etc / snmp / snmp.local.conf)SNMPv2-MIB :: sysName.0 = STRING: machine*snmptable# Snmptable-v 2c-c public localhost sysORTableSNMP table: SNMPv2-MIB :: sysORTablesysORIDIF-MIB :: ifMIBSNMPv2-MIB :: snmpMIBTCP-MIB :: tcpMIBIP-MIB :: ipUDP-MIB :: udpMIBSNMP-VIEW-BASED-ACM-MIB :: vacmBasicGroupSNMP-FRAMEWORK-MIB :: snmpFrameworkMIBComplianceSNMP-MPD-MIB :: snmpMPDComplianceSNMP-USER-BASED-SM-MIB :: usmMIBCompliance*snmpset# Snmpset-v 2c-c private localhost sysUpTime.0 "test"*snmptrap# Snmptrap-v 1-c public 192.168.1.2 IF-MIB :: linkUp192.168.1.2 2 0'' IF-MIB :: ifIndex i 1 
*snmptrapd# Snmptrapd-f-Le-C-------*snmptrapd.conftraphandle default script 
-------