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
9 <link href="usr_main.css" rel="stylesheet" type="text/css">
10 <script src="usr_menus.js" type="text/javascript"></script>
11 <script src="usr_common.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">
18 setPageTitle("<%ejGetWl(wlInterface)%>");
20 var addr = '<%ejGet(wanIpAddress)%>';
21 var mask = '<%ejGet(wanSubnetMask)%>';
22 var enblAuto = '<%ejGet(enblAuto)%>';
23 var gtwyIfc = '<%ejGetOther(sysInfo, dfltGwIfc)%>';
24 if ( gtwyIfc == ' ' ) gtwyIfc = '';
25 var gtwy = '<%ejGetOther(sysInfo, dfltGw)%>';
26 if ( gtwy == ' ' ) gtwy = '';
27 var dnsAuto = '<%ejGetOther(sysInfo,dnsAuto)%>';
28 var dns1Mem = '<%ejGet(dnsPrimary)%>';
29 var dns1 = '<%ejGetOther(sysInfo, dns)%>';
30 if ( dns1 == ' ' )
32 var dns2Mem = '<%ejGet(dnsSecondary)%>';
33 var dns2 = '<%ejGetOther(sysInfo, dns2)%>';
34 if ( dns2 == ' ' )
36 var qs = '<%ejGet(quickSetup)%>';
37 var srvId = parseInt('<%ejGet(serviceId)%>');
39 function disableDnsInfo() {
40 with ( document.forms[0] ) {
41 dnsPrimary.disabled = 1;
42 dnsPrimary.value = '';
43 dnsSecondary.disabled = 1;
44 dnsSecondary.value = '';
48 function enableDnsInfo() {
49 with ( document.forms[0] ) {
50 dnsPrimary.disabled = 0;
51 dnsPrimary.value = dns1;
52 dnsSecondary.disabled = 0;
53 dnsSecondary.value = dns2;
57 function dnsClick(cb) {
58 if ( cb.checked == true )
64 function disableGwInfo() {
65 with ( document.forms[0] ) {
67 gwAddr.checked = false;
68 defaultGateway.disabled = 1;
69 defaultGateway.value = '';
71 gwIfc.checked = false;
76 function enableGwInfo() {
77 with ( document.forms[0] ) {
79 if ( isValidIpAddress(gtwy) == true ) {
80 gwAddr.checked = true;
81 defaultGateway.value = gtwy;
83 gwAddr.checked = false;
84 defaultGateway.value = '';
86 defaultGateway.disabled = 0;
91 gwIfc.checked = false;
96 function gwClick(cb) {
97 if ( cb.checked == true )
104 with ( document.forms[0] ) {
105 wanIpAddress.value = addr;
106 wanSubnetMask.value = mask;
107 if ( enblAuto == '1' ) {
114 if (dnsAuto == '1') {
125 var loc = 'natcfg2.cgi?';
127 with ( document.forms[0] ) {
128 dns1 = dnsPrimary.value;
129 dns2 = dnsSecondary.value;
130 // ipoa always uses static wan ip address
131 loc += 'enblDhcpClnt=0';
133 if ( isValidIpAddress(wanIpAddress.value) == false ) {
134 alert('WAN IP address "' + wanIpAddress.value + '" is invalid IP address.');
137 loc += '&wanIpAddress=' + wanIpAddress.value;
139 if ( isValidIpAddress(wanSubnetMask.value) == false && wanSubnetMask.value != '255.255.255.255') {
140 alert('WAN subnet mask "' + wanSubnetMask.value + '" is invalid IP address.');
143 loc += '&wanSubnetMask=' + wanSubnetMask.value;
145 if ( gw.checked == true ) {
146 if ( gwAddr.checked == false && gwIfc.checked == false ) {
147 alert('There is no selection for default gateway.');
150 if ( gwAddr.checked == true ) {
151 if ( isValidIpAddress(defaultGateway.value) == false ) {
152 alert('Remote WAN IP address "' + defaultGateway.value + '" is invalid IP address.');
155 loc += '&defaultGateway=' + defaultGateway.value;
157 loc += '&defaultGateway=0.0.0.0';
158 if ( gwIfc.checked == true ) {
159 var idx = wanIf.selectedIndex;
160 var ifc = wanIf.options[idx].value;
161 // if chosen interface is MER but does not specify static IP address then display error
162 if ( ifc.indexOf('nas_') != -1 && gwAddr.checked == false ) {
163 alert('Default gateway IP address should be specified since MER interface is selected.');
166 loc += '&wanIfName=' + ifc;
168 loc += '&wanIfName=';
169 // use static default gateway
170 loc += '&enblAuto=0';
172 loc += '&defaultGateway=0.0.0.0';
173 loc += '&wanIfName=';
174 loc += '&enblAuto=1';
176 if ( dns.checked == true ) {
178 if ( isValidIpAddress(dns1) == false ) {
179 alert('Primary DNS server "' + dnsPrimary.value + '" is invalid IP address.');
182 loc += '&dnsPrimary=' + dns1;
184 if ( dns2 != '' && dns2 != '0.0.0.0' ) {
185 if ( isValidIpAddress(dns2) == false ) {
186 alert('Secondary DNS server "' + dns2 + '" is invalid IP address.');
190 loc += '&dnsSecondary=' + dns2;
191 loc += '&dnsDynamic=0';
193 loc += '&dnsPrimary=0.0.0.0';
194 loc += '&dnsSecondary=0.0.0.0';
195 loc += '&dnsDynamic=1';
199 var code = 'location.assign("' + loc + '")';
204 var loc = 'ntwkprtcl.html';
206 var code = 'location.assign("' + loc + '")';
213 <body onload="initMenu('idMenu'); frmLoad();">
215 <script type="text/javascript">
216 writeHeader("WAN IP Settings", "<%ejGet(curUserName)%>", "<%ejGetOther(sysInfo, adslStd)%>", "<%ejGetOther(sysInfo, noBrPrtcl)%>", <%ejGetOther(sysInfo, pppIpExtension)%>, <%ejGetOther(sysInfo, enblFirewall)%>, <%ejGetOther(sysInfo, enblNat)%>, "<%ejGetWl(wlInterface)%>", <%ejGet(enblQos)%>);
220 <p>Enter information provided to you by your ISP to configure the WAN IP settings.</p>
221 <p>Notice: DHCP is not supported in IPoA mode.
222 Changing the default gateway or the DNS affects the whole system.
223 Configuring them with static values will disable the automatic assignment
224 from other WAN connection.</p>
226 <table border="0" cellpadding="0" cellspacing="0">
228 <td><label for="wanIpAddress">WAN IP address:</label></td>
229 <td><input type='text' name='wanIpAddress' id='wanIpAddress'></td>
232 <td><label for="wanSubnetMask">WAN subnet mask:</label></td>
233 <td><input type='text' name='wanSubnetMask' id='wanSubnetMask'></td>
237 <table border="0" cellpadding="0" cellspacing="0">
239 <td colspan="3"><input type="checkbox" name="gw" id="gw" onClick='gwClick(this)'> <label for="gw">Use the following default gateway:</label></td>
242 <td width="20"> </td>
243 <td><input type="checkbox" name='gwAddr' id='gwAddr'> <label for="gwAddr">Use IP address:</label></td>
244 <td><input type='text' name='defaultGateway' id='defaultGateway'></td>
247 <td width="20"> </td>
248 <td><input type="checkbox" name='gwIfc' id='gwIfc'> <label for="gwIfc">Use WAN interface:</label></td>
249 <td><select name='wanIf' id='wanIf'>
250 <script type="text/javascript">
254 var defaultInterface = '<%ejGetOther(wanInterfaceInfo, default)%>';
255 var interfaceInfo = '<%ejGetOther(wanInterfaceInfo, route)%>';
256 var interfaces = interfaceInfo.split('|');
258 if ( srvId == 0 || qs == '1' ) {
259 var defaultNames = defaultInterface.split('/');
260 document.write(" <option value='" + defaultNames[1] + "' selected>");
261 document.writeln(defaultInterface);
262 for ( i = 0; i < interfaces.length; i++ ) {
263 var names = interfaces[i].split('/');
264 document.write(" <option value='" + names[1] + "'>");
265 document.writeln(interfaces[i]);
268 for ( i = 0; i < interfaces.length; i++ ) {
269 var names = interfaces[i].split('/');
270 if ( names[1] == gtwyIfc )
271 document.write(" <option value='" + names[1] + "' selected>");
273 document.write(" <option value='" + names[1] + "'>");
274 document.writeln(interfaces[i]);
283 <table border="0" cellpadding="0" cellspacing="0">
285 <td colspan="3"><input type="checkbox" name="dns" id="dns" onClick='dnsClick(this)'><label for="dns">Use the following DNS server addresses:</label></td>
288 <td width="20"> </td>
289 <td width="140"><label for="dnsPrimary">Primary DNS server:</label></td>
290 <td><input type='text' name='dnsPrimary' id='dnsPrimary'></td>
294 <td><label for="dnsSecondary">Secondary DNS server:</label></td>
295 <td><input type='text' name='dnsSecondary' id='dnsSecondary'></td>
298 <p><input type='button' onClick='btnBack()' value='Back'> <input type='button' onClick='btnNext()' value='Next'></p>
301 <script type="text/javascript">