How to Stop a Continuous Ping on Cambium Radio

The Cambium equipment comes with a nice little ping utility when you SSH to it. Very simple to use. Maybe we should say too simple.

usage: ping <host>
       ping -n <count> <host>
                count = 0 for continuous ping

So if I want to continuously ping a website, say, I can put in the following

ping -n 0

Hit return and we are off to the races. But wait. I can’t get it to stop. Ctrl + C, doesn’t do anything, Ctrl + D or Ctrl +Z don’t help either.

Okay well fine. We’ll launch another terminal and ssh into it again and see what we can do. Excellent, now we are in aaand… wait… why are the ping results showing up here too? Help!!!

Buried in the heart of the helpful help command are these lines.

       ping -- Send ICMP ECHO_REQUEST packets to network hosts
    pingend -- End ICMP ECHO_REQUEST packets to network hosts

You don’t say. Well lets try typing in pingend with all the commotion going on in the terminal.

SSH+> pingend
Ping statistics for
        Packets: Sent = 3, Received = 3, Lost = 0 (0% loss)

Well good to know. Saves having to reboot the device.

Simple SH Ping script to scan a /24

This is a very simple ping script I created to run on a remote UniFi device to scan for other IP addresses on it’s network. It works on SH environments as well as Bash.

Paste the script in a file and then

chmod +x

run like so, replacing 192.168.1. with the IP range you want to scan.

sh 192.168.1.

# simple ping scan utility

# i.e. 192.168.0.

while [ $ip -ne 255 ] 
  ping -w1 $ipFirstPart${ip} | grep "64 bytes from"

Ping multiple IP addresses to see if they are up or down

An easy way to do this is by using fping. fping is a little bit easier ping utility to use then normal ping when trying to verify that a host is actually down.

By default fping returns if a host is “alive” or “unreachable”


$ fping is alive

Or for a host that is down it returns something like the following

$ fping
ICMP Host Unreachable from for ICMP Echo sent to
ICMP Host Unreachable from for ICMP Echo sent to
ICMP Host Unreachable from for ICMP Echo sent to
ICMP Host Unreachable from for ICMP Echo sent to is unreachable

You can adjust the retry rate with the -r option, default is 3 which it has multiple of the Host Unreachable lines. Changing it to 1 or 2 gets rid of those lines so it just shows that the host is unreachable.

$ fping -r 1 is unreachable

Ping multiple addresses

Fortunately pinging multiple addresses with fping is as easy as adding them to the end of the command. For example

fping -r1

will ping both the specified addresses one after the other and print the results to the terminal.


$ fping -r is alive is alive is unreachable

How to Allow Ping Through Windows Firewall

Open up Windows Firewall with Advanced Security.

You can do this by going to
Control Panel –> System and security –> Windows Firewall –> Advanced settings

Or hit the Windows key and type in firewall and hit enter

Select Inbound rules and then add a New Rule.  On the New Inbound Rule Wizard select Custom for the type of rule and hit next.  Allow All programs and then hit next again.  Select ICMPv4 as the Protocol type and if you want you can specify the ICMP types by clicking on the Customize button.  Finish running through the wizard give it a name etc. and click Finish when your done.