28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

This chapter discusses how to configure the SNMP agent on the router with<br />

SNMPv2 and SNMPv3 and illustrates some basic techniques for using SNMP to<br />

query the router to collect information. Much of the information gathering done by<br />

SNMP is done from the NMS system, either with GUI or CLI tools. <strong>Discussion</strong> of the<br />

workings of the NMS systems is beyond the scope of this book; you should refer to<br />

your NMS documentation. For more information about SNMP see SNMP, SNMPv2,<br />

SNMPv3, and RMON 1 and 2 (Addison-Wesley).<br />

SNMP Management Model<br />

SNMP uses a client–server model. The SNMP client is called a manager, and the<br />

server is called an agent. The managers are centralized systems on the network that<br />

actively monitor the agents, which are the actual network devices, by querying and<br />

collecting status and statistics information from them. Managers can run on PCs or<br />

workstations but more often run on dedicated devices called NMS systems that are<br />

developed and sold by third-party companies. An example is the HP OpenView Network<br />

Node Manager product.<br />

Agents are individual processes running on the network devices that are being managed.<br />

These processes gather and store the status and statistics about their host platform<br />

and send them to the managers primarily in one or two ways. When the agent<br />

receives an SNMP Get request from the manager, as a Get, GetBulk, or GetNext<br />

request, it responds with the requested information. The second way is that the<br />

agent sends to the manager unsolicited notifications, called traps, that are triggered<br />

by events on the agent. The SNMP manager can also modify information on the<br />

agent by sending SNMP Set requests. A JUNOS router running SNMP is simply an<br />

SNMP agent. There are two JUNOS SNMP processes (daemons in Unix terminology):<br />

SNMPD, the SNMP process, and MIB2D, the MIB-II process. snmpd is the main<br />

entry point, or master agent, for dealing with SNMP, and it communicates with<br />

mib2d, which is a subagent.<br />

MIBs and OIDs<br />

SNMP agents store information in a Structure of Management Information (SMI),<br />

which is a hierarchical database that is similar to the directory structure in a filesystem.<br />

The individual files that store the information are called Management Information<br />

Bases (MIBs). Each MIB contains nodes of information that are stored in a tree<br />

structure. The tree contains branches, which move down from a root node. The<br />

branches are similar to the directory names in a directory path. Each branch eventually<br />

ends in a leaf, similar to a filename in a filesystem, that contains a specific piece<br />

of information about the SNMP agent. Each branching point in the tree corresponds<br />

to a MIBobject and is identified by a number and a text string. The series of numbers<br />

that uniquely identifies a node or a leaf is called the Object Identifier (OID). As<br />

examples, OID .1.3.6.1.2.1.1.4 corresponds to sysContact (system contact information)<br />

in the standard MIB-II MIB, and OID .1.3.1.4.1.2636 corresponds to<br />

130 | Chapter 4: SNMP<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!