Networking Tools Series: #1 – Building a Parallel Ping Checker GUI with Python

By Iris – Network Security Engineer


Welcome to the first installment of my Networking Tools Series, where I share tools I personally use or build to make daily network operations smoother and smarter. Whether you’re studying for your CCNP/CCIE Security certification, troubleshooting enterprise-grade environments, or just trying to keep tabs on hosts in your lab, this tool is a quick win.

This blog post introduces a GUI-based parallel ping tool built with Python. I built it to speed up connectivity tests to multiple hosts and IP addresses simultaneously – a task I often do in the field.

We’ll use:

  • tkinter for GUI
  • concurrent.futures.ThreadPoolExecutor for parallelism
  • subprocess for sending ping commands

Why Parallel Pinging?

As a network engineer, I’ve often faced situations where I had to verify availability for 20, 50, or even 300 devices – firewalls, switches, routers, or monitoring endpoints. Doing this sequentially wastes precious time. So, I decided to create a multi-threaded ping checker with a clean GUI.

This is a perfect little tool for:

  • Verifying branch office device status
  • Lab testing before/after configuration changes
  • Checking DNS and reachability of external resources

Flow Diagram

+---------------------------+
|   User Enters Hosts      |
|   (one per line)         |
+------------+-------------+
             |
             v
+---------------------------+
|   Click "Check Connectivity" |
+------------+-------------+
             |
             v
+---------------------------+
| ThreadPoolExecutor        |
| - Ping each host in thread |
+------------+-------------+
             |
             v
+---------------------------+
| Show Results in Text Box |
+---------------------------+

Full Python Code

import tkinter as tk
from tkinter import scrolledtext
from concurrent.futures import ThreadPoolExecutor
import platform
import subprocess

# Ping command generator based on OS
def ping(host):
    param = "-n" if platform.system().lower() == "windows" else "-c"
    command = ["ping", param, "1", host]
    try:
        output = subprocess.check_output(command, stderr=subprocess.DEVNULL, universal_newlines=True)
        return f"{host}: ✅ Reachable"
    except subprocess.CalledProcessError:
        return f"{host}: ❌ Unreachable"

# Function to execute pings in parallel
def run_ping_checks():
    result_box.delete("1.0", tk.END)
    hosts = input_box.get("1.0", tk.END).strip().splitlines()
    if not hosts:
        result_box.insert(tk.END, "No input provided.\n")
        return

    with ThreadPoolExecutor(max_workers=50) as executor:
        futures = {executor.submit(ping, host): host for host in hosts}
        for future in futures:
            result = future.result()
            result_box.insert(tk.END, result + "\n")

# GUI setup
root = tk.Tk()
root.title("Ping Tester - Parallel Network Reachability Tool")
root.geometry("600x500")

tk.Label(root, text="Enter Hostnames/IPs (one per line):").pack(pady=5)

input_box = scrolledtext.ScrolledText(root, height=10, width=70)
input_box.pack(pady=5)

tk.Button(root, text="Check Connectivity", command=run_ping_checks, bg="green", fg="white").pack(pady=10)

tk.Label(root, text="Results:").pack()

result_box = scrolledtext.ScrolledText(root, height=15, width=70)
result_box.pack(pady=5)

root.mainloop()

Screenshots

1. Initial Input Window

[User enters IPs or domain names, one per line]

[google.com]

[8.8.8.8]

[example.com]

2. Output Results

google.com: ✅ Reachable
8.8.8.8: ✅ Reachable
example.com: ❌ Unreachable

Packaging to EXE

To convert this script into a .exe for easy distribution:

  1. Install PyInstaller:
pip install pyinstaller
  1. Run PyInstaller:
pyinstaller --onefile --noconsole your_script.py
  1. Locate the .exe in the dist/ folder.

I personally use this technique to share tools with teammates or create quick portable utilities on my jump server.


Performance Tips

ParameterRecommendation
Threads (max_workers)50 (adjustable)
Input limitSafe up to 300 hosts per run
Ping timeoutUse -w or timeout options in subprocess for tuning
LoggingAdd file logging for large result sets

Conclusion

This Python-based GUI tool makes it easy to check the network availability of multiple devices in parallel. It is lightweight, easy to use, and cross-platform. Perfect for IT professionals and sysadmins who want quick visibility into network reachability without relying on enterprise tools.

Coming up next in this series:

  • A subnet scanner GUI
  • SSH mass command sender tool
  • Log analyzer for firewall exports

Let me know in the comments if you’d like those tools, or if you have suggestions for tools to build!

Happy pinging and stay secure,

—Iris

Add a Comment

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