Subnet Calculator

Subnet Calculator

subnetCalc.rb

IP space is not infinite, so network administrators must be cognizant of how they allocate IP addresses. One way to segment a network is through the use of subnet masks, or Classless Inter-Domain Routing. In order to properly calculate subnetworks, or subnets, you need a few pieces of information. If you don't already know how to calculate subnets, then hopefully this script will enlighten you.

You can calculate the subnets by hand, but that can be time consuming, and converting from decimal to binary and then back to decimal again gets old after many repetitions. This script solves the problems of having to memorize subnet calculations. As long as you have the information available to input into ...

Get Wicked Cool Ruby Scripts now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.