net-snmp 5.4.3 - Not able to receive traps for snmpv3
Ravi Chandran <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <F207907CC7282542A53C7027825DCC141381B635C1@IXCAEXCH07.ixiacom.com> |
Hi, I have downloaded net-snmp 5.4.3 source and compiled with IPV6 and open ssl support. I’m testing to see if we are able to receive traps from ipv6 based devices in addition to supporting ipv4 too. For SNMP v2, I ran snmptrapd from command line with the following options: Conf file contents: authCommunity log public authCommunity log public format1 %V|% Local Address: %A | Agent Address: %B | Local Time: %02.2m/%02.2l/%y %02.2h:%02.2j:%02.2k | Enterprise OID: %N | Trap Type: %w | Trap Sub-Type: %q | Community/Infosec Context: %P | Uptime: %T | Description: %W | PDU Attribute/Value Pair Array:|%v | -------------- \n format2 %V|% Local Address: %A | Agent Address: %B | Local Time: %02.2m/%02.2l/%y %02.2h:%02.2j:%02.2k | Enterprise OID: %N | Trap Type: %w | Trap Sub-Type: %q | Community/Infosec Context: %P | Uptime: %T | Description: %W | PDU Attribute/Value Pair Array:|%v | -------------- \n command line : IPV4 Snmptrapd -L f d:/trapd.log -m ALL -M "C:/mibs/custom;C:/default" -d -C -c d:/snmplog/snmptrapd.conf udp:162 I was able to receive traps for snmpv1, snmp v2 sucessfully. Pasted below the message. Received 158 bytes from UDP: [10.206.27.100]:60776->[0.0.0.0] 0000: 30 81 9B 02 01 01 04 06 70 75 62 6C 69 63 A7 81 0.›.....public§. 0016: 8D 02 01 76 02 01 00 02 01 00 30 81 81 30 10 06 ...v......0..0.. 0032: 08 2B 06 01 02 01 01 03 00 43 04 00 EF E0 60 30 .+.......C..ïà`0 0048: 17 06 0A 2B 06 01 06 03 01 01 04 01 00 06 09 2B ...+.......... + 0064: 06 01 06 03 01 01 05 03 30 0F 06 0A 2B 06 01 02 ........0...+... 0080: 01 02 02 01 01 10 02 01 10 30 1E 06 0A 2B 06 01 .........0...+.. 0096: 02 01 02 02 01 02 10 04 10 46 61 73 74 45 74 68 .........FastEth 0112: 65 72 6E 65 74 32 2F 31 33 30 0F 06 0A 2B 06 01 ernet2/130...+.. 0128: 02 01 02 02 01 03 10 02 01 06 30 12 06 0C 2B 06 ..........0...+. 0144: 01 04 01 09 02 02 01 01 14 10 04 02 75 70 ... ........up Local Address: testsys | Agent Address: 10.206.27.100 | Local Time: 10/01/2010 15:45:04 | Enterprise OID: . | Trap Type: 0 | Trap Sub-Type: 0 | Community/Infosec Context: TRAP2, SNMP v2c, community public | Uptime: 0 | Description: Cold Start | PDU Attribute/Value Pair Array:|DISMAN-EXPRESSION-MIB::sysUpTimeInstance = Timeticks: (15720544) 1 day, 20:43:05.44|SNMPv2-MIB::snmpTrapOID.0 = OID: IF-MIB::linkDown|RFC1213-MIB::ifIndex.16 = INTEGER: 16|RFC1213-MIB::ifDescr.16 = STRING: "FastEthernet2/13"|RFC1213-MIB::ifType.16 = INTEGER: ethernet-csmacd(6)|CISCO-SMI::local.2.1.1.20.16 = STRING: "up" | -------------- IPV6 Snmptrapd -L f d:/trapd.log -m ALL -M "C:/mibs/custom;C:/default" -d -C -c d:/snmplog/snmptrapd.conf udp6:162 (for ipv6) Received 159 bytes from UDP/IPv6: [2005::3]:50466 0000: 30 81 9C 02 01 01 04 06 70 75 62 6C 69 63 A7 81 0.œ.....public§. 0016: 8E 02 02 00 84 02 01 00 02 01 00 30 81 81 30 10 Ž...„......0..0. 0032: 06 08 2B 06 01 02 01 01 03 00 43 04 00 F5 EE 90 ..+.......C..õî. 0048: 30 17 06 0A 2B 06 01 06 03 01 01 04 01 00 06 09 0...+.......... 0064: 2B 06 01 06 03 01 01 05 03 30 0F 06 0A 2B 06 01 +........0...+.. 0080: 02 01 02 02 01 01 10 02 01 10 30 1E 06 0A 2B 06 ..........0...+. 0096: 01 02 01 02 02 01 02 10 04 10 46 61 73 74 45 74 ..........FastEt 0112: 68 65 72 6E 65 74 32 2F 31 33 30 0F 06 0A 2B 06 hernet2/130...+. 0128: 01 02 01 02 02 01 03 10 02 01 06 30 12 06 0C 2B ...........0...+ 0144: 06 01 04 01 09 02 02 01 01 14 10 04 02 75 70 .... ........up Local Address: testsys | Agent Address: UDP/IPv6: [2005::3]:50466 | Local Time: 10/01/2010 16:07:08 | Enterprise OID: . | Trap Type: 0 | Trap Sub-Type: 0 | Community/Infosec Context: TRAP2, SNMP v2c, community public | Uptime: 0 | Description: Cold Start | PDU Attribute/Value Pair Array:|DISMAN-EXPRESSION-MIB::sysUpTimeInstance = Timeticks: (16117392) 1 day, 20:46:13.92|SNMPv2-MIB::snmpTrapOID.0 = OID: IF-MIB::linkDown|RFC1213-MIB::ifIndex.16 = INTEGER: 16|RFC1213-MIB::ifDescr.16 = STRING: "FastEthernet2/13"|RFC1213-MIB::ifType.16 = INTEGER: ethernet-csmacd(6)|CISCO-SMI::local.2.1.1.20.16 = STRING: "up" | -------------- I’m trying to do the same for snmpv3. But I’m not getting the traps. Conf file contents: createUser user1 authUser log user1 noauth format1 %V|% Local Address: %A | Agent Address: %B | Local Time: %02.2m/%02.2l/%y %02.2h:%02.2j:%02.2k | Enterprise OID: %N | Trap Type: %w | Trap Sub-Type: %q | Community/Infosec Context: %P | Uptime: %T | Description: %W | PDU Attribute/Value Pair Array:|%v | -------------- \n format2 %V|% Local Address: %A | Agent Address: %B | Local Time: %02.2m/%02.2l/%y %02.2h:%02.2j:%02.2k | Enterprise OID: %N | Trap Type: %w | Trap Sub-Type: %q | Community/Infosec Context: %P | Uptime: %T | Description: %W | PDU Attribute/Value Pair Array:|%v | -------------- \n command line: Snmptrapd -L f d:/trapd.log -m ALL -M "C:/mibs/custom;C:/default" -d -C -c d:/snmplog/snmptrapd.conf udp:162 Snmptrapd -L f d:/trapd.log -m ALL -M "C:/mibs/custom;C:/default" -d -C -c d:/snmplog/snmptrapd.conf udp6:162 (for ipv6) Pasted below the data I received for snmpv3. NET-SNMP version 5.4.3 Received 222 bytes from UDP/IPv6: [2005::3]:61871 0000: 30 81 DB 02 01 03 30 0D 02 01 63 02 02 05 DC 04 0.¦...0...c..._. 0016: 01 00 02 01 03 04 24 30 22 04 0C 80 00 00 09 03 ......$0"..... . 0032: 00 00 1D E6 4D 5A 00 02 02 00 C3 02 03 02 67 BC ...µMZ....+...g+ 0048: 04 05 75 73 65 72 31 04 00 04 00 30 81 A0 04 0C ..user1....0.á.. 0064: 80 00 00 09 03 00 00 1D E6 4D 5A 00 04 00 A7 81 ... ....µMZ...º. 0080: 8D 02 01 7A 02 01 00 02 01 00 30 81 81 30 10 06 ...z......0..0.. 0096: 08 2B 06 01 02 01 01 03 00 43 04 00 F0 91 C2 30 .+.......C..=æ-0 0112: 17 06 0A 2B 06 01 06 03 01 01 04 01 00 06 09 2B ...+.......... + 0128: 06 01 06 03 01 01 05 03 30 0F 06 0A 2B 06 01 02 ........0...+... 0144: 01 02 02 01 01 10 02 01 10 30 1E 06 0A 2B 06 01 .........0...+.. 0160: 02 01 02 02 01 02 10 04 10 46 61 73 74 45 74 68 .........FastEth 0176: 65 72 6E 65 74 32 2F 31 33 30 0F 06 0A 2B 06 01 ernet2/130...+.. 0192: 02 01 02 02 01 03 10 02 01 06 30 12 06 0C 2B 06 ..........0...+. 0208: 01 04 01 09 02 02 01 01 14 10 04 02 75 70 ... ........up Am I missing any options that I need to use for SNMP v3 to receive the trap messages? Thanks in Advance. Regards Ravi ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ 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