Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

how do I know if the UDP port that i'm sending requests to is blocked? I am sending a snmp request and the SNMP agent receives requests on UDP port 161. I want to know if the port is blocked or not?

share|improve this question

migrated from stackoverflow.com Jul 30 '11 at 3:02

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

You don't. UDP is connectionless. The only way to tell is if you have something waiting to reply to your message and it doesn't respond. Even this doesn't tell you that it is blocked, it just tells you that something is wrong, sort of like a "general error."

edit: This assumes you were speaking in terms of discovering this remotely.

http://en.wikipedia.org/wiki/Port_scanner#UDP_scanning

share|improve this answer
add comment

The definitive way to test whether a packet is received by the recipient computer is with a network sniffer. Use Wireshark. I recommend running Wireshark on both the client and the server (assuming they're both PCs, not a network appliance) so you can see it being sent as well as received (or not received if the firewall is blocking it).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.