Trap source address
dan hennessey <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <1161167987.2696.15.camel@u607l1554> |
I have a linux host with multiple interfaces. Using net-snmp-5.2.3 (have
tried 3 versions so far) how can I set the source IP of sent traps.
I have tried the "clientaddr" config setting but this doesn't work.
I have tried modifying "snmplib/snmp_api.c" by changing
"netsnmp_ds_register_config(ASN_OCTET_STR, "snmp", "clientaddr","
to
"netsnmp_ds_register_premib(ASN_OCTET_STR, "snmp", "clientaddr","
but still no joy.
Here is a packet dump of a cold_start trap being sent. (IP addresses
changed). As you can see, the packet comes from "221.42.21.3" which is
correct but the address in the snmp "bit" is set to "192.168.0.1". This
is an interface on the host but not the one I want.
16:49:37.742119 IP 221.42.21.3.32774 > 221.206.33.145.snmptrap:
Trap(28) E:8072.4 192.168.0.1 enterpriseSpecific s=2 18180
0x0000: 45a0 0047 0001 4000 3c11 4c78 dd2a 1503
E..G..@.<.Lx.*..
0x0010: ddce 2191 8006 00a2 0033 6444 3029
0201 ..!......3dD0)..
0x0020: 0004 0670 7562 6c69 63a4 1c06 082b
0601 ...public....+..
0x0030: 0401 bf08 0440 04c0 a800 0102 0106
0201 .....@..........
0x0040: 0243 0247 0430 00 .C.G.0.
16:49:37.900034 IP 221.42.21.3.32774 > 221.206.33.145.snmptrap:
Trap(29) E:8072.3.2.10 192.168.0.1 coldStart 5
0x0000: 45a0 0048 0000 4000 3c11 4c78 dd2a 1503
E..H..@.<.Lx.*..
0x0010: ddce 2191 8006 00a2 0034 2fb7 302a
0201 ..!......4/.0*..
0x0020: 0004 0670 7562 6c69 63a4 1d06 0a2b
0601 ...public....+..
0x0030: 0401 bf08 0302 0a40 04c0 a800 0102
0100 .......@........
0x0040: 0201 0043 0105 3000 ...C..0.
Regards
Dan.
************************************************************************
DISCLAIMER
The information contained in this e-mail is confidential and is intended
for the recipient only.
If you have received it in error, please notify us immediately by reply
e-mail and then delete it from your system. Please do not copy it or
use it for any other purposes, or disclose the content of the e-mail
to any other person or store or copy the information in any medium.
The views contained in this e-mail are those of the author and not
necessarily those of Admenta UK Group.
************************************************************************
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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