> I added the following to my magt CONFIG file (I googled it somewhere):
>
> TRANSPORT extraordinary SNMP
> OVER UDP SOCKET
> AT PORT 1611
CORRECTION: This *is* in the Sun Docs not on some random website.
> How does this differ from what's documented there?
There is nothing in README.solaris about Sun ONE's sub agents. I
believe my problem was with the sub agent configuration (I can't bind
it to non-standard interfaces/ports).
Here's an overview of what I've done.
A) Problem Description:
Sun's iPlanet/ONE Web Server 6.1 comes bundles with a SNMP subagent
that communicates via SMUX. Sun's SNMP daemon is nowhere near NET-SNMP
on current SNMP developments (plus open-source rules!). We need Sun's
subagent to talk directly to NET-SNMP's snmpd. I am running on a
system with multiple interfaces and would like to tie everything to an
"internal" interface. This doc is for Solaris but it may generally
apply to all ONE supported platforms (I think I read somewhere that
Windows users have to use config #4 or 5).
B) Definitions:
Sun ONE's Master agent == magt
Sun ONE's HTTP Sub agent == httpagt (there are others for LDAP, MSG etc)
Sun ONE's Proxy agent == sagt (poorly named)
Sun's "Native" Master agent == snmpdx
NET-SNMP's "Native" Master agent == snmpd
<- or -> == connects to
<<- or ->> == forwards to
:% == WTF?!? too complex
:( == undesirable config
:| == works but could be better
:) == desirable config
C) Possible Configurations:
1. Only Sun ONE's master :(
magt <- httpagt
magt listens on 161/UDP, 199/TCP
2. Only Sun's "Native" master :(
snmpdx <- httpagt
snmpdx listens on 161/UDP, 199/TCP
3. Only NET-SNMP's master :)
snmpd <- httpagt
snmpd listens on 161/UDP, 199/TCP
4. NET-SNMP and Sun ONE's master :|
snmpd ->> magt <- httpagt
snmpd listens on 161/UDP
magt listens on 1611/UDP, 199/TCP
5. NET-SNMP and Sun ONE's master and Sun ONE's proxy :%
snmpd <<- sagt -> magt <- httpagt
snmpd listens on 1611/UDP
magt listens on 161/UDP, 199/TCP
D) Ready the Web Server:
Three files need are affected here.
1. https-instance/config/snmp.conf
Create this file with the following information:
MASTERHOST hostname
DESCRIPTION Some Sun Server
ORGANIZATION Some Cool Org
LOCATION Some Location
CONTACT Some Poor SA
SNMP On
2. https-instance/config/obj.xml
Make sure you have something similar to:
<Object name="default">
...
NameTrans fn="assign-name" name="stats-xml" from="(/stats-xml|/stats-xml/*)"
...
</Object>
...
<Object name="stats-xml">
Service fn="stats-xml"
</Object>
3. https-instance/config/magnus.conf
Add the following (at the end of the file):
Init fn="stats-init" profiling="on"
E) The *real* problem
I've configured NET-SNMP to listen on an "internal" interface and I've
configured smux to listen on the localhost. As part of my security
concerns I didn't want smux to be listening on any non-loopback
interfaces.
1. The problem I was running into with config 3 is that Sun's sub
agent was not completing the connection to snmpd correctly. This was
likely due to the non-standard nature of my interface configuration.
Further the configuration documentation for httpagt is pretty much
non-existant. I still cannot find docs on how to force httpagt to
listen to a single interface of communicate w/ smux on a non-standard
port.
2. The problem with config 4 is that magt and snmpd were both
listening to and answering requests from port 199/TCP (ie smux). This
is the first time I'd ever seen two processes listening on the same
interfaces and on the same TCP ports (newb or delusional I dunno?).
Sun's httpagt kept seg faulting in the initialization process. A
sample transaction from snmpd's perspective:
smux: [smux_accept] Calling accept()
[smux_accept] accepted fd 15 from 10.10.10.10:43067
smux: [smux_open_process] version 0, len 46, type 2
smux: [smux_open_process] smux peer: SNMPv2-SMI::enterprises.42.1.60
smux: [smux_open_process] len 36, type 6
smux: [smux_open_process] smux peer descr: Sun ONE Web Server SNMP Subagent
smux: [smux_open_process] len 2, type 4
smux: [smux_open_process] smux peer passwd:
smux: [smux_open_process] len 0, type 4
refused smux peer: oid SNMPv2-SMI::enterprises.42.1.60, password ,
descr Sun ONE Web Server SNMP Subagent
smux: [smux_close] sending close to fd 15, reason 5
smux: [smux_accept] peer on 15 failed authentication
F) The solution
After I reconfigured snmpd to listen on all interfaces I had no
problems with either config 3 or config 4. Here's an overview:
1. For config 3
a) Add the following lines to snmpd.conf:
smuxsocket 0.0.0.0
smuxpeer .1.3.6.1.4.1.42.1.60
b) Restart snmpd on all interfaces
/usr/local/sbin/snmpd # do NOT supply an interface as the argument
c) Start httpagt manually or via web interface (I had some problems
with 6.1sp1's httpagt not starting manually)
/serverroot/bin/https/bin/httpagt -d /serverroot
2) For config 4
a) Add the following lines to snmpd.conf:
# prevent smux from starting
smuxsocket 1.0.0.0
# forward all Sun requests to their master agent
proxy -v 1 -c public localhost:1611 .1.3.6.1.4.1.42
b) Add the following lines to /serverroot/plugins/snmp/magt/CONFIG
(Sun ONE's master agent):
# force magt to use 1611/UDP since snmpd has 161/UDP
TRANSPORT extraordinary SNMP
OVER UDP SOCKET
AT PORT 1611
b) Restart snmpd on all interfaces
c) Start Sun ONE's master agent manually or via web interface
cd /serverroot/plugins/snmp/magt
./magt CONFIG INIT &
c) Start httpagt manually or via web interface (I had some problems
with 6.1sp1's httpagt not starting manually)
/serverroot/bin/https/bin/httpagt -d /serverroot
G) Lessons learned
1. Sun's documentation on it's ONE subagents is incomplete.
2. Sun ONE's httpagt crashes in certain net-snmp interface configurations.
3. Locking down SNMP when using Sun ONE's sub agents will cause
week-long headaches (open up to all then attempt to lock down -
duh?!).
4. NET-SNMP will work with Sun ONE's sub agents (httpagt at least)
H) Resources:
http://docs.sun.com/source/819-0130-10/agsnmp.html (Sun's Web Server snmp docs)
http://swforum.sun.com (Sun's ONE forums)
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users