Introducing the Zing zero-packet network utility
Examples
Listing 4 shows a typical use of Zing to check the status of an Internet host. Listing 5 shows a similar query using ping. As you can see, the output for the two commands is similar. Listing 6 shows an attempt to ping a host that blocks ping requests. As you can see in Listing 7, Zing is still able to connect.
Listing 4
Zing at Work
java -cp . xyz.wfgilreath.net.Zing -4 -c 8 -p 80,443 -t 500 google.com ZING: google.com (142.251.33.78): 2 ports used, 8 ops per cycle #1 ... 8 ops to google.com (142.251.33.78): Active time = 90.500 ms #2 ... 8 ops to google.com (142.251.33.78): Active time = 45.750 ms #3 ... 8 ops to google.com (142.251.33.78): Active time = 34.500 ms #4 ... 8 ops to google.com (142.251.33.78): Active time = 32.625 ms #5 ... 8 ops to google.com (142.251.33.78): Active time = 33.250 ms #6 ... 8 ops to google.com (142.251.33.78): Active time = 33.500 ms #7 ... 8 ops to google.com (142.251.33.78): Active time = 36.125 ms #8 ... 8 ops to google.com (142.251.33.78): Active time = 34.375 ms --- zing summary for google.com/142.251.33.78 --- 64 total ops used; total time: 34814 ms total-time min/avg/max/stddev = 27.000/36.750/56.000/7.774 ms
Listing 5
Ping at Work
ping -c 8 google.com PING google.com (142.250.69.206): 56 data bytes 64 bytes from 142.250.69.206: icmp_seq=0 ttl=56 time=114.932 ms 64 bytes from 142.250.69.206: icmp_seq=1 ttl=56 time=30.062 ms 64 bytes from 142.250.69.206: icmp_seq=2 ttl=56 time=29.236 ms 64 bytes from 142.250.69.206: icmp_seq=3 ttl=56 time=30.609 ms 64 bytes from 142.250.69.206: icmp_seq=4 ttl=56 time=29.239 ms 64 bytes from 142.250.69.206: icmp_seq=5 ttl=56 time=29.582 ms 64 bytes from 142.250.69.206: icmp_seq=6 ttl=56 time=28.941 ms 64 bytes from 142.250.69.206: icmp_seq=7 ttl=56 time=160.050 ms --- google.com ping statistics --- 8 packets transmitted, 8 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 28.941/56.581/160.050/48.058 ms
Listing 6
No Ping
ping -c 8 nist.gov PING nist.gov (129.6.13.49): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2 Request timeout for icmp_seq 3 Request timeout for icmp_seq 4 Request timeout for icmp_seq 5 Request timeout for icmp_seq 6 --- nist.gov ping statistics --- 8 packets transmitted, 0 packets received, 100.0% packet loss
Listing 7
Getting Through with Zing
java -cp . xyz.wfgilreath.net.Zing -6 -c 8 -p 80,443 -t 500 nist.gov ZING: nist.gov (2610:20:6005:13:0:0:0:49): 2 ports used, 8 ops per cycle #1 ... 8 ops to nist.gov (2610:20:6005:13:0:0:0:49): Active time = 103.125 ms #2 ... 8 ops to nist.gov (2610:20:6005:13:0:0:0:49): Active time = 109.500 ms #3 ... 8 ops to nist.gov (2610:20:6005:13:0:0:0:49): Active time = 100.750 ms #4 ... 8 ops to nist.gov (2610:20:6005:13:0:0:0:49): Active time = 99.375 ms #5 ... 8 ops to nist.gov (2610:20:6005:13:0:0:0:49): Active time = 98.125 ms #6 ... 8 ops to nist.gov (2610:20:6005:13:0:0:0:49): Active time = 99.500 ms #7 ... 8 ops to nist.gov (2610:20:6005:13:0:0:0:49): Active time = 128.625 ms #8 ... 8 ops to nist.gov (2610:20:6005:13:0:0:0:49): Active time = 213.375 ms --- zing summary for nist.gov/2610:20:6005:13:0:0:0:49 --- 64 total ops used; total time: 39725 ms total-time min/avg/max/stddev = 92.000/97.750/103.000/3.307 ms
Conclusion
Zing meets all six of the criteria for the utility I needed and is an ideal solution to the problem of having a lightweight network utility. The Zing utility does not require any special packets and is simply another network application for connecting, binding, and disconnecting from a host system.
For more accurate timing, more operations are required, and Zing leaves that to the discretion of the user. The Zing network utility is open source Java, so it is open to be improved, tinkered with, and optimized by others in the future.
The Zing source code is available on GitHub under a GPL v3.0 license. My intention is for other, smarter, coders to tinker, improve, and expand upon the existing Java source code.
Other future work for Zing is to port it to Python for scripting – and to the C programming language to run on bare metal. A GUI version of Zing is another future endeavor. I welcome and encourage others to grab the source code and experiment with it.
Infos
- Gilreath, William F. "Zing – the Zero Packet PING Network Utility," GitHub repository, 2022, https://github.com/wgilreath/zing
- Muuss, Mike. "The Story of the PING Program," https://ftp.arl.army.mil/~mike/ping.html, Accessed August 14, 2022.
- Wikipedia, "Ping (networking utility)," https://en.wikipedia.org/wiki/Ping_(networking_utility), Accessed August 14, 2022.
- Wikipedia, "IP address," https://en.wikipedia.org/wiki/IP_address, Accessed August 14, 2022.
- Postel, J., "RFC 792: Internet Control Message Protocol," RFC Editor, 1981. https://www.rfc-editor.org/rfc/rfc792, Accessed August 14, 2022.
- Wikipedia, "Standard deviation," https://en.wikipedia.org/wiki/Standard_deviation, Accessed September 3, 2022.
« Previous 1 2 3
Buy this article as PDF
(incl. VAT)