Configure trap port
"Stephen Yu" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hello net-snmp users,
I just want to confirm the correct way to specify the trap port in
snmpd.conf in net-snmp 5.1.1 and above.
We were using ucd-snmp 4.2.6. When configuring a trap destination, the
'trapsess' (in /etc/snmp/snmpd.conf) looks like
trapsess [v1, v2c or v3 options] ip-addr
Now, we move to net-snmp 5.1.1, the above 'trapsess' line causes the
traps to be sent to port 161 of the destination (not port 162 as in the
ucd-snmp 4.2.6). Of course, I change the line to be
trapsess [v1, v2c or v3 options] ip-addr:162
It works, in the sense that traps are now being received on port 162 of
the destination.
The ucd-snmp 4.2.6 code agent/agent_trap.c inside function
snmpd_parse_config_trapsess, after the line
arg = snmp_parse_args(argn, argv, &session, "C:", trapOptProc);
There are two lines
if (session.remote_port == SNMP_DEFAULT_REMPORT)
session.remote_port = SNMP_TRAP_PORT;
These two line are removed in 5.1.1 (same as in the latest 5.3.1). This
means that we have to use 'ip-addr:162' for trap destination if we want
to receive traps at the port 162.
Am I correct? Thank you very much,
Stephen
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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