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>Device Setup</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">
21 var dhcpStart = '<%ejGetJS(dhcpEthStart)%>';
22 var dhcpEnd = '<%ejGetJS(dhcpEthEnd)%>';
23 var dhcpLease = '<%ejGetJS(dhcpLeasedTime)%>';
24 var nat = '<%ejGetJS(enblNat)%>';
25 var prtcl = '<%ejGetOther(memInfo, ntwkPrtcl)%>';
26 var ipExtension = '<%ejGetJS(pppIpExtension)%>';
27 var dhcpEnbl = '<%ejGetJS(enblDhcpSrv)%>';
28 var natEnbl = '<%ejGetOther(sysInfo, enblNat)%>';
31 function hideDhcpInfo(hide) {
32 var status = 'visible';
36 if (document.getElementById) // DOM3 = IE5, NS6
37 document.getElementById('dhcpInfo').style.visibility = status;
39 if (document.layers == false) // IE4
40 document.all.dhcpInfo.style.visibility = status;
44 function disableDhcpSrv() {
45 with ( document.forms[0] ) {
46 dhcpSrvType[1].checked = false;
47 dhcpEthStart.disabled = 1;
48 dhcpEthEnd.disabled = 1;
49 dhcpLeasedTime.value = '';
50 dhcpLeasedTime.disabled = 1;
54 function hideRelayInfo(hide) {
55 var status = 'visible';
59 if (document.getElementById) // DOM3 = IE5, NS6
60 document.getElementById('relayInfo').style.visibility = status;
62 if (document.layers == false) // IE4
63 document.all.relayInfo.style.visibility = status;
67 function enableDhcpSrv(formLoad) {
68 with ( document.forms[0] ) {
69 dhcpSrvType[1].checked = true;
70 dhcpEthStart.disabled = 0;
71 dhcpEthEnd.disabled = 0;
73 setDhcpAddresses(ethIpAddress.value);
75 dhcpEthStart.value = dhcpStart;
76 dhcpEthEnd.value = dhcpEnd;
78 dhcpLeasedTime.value = dhcpLease;
79 dhcpLeasedTime.disabled = 0;
83 function disableDhcpSrvRelay() {
84 with ( document.forms[0] ) {
85 dhcpSrvType[2].checked = false;
86 dhcpSrvAddr.disabled = 1;
90 function enableDhcpSrvRelay() {
91 with ( document.forms[0] ) {
92 dhcpSrvType[2].checked = true;
93 if (dhcpEthStart.value != "")
94 dhcpSrvAddr.value = dhcpEthStart.value;
96 dhcpSrvAddr.value = dhcpStart;
97 dhcpSrvAddr.disabled = 0;
101 function typeClick() {
102 with ( document.forms[0] ) {
103 // if any protocol has NAT enabled then
104 // don't show DHCP relay
105 if ( nat == '1' || natEnbl == '1' ) {
106 if ( dhcpSrvType[0].checked == true )
111 if ( dhcpSrvType[0].checked == true ) {
113 disableDhcpSrvRelay();
114 } else if ( dhcpSrvType[1].checked == true ) {
116 disableDhcpSrvRelay();
118 enableDhcpSrvRelay();
126 with ( document.forms[0] ) {
127 ethIpAddress.value = '<%ejGetJS(ethIpAddress)%>';
128 ethSubnetMask.value = '<%ejGetJS(ethSubnetMask)%>';
130 if ( prtcl == 'Bridge' ) {
132 } else if ( (ipExtension == '1') &&
133 ((prtcl == 'PPPoE') || (prtcl == 'PPPoA')) ) {
137 // if any protocol has NAT enabled then
138 // don't show DHCP relay
139 if ( nat == '1' || natEnbl == '1' ) {
141 if ( dhcpEnbl == '1' )
144 dhcpSrvType[0].checked = true;
149 if ( dhcpEnbl == '1' ) {
151 disableDhcpSrvRelay();
152 } else if ( dhcpEnbl == '2' ) {
153 enableDhcpSrvRelay();
156 dhcpSrvType[0].checked = true;
158 disableDhcpSrvRelay();
161 lan2IpAddress.value = '<%ejGetJS(lan2IpAddress)%>';
162 lan2SubnetMask.value = '<%ejGetJS(lan2SubnetMask)%>';
163 if ('<%ejGetJS(enblLan2)%>' == '1') {
164 enblLan2.checked = true;
167 enblLan2.checked = false;
174 function hideLan2Info(hide) {
175 var status = 'visible';
179 if (document.getElementById) // DOM3 = IE5, NS6
180 document.getElementById('lan2Info').style.visibility = status;
182 if (document.layers == false) // IE4
183 document.all.lan2Info.style.visibility = status;
187 function lan2CbClick(cb) {
188 if ( cb.checked == true )
195 var ifc = '<%ejGetWlJS(wlInterface)%>';
199 loc = 'wlsetup.cgi?';
201 loc = 'ntwksum2.cgi?';
203 with ( document.forms[0] ) {
204 if ( isValidIpAddress(ethIpAddress.value) == false ) {
205 alert('Address "' + ethIpAddress.value + '" is invalid IP address.');
208 if ( isValidIpAddress(ethSubnetMask.value) == false ) {
209 alert('Subnet mask "' + ethSubnetMask.value + '" has invalid IP address.');
212 loc += 'ethIpAddress=' + ethIpAddress.value;
213 loc += 'ðSubnetMask=' + ethSubnetMask.value;
215 if ( dhcpSrvType[1].checked == true ) {
216 if ( isValidIpAddress(dhcpEthStart.value) == false ) {
217 alert('Start IP address "' + dhcpEthStart.value + '" is invalid IP address.');
220 if ( isValidIpAddress(dhcpEthEnd.value) == false ) {
221 alert('Stop IP address "' + dhcpEthEnd.value + '" is invalid IP address.');
224 if ( isNaN(dhcpLeasedTime.value) == true ) {
225 alert('Leased time "' + dhcpLeasedTime.value + '" has invalid value.');
229 loc += '&dhcpEthStart=' + dhcpEthStart.value;
230 loc += '&dhcpEthEnd=' + dhcpEthEnd.value;
231 loc += '&dhcpLeasedTime=' + dhcpLeasedTime.value;
232 loc += '&enblDhcpSrv=1';
234 if ( nat == '1' || natEnbl == '1' )
235 loc += '&enblDhcpSrv=0';
237 if ( dhcpSrvType[2].checked == true ) {
238 if ( isValidIpAddress(dhcpSrvAddr.value) == false ) {
239 alert('DHCP server IP address "' + dhcpSrvAddr.value + '" is invalid IP address.');
242 loc += '&dhcpEthStart=' + dhcpSrvAddr.value;
243 loc += '&enblDhcpSrv=2';
245 loc += '&enblDhcpSrv=0';
248 if (enblLan2.checked == true) {
249 if ( isValidIpAddress(lan2IpAddress.value) == false ) {
250 alert('Address "' + lan2IpAddress.value + '" is invalid IP address.');
253 if ( isValidIpAddress(lan2SubnetMask.value) == false ) {
254 alert('Subnet mask "' + lan2SubnetMask.value + '" has invalid IP address.');
257 loc += '&enblLan2=1';
258 loc += '&lan2IpAddress=' + lan2IpAddress.value;
259 loc += '&lan2SubnetMask=' + lan2SubnetMask.value;
262 loc += '&enblLan2=0';
265 var code = 'location="' + loc + '"';
272 if ( prtcl == 'PPPoE' || prtcl == 'PPPoA' )
273 loc = 'enblservice.html';
274 else if ( prtcl == 'MER' || prtcl == 'IPoA' )
275 loc = 'natcfg2.html';
276 else if ( prtcl == 'Bridge' )
277 loc = 'enblbridge.html';
279 loc = 'ntwkprtcl.html';
281 var code = 'location="' + loc + '"';
285 function setDhcpAddresses(lanIp) {
286 with ( document.forms[0] ) {
287 if (manualMod == 1) {
288 dhcpEthStart.value = dhcpStart;
289 dhcpEthEnd.value = dhcpEnd;
292 if ( isValidIpAddress(lanIp) == false ) {
293 alert('Address "' + lanIp + '" is invalid IP address.');
296 addrParts = lanIp.split('.');
297 if ( addrParts.length != 4 )
299 t1 = parseInt(addrParts[3]) + 1;
300 if (dhcpEthStart.value != '' && t1 >= 255) {
301 alert("Last portion of IP Address has to be less than 254 for Enabled DHCP Server");
304 dhcpEthStart.value = dhcpEthEnd.value = "";
305 for (i = 0; i < 3; i++) {
306 dhcpEthStart.value = dhcpEthStart.value + addrParts[i] + ".";
307 dhcpEthEnd.value = dhcpEthEnd.value + addrParts[i] + ".";
309 dhcpEthStart.value = dhcpEthStart.value + t1;
310 dhcpEthEnd.value = dhcpEthEnd.value + 254;
314 function manualModDhcp() {
315 with ( document.forms[0] ) {
317 dhcpStart = dhcpEthStart.value;
318 dhcpEnd = dhcpEthEnd.value;
325 <base target="_self">
327 <body onload="initMenu(); frmLoad();">
329 <script type="text/javascript">
330 writeHeader("Device Setup");
334 <p>Configure the router’s IP address and subnet mask for LAN interface.</p>
336 <table border="0" cellpadding="1" cellspacing="0">
338 <td><label for="ethIpAddress">IP address:</label></td>
339 <td><input type='text' name='ethIpAddress' id='ethIpAddress' onChange="setDhcpAddresses(this.value)"></td>
342 <td><label for="ethSubnetMask">Subnet mask:</label></td>
343 <td><input type='text' name='ethSubnetMask' id='ethSubnetMask'></td>
349 <input type='radio' name='dhcpSrvType' id='dhcpSrvTypeDisable' onClick='typeClick()'> <label for="dhcpSrvTypeDisable">Disable DHCP server</label><br/>
350 <input type='radio' name='dhcpSrvType' id='dhcpSrvTypeEnable' onClick='typeClick()'> <label for="dhcpSrvTypeEnable">Enable DHCP server</label>
352 <table border="0" cellpadding="0" cellspacing="0" style="margin-left: 2em;">
354 <td><label for="dhcpEthStart">Start IP address:</label></td>
355 <td><input type='text' name='dhcpEthStart' id='dhcpEthStart' onChange='manualModDhcp()'></td>
358 <td><label for="dhcpEthEnd">End IP address:</label></td>
359 <td><input type='text' name='dhcpEthEnd' id='dhcpEthEnd' onChange='manualModDhcp()'></td>
362 <td><label for="dhcpLeasedTime">Lease time:</label></td>
363 <td><input type='text' name='dhcpLeasedTime' id='dhcpLeasedTime'> hours</td>
368 <p><input type='radio' name='dhcpSrvType' id='dhcpSrvTypeRelay' onClick='typeClick()'> <label for="dhcpSrvTypeRelay">Enable DHCP server relay</label></p>
369 <p style="margin-left: 2em;"><label for="dhcpSrvAddr">DHCP server IP address:</label> <input type='text' name='dhcpSrvAddr' id='dhcpSrvAddr'></p>
372 <p><input type='checkbox' name='enblLan2' id='enblLan2' onClick='lan2CbClick(this)'> <label for="enblLan2">Configure the second IP address and subnet mask for LAN interface</label></p>
374 <table border="0" cellpadding="0" cellspacing="0" ID="Table1" style="margin-left: 2em;">
376 <td><label for="lan2IpAddress">IP address:</label></td>
377 <td><input type='text' name='lan2IpAddress' id='lan2IpAddress' ID="Text1"></td>
380 <td><label for="lan2SubnetMask">Subnet mask:</label></td>
381 <td><input type='text' name='lan2SubnetMask' id='lan2SubnetMask' ID="Text2"></td>
386 <p><input type='button' onClick='btnBack()' value='Back'> <input type='button' onClick='btnNext()' value='Next'></p>
389 <script type="text/javascript">