www.usr.com/support/gpl/USR9108_release1.5.tar.gz
[bcm963xx.git] / userapps / broadcom / cfm / html / dnscfg.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--
3         (c) 2005 U.S. Robotics Corporation
4 -->
5 <html>
6    <head>
7         <title>Internet &raquo; DNS Server</title>
8
9         <link href="usr_main.css" rel="stylesheet" type="text/css">
10         <link href="usr_menus.css" rel="stylesheet" type="text/css"><script src="usr_menus.js" type="text/javascript"></script><script src="usr_menus_build.js" type="text/javascript"></script>
11         <script src="usr_common.js" type="text/javascript"></script>
12
13       <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
14
15    <script type="text/javascript" src="util.js"></script>
16    <script type="text/javascript">
17 <!-- hide
18
19 setPageTitle("<%ejGetWlJS(wlInterface)%>");
20
21 var state = '<%ejGetJS(dnsRefresh)%>';
22 if ( state == '1' ) {
23    var code = 'location = "dnscfg.cgi?dnsRefresh=0"';
24    eval(code);
25 }
26
27 function hideDnsInfo(hide) {
28    var status = 'visible';
29
30    if ( hide == 1 )
31       status = 'hidden';
32    if (document.getElementById)  // DOM3 = IE5, NS6
33       document.getElementById('dnsInfo').style.visibility = status;
34    else {
35       if (document.layers == false) // IE4
36          document.all.dnsInfo.style.visibility = status;
37    }
38 }
39
40
41 function dnsClick(cb) {
42    if (cb.checked == true)
43       hideDnsInfo(1);
44    else
45       hideDnsInfo(0);
46 }
47
48 function btnApply() {
49    var loc = 'dnscfg.cgi?';
50
51    with ( document.forms[0] ) {
52       if (enableAuto.checked == false) {
53          if ( isValidIpAddress(dnsPrimary.value) == false ) {
54             alert('Primary DNS "' + dnsPrimary.value + '" has invalid IP address.');
55             return;
56          }
57          loc += 'dnsPrimary=' + dnsPrimary.value;
58          if (dnsSecondary.value != '') {
59             if ( isValidIpAddress(dnsSecondary.value) == false ) {
60                alert('Secondary DNS "' + dnsSecondary.value + '" has invalid IP address.');
61                return;
62             }
63             loc += '&dnsSecondary=' + dnsSecondary.value;
64          }
65          else
66             loc += '&dnsSecondary=' + '0.0.0.0';
67          loc += '&dnsDynamic=0';
68          loc += '&dnsRefresh=1';
69       }
70       else {
71          loc += 'dnsPrimary=' + '0.0.0.0';
72          loc += '&dnsSecondary=' + '0.0.0.0';
73          loc += '&dnsDynamic=1';
74          loc += '&dnsRefresh=0';
75       }
76    }
77    var code = 'location = "' + loc + '"';
78    eval(code);
79 }
80
81
82 function frmLoad() {
83    with ( document.forms[0] ) {
84       var auto = '<%ejGetOther(sysInfo, dnsAuto)%>';
85
86       var dns1 = '<%ejGetOther(sysInfo, dns)%>';
87       if ( dns1 == '&nbsp;' ) dns1 = '';
88
89       var dns2 = '<%ejGetOther(sysInfo, dns2)%>';
90       if ( dns2 == '&nbsp;' ) dns2 = '';
91
92       if ( auto == '1' ) {
93          enableAuto.checked = true;
94             dnsPrimary.value = '';
95             dnsSecondary.value = '';
96          hideDnsInfo(1);
97       } else {
98          enableAuto.checked = false;
99          dnsPrimary.value = dns1;
100          dnsSecondary.value = dns2;
101          hideDnsInfo(0);
102       }
103    }
104 }
105
106 function btnReset() {
107    var loc = 'rebootinfo.cgi';
108
109    var code = 'location = "' + loc + '"';
110    eval(code);
111 }
112
113
114 // done hiding -->
115 </script>
116    </head>
117    <body onload="initMenu(); frmLoad();">
118
119 <script type="text/javascript">
120         writeHeader("Internet");
121 </script>
122
123
124 <h3>DNS Server</h3>
125
126 <p>If the <b>Automatically-assigned DNS</b> check box is selected, this router will accept
127 the first received DNS assignment from one of the PPPoA, PPPoE or MER/DHCP
128 enabled PVC(s) during the connection establishment. If the checkbox is
129 cleared, enter the primary and optional secondary DNS server IP addresses.
130 Press <b>Apply</b> to save it.
131 </P>
132
133 <P><b>Note:</b> If you select the <b>Automatically-assigned DNS</b> check box,
134 you must restart the router to get the automatically-assigned DNS addresses.</P>
135
136 <form>
137    <p><input type='checkbox' name='enableAuto' id='enableAuto' onclick='dnsClick(this)'> <label for="enableAuto">Automatically-assigned DNS</label></p>
138
139    <div id='dnsInfo'>
140       <table border="0">
141          <tr>
142             <td><label for="dnsPrimary">Primary DNS server:</label></td>
143             <td><input type='text' name='dnsPrimary' id='dnsPrimary'></td>
144          </tr>
145          <tr>
146             <td><label for="dnsSecondary">Secondary DNS server:</label></td>
147             <td><input type='text' name='dnsSecondary' id='dnsSecondary'></td>
148          </tr>
149       </table>
150    </div>
151
152    <p><input type='button' onClick='btnApply()' value='Apply'>
153         <input type='button' onClick='btnReset()' value='Restart'>
154    </p>
155 </form>
156
157
158 <script type="text/javascript">
159         writeFooter();
160 </script>
161
162 </body>
163 </html>