- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Checking connection to UDP ports
Operating System - HP-UX
1819817
Members
3107
Online
109607
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2009 01:47 AM
тАО11-20-2009 01:47 AM
Hi all,
does anyone know a way I can test connectivity to a UDP port across the network? It's easy with TCP but not sure how to do it with UDP - is there a script I can use?
Many Thanks
Chris
does anyone know a way I can test connectivity to a UDP port across the network? It's easy with TCP but not sure how to do it with UDP - is there a script I can use?
Many Thanks
Chris
hello
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2009 04:45 PM
тАО11-20-2009 04:45 PM
Solution
"It depends" - indeed for TCP you can just try to connect, and if connect() succeeds you can presume there is something there. UDP you would have to know the application-level protocol spoken by any application which might be bound to that port.
If you go the "send a message" route, you should probably send a zero-length message (UDP allows it) to minimize (but not eliminate) the possiblity of doing something unpleasant to the remote. You should not, however, expect any response.
In theory, if there is nothing bound to the UDP port, the remote system will respond with an ICMP Destination Unreachable message with a suitable subcode. If you have called bind() on your UDP socket, and IIRC perhaps issue an ioctl or two, it may (stretching my memory) be possible to get the ICMP message passed-up to your application. At the very least, a subsequent socket call - perhaps a getsockopt() to check socket error will return an error of some sort.
Of course, since there is no "reliability" in UDP, you have to deal with the very real possiblity that either your UDP datagram or the resulting ICMP message are lost...
If you go the "send a message" route, you should probably send a zero-length message (UDP allows it) to minimize (but not eliminate) the possiblity of doing something unpleasant to the remote. You should not, however, expect any response.
In theory, if there is nothing bound to the UDP port, the remote system will respond with an ICMP Destination Unreachable message with a suitable subcode. If you have called bind() on your UDP socket, and IIRC perhaps issue an ioctl or two, it may (stretching my memory) be possible to get the ICMP message passed-up to your application. At the very least, a subsequent socket call - perhaps a getsockopt() to check socket error will return an error of some sort.
Of course, since there is no "reliability" in UDP, you have to deal with the very real possiblity that either your UDP datagram or the resulting ICMP message are lost...
there is no rest for the wicked yet the virtuous have no pillows
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2009 01:30 AM
тАО11-21-2009 01:30 AM
Re: Checking connection to UDP ports
Thanks Rick,
I will do some research around your comments.
Chris
I will do some research around your comments.
Chris
hello
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP