+ All Categories
Home > Documents > TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP...

TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP...

Date post: 20-Dec-2015
Category:
View: 223 times
Download: 5 times
Share this document with a friend
Popular Tags:
48
TCP/IP Protocol Suite 1 Chapter 21 Chapter 21 Upon completion you will be able to: Network Management: Network Management: SNMP 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 format Objectives
Transcript
Page 1: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 1

Chapter 21Chapter 21

Upon completion you will be able to:

Network Management:Network Management:SNMPSNMP

• 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

Objectives

Page 2: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 2

21.1 CONCEPT

SNMP defines a manager, which is typically a host that controls and SNMP defines a manager, which is typically a host that controls and monitors a set of agents, and usually routers.monitors a set of agents, and usually routers.

Note: SNMP has gone thru 3 versions. SNMP v1 was very common.Note: SNMP has gone thru 3 versions. SNMP v1 was very common.SNMP v2 is rare. Many installations have skipped v2 and gone straight SNMP v2 is rare. Many installations have skipped v2 and gone straight to v3.to v3.

The topics discussed in this section include:The topics discussed in this section include:

Managers and Agents Managers and Agents

Page 3: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 3

Figure 21.1 SNMP concept

One or more

Page 4: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 4

21.2 MANAGEMENT COMPONENTS

SNMP requires the use of two other protocols: Structure of Management SNMP requires the use of two other protocols: Structure of Management Information (SMI) and Management Information Base (MIB). Network Information (SMI) and Management Information Base (MIB). Network management on the Internet is done through the cooperation of SNMP, management on the Internet is done through the cooperation of SNMP, SMI, and MIB.SMI, and MIB.

The topics discussed in this section include:The topics discussed in this section include:Role of SNMP Role of SNMP Role of SMI Role of SMI Role of MIB Role of MIB An Analogy An Analogy An Overview An Overview

Page 5: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 5

Figure 21.2 Components of network management on the Internet

We will discuss each of these components in turn,but first …

Page 6: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 6

SNMP 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:Note:

Page 7: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 7

SMI 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:Note:

Page 8: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 8

MIB creates a collection of named objects, their types, and their

relationships to each other in an entity to be managed.

Note:Note:

Page 9: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 9

We 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:Note:

Page 10: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 10

Figure 21.3 Management overview

Example: A manager station (SNMP client) wants to send a message toan agent station (SNMP server) to find the number of UDP datagramsreceived by the agent.

SNMP client

SNMP server

Page 11: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 11

21.3 SMI

SMI is a component used in network management. It names objects, SMI 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 defines the type of data that can be stored in an object, and shows how data can be encoded for transmission over the networkdata can be encoded for transmission over the network

The topics discussed in this section include:The topics discussed in this section include:

Name Name Type Type Encoding Method Encoding Method

Page 12: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 12

Figure 21.4 Object attributes

Each object has three attributes: name, type, and encoding method.Each managed object (such as a router or a variablein a router) has to have a unique name.Use the following hierarchical design to name an object.

Page 13: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 13

Figure 21.5 Object identifier

The objects thatare used in SMNPare located underthe mib-2 object,so their identifiersalways start with1.3.6.1.2.1.

Page 14: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 14

Figure 21.6 Data type

The second attribute of an object is the data type.To define the data type, SMI uses Abstract Syntax Notation1 (ASN.1).

SMI has two broad categories of data type: simple andstructured.

Page 15: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 15

Table 21.1 Table 21.1 Simple data typesSimple data types

First 5 are from ASN.1; next 7 are defined by SMI.

Page 16: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 16

Figure 21.7 Conceptual data types

SMI defines two structured data types: sequence and sequence of.Sequence is similar to C’s struct or record

Page 17: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 17

Figure 21.8 Encoding format

SMI uses another standard – Basic Encoding Rules (BER) – toencode data to be transmitted over the network.BER specifies that each piece of data be encoded in tripletformat: tag, length, and value.

The Class subfield defines the scope of the data: 00 – universal,01 – application-wide, 10 – context-specific, 11 – private.The universal data types are shown in the first 5 rows of thenext table. The application-wide types are the last 5 rows.Format bit: simple is 0 and structured is 1.The number field further divides simple or structured into subgroups.

Page 18: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 18

Table 21.2 Table 21.2 Codes for data typesCodes for data types

Page 19: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 19

Figure 21.9 Length format

If length is only 1 byte, first bit = 0

If length is >1 byte, first bit is 1 and remaining sevenbits define how many bytes in the length.

Page 20: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 20

Figure 21.10 shows how to define INTEGER 14.

Example 1

See Next Slide

Page 21: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 21

Figure 21.10 Example 1, INTEGER 14

Page 22: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 22

Example 2

See Next Slide

Figure 21.11 shows how to define the OCTET STRING “HI.”

Page 23: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 23

Figure 21.11 Example 2, OCTET STRING “HI”

Page 24: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 24

Figure 21.12 shows how to define ObjectIdentifier 1.3.6.1 (iso.org.dod.internet).

Example 3

See Next Slide

Page 25: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 25

Figure 21.12 Example 3, ObjectIdentifier 1.3.6.1

Page 26: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 26

Figure 21.13 shows how to define IPAddress 131.21.14.8.

Example 4

See Next Slide

Page 27: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 27

Figure 21.13 Example 4, IPAddress 131.21.14.8

Page 28: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 28

21.4 MIB

MIB (Management Information Base) is the second component used in MIB (Management Information Base) is the second component used in network management. Each agent has its own MIB, a collection of all network management. Each agent has its own MIB, a collection of all the objects that the manager can manage.the objects that the manager can manage.

The topics discussed in this section include:The topics discussed in this section include:

Accessing MIB Variables Accessing MIB Variables Lexicographic Ordering Lexicographic Ordering

Page 29: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 29

Figure 21.14 mib-2

The objects in an MIB are categorized under 10 different groups.sys: general info about the node (system)if: defines information about all of the interfaces of the nodeat: info about the ARP tableip: defines info related to IP, such as routing table and IP addressicmp: info related to ICMP, such as number of packets sent, total errorstcp: data such as connection table, time-out values, number of portsudp: data such as number of ports, number of packets sent and receivedsnmp: general info related to SNMP itself

Page 30: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 30

Figure 21.15 udp group

Say you want to reference the variable udpIn Datagrams.The id of the variable would be 1.3.6.1.2.1.7.1.To reference udpLocal Address: 1.3.6.1.2.1.7.5.1.1.But these only reference the variable. If you want to show thecontents of each variable, add a 0 to the end.So the value of updIn Datagrams is in 1.3.6.1.2.1.7.1.0.

Page 31: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 31

Figure 21.16 udp variables and tables

Page 32: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 32

Figure 21.17 Indexes for udpTable

Note that entries in a table are not referenced by simple integer,as they are in most programming languages. Table entries areindexed by local IP address and local port number.

Page 33: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 33

Figure 21.18 Lexicographic ordering

Data is ordered by columns.

Page 34: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 34

21.5 SNMP

SNMP v3 is an application program that allows 1) a manager to retrieve SNMP v3 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 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 in an object defined in an agent; and 3) an agent to send an alarm message about an abnormal situation to the manager.message about an abnormal situation to the manager.SNMP uses both SMI and MIB to accomplish this.SNMP uses both SMI and MIB to accomplish this.

The topics discussed in this section include:The topics discussed in this section include:

PDUs PDUs Format Format

Page 35: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 35

Figure 21.19 SNMP PDUs

SNMP defines 8 types of packets (or PDUs):

GetRequest – sent from manager (client) to agent (server)GetNextRequest – mostly used to retrieve values of the entries in a tableGetBulkRequest – to retrieve a large amount of dataSetRequest – sent from manager to agent to set(store) a valueResponse – in response to GetRequest or GetNextRequestTrap – reports an event. For example, if the agent is rebooted, it informsthe manager and reports the time of rebooting.InformRequest – sent from one manager to another remote manager to get the values of some variables under the control of the remote managerReport – to report some types of errors between managers. Not yet in use.

Page 36: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 36

Figure 21.19 SNMP PDUs

Page 37: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 37

Figure 21.20 SNMP PDU format

Format for the 8 PDUs:

PDU Type – See Table 21.4Error Status – Used in Response PDUs; see Table 21.3.Error Index – offset that tells which variable caused errorVarBind List – set of variables the manager wants to retrieve (or set)

Page 38: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 38

Table 21.3 Table 21.3 Types of errorsTypes of errors

Page 39: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 39

21.6 MESSAGES

SNMP does not just send PDUs, it embeds the PDU in a message.SNMP does not just send PDUs, it embeds the PDU in a message.

A message in SNMP is made of four elements: version, header, security A message in SNMP is made of four elements: version, header, security parameters, and data (which includes the encoded PDU). (See the next parameters, and data (which includes the encoded PDU). (See the next figure)figure)

Page 40: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 40

Figure 21.21 SNMP message

Page 41: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 41

Table 21.4 Table 21.4 Codes for SNMP messagesCodes for SNMP messages

Page 42: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 42

In 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 5

See Next Slide

Page 43: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 43

The 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 5

See Next Slide

Page 44: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 44

Figure 21.22 Example 5

object identifier, length 9, udpInDatagrams (1.3.6.1.2.1.7.1.0)

Security parameter, security model, flags

BER notation: 30 means Sequence of, 34 is length (Table 21.2)

Max. size and Msg.ID

GetRequest PDUTable 21.4

Request ID, Error Status,Error Index (Fig 21.20)

Page 45: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 45

Figure 21.23 GetRequest message

Page 46: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 46

21.7 UDP PORTS

SNMP uses the services of UDP on two well-known ports, 161 and 162. SNMP 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-The well-known port 161 is used by the server (agent), and the well-known port 162 is used by the client (manager).known port 162 is used by the client (manager).

Page 47: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 47

Figure 21.24 Port numbers for SNMP

Page 48: TCP/IP Protocol Suite 1 Chapter 21 Upon completion you will be able to: Network Management: SNMP Understand the SNMP manager and the SNMP agent Understand.

TCP/IP Protocol Suite 48

21.8 SECURITY

The main difference between SNMPv3 and SNMPv2 is the enhanced The main difference between SNMPv3 and SNMPv2 is the enhanced security. SNMPv3 provides two types of security: general and specific. security. SNMPv3 provides two types of security: general and specific. SNMPv3 provides message authentication, privacy, and manager SNMPv3 provides message authentication, privacy, and manager authorization. authorization.


Recommended