3 <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
4 <link rel="stylesheet" href='stylemain.css' type='text/css'>
5 <link rel="stylesheet" href='colors.css' type='text/css'>
6 <script language="javascript" src="util.js"></script>
7 <script language="javascript">
11 with ( document.forms[0] ) {
19 var loc = 'rtroutecfg.cmd?action=add';
20 with ( document.forms[0] ) {
21 if ( isValidIpAddress(dstAddr.value) == false ) {
22 alert('Destination "' + dstAddr.value + '" has invalid IP address.');
25 if ( isValidIpAddress(dstMask.value) == false && dstMask.value != '255.255.255.255') {
26 alert('Subnet mask "' + dstMask.value + '" has invalid IP address.');
29 loc += '&dstAddr=' + dstAddr.value;
30 loc += '&dstMask=' + dstMask.value;
31 if (gwStr.checked == false && ifStr.checked == false) {
32 alert('Need to select "Use Gateway IP Address" and/or "Use Interface".');
35 if (gwStr.checked == true) {
36 if ( isValidIpAddress(dstGtwy.value) == false ) {
37 alert('Default gateway "' + dstGtwy.value + '" has invalid IP address.');
40 loc += '&dstGtwy=' + dstGtwy.value;
42 loc += '&dstGtwy=' + '0.0.0.0';
43 if (ifStr.checked == true) {
44 var idx = dstWanIf.selectedIndex;
45 var ifc = dstWanIf.options[idx].value;
46 // if chosen interface is MER but does not specify static IP address then display error
47 if ( ifc.indexOf('nas_') != -1 && gwStr.checked == false ) {
48 alert('Gateway IP address should be specified since MER interface is selected.');
51 loc += '&dstWanIf=' + ifc;
54 loc += '&dstWanIf=' + '';
56 var code = 'location="' + loc + '"';
66 <b>Routing -- Static Route Add</b><br>
68 Enter the destination network address, subnet mask, gateway AND/OR available
69 WAN interface then click "Save/Apply" to add the entry to the routing table.<br>
72 <table border="0" cellpadding="0" cellspacing="0">
74 <td width="180">Destination Network Address:</td>
75 <td><input type='text' name='dstAddr'></td>
79 <td><input type='text' name='dstMask'></td>
85 <td><input type="checkbox" name='gwStr'> Use Gateway IP Address </td>
86 <td><input type='text' name='dstGtwy'></td>
89 <td><input type="checkbox" name='ifStr' checked> Use Interface</td>
90 <td><select name='dstWanIf'>
91 <script language="javascript">
95 var interfaceInfo = '<%ejGetOther(wanInterfaceInfo, route)%>';
96 var interfaces = interfaceInfo.split('|');
98 for ( i = 0; i < interfaces.length; i++ ) {
99 var names = interfaces[i].split('/');
100 document.write(" <option value='" + names[1] + "'>");
101 document.writeln(interfaces[i]);
103 document.writeln(" <option value='br0'> LAN/br0");
112 <input type='button' onClick='btnApply()' value='Save/Apply'>