blob: 810fae76cd2e768698cf2fcd1be32391a86a12e6 [file] [log] [blame]
Wes Hardaker82ad1f91997-02-04 08:35:02 +00001 Frequently Asked Questions (FAQ) for the UCD SNMP package
2 =========================================================
Wes Hardaker7dcf0861997-04-22 06:42:01 +00003 FAQ Author: Dave Shield
Wes Hardakerbdc10471999-07-30 21:19:21 +00004 ucd-snmp Version: 4.0.pre5
Wes Hardaker7dcf0861997-04-22 06:42:01 +00005 ucd-snmp Project Author: Wes Hardaker
Wes Hardakerebc1eb91999-03-04 01:51:31 +00006 Email: ucd-snmp-coders@ucd-snmp.ucdavis.edu
Wes Hardaker8acf73f1997-02-04 08:41:39 +00007
8TABLE OF CONTENTS
9=================
10
11 TABLE OF CONTENTS
12 GENERAL
13 What is it?
14 Where can I get it?
15 What documentation is available?
16 Are there binaries available?
Wes Hardakerf54dd3a1999-01-20 20:20:08 +000017 Where can I get the perl SNMP package?
Wes Hardaker8acf73f1997-02-04 08:41:39 +000018 What operating systems does it run on?
19 What happens if mine isn't listed?
Dave Shieldceab78b1999-08-09 08:02:15 +000020 Does it run on Windows?
Wes Hardaker8acf73f1997-02-04 08:41:39 +000021 How do I find out about new releases?
22 How can I find out what other people are doing?
23 How do I submit a patch or bug report?
Wes Hardaker468df0b1998-05-14 15:21:55 +000024 What's the difference between SNMPv1, SNMPv2 and SNMPv3?
Wes Hardaker8acf73f1997-02-04 08:41:39 +000025 What are all these different SNMPv2's anyway?
Wes Hardakerb922f281997-10-20 18:45:58 +000026 Which versions of SNMP are supported in this package?
Wes Hardakerf13d1ce1999-03-05 18:21:25 +000027 Where can I find more information about network management?
Dave Shieldceab78b1999-08-09 08:02:15 +000028 Is ucd-snmp year 2000 (Y2K) safe?
29 Is ucd-snmp thread safe?
Wes Hardakerf13d1ce1999-03-05 18:21:25 +000030 APPLICATIONS
Wes Hardaker8acf73f1997-02-04 08:41:39 +000031 How do I add a MIB?
Wes Hardakerb922f281997-10-20 18:45:58 +000032 How do I add a MIB to the tools?
Wes Hardakeree047991997-03-18 15:52:34 +000033 Why can't I see values in the <INSERT ENTERPRISE HERE> tree?
34 I've done that, and I still can't see the values. Why not?
Wes Hardakerb922f281997-10-20 18:45:58 +000035 I've done that, and I'm *still* not getting anything back. Why not?
36 I've done that, but I'm *still* getting "sub-identifier not found:" Grrr!
Wes Hardaker3eb7caf1998-05-20 14:34:31 +000037 Why do I sometimes get "End of MIB" when walking a tree, and sometimes not?
Wes Hardakerf13d1ce1999-03-05 18:21:25 +000038 I can't load any of the mib files, and they seem to be missing
39 the first two characters of the filename. What's happening?
40 I cannot set any variables in the MIB.
41 Variables seem to disappear when I try to set them. Why?
Dave Shieldceab78b1999-08-09 08:02:15 +000042 Where can I find a MIB compiler?
43 How do I handle traps and notifications?
44 How do I use SNMPv3?
45 Applications complain about entries in your example 'snmp.conf' file. Why?
Wes Hardakerf13d1ce1999-03-05 18:21:25 +000046 AGENT
47 What MIBs are supported?
48 How do I add a MIB to the agent?
49 How do I add functionality?
Dave Shieldceab78b1999-08-09 08:02:15 +000050 What's the difference between 'exec', 'sh' and 'pass'?
Wes Hardakerf13d1ce1999-03-05 18:21:25 +000051 How do I write C code to integrate with the agent?
52 What traps are sent by the agent?
53 When I run the agent it runs and then quits without staying around. Why?
54 How can I stop other people getting at my agent?
55 I don't understand the new access control stuff - what does it mean?
56 What ASN.1 parser is used?
57 How does the agent fetch the value of a variable from the system?
58 Why can't I see values in the UCDavis 'extensible' tree?
Dave Shieldceab78b1999-08-09 08:02:15 +000059 Why can't I see values in the UCDavis 'memory' tree?
Wes Hardaker8acf73f1997-02-04 08:41:39 +000060 What does "klread: bad address" mean?
61 What does "nlist err: wombat not found" (or similar) mean?
62 How about "Can't open /dev/kmem"?
Wes Hardakerf13d1ce1999-03-05 18:21:25 +000063 The agent is complaining about 'snmpd.conf'. Where is this?
Wes Hardaker8acf73f1997-02-04 08:41:39 +000064 Sometimes I seem to get the wrong answers. Why?
Dave Shieldceab78b1999-08-09 08:02:15 +000065 Why have some variables disappeared from the agent?
Wes Hardaker468df0b1998-05-14 15:21:55 +000066 The system uptime (sysUpTime) returned is wrong!
67 The Host Resources information is wrong (and/or doesn't even compile)!
Wes Hardakerf13d1ce1999-03-05 18:21:25 +000068 What is the Official Slogan of the ucd-snmp-coders list?
69 PERL
70 How do I install the Perl SNMP module?
71 Compiling this fails with "`MAX_NAME_LEN' undeclared"?
72 I'm trying to use mib2c (or tkmib) and it can't locate SNMP.pm?
73 I'm trying to use tkmib and it can't locate Tk.pm?
74 PROBLEMS
75 Why aren't my mib files read in any more?
76 I'm getting answers, but they're all numbers. Why?
Dave Shieldceab78b1999-08-09 08:02:15 +000077 The parser doesn't handle comments properly. Why not?
Wes Hardakerf13d1ce1999-03-05 18:21:25 +000078 How can I get more information about these MIB file problems?
79 What's this about "too many imported symbols"?
80 How do I compile with 'gcc' instead of 'cc'?
81 But gcc doesn't compile it successfully on my new Solaris system. Why not?
Wes Hardaker82ad1f91997-02-04 08:35:02 +000082
Wes Hardaker34ac96d1997-01-29 11:11:04 +000083
84GENERAL
85=======
86
87What is it?
Wes Hardaker82ad1f91997-02-04 08:35:02 +000088----------
Wes Hardaker34ac96d1997-01-29 11:11:04 +000089
90 - Various tools relating to the Simple Network Management Protocol
91 including:
92
93 * An extensible agent
94 * An SNMP library
95 * tools to request or set information from SNMP agents
96 * tools to generate and handle SNMP traps
97 * a version of the unix 'netstat' command using SNMP
Wes Hardakerd4b0c911999-02-08 23:08:57 +000098 * a graphical Perl/Tk/SNMP based mib browser
Wes Hardaker82ad1f91997-02-04 08:35:02 +000099
100 This package is originally based on the Carnegie Mellon University
Wes Hardaker468df0b1998-05-14 15:21:55 +0000101 SNMP implementation (version 2.1.2.1), but has developed significantly
102 since then.
103
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000104
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000105
106Where can I get it?
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000107------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000108
Wes Hardakerdc8282f1998-06-08 17:50:12 +0000109WWW:
Wes Hardakerc2eafd11999-06-10 01:31:42 +0000110 - http://ucd-snmp.ucdavis.edu
Wes Hardakerdc8282f1998-06-08 17:50:12 +0000111
112FTP:
Wes Hardakerc2eafd11999-06-10 01:31:42 +0000113 - ftp://ucd-snmp.ucdavis.edu/ucd-snmp.tar.gz
114 - ftp://sunsite.cnlab-switch.ch:/mirror/ucd-snmp/ucd-snmp.tar.gz
Wes Hardakerff4e3521997-12-01 20:33:49 +0000115 - ftp://ftp.win.or.jp/pub/network/snmp/ucd-snmp/ucd-snmp.tar.gz
Wes Hardakerc2eafd11999-06-10 01:31:42 +0000116 - ftp://ftp.chg.ru/pub/networking/management/snmp/ucd-snmp/ucd-snmp.tar.gz
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000117
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000118
Wes Hardaker468df0b1998-05-14 15:21:55 +0000119
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000120What documentation is available?
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000121-------------------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000122
123 This FAQ (!)
124 README
125 INSTALL
126 PORTING
127 EXAMPLE.conf
128 man pages for the individual tools, files and the API
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000129 A guide for extending the agent
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000130
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000131 Most of this documentation (plus archives of the mailing lists)
132 is also available on our web page:
133
134 http://ucd-snmp.ucdavis.edu
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000135
Wes Hardaker468df0b1998-05-14 15:21:55 +0000136
137
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000138Are there binaries available?
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000139----------------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000140
Wes Hardakere47f8e41998-05-24 22:22:21 +0000141 - There are binaries for some systems available in the binaries
142 directory on the ftp site.
Wes Hardaker468df0b1998-05-14 15:21:55 +0000143
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000144
145
Wes Hardakerf54dd3a1999-01-20 20:20:08 +0000146Where can I get the perl SNMP package?
147-------------------------------------
148
Wes Hardaker1c910971999-01-21 16:39:34 +0000149 Joe Marzot's excellent perl SNMP module, which requires the ucd-snmp
Wes Hardakerf54dd3a1999-01-20 20:20:08 +0000150 library, can be found at any Comprehensive Perl Archive Network
151 (CPAN) site mirror in modules/by-module/SNMP. To find the CPAN site
152 nearest you, please see http://www.cpan.org/SITES.html.
153
154 Consult the README file in the SNMP perl module distribution to find
155 out what version of the ucd-snmp library it needs to be linked against.
156
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000157 See also the 'PERL' section later in this FAQ.
158
159
Wes Hardakerd4b0c911999-02-08 23:08:57 +0000160
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000161What operating systems does it run on?
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000162-------------------------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000163
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000164 Both the applications and the agent have been reported as running
165 (at least in part) on the following configurations:
166
Wes Hardakerb922f281997-10-20 18:45:58 +0000167 * HP-UX 9.07, 9.05, 9.03, 9.01 on HPPA 1.1 systems
Wes Hardaker4ee4f741997-11-12 17:17:08 +0000168 * HP-UX 10.20, 10.10, 10.01 on HPPA 1.1 systems
169 * Ultrix 4.5, 4.4, 4.3, 4.2 on DEC MIPS systems
170 * Solaris 2.6, 2.5.1, 2.5, 2.4, 2.3 on Sun SPARC systems
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000171 * Solaris 2.5 on x86 systems
Wes Hardakerb922f281997-10-20 18:45:58 +0000172 * SunOS 4.1.4, 4.1.3, 4.1.3, 4.1.2 on Sun SPARC systems
Wes Hardaker4ee4f741997-11-12 17:17:08 +0000173 * OSF 4.0, 3.2 on DEC Alpha systems
174 * NetBSD 1.3alpha, 1.2.1, 1.2, 1.1, 1.0 on all? systems
175 * FreeBSD 3.0, 2.2.2, 2.2 on all? systems
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000176 * BSDi 2.1 on all? systems
Wes Hardaker4ee4f741997-11-12 17:17:08 +0000177 * Linux 2.1, 2.0, 1.3 on all? systems
178 * AIX 4.1.5, 3.2.5 on all? systems
Wes Hardaker6e489a11998-04-01 21:47:55 +0000179 * OpenBSD ? on all? systems
Wes Hardakere47f8e41998-05-24 22:22:21 +0000180 * Irix 5.1, 6.2
Wes Hardaker4ee4f741997-11-12 17:17:08 +0000181 * Windows95
182 * Windows NT
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000183
Dave Shieldceab78b1999-08-09 08:02:15 +0000184 Note that agent support on Windows systems is likely to be somewhat
185 less complete than on various flavours of Unix, due to the very
186 different nature of the underlying operating system.
187 (There's more that can be shared between the Unix implementations.
188 Windows tends to need a completely separate approach)
189
190 Also note that the presence of a particular configuration in this
191 list does not imply a perfect or complete implementation. This is
192 simply what various people have reported as seeming to work. (Or more
193 frequently, the configurations people have reported problems with!)
194
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000195
Wes Hardaker468df0b1998-05-14 15:21:55 +0000196
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000197What happens if mine isn't listed?
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000198---------------------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000199
200 It's worth trying anyway, particularly if the system is based
201 around the BSD kernel. If it seems to work correctly,
202 let us know so that we can update the list above.
203 If it doesn't work, let us know and we'll try to help.
Wes Hardaker7dcf0861997-04-22 06:42:01 +0000204 If the agent almost compiles, but certain files in the
Dave Shieldceab78b1999-08-09 08:02:15 +0000205 agents/mibgroup directory structure fail, you can try omitting
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000206 the relevant modules by re-running configure with the flag
Wes Hardaker09b535a1997-05-10 14:45:14 +0000207 --with-out-mib-modules="list"
Dave Shieldceab78b1999-08-09 08:02:15 +0000208 (where "list" is a space-separated list of modules to omit)
Wes Hardakerb922f281997-10-20 18:45:58 +0000209 You'll then need to re-compile.
Wes Hardaker09ce9c01998-06-19 15:41:00 +0000210
211 Note that with release 3.5, the structure of the mibgroup directory
212 has changed, and this may affect how you specify this list.
Wes Hardaker09ce9c01998-06-19 15:41:00 +0000213
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000214 Either way, try it and let us know how you get on (see below for how).
215
216
Wes Hardaker468df0b1998-05-14 15:21:55 +0000217
Dave Shieldceab78b1999-08-09 08:02:15 +0000218Does it run on Windows?
219----------------------
220
221 The basic suite should now compile and run on Win32 platforms.
222 This includes the library and command-line tools (apart perhaps
223 from 'snmpdtrapd').
224 The basic architecture of the agent builds, but the MIB-II
225 (and other) modules do not (which rather negates the point!).
226 Volunteers to assist in implementing Windows versions of these
227 modules are likely to welcomed with open arms :-)
228
229 Further details of Windows support (currently Visual C++ and
230 Cygnus cygwin32) is available in the file README.win32
231
232
233
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000234How do I find out about new releases?
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000235------------------------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000236
237 There is a mailing list for these announcements
Wes Hardakerebc1eb91999-03-04 01:51:31 +0000238 ucd-snmp-announce@ucd-snmp.ucdavis.edu
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000239 To be added to (or removed from) this list, send a message
Wes Hardakerebc1eb91999-03-04 01:51:31 +0000240 to the address 'ucd-snmp-announce-request@ucd-snmp.ucdavis.edu'
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000241 with a subject line of 'subscribe' (or 'unsubscribe' as appropriate).
242
243 Major code revisions may be announced more widely (e.g. on the
244 SNMP mailing lists, or comp.protocols.snmp) but this list is
245 the most reliable way to keep in touch with the status of this package.
246
Dave Shieldceab78b1999-08-09 08:02:15 +0000247 Patches to fix known problems are also made available via the web site:
248 http://ucd-snmp.ucdavis.edu/ucd-snmp-patches
249
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000250
Wes Hardaker468df0b1998-05-14 15:21:55 +0000251
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000252How can I find out what other people are doing?
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000253----------------------------------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000254
255 There is a general purpose discussion list
Wes Hardakerebc1eb91999-03-04 01:51:31 +0000256 ucd-snmp@ucd-snmp.ucdavis.edu
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000257 To be added to (or removed from) this list, send a message
Wes Hardakerebc1eb91999-03-04 01:51:31 +0000258 to the address 'ucd-snmp-request@ucd-snmp.ucdavis.edu'
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000259 with a subject line of 'subscribe' (or 'unsubscribe' as appropriate).
260
Wes Hardaker6e489a11998-04-01 21:47:55 +0000261 To find out what the coders are doing, and to help them out, please
262 read the PORTING file enclosed with the package.
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000263
Wes Hardaker468df0b1998-05-14 15:21:55 +0000264
265
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000266How do I submit a patch or bug report?
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000267-------------------------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000268
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000269 There is a script that you can use to submit a bug report.
Wes Hardakerb922f281997-10-20 18:45:58 +0000270 This allow you to describe the problem you're having, and
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000271 includes various pieces of information about your system
272 that are useful in trying to track down the problem.
273
Wes Hardakerb922f281997-10-20 18:45:58 +0000274 Alternatively, you can send a message to
Wes Hardakerebc1eb91999-03-04 01:51:31 +0000275 'ucd-snmp-coders@ucd-snmp.ucdavis.edu'
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000276 containing a description of the problem, and as much other
277 relevant details as you can. Useful information includes the
278 version of the package that you've been working with, the output
Wes Hardakerb922f281997-10-20 18:45:58 +0000279 of the command 'uname -a', the precise command that triggers the
280 problem and a copy of the output it produces.
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000281
Wes Hardakerb922f281997-10-20 18:45:58 +0000282 We can't promise to be able to solve the problem, but we'll
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000283 certainly try and help.
284
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000285
286 If you're trying to port the package to a new system, the output
Wes Hardakerb922f281997-10-20 18:45:58 +0000287 of the command 'make -k' is a good starting indicator of where
288 the bulk of the work is likely to be needed.
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000289
290 If you're reporting success on a new system, please let us know
291 both details of the hardware you're using, and what versions of
292 the operating system you've tried it on. The entry 'host' in
293 the file 'config.status' will show this information.
294 Oh, and congratulations!
295
296
Wes Hardaker468df0b1998-05-14 15:21:55 +0000297
298What's the difference between SNMPv1, SNMPv2 and SNMPv3?
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000299-------------------------------------------------------
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000300What are all these different SNMPv2's anyway?
301--------------------------------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000302
303
304 A full description is probably beyond the scope of this FAQ.
Wes Hardakerb922f281997-10-20 18:45:58 +0000305 Very briefly, the original protocol and framework was described
306 in RFCs 1155-1157, and is now known as SNMPv1.
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000307
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000308 Practical experience showed up various problems and
309 deficiencies with this, and a revised framework was developed to
Wes Hardakerb922f281997-10-20 18:45:58 +0000310 try and address these. This was described in RFCs 1441-1452, and
311 is known as "SNMPv2 classic".
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000312 The changes proposed include:
313
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000314 * new ways of defining information (MIB structure)
315 (SMI, Textual conventions, conformance statements)
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000316 * new protocol packet types and transport mappings
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000317 * new mechanisms for administration and security
318 * mechanisms for remote configuration
319
Wes Hardakerb922f281997-10-20 18:45:58 +0000320 Unfortunately, while many of these were generally accepted, there
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000321 was some disagreement in these last two areas, security/admin
Wes Hardakerb922f281997-10-20 18:45:58 +0000322 and remote configuration. This resulted in a number of variants and
323 alternative proposals:
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000324
325 SNMPv2c Contains the new protocol and MIB structure elements,
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000326 using the existing SNMPv1 administration structure.
327 This is the agreed SNMPv2 standard (described in
Wes Hardakerb922f281997-10-20 18:45:58 +0000328 RFCs 1901-1908), superseding SNMPv2 classic, and is
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000329 known as "Community-based SNMPv2" or simply "SNMPv2".
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000330
331
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000332 SNMPv2 usec } Alternative proposals to address the
333 SNMPv2* } limitations of SNMPv1 administration
334 } These are both super-sets of SNMPv2c
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000335
Wes Hardaker09b535a1997-05-10 14:45:14 +0000336
Wes Hardaker468df0b1998-05-14 15:21:55 +0000337 SNMP-NG An attempt to reach agreement between
Wes Hardaker09b535a1997-05-10 14:45:14 +0000338 the proponents of usec and v2star.
339
Wes Hardaker468df0b1998-05-14 15:21:55 +0000340 The formal successor to the SNMP-NG work has been termed SNMPv3.
Wes Hardaker72a2df71999-08-12 23:41:22 +0000341 This has now been effectively finalised, and as been published as
342 Proposed Standards. This is described in RFCs 2571-2575.
Wes Hardaker468df0b1998-05-14 15:21:55 +0000343
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000344
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000345
Wes Hardakerb922f281997-10-20 18:45:58 +0000346Which versions of SNMP are supported in this package?
347----------------------------------------------------
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000348
Dave Shieldceab78b1999-08-09 08:02:15 +0000349 This package currently supports the original SNMPv1, Community-based
350 SNMPv2 (i.e. RFCs 1901-1908), and SNMPv3 (i.e. RFCs 2271-2275).
Wes Hardakerb922f281997-10-20 18:45:58 +0000351 The agent will respond to requests using any of these protocols,
352 and all the tools take a command-line option to determine which
353 version to use.
354
Dave Shieldceab78b1999-08-09 08:02:15 +0000355 Support for SNMPv2 classic (a.k.a. "SNMPv2 historic" - RFCs 1441-1452)
356 has now been dropped. Those still requiring this functionality should
357 continue to use the v3-line of the UCD suite. However, please note that
358 it is unlikely that there will be any continued support of this line.
Wes Hardaker468df0b1998-05-14 15:21:55 +0000359
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000360
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000361
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000362Where can I find more information about network management?
363----------------------------------------------------------
Wes Hardaker3e1ced61997-02-10 08:22:03 +0000364
Wes Hardakerb922f281997-10-20 18:45:58 +0000365 There are a number of sites with network management information on
366 the World Wide Web. Two of the most useful are
Wes Hardaker3e1ced61997-02-10 08:22:03 +0000367
368 http://netman.cit.buffalo.edu/index.html
369 http://wwwsnmp.cs.utwente.nl/
370
Wes Hardakerb922f281997-10-20 18:45:58 +0000371 There are two Usenet newsgroups which are relevant.
372 'comp.dcom.net-management'
373 which discusses general issues relating to network management
374 'comp.protocols.snmp'
375 which is specifically concerned with use of SNMP in particular
376
377 (though there is a large overlap between these two groups).
378 The SNMP group also has an FAQ (split into two parts) which discusses more
379 general issues related to SNMP, including books, software, other sites,
380 how to get an enterprise number, etc, etc.
381 This is available from
Wes Hardaker3e1ced61997-02-10 08:22:03 +0000382
383 ftp://rtfm.mit.edu/pub/usenet/comp.protocols.snmp/
384
385 or via either of the two Web sites above.
386
387
Dave Shieldceab78b1999-08-09 08:02:15 +0000388Is ucd-snmp year 2000 (Y2K) safe?
389--------------------------------
Wes Hardakerf54dd3a1999-01-20 20:20:08 +0000390
391 The ucd-snmp toolset stores all of its dates in the standard posix
Dave Shieldceab78b1999-08-09 08:02:15 +0000392 fashion supported by most operating systems: as seconds since
393 1st Jan 1970. Information stored this way is year 2000 safe.
394 (Note that on 32-bit systems, this will overflow in the year 2038)
Wes Hardakerf54dd3a1999-01-20 20:20:08 +0000395
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000396 Note that the suite will use assorted system library routines, so is
397 clearly vulnerable to any year 2000 problems with these.
398
Dave Shieldceab78b1999-08-09 08:02:15 +0000399 Yes, ucd-snmp is year 2000 safe, as long as your operating system is as well.
400
401
402Is ucd-snmp year thread safe?
403----------------------------
404
405 Strictly speaking, no. However, it should be possible to use the
406 library in a thread-safe manner. This is covered in detail in the file
407 README.thread (shipped with the standard distribution), but can be
408 summarised as follows:
409
410 - Call 'snmp_sess_init()' prior to activating any threads.
411 This reads in and parses MIB information (which isn't thread-safe)
412 as well as preparing a session structure for subsequent use.
413
414 - Open an SNMP session using 'snmp_sess_open()' which returns an
415 opaque session handle, which is essentially independent of any
416 other sessions (regardless of thread).
417
418 - Resource locking is not handled within the library, and is the
419 responsibility of the main application.
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000420
421
422
423
424
425APPLICATIONS
426============
427
428How do I add a MIB?
429------------------
430
431 This is actually two separate questions, depending on whether you
432 are referring to the tools, or the agent (or both).
433 See the next question or the next section respectively.
434
435
436
437How do I add a MIB to the tools?
438-------------------------------
439
440 The tools only really use the MIB files for translating between
441 numeric and textual forms for queries and responses. They will
442 operate quite happily without any MIB files at all, as long as
443 you are prepared to work with numeric OIDs throughout.
444 The one exception to that is 'snmptable', which does require
445 the relevant MIB file to be loaded.
446
447 The tools look in a predefined directory (usually PREFIX/share/snmp/mibs)
448 and regard any file held there as defining a MIB module or modules.
449 Adding translation ability for a new MIB module is simply a
450 matter of placing a file defining the MIB in this directory, and
451 defining a suitable environment to tell the tools about it.
452 (See the first question under 'PROBLEMS' for more details).
453
454 The tools can then be used to communicate with any agent that
455 implements the relevant MIB modules.
456
457 The UCD agent, however, does not use these MIB text files at all, and
458 will work quite happily without them. (Actually it needs to find the
459 main MIB file, though it doesn't do anything with it!). The values
460 returned by the agent are simple numeric (or string) responses, and
461 the syntax and scope of the variables supported are hard-coded into
462 the implementation. The MIB text files are only used to translate
463 these responses into more meaningful terms.
464
465
466
467Why can't I see values in the <INSERT ENTERPRISE HERE> tree?
468-----------------------------------------------------------
469
470 Normally, the tools assume that any object ID specified is
471 a full path, starting from the 'mib-2' node of the overall
472 MIB tree. So if you perform an 'snmpwalk' on an agent, without
473 specifying a starting point, it will return just the values in
474 the 'mib-2' tree.
475
476 If you wish to examine anything under the 'private.enterprises'
477 branch (or anywhere else in the MIB structure) you will need to
478 inform the tools appropriately. There are two ways to do this:
479
480 First, you can give the full specification, starting from the root
481 of the tree - e.g:
482
483 .iso.org.dod.internet.private.enterprises.ucdavis
484
485 Note the initial dot - this is important!
486
487
488 Alternatively, you can define the environmental variable PREFIX,
489 to specify where to start looking for ( non-fully specified) objects.
490 This can be done by the command
491 (C shell family)
492 setenv PREFIX .iso.org.dod.internet.private.enterprises.ucdavis
493 or
494 (Bourne shell family)
495 PREFIX=.iso.org.dod.internet.private.enterprises.ucdavis
496 export PREFIX
497
498 after which, the following example should work:
499
500 snmpwalk -v 1 localhost public processes
501
502
503
504I've done that, and I still can't see the values. Why not?
505---------------------------------------------------------
506
507 Another possibility is that there is a clash of names
508 somewhere within the MIB tree. Try running the command
509 'snmptranslate -w zzz' which will inform you of any duplicates,
510 or other similar problem.
511
512 This should be less of a problem with the new parser, which
513 now handles duplicate identifier names, though inconsistent
514 case in labels (or different names) for the same node still
515 confuse the poor darling.
516
517
518
519I've done that, and I'm *still* not getting anything back. Why not?
520------------------------------------------------------------------
521
522 Another possibility is that the agent you are querying is simply not
523 responding. Try contacting it with a "reliable" query.
524 A good test is to do an 'snmpwalk' on the 'system' sub-tree.
525
526 Or it may be that the agent just doesn't implement the MIB
527 module that you're interested in. Or it does, but is falling over
528 (software with bugs in - shock horror!)
529 Try doing an 'snmpwalk' starting somewhere above the offending bit
530 of the MIB tree, and seeing how far it gets.
531
Dave Shieldceab78b1999-08-09 08:02:15 +0000532 Or the agent may not be configured to allow you access.
533 One of the most common problems with the UCD agent is installing
534 the example config file, but not changing the NETWORK field to
535 match the local network address. You also need to set a suitable
536 string for COMMUNITY.
537 See the access control question (in the AGENT section) for more details.
538
539
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000540
541
542I've done that, but I'm *still* getting "sub-identifier not found:" Grrr!
543------------------------------------------------------------------------
544
545 If a "general" snmpwalk shows the entry, but asking for it more
546 specifically gives a "sub-identifier not found:" error, then that's
547 probably a slightly different problem.
548
549 The tools assume that the object ID they are given is a full path
550 starting from 'mib-2' (or wherever you have set PREFIX to) - i.e.
551 including the intermediate names.
552 You can't simply give the final sub-identifier, and expect the tools
553 to find the relevant node. (Well, you can, but you'll be disappointed).
554 You need to specify the intermediate sub-identifiers as well.
555
556 For example
557 snmpget myhost public sysUpTime.0
558 will fail, while
559 snmpget myhost public system.sysUpTime.0
560 will work.
561
562 If you are confident that the sub-identifier is unique within the
563 loaded MIB files, you can request direct "random access" using the
564 command flag '-R'.
565 snmpget myhost public -R sysUpTime.0
566
567 If the sub-identifier is not unique, but you know which module it's
568 in, you can specify this explicitly:
569
570 snmpget myhost public -R RFC1213-MIB:sysUpTime.0
571
572 The behaviour with non-unique sub-identifiers if the module is not
573 specified is "implementation specific"
574 (i.e. we reserve the right to change it without warning!)
575
576
577
578Why do I sometimes get "End of MIB" when walking a tree, and sometimes not?
579--------------------------------------------------------------------------
580
581 This depends on which MIB modules are supported by the agent you are querying.
582
583 A tree is walked by repeatedly asking for "the next entry" until all the
584 values under that tree have been retrieved. However, the agent has no idea
585 that this is what's happening - all it sees is a request for "the next entry
586 after X".
587
588 If the variable X happens to be the last entry in a tree, the agent will
589 provide the next variable supported (as requested) even though this will
590 be in a different subtree. It's up to the querying tool to recognise that
591 this last result lies outside the area of interest, and simply discard it.
592
593 If the variable X happens to be the last entry supported, then the agent
594 doesn't have another variable to provide, so returns a suitable error.
595 The UCD tools report this with the message above.
596
597 But in either case, the actual information provided will be the same.
598
599
600
601I can't load any of the mib files, and they seem to be missing
602the first two characters of the filename. What's happening?
603-----------------------------------------------------------
604
605 This is a problem experienced with Sun systems when the tools have
606 been compiled with a mixture of BSD and Solaris environments.
607 You'll need to re-configure and compile the tools, making sure that
608 '/usr/ucb' is not in your PATH (or at least comes at the end).
609
610
611
612I cannot set any variables in the MIB.
613-------------------------------------
614
615 There are three possible reasons for this:
616
617 The majority of MIB variables are "read-only" and cannot be changed.
618
619 Of those that can in principle be changed, only a few have been
620 implemented as such in this agent. Currently, most (if not all)
621 of these are contained within the 'system' sub-tree, relating to
622 general contact information.
623
624 With the distribution as shipped, the community name "private" must
625 be used to set these values, and this can only be done from the local
626 host (i.e. the same system that the agent is running on).
627 This can be changed using the access control commands, which appear
628 at the end of the example config file. For example, to allow write
629 access to the 'system' group from the local subnet, with the community
630 string "sysadmin", follow the instructions at the end of this example file.
631
632 Note that the community string "public" can *not* be used to set variables.
633
634
635
636Variables seem to disappear when I try to set them. Why?
637--------------------------------------------------------
638
639 This is actually the same as the previous question - it just isn't
640 particularly obvious. A typical example of this effect would be
641
642 $ snmpget localhost public system.sysLocation.0
643 system.sysLocation.0 = somewhere nearby
644
645 $ snmpset localhost public system.sysLocation.0 s "right here"
646 Error in packet.
647 Reason: (noSuchName) There is no such variable name in this MIB.
648 This name doesn't exist: system.sysLocation.0
649
650 This is due to the limitations of the available SNMPv1 error codes,
651 which are forced to cover a number of different possibilities.
652 What 'noSuchName' actually means is
653
654 "You can't do that to this variable"
655
656 That could be because the variable doesn't exist, it does exist but
657 you don't have access to it (but someone else may do), or it exists
658 but you can't perform that particular operation (i.e. changing it).
659
660 The error codes in SNMPv2 (various flavours) are rather more flexible
661 and informative:
662
663 $ snmpset -v 2c localhost public system.sysLocation.0 s "right here"
664 Error in packet.
665 Reason: notWritable
666
667 Note that this actually means "not writeable in this particular case",
668 rather than "not writeable under any circumstances". It may well be
669 that a different invocation (such as using the community string "private")
670 might be successful.
671
672
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000673
Dave Shieldceab78b1999-08-09 08:02:15 +0000674Where can I find a MIB compiler?
675-------------------------------
676
677 That depends what you mean by a "MIB compiler". There are at least two
678 types of tool that are commonly referred to by this name.
679
680 The first is a tool to check MIB files for validity. The functionality
681 of this is mostly integrated within the MIB parser (part of the UCD library)
682 and hence included in all the applications. The tool 'snmptranslate' is
683 probably the most appropriate for this purpose.
684 Note that the parser is fairly forgiving (see 'What ASN.1 parser is used'
685 below), so this should not be regarded as a stamp of approval.
686
687 The second type of tool is one to turn a MIB specification into C code,
688 specifically one designed to aid agent implementation. There is an example
689 of such a tool included within the 'local' directory, as 'mib2c'.
690 See the next section for more information.
691
692
693
694How do I handle traps and notifications?
695---------------------------------------
696
697 That depends on whether you need to send traps and notifications to
698 a management station, or receive them from existing agents and handle
699 them in some manner.
700
701 Generating traps "by hand" can be done using the tool 'snmptrap'.
702 An SNMPv1 trap needs to specify seven parameters:
703 - the station to send to
704 - the community name to use
705 - the enterprise OID to send (*)
706 - the agent "sending" the trap (*)
707 - the generic trap type (1-6 as defined in RFC 1157)
708 - the specific trap type (0 if using generic traps 1-5)
709 - the value of "uptime" (*)
710
711 The three parameters marked (*) can be left null (i.e. "") to use
712 sensible default values.
713
714 An SNMPv2 or v3 trap or notification (aka "inform") is simpler and
715 just needs three (or four) parameters:
716 - the station to send to
717 - the community name (SNMPv2c only)
718 - the value of uptime (or "")
719 - the trap OID to send
720
721 Either of these can then be followed by one or more (objectID type value)
722 triples, using the same syntax as for 'snmpset'.
723
724
725 Handling received traps is done using the tool 'snmptrapd'. This can
726 be used to log these traps (via 'syslog()' or printed to standard output)
727 or pass them to an external command.
728 See 'snmptrapd(8)' and 'snmptrapd.conf(5)' for details.
729
730
731
732How do I use SNMPv3?
733-------------------
734
735 <Sigh> We were hoping you wouldn't ask that!
736
737 As far as the applications are concerned, this is simply a matter of using
738 the "-v 3" option, and providing suitable values for the various SNMPv3
Wes Hardaker72a2df71999-08-12 23:41:22 +0000739 parameters. These are described in the snmpcmd(1) manual page.
Dave Shieldceab78b1999-08-09 08:02:15 +0000740 Configuring the UCD agent is less straightforward. There is an initial
741 description of how to do this in the file 'README.snmpv3', but this is more
742 complex than we would like, and will hopefully be revised in the future.
Wes Hardaker72a2df71999-08-12 23:41:22 +0000743 Also see the snmpusm(1) manual page, as it describes some basic
744 information about how SNMPv3's user based security module works.
Dave Shieldceab78b1999-08-09 08:02:15 +0000745 Watch this space....
746
747
748
749Applications complain about entries in your example 'snmp.conf' file. Why?
750--------------------------------------------------------------------------
751
752 The example configuration file 'EXAMPLE.conf' is designed as a config
753 for the agent, and should be installed as 'snmpd.conf' (note the 'd').
754 The file 'snmp.conf' is intended for general configuration options,
755 applicable to all applications (via the SNMP library).
756 Rename (or merge) the 'snmp.conf' file to 'snmpd.conf', and this should
757 fix the problem.
758
759
760
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000761AGENT
762=====
763
764What MIBs are supported?
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000765-----------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000766
767 The following MIBs are supported (at least in part):
768
769 - MIB-2 General network statistics (RFC 1213)
770 - UCD agent extensions
771 (processes, disks, memory, load average,
772 shell commands, error handling)
Wes Hardakerb922f281997-10-20 18:45:58 +0000773 - SMUX implementation (RFC 1227) for communicating with 'gated'
774 (plus routing protocols BGP, OPSF & RIP2 - RFCs 1657, 1724 & 1850)
Wes Hardaker468df0b1998-05-14 15:21:55 +0000775 - Host Resources (RFC 1514) initial implementation
Wes Hardakerb922f281997-10-20 18:45:58 +0000776
Dave Shieldceab78b1999-08-09 08:02:15 +0000777 The SNMPv2 Party and Manager-to-Manager MIBs (RFCs 1447 & 1451) have been
778 withdrawn.
779
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000780
781
Wes Hardakerb922f281997-10-20 18:45:58 +0000782How do I add a MIB to the agent?
783-------------------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000784How do I add functionality?
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000785--------------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000786
Wes Hardakerb922f281997-10-20 18:45:58 +0000787 Unfortunately, adding a file to the MIB directory does not automatically
788 extend the functionality of the agent to include this MIB. (Would that
789 life were so simple). In fact, the agent makes little or no use of
790 these files, and will work quite happily without them.
791 All the information about the syntax and scope of the variables supported
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000792 is hardwired into the implementation of the agent.
Wes Hardakerb922f281997-10-20 18:45:58 +0000793
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000794 There are three ways to add functionality for a new MIB to the agent.
Wes Hardakerb922f281997-10-20 18:45:58 +0000795
796 Firstly, it is possible that the agent distribution already includes
797 the desired functionality, but this has simply not been configured in
798 to the running version. This is done using the configure option
799 --with-mib-modules="list"
Dave Shieldceab78b1999-08-09 08:02:15 +0000800 (where "list" is a space-separated list of modules to omit) then
801 recompiling the agent.
Wes Hardakerb922f281997-10-20 18:45:58 +0000802 Note that some functionality concerned with monitoring and managing
803 unix hosts is included in the UCD extension modules, which are located
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000804 within the 'private' branch of the MIB tree. This is covered in a later
805 question in this FAQ.
Wes Hardakerb922f281997-10-20 18:45:58 +0000806
807 Secondly, it is possible for the agent to run commands or shell scripts
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000808 in response to queries. These can obtain and report the necessary
Wes Hardakerb922f281997-10-20 18:45:58 +0000809 information, or perform actions as required.
810 Detailed information and examples are provided in the snmpd(1) and
811 snmpd.conf(5) manual pages, and the EXAMPLE.conf file.
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000812 This is known as "pass-through" support.
Wes Hardakerb922f281997-10-20 18:45:58 +0000813
814 Thirdly, the agent itself can be extended to support additional MIB
815 groups, by writing the necessary C code. This is covered further in
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000816 the next question.
Wes Hardakeree047991997-03-18 15:52:34 +0000817
818 Note that there is effectively no difference between 'pass-through'
819 MIB support, and modules implemented within the agent itself. Tools
820 querying the agent will see a single MIB structure.
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000821
822
Wes Hardakerb922f281997-10-20 18:45:58 +0000823
Dave Shieldceab78b1999-08-09 08:02:15 +0000824What's the difference between 'exec', 'sh' and 'pass'?
825-----------------------------------------------------
826
827 'exec' will fork off the specified command and return the exit status
828 and/or the output. Arguments are passed directly to the command.
829
830 'sh' is similar, but invokes a shell to run the command.
831 This means that quoted arguments will be recognised as such, and also
832 allows redirection, and other similar shell interpretation.
833
834 Neither of these mechanisms require the command to have any knowledge
835 of the fact that they are being used in this manner. Note that return
836 values are cached within the agent for 30 seconds, rather than invoking
837 the command for every request.
838
839
840 'pass' is a more general mechanism for extending the agent, and the
841 command given will be invoked for any request within the specific MIB
842 subtree. Details of precisely how this command will be called in
843 various circumstances is given in the 'snmpd.conf(8)' man page.
844
845 'pass-persist' is similar, but the command will continue running
846 even once the initial request has been answered.
847
848 See 'snmpd.conf(5)' for more details.
849
850
851
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000852How do I write C code to integrate with the agent?
853-------------------------------------------------
854
Wes Hardaker0540f281999-03-06 01:08:21 +0000855 At the moment, there are two methods for integrating external C code
Dave Shieldceab78b1999-08-09 08:02:15 +0000856 within the agent.
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000857
Dave Shieldceab78b1999-08-09 08:02:15 +0000858 The first is to include this code within the agent itself, using the
859 UCD agent API. This is described (in excruciating detail) in the file
860 AGENT.txt, shipped with the standard distribution. There is also an
861 HTML version accessible via the project web page.
862 This task can be aided using the tool 'mib2c' which generates most
863 of the necessary skeleton code from the description in the MIB file.
864 Further information is also available in the files mibgroup/README
865 and local/README.mib2c
866
867 The second is to use an alternative API to communicate between the
868 agent and an external management-enabled application. One possibility
869 is the SMUX protocol, which available as the module "smux" and is
870 described in the file agent/mibgroup/README.smux.
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000871
Dave Shieldceab78b1999-08-09 08:02:15 +0000872 Alternatively, work is underway to implement AgentX support. The
873 initial implementation of this is available as the module "agentx",
874 and is described in the file agent/mibgroup/agentx/README. Note that
875 the AgentX support is still very incomplete, and should be regarded as
876 alpha code. Don't even think about using this in a production environment!
877
Wes Hardaker0540f281999-03-06 01:08:21 +0000878
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000879
Wes Hardakeree047991997-03-18 15:52:34 +0000880What traps are sent by the agent?
881--------------------------------
882
Wes Hardakerb922f281997-10-20 18:45:58 +0000883 The agent can be configured to send a 'coldStart(0)' trap when it first
884 starts up. The destination to send the trap to, and the community name
885 to use, are set in the snmpd.conf file
886 ('trapsink' and 'trapcommunity' respectively - note both are required)
887
Wes Hardaker09b535a1997-05-10 14:45:14 +0000888 The agent can also be configured to send 'authenticationFailure(4)'
889 traps when it receives SNMPv1 requests using a community name that is
Wes Hardakerb922f281997-10-20 18:45:58 +0000890 not recognised.
Wes Hardakerf957a5e1998-02-13 17:07:31 +0000891 This is done with the snmpd.conf entry 'authtrapenable 1'.
Wes Hardaker468df0b1998-05-14 15:21:55 +0000892 (Note that the two 'trap' entries above are also still required).
Dave Shieldceab78b1999-08-09 08:02:15 +0000893
894 There is currently no easy way to extend the agent to send other
895 traps or notifications.
Wes Hardaker09b535a1997-05-10 14:45:14 +0000896
Wes Hardakeree047991997-03-18 15:52:34 +0000897
898
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000899When I run the agent it runs and then quits without staying around. Why?
900-----------------------------------------------------------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000901
Wes Hardakerb922f281997-10-20 18:45:58 +0000902 The first question is, are you certain that this is what is happening?
903
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000904 The normal operation of the agent is to 'fork' itself into the
905 background, detaching itself so that it will continue running even
Wes Hardaker82ad1f91997-02-04 08:35:02 +0000906 when you log out, and freeing the command line for subsequent use.
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000907 This looks at first sight as if the agent has died, but using 'ps'
908 to show all processes should reveal that the agent is still running.
909
Dave Shieldceab78b1999-08-09 08:02:15 +0000910 To prevent this behaviour (such as when attempting to debug the
911 agent), you can start it with the '-f' flag. This suppresses the
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000912 fork, and the agent will run as a 'normal' command.
913
Wes Hardakerb922f281997-10-20 18:45:58 +0000914 On the other hand, if 'ps' shows that the agent is not running, then
915 this is an error, and probably show that something went wrong in
916 starting the agent up. See under 'PROBLEMS' for more advice.
917
Wes Hardaker34ac96d1997-01-29 11:11:04 +0000918
919
Wes Hardaker468df0b1998-05-14 15:21:55 +0000920How can I stop other people getting at my agent?
921-----------------------------------------------
922
923 First question - are you concerned with read access or write access?
924
925 As far as changing things on the agent is concerned, there is very
926 little that can actually be altered (see the answer to "I can't set
Wes Hardaker09ce9c01998-06-19 15:41:00 +0000927 any variables" under PROBLEMS, below).
Wes Hardaker468df0b1998-05-14 15:21:55 +0000928
Dave Shieldceab78b1999-08-09 08:02:15 +0000929 If you are using the example config file, this is set up to allow
930 read access from your local network, and write access only from the
931 system itself (accessed as 'localhost'), both using the community name
932 specified. You will need to set appropriate values for both NETWORK
933 and COMMUNITY in this file before using it.
934 This mechanism can also be used to control access much more precisely.
935 (see the next question for details)
936
937 Other options include:
938 - Blocking access to port 161 from outside your organisation
Wes Hardaker468df0b1998-05-14 15:21:55 +0000939 (using filters on network routers)
Dave Shieldceab78b1999-08-09 08:02:15 +0000940 - Configuring TCP wrapper support ("--with-libwrap")
Wes Hardaker468df0b1998-05-14 15:21:55 +0000941 This uses the TCP 'libwrap' library (available separately)
942 to allow/deny access via /etc/hosts.{allow,deny}
Wes Hardaker468df0b1998-05-14 15:21:55 +0000943
944
945
Wes Hardakerfae82bb1998-10-10 06:20:25 +0000946I don't understand the new access control stuff - what does it mean?
947-------------------------------------------------------------------
948
949 The idea behind the new access control model is to give a more flexible
950 way of specifying who can see and do what within the MIB tree.
951 It's more complicated to understand than the old community style, but
952 that's because it can do a whole lot more.
953
954 There are four configuration keywords in the new scheme:
955 'com2sec', 'group', 'view', and 'access'
956
957 We'll consider these one at a time, starting with 'access'.
958 (Because I feel like starting with the last one, that's why - OK?)
959
960
961 The "access" keyword has the job of specifying who has access to
962 which bits of the MIB tree. This has eight parameters, so can look
963 rather offputting. Most of these can be safely left with default values
964 in most cases (so don't you worry your pretty little head about them).
965 The syntax is
966
967 access {group} "" any noauth 0 {read-tree} {write-tree} {notify-tree}
968
969 where the entries in braces need to be defined elsewhere (I'm coming
970 to that - be patient!), and the rest can be left as shown here.
971
972 [ If you really want to know, the 'sec.model' field can be used
973 to have an access line that's only relevant to particular
974 versions of SNMP (such v1 or v2c) rather than "any" version,
975 and the 'sec.level' field can be used to ensure that the
976 request is authenticated or encrypted.
977 You'll have to ask Niels about the other two!]
978
979
980 The "view" keyword is used to define particular bits of the MIB tree,
981 for use in the last three field of the access entry.
982 This has the syntax
983
984 view {name} included/excluded {subtree} {mask}
985
986 where {name} is the identifier to be used for this view (i.e. what should
987 appear in the access entry), and {subtree} is the portion of the MIB tree
988 that this name refers to (in either numeric or named form).
989 Note that the name of the view does not have to have anything to do
990 with the MIB sub-identifier names - it's purely an identifying tag for
991 use within the config file (though choosing a meaningful name is, as
992 always, a very good idea).
993
994 The {mask} field is used to control which elements of the OID subtree
Wes Hardakerf13d1ce1999-03-05 18:21:25 +0000995 should be regarded as relevant when determining which view an OID is in.
Wes Hardakerfae82bb1998-10-10 06:20:25 +0000996 Normally, the whole of the OID should be included, so you'll need a mask
997 with as many bits set as there are OID elements.
998 Thus, in the example config file, ".1" (i.e. the whole dod tree) has
999 one element, so the mask has one bit set (counting from the most
1000 significant) - i.e. '80' (in hex).
1001 ".iso.org.dod.internet.mgmt.mib-2" has six elements, so six bits set ('fc').
1002 "system" is short for ".iso.org.dod.internet.mgmt.mib-2.system", which
1003 has seven elements, and so seven bits in its mask (hence 'fe')
1004 If there are more than eight elements, you specify the longer masks
1005 as single octet values, separated by dots (e.g. 'ff.c0' for 10 bits)
1006 The third field can be used to include or exclude particular portions
1007 of the MIB from the view, and different lines can use the same view name
1008 to build up a more complicated view, if that's what's needed.
1009
1010 The three view fields in the access line are used to control which
1011 portions of the MIB tree a particular {group} can see (GET et al),
1012 alter (SET), or request NOTIFYs on.
1013
1014
1015
1016 That's dealt with the "what" - now for the "who".
1017 This is the role of the "group" and "com2sec" entries.
1018
1019 The "group" keyword gives general control, by mapping between a
1020 "security name" (and possibly a particular protocol version), and the
1021 internal name used in the access line. This will really only come into
1022 play once the full features of SNMP v3 are available.
1023
1024 At the moment, it's just an intermediate step between the "access" line
1025 and the "com2sec" line, which is the last bit of the jigsaw.
1026 The "com2sec" entry is used to determine a "security name" from the
1027 traditional community string, taking into account where the request has
1028 come from. Thus the same community string can give access to different
1029 portions of the tree, depending on where the request is sent from.
1030
1031 For example, in the example config file, there are two com2sec lines
1032 with the community string "public" - one is valid from anywhere (with
1033 the security name "public") and one is only valid from the local network
1034 (using the security name "mynet").
1035 The group lines convert these security names into the groups "public"
1036 and "mygroup" respectively, and the access lines give these two groups
1037 the ability to GET values in the 'system' sub-tree (from anywhere) or
1038 the 'mib-2' sub-tree (from the local network). Neither of these can
1039 SET any values though, (since the write-tree is "none" in both cases).
1040 Someone on the local machine, using the community string "private",
1041 has the security name "local" and the group name "local", and hence has
1042 full access (both GET and SET, as well as NOTIFY) to the whole of the
1043 MIB tree (or at least everything under .1, which covers most things!)
1044
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001045 Note that the three occurrences of "public", as community string,
Wes Hardakerfae82bb1998-10-10 06:20:25 +00001046 security name and group name, are three totally separate things.
1047 You can't use a community string in a security name field, or either
1048 of these as a group name (or vice versa), unless you set up suitable
1049 entries to map one name onto the other.
1050
1051
1052 And here concludes our tour of the view-based access control mechanism.
1053 Phew!
1054
1055
1056
Wes Hardaker82ad1f91997-02-04 08:35:02 +00001057What ASN.1 parser is used?
1058-------------------------
1059
1060 The parser used by both the agent and client programs is coded by hand.
Wes Hardakerb922f281997-10-20 18:45:58 +00001061 This parser has recently been re-vamped to allow control of which of
1062 the available MIBs should be included, and to handle duplicate object
1063 subidentifiers.
1064 The source code can be found in the snmplib directory (in 'parse.c'),
1065 and the parser is usually bundled into the library 'libsnmp.a'
Wes Hardaker82ad1f91997-02-04 08:35:02 +00001066
Dave Shieldceab78b1999-08-09 08:02:15 +00001067 Note that the parser attempts to be fairly forgiving of some common
1068 errors and incompatabilities in MIB files. The UCD tools accepting a
1069 MIB file without complaint does not imply that the MIB is strictly
1070 correct.
1071 Certain MIBs (most notably those from Cisco) may need some amendments
1072 to allow them to be read correctly by the parser. Contact the coders'
1073 list for advice.
1074
Wes Hardaker82ad1f91997-02-04 08:35:02 +00001075
Wes Hardaker468df0b1998-05-14 15:21:55 +00001076
Wes Hardaker82ad1f91997-02-04 08:35:02 +00001077How does the agent fetch the value of a variable from the system?
1078----------------------------------------------------------------
1079
1080 Much of the information is extracted from kernel memory - usually
1081 by seeking to the appropriate location and reading the structures
1082 directly.
1083 Some systems provide cleaner interfaces to such kernel information
1084 (it would be hard to think of a less clean interface!), via ioctl()
1085 calls or similar system routines and these mechanisms are usually used
1086 in preference.
1087
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001088
Wes Hardaker468df0b1998-05-14 15:21:55 +00001089
Wes Hardakeree047991997-03-18 15:52:34 +00001090Why can't I see values in the UCDavis 'extensible' tree?
1091-------------------------------------------------------
Wes Hardakerff4e3521997-12-01 20:33:49 +00001092
1093 The extensible tree is designed to report things you ask it to report
1094 on. If you don't declare anything in the snmpd.conf file for it to
1095 monitor, it will not report anything. See the snmpd.conf manual page
Wes Hardaker468df0b1998-05-14 15:21:55 +00001096 and the EXAMPLE.conf file for details on configuring the agent.
1097
1098 As from version 3.4, the structure of the UCDavis MIB has been changed
1099 slightly, to bring it into conformance with MIB structure standards.
1100 This particularly affects the tables within this MIB.
1101 Make sure you have "make install"ed the MIB files that come with
1102 this release, and check any applications that may request these values.
1103 It's likely that the SNMP queries being sent will need amending.
1104
1105 Also see the answer to the next few questions.
1106
1107
Dave Shieldceab78b1999-08-09 08:02:15 +00001108Why can't I see values in the UCDavis 'memory' tree?
1109---------------------------------------------------
Wes Hardaker6166b741999-02-03 06:00:13 +00001110
1111 The memory mib is not supported on all operating systems. More
1112 specifically, it is only supported on linux, hpux9, hpux10, bsdi2,
Dave Shieldceab78b1999-08-09 08:02:15 +00001113 bsdi3, freebsd2 and Solaris, and is not compiled in on any other
Wes Hardaker6166b741999-02-03 06:00:13 +00001114 architectures. If you want to help port it to other systems, let us
1115 know.
1116
Wes Hardakerff4e3521997-12-01 20:33:49 +00001117
Wes Hardaker468df0b1998-05-14 15:21:55 +00001118
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001119What does "klread: bad address" mean?
Wes Hardaker82ad1f91997-02-04 08:35:02 +00001120-------------------------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001121
1122 This means that the agent was unable to extract some of the
1123 necessary information from the kernel structures. This is
1124 possibly due to:
1125 - either looking in the wrong place for kernel information
1126 (check the value of KERNEL_LOC)
1127 - an error in the implementation of part of the MIB tree
1128 for that architecture. Try and identify which
1129 OID is generating the error, and contact the
Wes Hardakerebc1eb91999-03-04 01:51:31 +00001130 list 'ucd-snmp-coders@ucd-snmp.ucdavis.edu'
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001131
Wes Hardaker82ad1f91997-02-04 08:35:02 +00001132
Wes Hardaker468df0b1998-05-14 15:21:55 +00001133
Wes Hardaker82ad1f91997-02-04 08:35:02 +00001134What does "nlist err: wombat not found" (or similar) mean?
1135----------------------------------------------------------
1136
1137 This means that the agent wasn't able to locate one of the
1138 kernel structures it was looking for. This may or may not
1139 be important - some systems provide alternative mechanisms
1140 for obtaining the necessary information - Solaris, for example,
Wes Hardakeree047991997-03-18 15:52:34 +00001141 can produce a whole slew of such messages, but still provide
Wes Hardaker82ad1f91997-02-04 08:35:02 +00001142 the correct information.
1143 This error only occurs if you have used the flag
1144 '--enable-debugging' as part of the initial configuration.
1145 Reconfigure the agent with '--disable-debugging' and these
1146 messages will disappear.
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001147
1148
Wes Hardaker468df0b1998-05-14 15:21:55 +00001149
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001150How about "Can't open /dev/kmem"?
Wes Hardaker82ad1f91997-02-04 08:35:02 +00001151--------------------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001152
1153 This device is normally restricted to just being accessible by root
1154 (or possibly by a special group such as 'kmem' or 'sys'). The agent
1155 must be able to read this device to obtain the necessary information
1156 about the running system.
1157 Check that the agent was started by root, and is running with UID 0
1158 (or suitable GID if appropriate)
Wes Hardaker468df0b1998-05-14 15:21:55 +00001159
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001160
1161
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001162The agent is complaining about 'snmpd.conf'. Where is this?
Wes Hardaker09b535a1997-05-10 14:45:14 +00001163-----------------------------------------------------------
1164
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001165 It doesn't exist in the distribution as shipped. You need to
1166 create it to reflect your local requirement.
1167 To get started, you can either just create this as an empty file,
1168 or try copying the EXAMPLE.conf file which will use some of the UCD
1169 extensions. See the snmpd.conf(5) manual page for further details.
Wes Hardaker3eb7caf1998-05-20 14:34:31 +00001170
1171
1172
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001173Sometimes I seem to get the wrong answers. Why?
Wes Hardaker82ad1f91997-02-04 08:35:02 +00001174-----------------------------------------------
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001175
1176 Many of the variables in the basic MIB-2 tree require information
Dave Shieldceab78b1999-08-09 08:02:15 +00001177 that is not easily available in the common Unix kernels. Prior to
1178 the v4 release, the agent returned hardwired 'null' values (in the
1179 absence of anything better). As from release 4.0, the agent now
1180 returns a "noSuchName" error, which is more in keeping with the
1181 SNMP specification.
1182 The items affected are:
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001183
1184 interface.ifType other(1)
1185 interface.ifSpeed 1
1186 interface.ifLastChange 0
1187 interface.ifInNUCastPkts 0
1188 interface.ifInDiscards 0
1189 interface.ifInUnknownProtos 0
Wes Hardaker468df0b1998-05-14 15:21:55 +00001190 Interface.ifOutNUCastPkts 0
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001191 interface.ifSpecific Null OID
1192
1193 ip.ipInUnknownProtos 0
1194 ip.ipInDiscards 0
1195 ip.ipOutRequests 0
1196 ip.ipOutDiscards 0
1197 ip.ipFragOKs 0
1198 ip.ipFragFails 0
1199 ip.ipFragCreates 0
1200 ip.ipRouteDiscards 0
1201 ipAddrEntry.ipAdEntReasmMaxSize -1
1202 ipRouteEntry.ipRouteAge 0
1203
1204 tcp.tcpMaxConn -1
1205 tcp.tcpOutRsts 0
1206
1207 udp.udpInDatagrams 0
1208 udp.udpNoPorts 0
1209 udp.udpOutDatagrams 0
1210
1211
1212 The following variables have 'likely guess' values, that are not
1213 necessarily strictly accurate.
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001214
1215 interface.ifInOctets guess based on # of packets
1216 interface.ifInUCastPkts includes non-unicast packets
1217 interface.ifOutOctets guess based on # of packets
1218 interface.ifOutUCastPkts includes non-unicast packets
1219
1220 ip.ipInDelivers Doesn't handle fragments properly
1221 ip.ipReasmOKs Assumes fragments are complete datagrams
1222 ipRouteEntry.ipRouteProto local(2) or icmp(4)
1223
1224 tcp.tcpRtoAlgorithm vanJ(4) (probably correct!)
Wes Hardakeree047991997-03-18 15:52:34 +00001225
1226
1227 The following variables are simply not implemented according to specification
1228
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001229 tcp.tcpAttemptFails } actually counting
1230 tcp.tcpEstabResets } something different
Wes Hardakeree047991997-03-18 15:52:34 +00001231 tcp.tcpOutResets }
1232
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001233
1234 Some systems may return the correct information for these values.
Wes Hardaker4ee4f741997-11-12 17:17:08 +00001235 Systems that are believed to have corrected some of these are as follows:
Wes Hardaker34ac96d1997-01-29 11:11:04 +00001236
Wes Hardaker82ad1f91997-02-04 08:35:02 +00001237 * FreeBSD & BSDi provide correct interface statistics
Wes Hardaker4ee4f741997-11-12 17:17:08 +00001238 * Solaris, Linux & HP-UX provide correct statistics throughout
Dave Shieldceab78b1999-08-09 08:02:15 +00001239 (though Solaris may need a kernel patch to support interface
1240 octet counts, and Linux requires kernel 2.2 or better).
Wes Hardaker468df0b1998-05-14 15:21:55 +00001241
1242
1243
Dave Shieldceab78b1999-08-09 08:02:15 +00001244Why have some variables disappeared from the agent?
1245--------------------------------------------------
1246
1247 This is related to the previous question. The information necessary to
1248 provide correct values for some variables is not available on some systems,
1249 In previous releases, the agent attempted to guess sensibly, or provided
1250 a "null" answer, which was contrary to SNMP specifications.
1251 The agent now (correctly) treats this as an unavailable variable, and
1252 returns an error.
1253
1254 If you *really* insist on the agent returning wrong answers, then you can
1255 return to the previous behaviour by using the configure flag "--with-dummy-values"
1256
1257
1258
Wes Hardaker468df0b1998-05-14 15:21:55 +00001259The system uptime (sysUpTime) returned is wrong!
1260-----------------------------------------------
1261
1262 Oh no it's not.
1263 The defined meaning of 'sysUpTime' is
1264 "the time ... since the *network management*
1265 portion of the system was re-initialized."
1266
1267 In other words, when the snmp agent was started, not when the
1268 system itself last booted. This latter information is available
1269 in the Host Resources MIB as "host.hrSystem.hrSystemUpTime"
1270 Note that even if the full Host Resources is not supported on
1271 your system, it's worth trying configuring using
1272
Wes Hardaker09ce9c01998-06-19 15:41:00 +00001273 '--with-mib-modules=host/hr_system'
Wes Hardaker468df0b1998-05-14 15:21:55 +00001274
1275 and recompiling. This particular group is reasonably likely to
1276 work, even if some of the other more system-specific groups don't.
1277 (see the next question)
1278
1279
1280
1281The Host Resources information is wrong (and/or doesn't even compile)!
1282---------------------------------------------------------------------
1283
1284 Very likely.
1285
1286 This is still a very new implementation, and has only really been
1287 tried on a limited number of systems. While every attempt is made
1288 to provide information in as general way as possible, the Host
1289 Resources is extremely system-specific, by its very nature.
1290
1291 The current list of systems that have a relatively complete
1292 implementation of this MIB is:
1293
1294 - HP-UX 9 & 10
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001295 - Solaris 2.5 and above
1296 - RedHat Linux 5 and above
Wes Hardaker468df0b1998-05-14 15:21:55 +00001297
1298 Though the hrDevice table in particular is somewhat sparse, even on these.
1299 If your system is not listed here, and you would like to help implement
1300 it, contact the coders list, and make a friend for life!
1301
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001302
1303
1304What is the Official Slogan of the ucd-snmp-coders list?
1305-------------------------------------------------------
1306
1307 "The current implementation is non-obvious and may need to be improved."
1308 (with thanks to Rohit Dube)
1309
1310
1311
1312
1313PERL
1314====
1315
1316How do I install the Perl SNMP module?
1317-------------------------------------
1318
1319 Assuming you have a reasonably new (and properly configured) perl system,
1320 this should be simply:
1321
1322 perl Makefile.PL
1323 (press RETURN when prompted for host and community)
1324 make
1325 make test
1326 make install (probably as root)
1327
1328
1329
1330Compiling this fails with "`MAX_NAME_LEN' undeclared"?
1331-----------------------------------------------------
1332
1333 This name is no longer used (from release 3.6 onwards), due to clashes with
1334 system header files on some systems. There should be a new version of the Perl
1335 SNMP module out soon (probably 1.9) that handles this.
1336 In the meantime, changing the file SNMP.xs (in the perl module) to replace
1337 each occurrence of 'MAX_NAME_LEN' with 'MAX_OID_LEN' will work.
1338
1339
1340
1341I'm trying to use mib2c (or tkmib) and it can't locate SNMP.pm?
1342------------------------------------------------------------
1343
1344 That's probably because the SNMP perl module hasn't been installed.
1345 It's not part of the standard distribution, nor is it installed by
1346 default in RedHat linux (for example).
1347 You'll need to get it from CPAN, and install it yourself
1348 (see the first question in this section).
1349
1350
1351
1352I'm trying to use tkmib and it can't locate Tk.pm?
1353------------------------------------------------------------
1354
1355 Tk.pm is another Perl package that needs to be installed before tkmib will run.
1356 It's also available on Perl CPAN. We suggest using version "Tk800.011" or later.
1357
1358
1359
1360GENERAL PROBLEMS
1361================
1362
1363Why aren't my mib files read in any more?
1364-----------------------------------------
1365
1366 There are a number of possible reasons for this.
1367 In summary: a particular MIB file isn't being read in
1368 none of the MIB files are found
1369 there's an error in the MIB file
1370
1371 To expand on these in turn:
1372
Dave Shieldceab78b1999-08-09 08:02:15 +00001373 * As from version 3.2, the parser has been re-written. One effect
1374 of this is that only a specified set of MIB modules are read in by
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001375 the tools by default. This list can be set in a number of ways:
1376
1377 The tools have a default list compiled in, which can be set
1378 using the configure option
1379 --with-mibs="list"
1380 and recompiling the tools.
1381
1382 The environmental variable 'MIBS' will be taken as a list of
1383 module names (separated by colons) to be read in, instead of (or as
1384 well as) the default list. Note that any modules these rely on will
1385 be read in automatically, without needing to be listed explicitly.
Dave Shieldceab78b1999-08-09 08:02:15 +00001386 Note also that this refers to the name of the MIB (i.e. the name
1387 before the token 'DEFINITIONS'), which is not necessarily the same
1388 as the name of the file containing it.
1389
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001390
1391 The environment variable 'MIBFILES' will be taken as a list of
1392 filenames, containing MIB modules to be read in (instead of, or in
1393 addition to those included by 'MIBS' and/or the default list).
1394 Again, any modules these rely on will also be loaded in automatically.
1395 The names listed in this variable can be anywhere in the filesystem,
1396 though any implicitly loaded modules must be present in the standard
1397 location(s).
1398
1399 Finally, if the environmental variable 'MIBS' has the special
1400 value "ALL", then the tools will load in every module present in
1401 the module directory (or directories).
1402
1403 The command line options '-m' and '-M' can also be used to override
1404 these variables. This is described in the 'snmpcmd(1)' man page.
1405
1406
Dave Shieldceab78b1999-08-09 08:02:15 +00001407 * The location where the tools look for MIB module files is compiled
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001408 into the tools. This can also be set using the environmental
1409 variable 'MIBDIRS', being a (colon-seperated) list of directories
1410 containing MIB files.
1411
1412 Note that from version 3.3 onwards, the default location has changed
1413 (from /usr/local/lib/snmp/mibs to /usr/local/share/snmp/mibs).
1414 This is in line with current standards regarding file system structure.
1415
1416
Dave Shieldceab78b1999-08-09 08:02:15 +00001417 * As from version 3.4, the parser is somewhat more strict about the
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001418 syntax of MIB files. This may result in it rejecting previously
1419 acceptable (though erroneous) MIB files.
Dave Shieldceab78b1999-08-09 08:02:15 +00001420 See the next-but-two question for more help on this.
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001421
Dave Shieldceab78b1999-08-09 08:02:15 +00001422 See the 'mib_api(3)' man page for more details of how MIBs are parsed.
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001423
1424
1425
1426I'm getting answers, but they're all numbers. Why?
1427-------------------------------------------------
1428
1429 This is actually the same as the previous question. Because the tools
1430 no longer read in every MIB module they can find, it is quite possible
1431 for results from an agent to refer to modules that have not been loaded
1432 (particularly with GETNEXT requests, or when walking a tree).
1433 The tools will report the answer quite correctly, but won't translate
1434 identifiers and enumerations into readable strings. To fix this, use
Dave Shieldceab78b1999-08-09 08:02:15 +00001435 the environmental variables MIBS or MIBFILES (or the '-m' and '-M' flags)
1436 to read in the relevant module files.
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001437 This does assume you have these files installed properly. There's not
1438 a great deal we can do if you haven't. Note that the default location
1439 for these files has changed recently (see the previous question).
1440
1441
1442
Dave Shieldceab78b1999-08-09 08:02:15 +00001443The parser doesn't handle comments properly. Why not?
1444------------------------------------------------------------
1445
1446 The most likely reason is that the line in question contains two
1447 (or more) sequences of pairs of dashes. This is often used to try
1448 and "comment out" an unwanted line that already contains a comment:
1449
1450 -- broken ::= { myMIB 1 } -- This isn't working yet
1451
1452 The assumption here is that a comment continues to the end of the line.
1453 Unfortunately, this assumption is not correct.
1454 A comment will continue either to the end of the line, or the next
1455 occurance of a pair of dashes. Thus in this case, the definition of
1456 "broken" is commented out (as intended) but the following text is
1457 treated as part of the MIB, and will generate an error.
1458
1459 A similar effect can be obtained when a line of dashes has been used
1460 to try and mark separate parts of a MIB file.
1461
1462 Most of the applications have a command-line option (-Pc) which will
1463 work around this problem by treating the whole line as a comment. But
1464 this is not strictly legal, and the offending MIB file should really be
1465 corrected.
1466
1467
1468
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001469How can I get more information about these MIB file problems?
1470------------------------------------------------------------
1471
1472 The command 'snmptranslate' is used to translate between numeric
1473 and symbolic forms of OIDs. It uses the same routines as the
1474 'active' commands, but does not rely on communicating successfully
1475 with a network management agent. As such, it is a useful tool
1476 for identifying problems with reading in MIB files.
1477
1478 In particular, the following options may be useful in
1479 identifying problems:
Dave Shieldceab78b1999-08-09 08:02:15 +00001480 -Pw warns about conflicting symbols
1481 -PW prints more verbose warnings about other problems as well
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001482 (in both cases, ignore the 'xmalloc' reports)
Dave Shieldceab78b1999-08-09 08:02:15 +00001483 -p prints a list of the entries that have been read in
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001484 (including the MIBs they belong to)
Dave Shieldceab78b1999-08-09 08:02:15 +00001485 -T provides sub-options for various views of these entries
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001486
Dave Shieldceab78b1999-08-09 08:02:15 +00001487 There are other '-P' options to control various aspects of MIB parsing.
1488 See the 'snmptranslate(1)' and 'snmpcmd(1)' man pages for more details.
Wes Hardakerf13d1ce1999-03-05 18:21:25 +00001489
1490
1491
1492What's this about "too many imported symbols"?
1493---------------------------------------------
1494
1495 Any MIB file starts with an (optional) list of identifiers that
1496 it "imports" from other files. The parser implements this using
1497 a fixed size buffer to hold the import information.
1498 There are two circumstances in which this can result in the
1499 error message shown above.
1500
1501 Firstly, if the MIB file refers to an unususally large number
1502 of external identifiers. Handling this case requires a (trivial)
1503 patch to the parsing code. Contact the coders list for advice.
1504 (This is extremely rare - the only example that
1505 we've come across is the Cabletron Trap MIB).
1506
1507 Much more common is a syntax error in the IMPORTS clause of the
1508 MIB file in question. In particular, check that this ends in a
1509 semicolon, before going on to the main definition section.
1510
1511
1512
1513How do I compile with 'gcc' instead of 'cc'?
1514-------------------------------------------
1515
1516 Set the environmental variable 'CC' to have the value 'gcc' before
1517 running the configure script.
1518
1519
1520
1521But gcc doesn't compile it successfully on my new Solaris system. Why not?
1522-------------------------------------------------------------------------
1523
1524 Whenever you upgrade the operating system under Solaris, you need to
1525 reinstall gcc, and run the 'fixincludes' script. (This is probably
1526 a sensible step to take when you upgrade any operating system).
1527 Under Solaris 2.6, there is also a bug in the gcc 'fixinc.sv4' script.
1528 This needs an additional line as follows:
1529
1530*** fixinc.svr4.cln Thu Jun 15 22:03:29 1995
1531--- fixinc.svr4 Tue Nov 25 09:47:57 1997
1532***************
1533*** 191,191 ****
1534--- 191,192 ----
1535 s/__STDC__ - 0 == 0/!defined (__STRICT_ANSI__)/g
1536+ s/__STDC__ - 0 == 1/defined (__STRICT_ANSI__)/g