TCP/UDP Ping


A slight variation on ICMP Ping is the TCP and UDP Ping.

Some network nodes disable ICMP ping or ICMP all together.  In addition, some firewalls block ICMP packets.  When that is the case, TCP or UDP ping may be an option.

Let’s start with UDP Ping.

Instead of sending an ICMP packet, a UDP packet is sent.  UDP packets require a UDP port be configured.  There are two options here:  1) use a port with a service, 2) use a port with no service configured.

For the former, depending on the service running on the port used, a valid payload may be required that is recognized by the service.  It may not respond at all if the payload is invalid.  Other services may send back an error message if the payload isn’t valid.  Determine what type of service is running to determine what the payload needs to contain.

For the latter, depending on how the system is configured, when a packet is sent to the UDP port that is not is use, the system may send back an ICMP Type 3 – destination unreachable – Code 3 – port unreachable – message.  If the system sends back the destination unreachable this is a verification that the system is up and responding.

 

TCP works a bit different than ICMP and UDP.  All TCP sessions start with a sequence of packets to start a reliable session.  The originating system sends a SYN packet to the destination at a TCP port, if there is a valid service running on that port, the destination will send a SYN ACK back to the originating system.  Once the SYN ACK is received, it is a confirmation that the destination system is up and responding.   Once verified, if the TCP session is not used further, the session should be reset or established then closed.  If there is no service running on the TCP port, the system may send back an ICMP Type 3 – destination unreachable – Code 3 – port unreachable – message.  If the system sends back the destination unreachable this is a verification that the system is up and responding.

For UDP and TCP ping, all options discussed in the Advanced ICMP post are available, except for payload size and content.


One response to “TCP/UDP Ping”

  1. Howdy! I just want to give you a big thumbs up for the excellent information you have got here on this post. I’ll be coming back to your blog for more soon.

Leave a Reply

Your email address will not be published. Required fields are marked *