top rounded corners

About The Simple Subnet Calculator

The WebGnuru Simple Subnet Calculator is a PHP driven web application which accepts input of an IP address and a subnet mask, and returns the network address and broadcast address the IP belongs to, as well as the full range of IP addresses available in the network.

The user may input the subnet mask in either dotted decimal notation (xxx.xxx.xxx.xxx) or in CIDR notation (/xx). The application returns values in both dotted decimal and 8 bit binary notation. Basic error checking is performed on the input data against:

  • Invalid characters
  • Invalid Subnet Mask Values*
  • IP Octet values must range 0 to 255
  • Incomplete entries

* The application checks that a subnet mask octet is one of: 0, 128, 192, 224, 240, 248, 252. It does NOT check for an invalid entry such as 255.255.0.255. That is a function planned for the next revision.

The Simple Subnet Calculator emphasizes ease of use, placing the field focus directly in the first form field at page load, and utilizing a correct tab index for ease of data entry. Additionally, the form field with focus is gently hilited to provide a visual cue for the user. The page layout strives to be intuitively useable and simple.

The application is written in an object oriented manner, with the main script instantiating an external class to provide the calculations. The output is in W3C validated XHTML 1.0 and CSS. It utilizes gracefully degrading, non-intrusive Javascript to enhance the user's experience, and is written in a semantic manner, separating content, structure, style, and scripting.

bottom rounded corners