You are previewing Essential SNMP, 2nd Edition.
O'Reilly logo
Essential SNMP, 2nd Edition

Book Description

Simple Network Management Protocol (SNMP) provides a "simple" set of operations that allows you to more easily monitor and manage network devices like routers, switches, servers, printers, and more. The information you can monitor with SNMP is wide-ranging--from standard items, like the amount of traffic flowing into an interface, to far more esoteric items, like the air temperature inside a router. In spite of its name, though, SNMP is not especially simple to learn.

O'Reilly has answered the call for help with a practical introduction that shows how to install, configure, and manage SNMP. Written for network and system administrators, the book introduces the basics of SNMP and then offers a technical background on how to use it effectively. Essential SNMP explores both commercial and open source packages, and elements like OIDs, MIBs, community strings, and traps are covered in depth. The book contains five new chapters and various updates throughout. Other new topics include:

  • Expanded coverage of SNMPv1, SNMPv2, and SNMPv3

  • Expanded coverage of SNMPc

  • The concepts behind network management and change management

  • RRDTool and Cricket

  • The use of scripts for a variety of tasks

  • How Java can be used to create SNMP applications

  • Net-SNMP's Perl module

The bulk of the book is devoted to discussing, with real examples, how to use SNMP for system and network administration tasks. Administrators will come away with ideas for writing scripts to help them manage their networks, create managed objects, and extend the operation of SNMP agents.

Once demystified, SNMP is much more accessible. If you're looking for a way to more easily manage your network, look no further than Essential SNMP, 2nd Edition.

Table of Contents

  1. Essential SNMP, 2nd Edition
  2. A Note Regarding Supplemental Files
  3. Preface
    1. Audience for This Book
    2. Organization
    3. What's New in This Edition
    4. Example Programs
    5. Using Code Examples
    6. Conventions Used in This Book
    7. Comments and Questions
    8. SafariĀ® Enabled
    9. Acknowledgments for the Second Edition
      1. Douglas
      2. Kevin
    10. Acknowledgments for the First Edition
  4. 1. Introduction to SNMP and Network Management
    1. 1.1. What Is SNMP?
      1. 1.1.1. RFCs and SNMP Versions
      2. 1.1.2. Managers and Agents
      3. 1.1.3. The Structure of Management Information and MIBs
      4. 1.1.4. Host Management
      5. 1.1.5. A Brief Introduction to Remote Monitoring (RMON)
    2. 1.2. The Concept of Network Management
      1. 1.2.1. Fault Management
      2. 1.2.2. Configuration Management
      3. 1.2.3. Accounting Management
      4. 1.2.4. Performance Management
      5. 1.2.5. Security Management
    3. 1.3. Applying the Concepts of Network Management
      1. 1.3.1. Business Case Requirements
      2. 1.3.2. Levels of Activity
      3. 1.3.3. Reporting of Trend Analysis
      4. 1.3.4. Response Time Reporting
      5. 1.3.5. Alarm Correlation
      6. 1.3.6. Trouble Resolution
    4. 1.4. Change Management
      1. 1.4.1. Planning for Change
      2. 1.4.2. Managing Change
      3. 1.4.3. High-Level Process Flow for Planned Change Management
        1. 1.4.3.1. Scope
        2. 1.4.3.2. Risk assessment
        3. 1.4.3.3. Test and validation
        4. 1.4.3.4. Change planning
        5. 1.4.3.5. Change controller
        6. 1.4.3.6. Change management team
        7. 1.4.3.7. Communication
        8. 1.4.3.8. Implementation team
        9. 1.4.3.9. Test evaluation of change
        10. 1.4.3.10. Network management update
        11. 1.4.3.11. Documentation
      4. 1.4.4. High-Level Process Flow for Emergency Change Management
        1. 1.4.4.1. Issue determination
        2. 1.4.4.2. Limited risk assessment
        3. 1.4.4.3. Communication and documentation
        4. 1.4.4.4. Implementation
        5. 1.4.4.5. Test and evaluation
      5. 1.4.5. Before and After SNMP
      6. 1.4.6. Staffing Considerations
    5. 1.5. Getting More Information
  5. 2. SNMPv1 and SNMPv2
    1. 2.1. SNMP and UDP
    2. 2.2. SNMP Communities
    3. 2.3. The Structure of Management Information
      1. 2.3.1. Naming OIDs
      2. 2.3.2. Defining OIDs
    4. 2.4. Extensions to the SMI in Version 2
    5. 2.5. A Closer Look at MIB-II
    6. 2.6. SNMP Operations
      1. 2.6.1. The get Operation
      2. 2.6.2. The getnext Operation
      3. 2.6.3. The getbulk Operation
      4. 2.6.4. The set Operation
      5. 2.6.5. get, getnext, getbulk, and set Error Responses
      6. 2.6.6. SNMP Traps
      7. 2.6.7. SNMP Notification
      8. 2.6.8. SNMP inform
      9. 2.6.9. SNMP report
    7. 2.7. Host Management Revisited
    8. 2.8. Remote Monitoring Revisited
    9. 2.9. Reverse Engineering SNMP
  6. 3. SNMPv3
    1. 3.1. Changes in SNMPv3
      1. 3.1.1. The SNMPv3 Engine
      2. 3.1.2. SNMPv3 Applications
      3. 3.1.3. What Does an Entity Look Like?
      4. 3.1.4. SNMPv3 Textual Conventions
    2. 3.2. USM
      1. 3.2.1. The Basics
      2. 3.2.2. Discovery
      3. 3.2.3. USM Timeliness
      4. 3.2.4. Authentication
      5. 3.2.5. Privacy
      6. 3.2.6. USM User Table
      7. 3.2.7. Localized Keys and Changing Keys
    3. 3.3. VACM
      1. 3.3.1. The Basics
      2. 3.3.2. Context Table
      3. 3.3.3. Security to Group Table
      4. 3.3.4. Access Table
      5. 3.3.5. View Tree Family Table
    4. 3.4. SNMPv3 in the Real World
  7. 4. NMS Architectures
    1. 4.1. Hardware Considerations
    2. 4.2. NMS Architectures
    3. 4.3. A Look Ahead
  8. 5. Configuring Your NMS
    1. 5.1. HP's OpenView Network Node Manager
      1. 5.1.1. Running NNM
      2. 5.1.2. The netmon Process
      3. 5.1.3. Configuring Polling Intervals
      4. 5.1.4. A Few Words About NNM Map Colors
      5. 5.1.5. Using OpenView Filters
        1. 5.1.5.1. Sets
        2. 5.1.5.2. Filters
        3. 5.1.5.3. FilterExpressions
      6. 5.1.6. Loading MIBs into OpenView
    2. 5.2. Castle Rock's SNMPc Enterprise Edition
      1. 5.2.1. SNMPc's Map
      2. 5.2.2. Discovery and Filters
      3. 5.2.3. Discovery Run-Through
      4. 5.2.4. Configuring SNMPv3
      5. 5.2.5. Loading MIBs into SNMPc
  9. 6. Configuring SNMP Agents
    1. 6.1. Parameter Settings
    2. 6.2. Security Concerns
    3. 6.3. Agent Configuration Walkthroughs
      1. 6.3.1. Windows Agents (Net-SNMP)
      2. 6.3.2. HP OpenView Agent for HP-UX and Solaris
        1. 6.3.2.1. Simple configuration
        2. 6.3.2.2. Advanced configuration
      3. 6.3.3. Net-SNMP for Unix
        1. 6.3.3.1. Running the configuration script
        2. 6.3.3.2. Creating a configuration by hand
        3. 6.3.3.3. Using snmpusm to manage users
      4. 6.3.4. Concord SystemEDGE Agent for Unix and Windows
        1. 6.3.4.1. Simple configuration
        2. 6.3.4.2. Advanced configuration
      5. 6.3.5. Cisco Devices
        1. 6.3.5.1. Simple configuration
        2. 6.3.5.2. Advanced configuration
        3. 6.3.5.3. Configuring SNMPv3
      6. 6.3.6. APC Symetra
  10. 7. Polling and Setting
    1. 7.1. Retrieving a Single MIB Value
      1. 7.1.1. Using HP OpenView to Retrieve Values
      2. 7.1.2. Using Net-SNMP
    2. 7.2. Retrieving Multiple MIB Values
      1. 7.2.1. Walking the MIB Tree with OpenView
      2. 7.2.2. Walking the Tree with Net-SNMP
    3. 7.3. Setting a MIB Value
    4. 7.4. Error Responses
  11. 8. Polling and Thresholds
    1. 8.1. Internal Polling
      1. 8.1.1. Remote Monitoring (RMON)
        1. 8.1.1.1. RMON configuration
    2. 8.2. External Polling
      1. 8.2.1. Collecting and Displaying Data with OpenView
      2. 8.2.2. OpenView Graphing
      3. 8.2.3. OpenView Data Collection and Thresholds
        1. 8.2.3.1. Designing collections
        2. 8.2.3.2. Creating a threshold
      4. 8.2.4. Castle Rock's SNMPc
      5. 8.2.5. Open Source Tools for Data Collection and Graphing
  12. 9. Traps
    1. 9.1. Understanding Traps
      1. 9.1.1. SNMPv2 Traps
    2. 9.2. Receiving Traps
      1. 9.2.1. HP OpenView
      2. 9.2.2. Using NNM's Event Configurations
        1. 9.2.2.1. Selecting event sources
        2. 9.2.2.2. Setting event categories
        3. 9.2.2.3. Forwarding events and event severities
        4. 9.2.2.4. Log messages, notifications, and automatic actions
      3. 9.2.3. Custom Event Categories
      4. 9.2.4. The Event Categories Display
      5. 9.2.5. The Alarms Browser
      6. 9.2.6. Creating Events Within OpenView
      7. 9.2.7. Monitoring Traps with Perl
      8. 9.2.8. Using the Network Computing Technologies Trap Receiver
      9. 9.2.9. Receiving Traps Using Net-SNMP
    3. 9.3. Sending Traps
      1. 9.3.1. Sending Traps with OpenView
      2. 9.3.2. Sending Traps with Perl
      3. 9.3.3. Sending Traps with Network Computing Technologies' Trap Generator
      4. 9.3.4. Sending Traps with Net-SNMP
      5. 9.3.5. Forcing Your Hardware to Generate Traps
      6. 9.3.6. Receiving Traps with SNMPc
        1. 9.3.6.1. Custom trap actions
      7. 9.3.7. Using Hooks with Your Programs
  13. 10. Extensible SNMP Agents
    1. 10.1. Net-SNMP
    2. 10.2. SystemEDGE
      1. 10.2.1. Extensibility for Unix and Windows
      2. 10.2.2. Added Extensibility for Windows
    3. 10.3. OpenView's Extensible Agent
      1. 10.3.1. Tables
  14. 11. Adapting SNMP to Fit Your Environment
    1. 11.1. General Trap-Generation Program
    2. 11.2. Who's Logging into My Machine? (I-Am-In)
    3. 11.3. Throw Core
    4. 11.4. Veritas Disk Check
    5. 11.5. Disk-Space Checker
    6. 11.6. Port Monitor
    7. 11.7. Service Monitoring
      1. 11.7.1. Web Content
      2. 11.7.2. SMTP and POP3
      3. 11.7.3. DNS
      4. 11.7.4. More Monitoring Suggestions
    8. 11.8. Pinging with Cisco
    9. 11.9. Simple SNMP Agent
    10. 11.10. Switch Port Control
    11. 11.11. Wireless Networking
    12. 11.12. SNMP: The Object-Oriented Way
      1. 11.12.1. Extending SNMP::Info
    13. 11.13. Final Words
  15. 12. MRTG
    1. 12.1. Using MRTG
    2. 12.2. Viewing Graphs
    3. 12.3. Graphing Other Objects
    4. 12.4. Other Data-Gathering Applications
    5. 12.5. Pitfalls
    6. 12.6. Getting Help
  16. 13. RRDtool and Cricket
    1. 13.1. RRDtool
      1. 13.1.1. Installing RRDtool
    2. 13.2. Cricket
      1. 13.2.1. Cricket's History
      2. 13.2.2. Cricket's Config Tree
      3. 13.2.3. Installing Cricket
      4. 13.2.4. Configuring and Using Cricket
      5. 13.2.5. Gathering Router Data
      6. 13.2.6. Command-Line Data Sources
      7. 13.2.7. Parallelizing Cricket
      8. 13.2.8. Help with Cricket
  17. 14. Java and SNMP
    1. 14.1. SNMP4J
    2. 14.2. SNMP getnext
    3. 14.3. SNMP set
    4. 14.4. Sending Traps and Informs
    5. 14.5. Receiving Traps and Informs
    6. 14.6. Resources
  18. A. Using Input and Output Octets
  19. B. More on OpenView's NNM
    1. B.1. Using External Data
    2. B.2. Adding a Menu to NNM
    3. B.3. Profiles for Different Users
    4. B.4. Using NNM for Communications
  20. C. Net-SNMP Tools
    1. C.1. Net-SNMP and MIB Files
    2. C.2. Common Command-Line Arguments
    3. C.3. Net-SNMP Command-Line Tools
      1. C.3.1. snmpwalk
      2. C.3.2. snmpget
      3. C.3.3. snmpbulkget
      4. C.3.4. snmpbulkwalk
      5. C.3.5. snmpset
      6. C.3.6. snmptrap
      7. C.3.7. snmpdelta
      8. C.3.8. snmpdf
      9. C.3.9. snmpgetnext
      10. C.3.10. snmpstatus
      11. C.3.11. snmptable
      12. C.3.12. snmpusm
      13. C.3.13. snmpconf
      14. C.3.14. snmpinform
      15. C.3.15. snmptranslate
  21. D. SNMP RFCs
    1. D.1. SMIv1 Data Definition Language
    2. D.2. SMIv2 Data Definition Language
    3. D.3. SNMPv3 Protocol
    4. D.4. SNMP Agent Extensibility
    5. D.5. SMIv1 MIB Modules
    6. D.6. SMIv2 MIB Modules
    7. D.7. IANA-Maintained MIB Modules
    8. D.8. Related Documents
  22. E. SNMP Support for Perl
    1. E.1. SNMP_Util
      1. E.1.1. MIB Management Routines
        1. E.1.1.1. snmpmapOID()
        2. E.1.1.2. snmpMIB_to_OID()
        3. E.1.1.3. snmpLoad_OID_Cache()
        4. E.1.1.4. snmpQueue_MIB_File()
      2. E.1.2. SNMP Operations
        1. E.1.2.1. snmpget()
        2. E.1.2.2. snmpgetnext()
        3. E.1.2.3. snmpwalk()
        4. E.1.2.4. snmpset()
        5. E.1.2.5. snmptrap()
    2. E.2. Net-SNMP
      1. E.2.1. MIB Management Routines
        1. E.2.1.1. &SNMP::loadModules(<mod>,...)
        2. E.2.1.2. &SNMP::addMibDirs(<dir>,...)
      2. E.2.2. SNMP Operations
        1. E.2.2.1. snmpwalk
        2. E.2.2.2. snmpget
        3. E.2.2.3. snmpset
  23. F. Network Management Software
    1. F.1. SNMP Agents
    2. F.2. NMS Suites
    3. F.3. Element Managers (Vendor-Specific Management)
    4. F.4. Trend Analysis
    5. F.5. Supporting Software
  24. G. Open Source Monitoring Software
    1. G-1. Big Brother
    2. G-2. Nagios
    3. G-3. JFFNMS
    4. G-4. OpenNMS
    5. G-5. NINO
  25. H. Network Troubleshooting Primer
    1. H-1. ping
    2. H-2. ipconfig and ifconfig
    3. H-3. arp
    4. H-4. netstat
    5. H-5. traceroute and tracert
    6. H-6. nslookup and dig
    7. H-7. whois
    8. H-8. Ethereal
  26. 15. About the Authors
  27. About the Authors
  28. Colophon
  29. Copyright