Peter Mac

Consulting Technology Architect

Tags filtered by: Networking

Background Check Network Status

Because I live in the land down under where we’re serviced by a broadband network system that’s been screwed over by a number of successive Governments, we can never be guaranteed a consistent service. I wrote the following script to run in the background on my Apple Mac to notify me of any changes to the network status. It requires nc to run…but you can change this to any command that does an external connection test such as a simple ping. It does a little sleep at the end for 10 seconds. Obviously adjust to suit your circumstances.


Calculating ip address ranges

A handy way of calculating how many IP addresses are available in a subnet is as follows:

Eg. 1 Given an IP subnet with the CIDR of 192.168.0.0/16, how many available IP addresses have you got?