
Contents
Preface
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vii
1 Overview
1.1
SNMP Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1–1
1.2
Request Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1–2
1.3
TCP/IP Services Components for SNMP . . . . . . . . . . . . . . . . . . . . . . . . . .
1–4
1.4
Writing an eSNMP Subagent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1–5
1.5
The eSNMP API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1–6
1.5.1
The SNMP Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1–7
1.6
The MIB Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1–7
1.7
SNMP Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1–8
1.7.1
Using Existing (SNMP Version 1) MIB Modules . . . . . . . . . . . . . . . . .
1–8
1.8
For More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1–9
2 MIBs Provided with TCP/IP Services
2.1
Overview of the Host Resources MIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2–1
2.1.1
Defining Host Resources MIB Implemented Objects . . . . . . . . . . . . . .
2–1
2.1.2
Restrictions to Host Resources MIB . . . . . . . . . . . . . . . . . . . . . . . . . . .
2–3
2.2
Overview of MIB II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2–5
2.2.1
MIB II Implemented Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2–6
2.2.2
Restrictions to MIB II Implementation . . . . . . . . . . . . . . . . . . . . . . . .
2–6
3 Creating a Subagent Using the eSNMP API
3.1
Creating a MIB Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3–1
3.2
The Structure of Management Information . . . . . . . . . . . . . . . . . . . . . . . .
3–1
3.2.1
Assigning Object Identification Codes . . . . . . . . . . . . . . . . . . . . . . . . .
3–2
3.2.2
MIB Subtrees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3–2
3.3
Creating a MIB Source File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3–5
3.3.1
Writing the ASN.1 Input File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3–5
3.3.2
Processing the Input File with the MIB Compiler . . . . . . . . . . . . . . . .
3–5
3.3.2.1
UNIX Utilities Supplied with TCP/IP Services . . . . . . . . . . . . . . .
3–7
3.3.2.2
Object Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3–7
3.3.2.3
The subtree_TBL.H Output File . . . . . . . . . . . . . . . . . . . . . . . . . . .
3–7
3.3.2.4
The subtree_TBL.C Output Files . . . . . . . . . . . . . . . . . . . . . . . . . .
3–9
3.4
Including the Routines and Building the Subagent . . . . . . . . . . . . . . . . . .
3–11
3.5
Including Extension Subagents in the Startup and Shutdown
Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3–12
iii