490 lines
14 KiB
HTML
490 lines
14 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4.0//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>Outbound interface</title>
|
|
<meta name="Copyright" content="Copyright (c) 2004 by IBM Corporation">
|
|
<!-- 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. -->
|
|
|
|
<!--
|
|
----------------------------------------------------------------------------
|
|
START_DESCRIPTION
|
|
Page Function: Defines the server-side interface from which you want to restrict applications.
|
|
Collects IP address for planning worksheet.
|
|
|
|
Stored Values:
|
|
[theIP](parent.hidden.clientInfo[clientNum][15])[valid IP address or range]
|
|
|
|
Next and Back:
|
|
[Next]: rzalladvqos33.htm
|
|
[Back]: rzalladvqos26.htm
|
|
END_DESCRIPTION
|
|
----------------------------------------------------------------------------
|
|
-->
|
|
|
|
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
<script language = "Javascript" src = "../rzahg/iccommon.js"></script>
|
|
<script language="Javascript" type="text/javascript">
|
|
//START NON-TRANSLATABLE
|
|
var subnettype
|
|
var myClientName
|
|
//END NON-TRANSLATABLE
|
|
|
|
|
|
|
|
var error1 = "Segment must be between 0 and 255"
|
|
var error2 = "The first segment of your IP address must be greater than 0"
|
|
var error5 = "Segements cannot be blank values and must be a positive Integer between 0 and 256"
|
|
var error6 = "The first segment must be larger than 1"
|
|
var error7 = "No segement can be greater than 255"
|
|
var error8 = "Each segment must be an integer."
|
|
var error9 = "Segements cannot be blank values and must be a positive Integer between 0 and 256"
|
|
var error10 = "The first segment of an IP address must be larger than 1"
|
|
var error11 = "No segement can be greater than 255"
|
|
var error12 = "Each segment must be an integer."
|
|
var message1 = "All IP addresses";
|
|
|
|
//START NON-TRANSLATABLE
|
|
clientNum = parent.hidden.retClientNumber()
|
|
|
|
var client = true;
|
|
var ip = true;
|
|
var goodname = true;
|
|
|
|
function onBack() {
|
|
window.location = "rzalladvqos26.htm";
|
|
}
|
|
|
|
|
|
|
|
|
|
function onNext(){
|
|
var theIP="";
|
|
if (checkip()){ //check to make sure form is filled out
|
|
|
|
|
|
if ( document.allclients.radio1.checked == true ) {
|
|
theIP = message1;
|
|
}
|
|
|
|
else if ( document.clients.myradio.checked == true ) { //static ip address selected
|
|
if ( isNS && !isNS6 ) {
|
|
theIP = document.ipstatic.document.ipstaticForm.static1.value + "." + document.ipstatic.document.ipstaticForm.static2.value + "." + document.ipstatic.document.ipstaticForm.static3.value + "." + document.ipstatic.document.ipstaticForm.static4.value
|
|
}
|
|
else{theIP = document.ipstaticForm.static1.value + "." + document.ipstaticForm.static2.value + "." + document.ipstaticForm.static3.value + "." + document.ipstaticForm.static4.value
|
|
}
|
|
}
|
|
|
|
else{ //range of ips
|
|
if ( isNS && !isNS6 ) {
|
|
seg1 = document.iprange.document.iprangeForm.range1a.value + "." + document.iprange.document.iprangeForm.range1b.value + "." + document.iprange.document.iprangeForm.range1c.value + "." + document.iprange.document.iprangeForm.range1d.value
|
|
seg2 = document.iprange.document.iprangeForm.range2a.value + "." + document.iprange.document.iprangeForm.range2b.value + "." + document.iprange.document.iprangeForm.range2c.value + "." + document.iprange.document.iprangeForm.range2d.value
|
|
theIP = seg1 + "-" + seg2
|
|
}
|
|
else{
|
|
seg1 = document.iprangeForm.range1a.value + "." + document.iprangeForm.range1b.value + "." + document.iprangeForm.range1c.value + "." + document.iprangeForm.range1d.value
|
|
seg2 = document.iprangeForm.range2a.value + "." + document.iprangeForm.range2b.value + "." + document.iprangeForm.range2c.value + "." + document.iprangeForm.range2d.value
|
|
}
|
|
|
|
theIP = seg1 + "-" + seg2
|
|
|
|
}
|
|
|
|
parent.hidden.clientInfo[clientNum][15] = theIP
|
|
|
|
|
|
|
|
|
|
window.location = "rzalladvqos33.htm"; //change to the next panel
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
function clearIt(whichForm) {
|
|
if ( whichForm == 1 ) {
|
|
for ( var i=4; i<12; i++ ) {
|
|
document.clients.elements[i].value = "";
|
|
}
|
|
|
|
}
|
|
else {
|
|
for ( var i=0; i<4; i++ ) {
|
|
document.clients.elements[i].value = "";
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
function hideIt() { //hides the iprange form; called onload
|
|
MM_showHideLayers('iprange','','hide');
|
|
MM_showHideLayers('ipstatic','','hide');
|
|
|
|
|
|
}
|
|
|
|
function changeLayer(layershow,layerhide) { //switches layers by hiding them
|
|
MM_showHideLayers(layershow,'','show');
|
|
MM_showHideLayers(layerhide,'','hide');
|
|
|
|
}
|
|
|
|
function checkip() { //syntax checking on IP address
|
|
|
|
if ( document.allclients.radio1.checked == true ) {return true;}
|
|
|
|
if ( document.clients.myradio.checked == true ) { //checking single ip here
|
|
for ( var i=0; i<4; i++ ) {
|
|
|
|
if ( isNS && !isNS6 ) { //for netscrape
|
|
theSegment = document.ipstatic.document.ipstaticForm.elements[i].value
|
|
}
|
|
else{theSegment = document.ipstaticForm.elements[i].value}
|
|
|
|
// checking the segment for validity
|
|
if ( theSegment == '' || theSegment == null || isNaN(theSegment)) { //blank segments
|
|
alert(error5)
|
|
if ( isNS && !isNS6 ) {
|
|
document.ipstatic.document.ipstaticForm.elements[i].focus()
|
|
}
|
|
else {document.ipstaticForm.elements[i].focus()}
|
|
|
|
//var bad = false;
|
|
return false;
|
|
break;}
|
|
|
|
if ( i == 0 && theSegment <= 1 ) { //segment 1 is less than 0
|
|
alert(error6)
|
|
if ( isNS && !isNS6 ) {
|
|
document.ipstatic.document.ipstaticForm.elements[0].focus()
|
|
}
|
|
else{document.ipstaticForm.elements[0].focus()}
|
|
|
|
//var bad = false;
|
|
return false;
|
|
break;
|
|
|
|
}
|
|
|
|
if ( theSegment > 255 ) { //any segment is greater than 255
|
|
alert(error7)
|
|
if ( isNS && !isNS6 ) {
|
|
document.ipstatic.document.ipstaticForm.elements[i].focus()
|
|
}
|
|
else {document.ipstaticForm.elements[i].focus()}
|
|
|
|
//var bad = false;
|
|
return false;
|
|
break;
|
|
}
|
|
|
|
|
|
|
|
positive = isPosInteger(theSegment)
|
|
if ( !positive ) {
|
|
alert(error8)
|
|
if ( isNS && !isNS6 ) {
|
|
document.ipstatic.document.ipstaticForm.elements[i].focus()
|
|
}
|
|
else {document.ipstaticForm.elements[i].focus()}
|
|
|
|
//var bad = false;
|
|
return false;
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
return true;
|
|
|
|
} // done checking single IP
|
|
|
|
/************************ Checking range ************************/
|
|
|
|
else{ //check IP range for validity
|
|
|
|
for ( var i=0; i<8; i++ ) {
|
|
if ( isNS && !isNS6 ) { //for netscrape
|
|
theSegment = document.iprange.document.iprangeForm.elements[i].value
|
|
}
|
|
else{theSegment = document.iprangeForm.elements[i].value}
|
|
|
|
|
|
if ( theSegment == '' || theSegment == null || isNaN(theSegment)) { //blank segments
|
|
alert(error9)
|
|
if ( isNS && !isNS6 ) {
|
|
document.iprange.document.iprangeForm.elements[i].focus()
|
|
}
|
|
else {document.iprangeForm.elements[i].focus()}
|
|
|
|
//var bad = false;
|
|
return false;
|
|
break;}
|
|
|
|
if ( (i == 0 && theSegment <= 1) || (i == 4 && theSegment <= 1) ) { //segment 1 is less than 0
|
|
alert(error10)
|
|
if ( isNS && !isNS6 ) {
|
|
document.iprange.document.iprangeForm.elements[i].focus()
|
|
}
|
|
else{document.iprangeForm.elements[i].focus()}
|
|
|
|
//var bad = false;
|
|
return false;
|
|
break;
|
|
|
|
}
|
|
|
|
if ( theSegment > 255 ) { //any segment is greater than 255
|
|
alert(error11)
|
|
if ( isNS && !isNS6 ) {
|
|
document.iprange.document.iprangeForm.elements[i].focus()
|
|
}
|
|
else {document.iprangeForm.elements[i].focus()}
|
|
|
|
//var bad = false;
|
|
return false;
|
|
break;
|
|
}
|
|
|
|
|
|
|
|
positive = isPosInteger(theSegment) //checking for a positive integer
|
|
if ( !positive ) {
|
|
alert(error12)
|
|
if ( isNS && !isNS6 ) {
|
|
document.iprange.document.iprangeForm.elements[i].focus()
|
|
}
|
|
else {document.iprangeForm.elements[i].focus()}
|
|
|
|
//var bad = false;
|
|
return false;
|
|
break;
|
|
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
function isPosInteger(theSegment) { //checking for positive integer
|
|
|
|
theSegement = theSegment.toString();
|
|
|
|
for ( var i=0; i<theSegment.length; i++ ) {
|
|
var onechar = theSegment.charAt(i)
|
|
if ( onechar < "0" || onechar > "9" ) {
|
|
return false;
|
|
}
|
|
|
|
|
|
}
|
|
return true;
|
|
}
|
|
|
|
//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 restoreValues() {
|
|
//Is the hidden frame already loaded with the correct html?
|
|
if (parentUrl != "rzalladvqoswelcome.htm") {
|
|
window.location = "rzalladvqoswelcome.htm"; //load advisor 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 != "rzalladvqoshidden.htm") {
|
|
//Correct HTML not loaded, load it
|
|
parent.hidden.window.location = "rzalladvqoshidden.htm";
|
|
} else { //already loaded
|
|
restoreValues2();
|
|
}
|
|
}
|
|
}
|
|
|
|
function restoreValues2() {
|
|
|
|
clearIPFields();
|
|
var segmentNum = 0
|
|
var segment = ''
|
|
|
|
|
|
|
|
prevIP = parent.hidden.clientInfo[clientNum][15]
|
|
|
|
|
|
|
|
if ( prevIP != '') {
|
|
//staticIP = isStatic(prevIP) //does the IP address have a '-' in it?
|
|
kindIP = iptype(prevIP)
|
|
|
|
if ( kindIP == "all" ) {
|
|
document.allclients.radio1.checked = true;
|
|
|
|
}
|
|
|
|
else if ( kindIP == "static") { //dealing with a static ip here
|
|
var count = 0;
|
|
changeLayer('ipstatic','iprange');document.clients.myradio.checked = true;document.clients2.radio2.checked = false;document.allclients.radio1.checked = false;
|
|
while ( count != prevIP.length ) {
|
|
var onechar = prevIP.charAt(count)
|
|
if ( onechar != '.' ) {
|
|
if ( isNS && !isNS6 ) {
|
|
document.ipstatic.document.ipstaticForm.elements[segmentNum].value = document.ipstatic.document.ipstaticForm.elements[segmentNum].value + onechar
|
|
}
|
|
else{document.ipstaticForm.elements[segmentNum].value = document.ipstaticForm.elements[segmentNum].value + onechar}
|
|
}
|
|
else {segmentNum++}
|
|
count++;
|
|
}
|
|
}
|
|
|
|
|
|
else { //dealing with an ip range here
|
|
|
|
var count = 0;
|
|
changeLayer('iprange','ipstatic');document.clients.myradio.checked = false;document.clients2.radio2.checked = true;document.allclients.radio1.checked = false;
|
|
|
|
while ( count != prevIP.length ) {
|
|
var onechar = prevIP.charAt(count)
|
|
if ( onechar != '.' && onechar != '-' ) {
|
|
if ( isNS && !isNS6 ) {
|
|
document.iprange.document.iprangeForm.elements[segmentNum].value = document.iprange.document.iprangeForm.elements[segmentNum].value + onechar
|
|
}
|
|
else{document.iprangeForm.elements[segmentNum].value = document.iprangeForm.elements[segmentNum].value + onechar}
|
|
}
|
|
else {segmentNum++}
|
|
count++;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
function isStatic(prevIP) {
|
|
|
|
dash = prevIP.indexOf('-')
|
|
if ( dash >= 0 ) {
|
|
return false;
|
|
}
|
|
else {return true;}
|
|
|
|
}
|
|
|
|
function iptype(prevIP) {
|
|
dash = prevIP.indexOf('-')
|
|
if ( dash >= 0 ) {
|
|
return "range";
|
|
}
|
|
else if ( prevIP.indexOf('.') >= 0 ) {
|
|
return "static";
|
|
}
|
|
else {return "all";}
|
|
|
|
}
|
|
|
|
|
|
|
|
function clearIPFields() {
|
|
|
|
//clear static fields
|
|
for ( var i=0; i<4; i++ ) {
|
|
if ( isNS && !isNS6 ) {
|
|
document.ipstatic.document.ipstaticForm.elements[i].value = ''
|
|
}
|
|
else{document.ipstaticForm.elements[i].value = ''
|
|
}
|
|
}
|
|
|
|
|
|
//clear range fields
|
|
|
|
for ( var i=0; i<8; i++ ) {
|
|
if ( isNS && !isNS6 ) {
|
|
document.iprange.document.iprangeForm.elements[i].value = ''
|
|
}
|
|
else{document.iprangeForm.elements[i].value = ''}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
//END NON-TRANSLATABLE
|
|
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
|
|
<BODY onload="hideIt();restoreValues()">
|
|
<h2>QoS planning advisor: Server-side interface </h2>
|
|
<P>Selecting an interface is the second part to defining an application. The interface is the server side or local IP address from which you want to restrict applications. </p>
|
|
<p>Define the local interface on which this policy will restrict traffic.</p>
|
|
<form name="allclients">
|
|
<input type="radio" name="radio1" id="myradio1" onClick="document.clients2.radio2.checked = false;document.clients.myradio.checked = false;hideIt();" checked>
|
|
<b><label for="myradio1">Any IP address</label></b><br>
|
|
</form>
|
|
|
|
<form name="clients">
|
|
<input type="radio" name="myradio" id="myradio2" onClick="changeLayer('ipstatic','iprange');document.clients2.radio2.checked = false; document.allclients.radio1.checked = false">
|
|
<b><label for="myradio2">IP address</label></b><br>
|
|
</form>
|
|
|
|
<div id="ipstatic" style="position:relative;" >
|
|
<form name="ipstaticForm">
|
|
|
|
|
|
<input type="text" name="static1" id="myradio2" size="3" maxlength="3">
|
|
.
|
|
<INPUT TYPE="text" SIZE=3 MAXLENGTH=3 NAME="static2" id="myradio2">
|
|
. <INPUT TYPE="text" SIZE=3 MAXLENGTH=3 NAME="static3" id="myradio2">
|
|
. <INPUT TYPE="text" SIZE=3 MAXLENGTH=3 NAME="static4" id="myradio2">
|
|
</form>
|
|
<p>
|
|
</div>
|
|
<form name="clients2">
|
|
<input type="radio" name="radio2" id="myradio3" value="range" onClick="changeLayer('iprange','ipstatic');document.clients.myradio.checked = false; document.allclients.radio1.checked = false">
|
|
<b><label for="myradio3">IP address range</label></b>
|
|
<p>
|
|
</form>
|
|
<div id="iprange" style="position: relative;">
|
|
<form name="iprangeForm">
|
|
|
|
<INPUT TYPE="text" SIZE=3 MAXLENGTH=3 NAME="range1a" id="myradio3">
|
|
. <INPUT TYPE="text" SIZE=3 MAXLENGTH=3 NAME="range1b" id="myradio3">
|
|
. <INPUT TYPE="text" SIZE=3 MAXLENGTH=3 NAME="range1c" id="myradio3">
|
|
. <INPUT TYPE="text" SIZE=3 MAXLENGTH=3 NAME="range1d" id="myradio3">
|
|
|
|
-
|
|
|
|
<INPUT TYPE="text" SIZE=3 MAXLENGTH=3 NAME="range2a" id="myradio3">
|
|
. <INPUT TYPE="text" SIZE=3 MAXLENGTH=3 NAME="range2b" id="myradio3">
|
|
. <INPUT TYPE="text" SIZE=3 MAXLENGTH=3 NAME="range2c" id="myradio3">
|
|
. <INPUT TYPE="text" SIZE=3 MAXLENGTH=3 NAME="range2d" id="myradio3">
|
|
</form>
|
|
</div>
|
|
|
|
<form name="buttons">
|
|
<center><input name=submit type="button" value="<< Back " onClick="onBack()">
|
|
<input name=submit type="button" value=" Next >>" onClick="onNext(this.form)">
|
|
</center>
|
|
</form>
|
|
|
|
|
|
</BODY>
|
|
|
|
</html>
|
|
|