Network calculator

Problem this snippet solves:

The following is an example how powerful the LTM in terms of hosting web pages w/o the necessity of having a physical web server. This technique can sometimes save you from purchasing or taking up valuable resource on a production web server for hosting a webpage.

This particular iRule throws up a network calculator which was coded by Al Vonkeman (http://www.subnetmask.info./)).

NOTE: The website does initially load up slowly. Thereafter it performs quickly as the processing is client side.

Code :

when HTTP_REQUEST {
if {[HTTP::uri] eq "/calc" } {
set response {  
Network Calculators

< SCRIPT type="text/javascript">






Network Calculators


Subnet Mask Calculator

   < script type="text/javascript"></script>
Enter the TCPIP Network Address:
Force as Class: Default Class A Class B Class C
Enter the required number of sub-networks:
OR enter the required number of nodes/hosts per network (including network & broadcast addresses)***:

Network Class:
Subnet Mask: or
Subnets:
Nodes/Hosts per Network (including network and broadcast addresses)***:

Network/Node Calculator

Enter the Subnet Mask:
Enter the TCPIP Address:

Network:
Node/Host:
Broadcast Address:


IP Address Converter

Enter the dotted decimal TCPIP Address:
or Enter the binary TCPIP Address:
or Enter the hex TCPIP Address:
or Enter the decimal TCPIP Address:


Subnet Mask Converter

Enter the dotted decimal Subnet Mask
or Enter the number of bits in the subnetmask /


Subnet Mask Inverter

Enter the dotted decimal Subnet Mask
Enter inverted Subnet Mask  

< SCRIPT type="text/javascript"> } HTTP::respond 200 content $response "Content-Type" "text/html" } }

Published Mar 18, 2015
Version 1.0
  • Joe_M's avatar
    Joe_M
    Icon for Nimbostratus rankNimbostratus
    This doesn't work properly on 11.5.3. I haven't tested anything else. The Subnet calculator here: http://jodies.de/ipcalc works much better for my needs. If that could be converted into an iRule that would be fantastic!