I looked in the bug database and didn't see this listed.  I've found a scenario 
where snmptrap will default to port 161 for a IPv6 trap instead of port 162.

In sending a simple trap on the command line I realized that it was stripping 
off the end of my IPv6 addr and using it as a port.

snmptrap -v 2c -c trappy 2001:1890:1c00:5403::d:7 42 linkUp

tcpdump shows it being sent via port 7 - 2001:1890:1c00:5403::d.7: UDP, length 
69

What's interesting is that if the IPv6 addr ends in something that cannot be a 
port it works as expected.

snmptrap -v 2c -c trappy 2001:1890:1c00:5403::d:a7 42 linkUp

tcpdump shows it being sent via port 162 - 2001:1890:1c00:5403::d:a7.162: UDP, 
length 69

In the "How do I specify IPv6 addresses on the command line?" part of the FAQ 
it says the address should be in square brackets and quoted.  So what I was 
doing was incorrect.  I changed my syntax to address this issue:

snmptrap -v 2c -c trappy "udp6:[2001:1890:1c00:5403::d:7]" 42 linkUp

tcpdump shows it being sent via port 161 instead of port 162 - 
2001:1890:1c00:5403::d:7.161: UDP, length 69

Specifying port 162 works:

snmptrap -v 2c -c trappy "udp6:[2001:1890:1c00:5403::d:7]:162" 42 linkUp

tcpdump shows it being sent via port 162 - 2001:1890:1c00:5403::d:7.162: UDP, 
length 69

If you send a similar way via IPv4 without specifying the port it defaults to 
162:

snmptrap -v 2c -c trappy "udp:1.1.1.1" 42 linkUp

tcpdump shows it being sent via port 162 - 1.1.1.1.162: UDP, length 69

I tested with the Linux version of NET-SNMP version: 5.7.2.1

I have a way around this by specifying the port.  I just thought that the 
developers would have liked to have this brought to their attention.






------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to