Fwd: does netsnmp support IPv6 varbind

Surya Mishra <[email protected]>
Newsgroups gmane.network.net-snmp.devel
Message-ID <CADO_KoEw=UFccqcqV-WOtL9RVcb2ax8EgwvD00FxgmYEKAJXGw@mail.gmail.com>
*Question : Does netsnmp support IPv6 varbind as type IPAdress?*

1- *I "get bad notation" error when I am trying to send trap having IPv6
address with type IPAdress(a) as highlighted(in red italics underlined)*

[root@IWFVM00141 ~]# snmptrap -d -v 2c -c public 16.166.98.198:5163 123
.1.3.6.1.4.1.18497.2.6.2 .1.3.6.1.4.1.18497.2.2.1 s "Test Trap"
.1.3.6.1.4.1.18497.2.2.2 s "snmp_testing_start" .1.3.6.1.4.1.18497.2.2.3 i
120 .1.3.6.1.4.1.18497.2.2.4 *a 2001:4888:67:13:643:201:0:20*
.1.3.6.1.4.1.18497.2.2.4: *Bad value notation
(2001:4888:67:13:643:201:0:20)*

2- *But when I send the same trap modifying type of IPv6 address as
String(s), it goes fine without error*
[root@IWFVM00141 ~]# snmptrap -d -v 2c -c public 16.166.98.198:5163 123
.1.3.6.1.4.1.18497.2.6.2 .1.3.6.1.4.1.18497.2.2.1 s "Test Trap"
.1.3.6.1.4.1.18497.2.2.2 s "snmp_testing_start" .1.3.6.1.4.1.18497.2.2.3 i
120 .1.3.6.1.4.1.18497.2.2.4 *s 2001:4888:67:13:643:201:0:20*

Sending 198 bytes to UDP: [16.166.98.198]:5163->[0.0.0.0]:0
0000: 30 81 C3 02  01 01 04 06  70 75 62 6C  69 63 A7 81    0.......public..
0016: B5 02 04 7D  19 93 23 02  01 00 02 01  00 30 81 A6    ...}..#......0..
0032: 30 0D 06 08  2B 06 01 02  01 01 03 00  43 01 7B 30    0...+.......C.{0
0048: 19 06 0A 2B  06 01 06 03  01 01 04 01  00 06 0B 2B    ...+...........+
0064: 06 01 04 01  81 90 41 02  06 02 30 18  06 0B 2B 06    ......A...0...+.
0080: 01 04 01 81  90 41 02 02  01 04 09 54  65 73 74 20    .....A.....Test
0096: 54 72 61 70  30 21 06 0B  2B 06 01 04  01 81 90 41    Trap0!..+......A
0112: 02 02 02 04  12 73 6E 6D  70 5F 74 65  73 74 69 6E    .....snmp_testin
0128: 67 5F 73 74  61 72 74 30  10 06 0B 2B  06 01 04 01    g_start0...+....
0144: 81 90 41 02  02 03 02 01  78 30 2B 06  0B 2B 06 01    ..A.....x0+..+..
0160: 04 01 81 90  41 02 02 04  04 1C 32 30  30 31 3A 34    ....A.....2001:4
0176: 38 38 38 3A  36 37 3A 31  33 3A 36 34  33 3A 32 30    888:67:13:643:20
0192: 31 3A 30 3A  32 30                                    1:0:20

*3-  While the trap having IPv4 address with type as IPAdress(a), goes fine
without error as highlighted(in red italics underlined) *
[root@IWFVM00141 ~]# snmptrap -d -v 2c -c public 16.166.98.198:5163 123
.1.3.6.1.4.1.18497.2.6.2 .1.3.6.1.4.1.18497.2.2.1 s "Test Trap"
.1.3.6.1.4.1.18497.2.2.2 s "snmp_testing_start" .1.3.6.1.4.1.18497.2.2.3 i
120 .1.3.6.1.4.1.18497.2.2.4 *a 16.166.97.22*

Sending 174 bytes to UDP: [16.166.98.198]:5163->[0.0.0.0]:0
0000: 30 81 AB 02  01 01 04 06  70 75 62 6C  69 63 A7 81    0.......public..
0016: 9D 02 04 50  69 9C 88 02  01 00 02 01  00 30 81 8E    ...Pi........0..
0032: 30 0D 06 08  2B 06 01 02  01 01 03 00  43 01 7B 30    0...+.......C.{0
0048: 19 06 0A 2B  06 01 06 03  01 01 04 01  00 06 0B 2B    ...+...........+
0064: 06 01 04 01  81 90 41 02  06 02 30 18  06 0B 2B 06    ......A...0...+.
0080: 01 04 01 81  90 41 02 02  01 04 09 54  65 73 74 20    .....A.....Test
0096: 54 72 61 70  30 21 06 0B  2B 06 01 04  01 81 90 41    Trap0!..+......A
0112: 02 02 02 04  12 73 6E 6D  70 5F 74 65  73 74 69 6E    .....snmp_testin
0128: 67 5F 73 74  61 72 74 30  10 06 0B 2B  06 01 04 01    g_start0...+....
0144: 81 90 41 02  02 03 02 01  78 30 13 06  0B 2B 06 01    ..A.....x0...+..
0160: 04 01 81 90  41 02 02 04  40 04 10 A6  61 16          [email protected].


Thanks
Surya

_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.