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

143 lines
5.1 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 for the subnet masks
bsize[0] = 128;
bsize[1] = 64;
bsize[2] = 32;
bsize[3] = 16;
bsize[4] = 8;
bmask[0] = 2;
bmask[1] = 4;
bmask[2] = 8;
bmask[3] = 16;
bmask[4] = 32;
sub_mask[0] = '255.255.255.128';
sub_mask[1] = '255.255.255.192';
sub_mask[2] = '255.255.255.224';
sub_mask[3] = '255.255.255.240';
sub_mask[4] = '255.255.255.248';
function getRadioValueclassc(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;
//Call the storerest() function
storerest();
}
// Stores the number of subnets and subnet mask
function storerest() {
var subnetsize = parseInt(parent.hidden.data[4]);
for (var i = 0; i < 7; 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";
}
// 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
// every 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 < 5; i++) {
if (retnumips == bsize[i]) {
document.classc.classc[i].checked = true;
break;
}
}
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 C</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="classc">
<!-- 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="classc" id="128" value=128 checked><label for="128">2 subnets with 128 IP addresses</label><br>
<INPUT TYPE="radio" name="classc" id="64" value=64><label for="64">4 subnets with 64 IP addresses</label><br>
<INPUT TYPE="radio" name="classc" id="32" value=32><label for="32">8 subnets with 32 IP addresses</label><br>
<INPUT TYPE="radio" name="classc" id="16" value=16><label for="16">16 subnets with 16 IP addresses</label><br>
<INPUT TYPE="radio" name="classc" id="8" value=8><label for="8">32 subnets with 8 IP addresses</label><br>
<br><br><br>
<center>
<INPUT TYPE=button VALUE="&lt;&lt;&nbsp; Back&nbsp;" onclick="goback()">
<INPUT TYPE=button VALUE="Calculate" onclick="getRadioValueclassc(this.form.classc)">
</center>
</FORM>
</BODY>
</HTML>