179 lines
6.9 KiB
HTML
179 lines
6.9 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|||
|
<HTML>
|
|||
|
<HEAD>
|
|||
|
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|||
|
<!-- (C) Copyright IBM Corporation, 2005 -->
|
|||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|||
|
<!-- US Government Users Restricted Rights -->
|
|||
|
<!-- Use, duplication or disclosure restricted by -->
|
|||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|||
|
<TITLE>TCP/IP subnet calculator</TITLE>
|
|||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|||
|
<SCRIPT language="JavaScript" type="text/javascript">
|
|||
|
<!-- //////////
|
|||
|
|
|||
|
//START NON-TRANSLATABLE
|
|||
|
|
|||
|
// Arrays that describe the subnet's size and number of IPs per subnet
|
|||
|
var bsize = new Array();
|
|||
|
var bmask = new Array();
|
|||
|
var sub_mask = new Array(); // array of subnet masks
|
|||
|
|
|||
|
bsize[0] = 8388608;
|
|||
|
bsize[1] = 4194304;
|
|||
|
bsize[2] = 2097152;
|
|||
|
bsize[3] = 1048576;
|
|||
|
bsize[4] = 524288;
|
|||
|
bsize[5] = 262144;
|
|||
|
bsize[6] = 131072;
|
|||
|
bsize[7] = 65536;
|
|||
|
bsize[8] = 32768;
|
|||
|
bsize[9] = 16384;
|
|||
|
bsize[10] = 8192;
|
|||
|
bsize[11] = 4096;
|
|||
|
bsize[12] = 2048;
|
|||
|
bsize[13] = 1024;
|
|||
|
|
|||
|
bmask[0] = 2;
|
|||
|
bmask[1] = 4;
|
|||
|
bmask[2] = 8;
|
|||
|
bmask[3] = 16;
|
|||
|
bmask[4] = 32;
|
|||
|
bmask[5] = 64;
|
|||
|
bmask[6] = 128;
|
|||
|
bmask[7] = 256;
|
|||
|
bmask[8] = 512;
|
|||
|
bmask[9] = 1024;
|
|||
|
bmask[10] = 2048;
|
|||
|
bmask[11] = 4096;
|
|||
|
bmask[12] = 8192;
|
|||
|
bmask[13] = 16384;
|
|||
|
|
|||
|
sub_mask[0] = '255.128.0.0';
|
|||
|
sub_mask[1] = '255.192.0.0';
|
|||
|
sub_mask[2] = '255.224.0.0';
|
|||
|
sub_mask[3] = '255.240.0.0';
|
|||
|
sub_mask[4] = '255.248.0.0';
|
|||
|
sub_mask[5] = '255.252.0.0';
|
|||
|
sub_mask[6] = '255.254.0.0';
|
|||
|
sub_mask[7] = '255.255.0.0';
|
|||
|
sub_mask[8] = '255.255.128.0';
|
|||
|
sub_mask[9] = '255.255.192.0';
|
|||
|
sub_mask[10] = '255.255.224.0';
|
|||
|
sub_mask[11] = '255.255.240.0';
|
|||
|
sub_mask[12] = '255.255.248.0';
|
|||
|
sub_mask[13] = '255.255.252.0';
|
|||
|
|
|||
|
// Gets the checked value from the form
|
|||
|
function getRadioValueclassb(radioObject) {
|
|||
|
var value = null;
|
|||
|
for (var i = 0; i < radioObject.length; i++) {
|
|||
|
if (radioObject[i].checked) {
|
|||
|
value = parseInt(radioObject[i].value);
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
// Stores the number of IPs in the subnet
|
|||
|
parent.hidden.data[4] = value;
|
|||
|
storerest();
|
|||
|
}
|
|||
|
|
|||
|
// Stores the number of subnets
|
|||
|
function storerest() {
|
|||
|
var subnetsize = parseInt(parent.hidden.data[4]);
|
|||
|
for (var i = 0; i < 15; i++) {
|
|||
|
if (subnetsize == bsize[i]) {
|
|||
|
parent.hidden.data[5] = bmask[i];
|
|||
|
parent.hidden.data[6] = sub_mask[i];
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
var subnetnum = parseInt(parent.hidden.data[5]);
|
|||
|
window.location = "rzak1advsubfinal.htm";
|
|||
|
}
|
|||
|
|
|||
|
// For the Back button
|
|||
|
function goback() {
|
|||
|
window.location = "rzak1advsub10.htm";
|
|||
|
}
|
|||
|
|
|||
|
//Obtain name of HTML file in parent frame.
|
|||
|
var parentDir = parent.window.location.href.substring(0,location.href.lastIndexOf('/')+1);
|
|||
|
var parentUrl = parent.window.location.href.substring(parentDir.length,parent.window.location.href.length+1);
|
|||
|
if (parentUrl.indexOf("#") >= 0) { parentUrl = parentUrl.substring(0,parentUrl.indexOf("#"));}
|
|||
|
|
|||
|
function checkFrame() {
|
|||
|
//Is the hidden frame already loaded with the correct html?
|
|||
|
if (parentUrl != "rzak1advsubwelcome.htm") {
|
|||
|
window.location = "rzak1advsubwelcome.htm"; //load calculator frameset
|
|||
|
return;
|
|||
|
} else {
|
|||
|
//Obtain name of HTML file in hidden frame.
|
|||
|
var hiddenDir = parent.hidden.window.location.href.substring(0,location.href.lastIndexOf('/')+1);
|
|||
|
var hiddenUrl = parent.hidden.window.location.href.substring(hiddenDir.length,parent.hidden.window.location.href.length+1);
|
|||
|
if (hiddenUrl.indexOf("#") >= 0) { hiddenUrl = hiddenUrl.substring(0,hiddenUrl.indexOf("#"));}
|
|||
|
if (hiddenUrl != "rzak1advsubhidden.htm") {
|
|||
|
//Correct HTML not loaded, load it
|
|||
|
parent.hidden.window.location = "rzak1advsubhidden.htm";
|
|||
|
} else { //already loaded
|
|||
|
restorevalues();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
// This function restores the values that were chosen by this page previously. If no value was
|
|||
|
// ever chosen, no value is set. It is executed upon loading the page
|
|||
|
function restorevalues() {
|
|||
|
var retnumips = parseInt(parent.hidden.data[4]);
|
|||
|
for (var i = 0; i < 15; i++) {
|
|||
|
if (retnumips == bsize[i]) {
|
|||
|
|
|||
|
document.classa.classa[i].checked = true;
|
|||
|
}
|
|||
|
}
|
|||
|
parent.hidden.data[7] = 0; // restores the counter
|
|||
|
}
|
|||
|
|
|||
|
//END NON-TRANSLATABLE
|
|||
|
|
|||
|
//////////-->
|
|||
|
</SCRIPT>
|
|||
|
</HEAD>
|
|||
|
<BODY onload="checkFrame()">
|
|||
|
<h2>TCP/IP subnet calculator</h2>
|
|||
|
<strong>Select subnet size for class A</strong>
|
|||
|
<noscript>
|
|||
|
<p>This calculator uses Javascript to function. Ensure you are using a browser which supports Javascript and that Javascript is enabled.</p></noscript>
|
|||
|
<p>From the list below, select the number and size of your new subnets. Remember
|
|||
|
to account for growth within your new subnets.</p>
|
|||
|
<FORM name="classa">
|
|||
|
<!-- TRNOTE Please do not translate the following quotations. -->
|
|||
|
<!-- TRNOTE It is from a referenced document and must remain in -->
|
|||
|
<!-- TRNOTE its original form. -->
|
|||
|
<!-- TRNOTE You may translate the text outside of the <input> fields -->
|
|||
|
|
|||
|
<INPUT TYPE=radio name="classa" value="8388608" id="8388608" checked> <label for="8388608">2 subnets with 8,388,608 IP addresses </label><br>
|
|||
|
<INPUT TYPE=radio name="classa" value="4194304" id="4194304"> <label for="4194304">4 subnets with 4,194,304 IP addresses <br></label>
|
|||
|
<INPUT TYPE=radio name="classa" value="2097152" id="2097152"> <label for="2097152">8 subnets with 2,097,152 IP addresses</label> <br>
|
|||
|
<INPUT TYPE=radio name="classa" value="1048576" id="1048576"> <label for="1048576">16 subnets with 1,048,576 IP addresses</label> <br>
|
|||
|
<INPUT TYPE=radio name="classa" value="524288" id="524288"> <label for="524288">32 subnets with 524,288 IP addresses</label> <br>
|
|||
|
<INPUT TYPE=radio name="classa" value="262144" id="262144"> <label for="262144">64 subnets with 262,144 IP addresses</label> <br>
|
|||
|
<INPUT TYPE=radio name="classa" value="131072" id="131072"> <label for="131072">128 subnets with 131,072 IP addresses</label> <br>
|
|||
|
<INPUT TYPE=radio name="classa" value="65536" id="65536"> <label for="65536">256 subnets with 65,536 IP addresses</label> <br>
|
|||
|
<INPUT TYPE=radio name="classa" value="32768" id="32768"> <label for="32768">512 subnets with 32,768 IP addresses</label> <br>
|
|||
|
<INPUT TYPE=radio name="classa" value="16384" id="16384"> <label for="16384">1024 subnets with 16,384 IP addresses</label> <br>
|
|||
|
<INPUT TYPE=radio name="classa" value="8192" id="8192"> <label for="8192">2048 subnets with 8,192 IP addresses</label> <br>
|
|||
|
<INPUT TYPE=radio name="classa" value="4096" id="4096"> <label for="4096">4096 subnets with 4,096 IP addresses</label> <br>
|
|||
|
<INPUT TYPE=radio name="classa" value="2048" id="2048"> <label for="2048">8192 subnets with 2,048 IP addresses</label> <br>
|
|||
|
<INPUT TYPE=radio name="classa" value="1024" id="1024"> <label for="1024">16384 subnets with 1,024 IP addresses</label> <br>
|
|||
|
|
|||
|
<br><br><br>
|
|||
|
<center>
|
|||
|
<INPUT TYPE=button VALUE="<< Back " onclick="goback()">
|
|||
|
<INPUT TYPE=button VALUE="Calculate" onclick="getRadioValueclassb(this.form.classa)">
|
|||
|
</center>
|
|||
|
</FORM>
|
|||
|
</BODY>
|
|||
|
</HTML>
|