Understand the SNMP manager and the SNMP agent
Understand the roles of SMI and MIB in network management
Be familiar with SMI object attributes and encoding methods
Know how an MIB variable is accessed
Be familiar with the SNMP PDU and format
48 trang |
Chia sẻ: thuongdt324 | Lượt xem: 510 | Lượt tải: 0
Bạn đang xem trước 20 trang tài liệu TCP/IP Protocol Suite - Chapter 21: Network Management: SNMP, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Chapter 21Upon completion you will be able to:Network Management:SNMP Understand the SNMP manager and the SNMP agent Understand the roles of SMI and MIB in network management Be familiar with SMI object attributes and encoding methods Know how an MIB variable is accessed Be familiar with the SNMP PDU and formatObjectives 1TCP/IP Protocol Suite21.1 CONCEPTSNMP defines a manager, usually a host, that controls and monitors a set of agents, usually routers.The topics discussed in this section include:Managers and Agents 2TCP/IP Protocol SuiteFigure 21.1 SNMP concept3TCP/IP Protocol Suite21.2 MANAGEMENT COMPONENTSSNMP requires the use of two other protocols: Structure of Management Information (SMI) and Management Information Base (MIB). Network management on the Internet is done through the cooperation of SNMP, SMI, and MIB.The topics discussed in this section include:Role of SNMP Role of SMI Role of MIB An Analogy An Overview 4TCP/IP Protocol SuiteFigure 21.2 Components of network management on the Internet5TCP/IP Protocol SuiteSNMP defines the format of packets exchanged between a manager and an agent. It reads and changes the status (values) of objects (variables) in SNMP packets.Note:6TCP/IP Protocol SuiteSMI defines the general rules for naming objects, defining object types (including range and length), and showing how to encode objects and values. SMI defines neither the number of objects an entity should manage, nor names the objects to be managed nor defines the association between the objects and their values.Note:7TCP/IP Protocol SuiteMIB creates a collection of named objects, their types, and their relationships to each other in an entity to be managed.Note:8TCP/IP Protocol SuiteWe can compare the task of network management to the task of writing a program.❏ Both tasks need rules. In network management this is handled by SMI.❏ Both tasks need variable declarations. In network management this is handled by MIB.❏ Both tasks have actions performed by statements. In network management this is handled by SNMP.Note:9TCP/IP Protocol SuiteFigure 21.3 Management overview10TCP/IP Protocol Suite21.3 SMISMI is a component used in network management. It names objects, defines the type of data that can be stored in an object, and shows how data can be encoded for transmission over the networkThe topics discussed in this section include:Name Type Encoding Method 11TCP/IP Protocol SuiteFigure 21.4 Object attributes12TCP/IP Protocol SuiteFigure 21.5 Object identifier13TCP/IP Protocol SuiteAll objects managed by SNMP are given an object identifier.The object identifier always starts with 1.3.6.1.2.1.Note:14TCP/IP Protocol SuiteFigure 21.6 Data type15TCP/IP Protocol SuiteTable 21.1 Data types16TCP/IP Protocol SuiteFigure 21.7 Conceptual data types17TCP/IP Protocol SuiteFigure 21.8 Encoding format18TCP/IP Protocol SuiteTable 21.2 Codes for data types19TCP/IP Protocol SuiteFigure 21.9 Length format20TCP/IP Protocol SuiteFigure 21.10 shows how to define INTEGER 14.Example 1See Next Slide21TCP/IP Protocol SuiteFigure 21.10 Example 1, INTEGER 1422TCP/IP Protocol SuiteExample 2See Next SlideFigure 21.11 shows how to define the OCTET STRING “HI.”23TCP/IP Protocol SuiteFigure 21.11 Example 2, OCTET STRING “HI”24TCP/IP Protocol SuiteFigure 21.12 shows how to define ObjectIdentifier 1.3.6.1 (iso.org.dod.internet).Example 3See Next Slide25TCP/IP Protocol SuiteFigure 21.12 Example 3, ObjectIdentifier 1.3.6.126TCP/IP Protocol SuiteFigure 21.13 shows how to define IPAddress 131.21.14.8.Example 4See Next Slide27TCP/IP Protocol SuiteFigure 21.13 Example 4, IPAddress 131.21.14.828TCP/IP Protocol Suite21.4 MIBMIB is a component used in network management. Each agent has its own MIB, a collection of all the objects that the manager can manage.The topics discussed in this section include:Accessing MIB Variables Lexicographic Ordering 29TCP/IP Protocol SuiteFigure 21.14 mib-230TCP/IP Protocol SuiteFigure 21.15 udp group31TCP/IP Protocol SuiteFigure 21.16 udp variables and tables32TCP/IP Protocol SuiteFigure 21.17 Indexes for udpTable33TCP/IP Protocol SuiteFigure 21.18 Lexicographic ordering34TCP/IP Protocol Suite21.5 SNMPSNMP is an application program that allows 1) a manager to retrieve the value of an object defined in an agent; 2) a manager to store a value in an object defined in an agent; and 3) an agent to send an alarm message about an abnormal situation to the managerThe topics discussed in this section include:PDUs Format 35TCP/IP Protocol SuiteFigure 21.19 SNMP PDUs36TCP/IP Protocol SuiteFigure 21.20 SNMP PDU format37TCP/IP Protocol SuiteTable 21.3 Types of errors38TCP/IP Protocol Suite21.6 MESSAGESA message in SNMP is made of four elements: version, header, security parameters, and data (which includes the encoded PDU).39TCP/IP Protocol SuiteFigure 21.21 SNMP message40TCP/IP Protocol SuiteTable 21.4 Codes for SNMP messages41TCP/IP Protocol SuiteIn this example, a manager station (SNMP client) uses the GetRequest message to retrieve the number of UDP datagrams that a router has received. There is only one VarBind entity. The corresponding MIB variable related to this information is udpInDatagrams with the object identifier 1.3.6.1.2.1.7.1.0. The manager wants to retrieve a value (not to store a value), so the value defines a null entity. Figure 21.22 shows the conceptual view of the packet showing the hierarchical nature of sequences. We have used white and color boxes for the sequence and a gray one for the PDU.Example 5See Next Slide42TCP/IP Protocol SuiteThe VarBind list has only one VarBind. The variable is of type 06 and length 09. The value is of type 05 and length 00. The whole is a sequence of length 0D (13). The VarBind list is also a sequence of length 0F (15). The GetRequest PDU is of length 1D (29). Now we have three OCTET STRINGs related to security parameter, security model, and flags. Then we have two integers defining maximum size (1024) and message ID (64). The header is a sequence of length 12, which we left blank for simplicity. There is one integer, version (version 3). The whole message is a sequence of 52 bytes. Figure 21.23 shows the actual message sent by the manager station (client) to the agent (server).Example 5See Next Slide43TCP/IP Protocol SuiteFigure 21.22 Example 544TCP/IP Protocol SuiteFigure 21.23 GetRequest message45TCP/IP Protocol Suite21.7 UDP PORTSSNMP uses the services of UDP on two well-known ports, 161 and 162. The well-known port 161 is used by the server (agent), and the well-known port 162 is used by the client (manager).46TCP/IP Protocol SuiteFigure 21.24 Port numbers for SNMP47TCP/IP Protocol Suite21.8 SECURITYThe main difference between SNMPv3 and SNMPv2 is the enhanced security. SNMPv3 provides two types of security: general and specific. SNMPv3 provides message authentication, privacy, and manager authorization. 48TCP/IP Protocol Suite