1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3 (c) 2005 U.S. Robotics Corporation
7 <title>WAN IP Settings</title>
9 <link href="usr_layout.css" type="text/css" rel="stylesheet" /><script src="usr_layout.js" type="text/javascript"></script>
10 <link href="usr_menus_dropdown.css" rel="stylesheet" type="text/css"><script src="usr_menus_dropdown.js" type="text/javascript"></script><script src="usr_menus_build.js" type="text/javascript"></script>
11 <link href="usr_device.css" type="text/css" rel="stylesheet" /><script src="usr_device.js" type="text/javascript"></script><link href="usr_91xx.css" type="text/css" rel="stylesheet" /><script src="usr_91xx.js" type="text/javascript"></script><script src="usr_resources.js" type="text/javascript"></script>
13 <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
15 <script type="text/javascript" src="util.js"></script>
16 <script type="text/javascript">
20 var dhcpClnt = '<%ejGetJS(enblDhcpClnt)%>';
21 var addr = '<%ejGetJS(wanIpAddress)%>';
22 var mask = '<%ejGetJS(wanSubnetMask)%>';
23 var enblAuto = '<%ejGetJS(enblAuto)%>';
24 var gtwyIfc = '<%ejGetOther(sysInfo, dfltGwIfc)%>';
25 if ( gtwyIfc == ' ' ) gtwyIfc = '';
26 var gtwy = '<%ejGetOther(sysInfo, dfltGw)%>';
27 if ( gtwy == ' ' ) gtwy = '';
28 var dnsAuto = '<%ejGetOther(sysInfo,dnsAuto)%>';
29 var dns1Mem = '<%ejGetJS(dnsPrimary)%>';
30 var dns1 = '<%ejGetOther(sysInfo, dns)%>';
31 if ( dns1 == ' ' )
33 var dns2Mem = '<%ejGetJS(dnsSecondary)%>';
34 var dns2 = '<%ejGetOther(sysInfo, dns2)%>';
35 if ( dns2 == ' ' )
37 var qs = '<%ejGetJS(quickSetup)%>';
38 var srvId = parseInt('<%ejGetJS(serviceId)%>');
40 function disableDnsInfo() {
41 with ( document.forms[0] ) {
42 dnsPrimary.disabled = 1;
43 dnsPrimary.value = '';
44 dnsSecondary.disabled = 1;
45 dnsSecondary.value = '';
49 function enableDnsInfo() {
50 with ( document.forms[0] ) {
51 dnsPrimary.disabled = 0;
52 dnsPrimary.value = dns1;
53 dnsSecondary.disabled = 0;
54 dnsSecondary.value = dns2;
59 with ( document.forms[0] ) {
60 if ( dns[0].checked == true )
67 function disableGwInfo() {
68 with ( document.forms[0] ) {
70 gwAddr.checked = false;
71 defaultGateway.disabled = 1;
72 defaultGateway.value = '';
74 gwIfc.checked = false;
79 function enableGwInfo() {
80 with ( document.forms[0] ) {
83 if ( isValidIpAddress(gtwy) == true ) {
84 gwAddr.checked = true;
85 defaultGateway.value = gtwy;
87 gwAddr.checked = false;
88 defaultGateway.value = '';
90 defaultGateway.disabled = 0;
95 gwIfc.checked = false;
101 with ( document.forms[0] ) {
102 if ( gw[0].checked == true )
109 function disableWanInfo() {
110 with ( document.forms[0] ) {
111 wanIpAddress.disabled = 1;
112 wanIpAddress.value = '';
113 wanSubnetMask.disabled = 1;
114 wanSubnetMask.value = '';
118 function enableWanInfo() {
119 with ( document.forms[0] ) {
120 wanIpAddress.disabled = 0;
121 wanIpAddress.value = addr;
122 wanSubnetMask.disabled = 0;
123 wanSubnetMask.value = mask;
127 function wanClick() {
128 with ( document.forms[0] ) {
129 if ( wan[0].checked == true )
137 with ( document.forms[0] ) {
138 if ( dhcpClnt == '1' ) {
139 wan[0].checked = true;
142 wan[1].checked = true;
145 if ( enblAuto == '1' ) {
146 gw[0].checked = true;
149 gw[1].checked = true;
152 if (dnsAuto == '1') {
153 dns[0].checked = true;
156 dns[1].checked = true;
163 var loc = 'natcfg2.cgi?';
165 with ( document.forms[0] ) {
166 dns1 = dnsPrimary.value;
167 dns2 = dnsSecondary.value;
169 if ( wan[0].checked == true )
170 loc += 'enblDhcpClnt=1'; // auto WAN address
172 loc += 'enblDhcpClnt=0'; // static WAN address
173 if ( isValidIpAddress(wanIpAddress.value) == false ) {
174 alert('WAN IP address "' + wanIpAddress.value + '" is an invalid IP address.');
177 loc += '&wanIpAddress=' + wanIpAddress.value;
178 if ( isValidIpAddress(wanSubnetMask.value) == false ) {
179 alert('WAN subnet mask "' + wanSubnetMask.value + '" is an invalid IP address.');
182 loc += '&wanSubnetMask=' + wanSubnetMask.value;
185 if ( gw[0].checked == false ) {
186 if ( gwAddr.checked == false && gwIfc.checked == false ) {
187 alert('There is no selection for default gateway.');
190 if ( gwAddr.checked == true ) {
191 if ( isValidIpAddress(defaultGateway.value) == false ) {
192 alert('Remote WAN IP address "' + defaultGateway.value + '" is an invalid IP address.');
195 loc += '&defaultGateway=' + defaultGateway.value;
197 loc += '&defaultGateway=0.0.0.0';
198 if ( gwIfc.checked == true ) {
199 var idx = wanIf.selectedIndex;
200 var ifc = wanIf.options[idx].value;
201 // if chosen interface is MER but does not specify static IP address then display error
202 if ( ifc.indexOf('nas_') != -1 && gwAddr.checked == false ) {
203 alert('Default gateway IP address should be specified since MER interface is selected.');
206 loc += '&wanIfName=' + ifc;
208 loc += '&wanIfName=';
209 // use static default gateway
210 loc += '&enblAuto=0';
212 loc += '&defaultGateway=0.0.0.0';
213 loc += '&wanIfName=';
214 loc += '&enblAuto=1';
216 if ( dns[0].checked == false ) {
218 if ( isValidIpAddress(dns1) == false ) {
219 alert('Primary DNS server "' + dnsPrimary.value + '" is an invalid IP address.');
222 loc += '&dnsPrimary=' + dns1;
224 if ( dns2 != '' && dns2 != '0.0.0.0' ) {
225 if ( isValidIpAddress(dns2) == false ) {
226 alert('Secondary DNS server "' + dns2 + '" is an invalid IP address.');
230 loc += '&dnsSecondary=' + dns2;
231 loc += '&dnsDynamic=0';
233 loc += '&dnsPrimary=0.0.0.0';
234 loc += '&dnsSecondary=0.0.0.0';
235 loc += '&dnsDynamic=1';
239 var code = 'location = "' + loc + '"';
244 var loc = 'ntwkprtcl.html';
246 var code = 'location = "' + loc + '"';
254 <body onload="initMenu(); frmLoad();">
256 <script type="text/javascript">
257 writeHeader("WAN IP Settings");
261 <p>Enter information provided to you by your ISP to configure the WAN IP settings.</p>
262 <p><b>Note:</b> DHCP can be enabled for PVC in MER mode
263 if "Obtain an IP address automatically" is chosen.
264 Changing the default gateway or the DNS affects the entire network.
265 Configuring them with static values will disable the
266 automatic assignment from DHCP or another WAN connection.</p>
267 <p>If you configure a static default gateway over this PVC in MER mode, you must enter
268 the IP address of the remote gateway in the "Use IP address."
269 The "Use WAN interface" is optional.</p>
272 <input type="radio" name="wan" id="wan1" onClick='wanClick()'> <label for="wan1">Obtain an IP address automatically</label><br/>
273 <input type="radio" name="wan" id="wan2" onClick='wanClick()'> <label for="wan2">Use the following IP address:</label>
277 <td><label for="wanIpAddress">WAN IP address:</label></td>
278 <td><input type='text' name='wanIpAddress' id='wanIpAddress'></td>
281 <td><label for="wanSubnetMask">WAN subnet mask:</label></td>
282 <td><input type='text' name='wanSubnetMask' id='wanSubnetMask'></td>
287 <input type="radio" name="gw" id="gw1" onClick='gwClick()'> <label for="gw1">Obtain default gateway automatically</label><br/>
288 <input type="radio" name="gw" id="gw2" onClick='gwClick()'> <label for="gw2">Use the following default gateway:</label>
292 <td><input type="checkbox" name='gwAddr' id='gwAddr'> <label for="gwAddr">Use IP address:</label></td>
293 <td><input type='text' name='defaultGateway' id='defaultGateway'></td>
296 <td><input type="checkbox" name='gwIfc' id='gwIfc'> <label for="gwIfc">Use WAN interface:</label></td>
297 <td><select name='wanIf' id='wanIf'>
298 <script type="text/javascript">
302 var defaultInterface = '<%ejGetOther(wanInterfaceInfo, default)%>';
303 var interfaceInfo = '<%ejGetOther(wanInterfaceInfo, route)%>';
304 var interfaces = interfaceInfo.split('|');
306 if ( srvId == 0 || qs == '1' ) {
307 var defaultNames = defaultInterface.split('/');
308 document.write(" <option value='" + defaultNames[1] + "' selected>");
309 document.writeln(defaultInterface);
310 for ( i = 0; i < interfaces.length; i++ ) {
311 var names = interfaces[i].split('/');
312 document.write(" <option value='" + names[1] + "'>");
313 document.writeln(interfaces[i]);
316 for ( i = 0; i < interfaces.length; i++ ) {
317 var names = interfaces[i].split('/');
318 if ( names[1] == gtwyIfc )
319 document.write(" <option value='" + names[1] + "' selected>");
321 document.write(" <option value='" + names[1] + "'>");
322 document.writeln(interfaces[i]);
333 <input type="radio" name="dns" id="dnsP" onClick='dnsClick()'><label for="dnsP">Obtain DNS server addresses automatically</label><br>
334 <input type="radio" name="dns" id="dnsS" onClick='dnsClick()'><label for="dnsS">Use the following DNS server addresses:</label>
338 <td width="20"> </td>
339 <td><label for="dnsPrimary">Primary DNS server:</label></td>
340 <td><input type='text' name='dnsPrimary' id='dnsPrimary'></td>
344 <td><label for="dnsSecondary">Secondary DNS server:</label></td>
345 <td><input type='text' name='dnsSecondary' id='dnsSecondary'></td>
348 <p><input type='button' onClick='btnBack()' value='Back'> <input type='button' onClick='btnNext()' value='Next'></p>
351 <script type="text/javascript">