ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzak1_5.4.0.1/rzak1advsub20.htm

163 lines
6.2 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
//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
// every chosen, no value is set. It is executed upon loading the page.
function restorevalues() {
//var retnumips = parseInt(parent.hidden.document.DataObjects.retValue(4));
var retnumips = parseInt(parent.hidden.data[4]);
for (var i = 0; i < 15; i++) {
if (retnumips == bsize[i]) {
document.classb.classb[i].checked = true;
}
}
parent.hidden.data[7] = 0; // restores the counter
}
// 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 for subnet masks
bsize[0] = 32768;
bsize[1] = 16384;
bsize[2] = 8192;
bsize[3] = 4096;
bsize[4] = 2048;
bsize[5] = 1024;
bsize[6] = 512;
bsize[7] = 256;
bsize[8] = 128;
bsize[9] = 64;
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;
sub_mask[0] = '255.255.128.0';
sub_mask[1] = '255.255.192.0';
sub_mask[2] = '255.255.224.0';
sub_mask[3] = '255.255.240.0';
sub_mask[4] = '255.255.248.0';
sub_mask[5] = '255.255.252.0';
sub_mask[6] = '255.255.254.0';
sub_mask[7] = '255.255.255.0';
sub_mask[8] = '255.255.255.128';
sub_mask[9] = '255.255.255.192';
// 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.document.DataObjects.retValue(4));
var subnetsize = parseInt(parent.hidden.data[4]);
for (var i = 0; i < 11; i++) {
if (subnetsize == bsize[i]) {
parent.hidden.data[5] = bmask[i];
parent.hidden.data[6] = sub_mask[i];
break;
}
}
// stores the subnet value
var subnetnum = parseInt(parent.hidden.data[5]);
window.location = "rzak1advsubfinal.htm";
}
// Back button
function goback() {
window.location = "rzak1advsub10.htm";
}
//END NON-TRANSLATABLE
//////////-->
</SCRIPT>
</HEAD>
<BODY onload="checkFrame()">
<h2>TCP/IP subnet calculator</h2>
<STRONG>Select subnet size for class B</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="classb">
<!-- 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="classb" id="32768" value="32768" checked><label for="32768">2 subnets with 32,768 IP addresses</label> <br>
<INPUT TYPE=radio name="classb" id="16384" value="16384"><label for="16384">4 subnets with 16,384 IP addresses </label><br>
<INPUT TYPE=radio name="classb" id="8192" value="8192"><label for="8192">8 subnets with 8192 IP addresses</label> <br>
<INPUT TYPE=radio name="classb" id="4096" value="4096"><label for="4096">16 subnets with 4096 IP addresses</label> <br>
<INPUT TYPE=radio name="classb" id="2048" value="2048"><label for="2048">32 subnets with 2048 IP addresses</label> <br>
<INPUT TYPE=radio name="classb" id="1024" value="1024"><label for="1024">64 subnets with 1024 IP addresses</label> <br>
<INPUT TYPE=radio name="classb" id="512" value="512"><label for="512">128 subnets with 512 IP addresses</label> <br>
<INPUT TYPE=radio name="classb" id="256" value="256"><label for="256">256 subnets with 256 IP addresses</label> <br>
<INPUT TYPE=radio name="classb" id="128" value="128"><label for="128">512 subnets with 128 IP addresses</label> <br>
<INPUT TYPE=radio name="classb" id="64" value="64"><label for="64">1024 subnets with 64 IP addresses</label> <br>
<!-- TRNOTE End Translation -->
<br><br><br><center><INPUT TYPE=button VALUE="&lt;&lt;&nbsp; Back&nbsp;" onclick="goback()">
<INPUT TYPE=button VALUE="Calculate" onclick="getRadioValueclassb(this.form.classb)">
</center>
</FORM>
</BODY>
</HTML>