www.usr.com/support/gpl/USR9113_release1.0.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>DNS Server &laquo; Internet</title>
8
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>
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
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       var dns1 = '<%ejGetOther(sysInfo, dns)%>';
86       if ( dns1 == '&nbsp;' ) dns1 = '';
87
88       var dns2 = '<%ejGetOther(sysInfo, dns2)%>';
89       if ( dns2 == '&nbsp;' ) dns2 = '';
90
91       if ( auto == '1' ) {
92          enableAuto.checked = true;
93          dnsPrimary.value = '';
94          dnsSecondary.value = '';
95          hideDnsInfo(1);
96       } else {
97          enableAuto.checked = false;
98          dnsPrimary.value = dns1;
99          dnsSecondary.value = dns2;
100          hideDnsInfo(0);
101       }
102    }
103 }
104
105 function btnReset() {
106    var loc = 'rebootinfo.cgi';
107
108    var code = 'location = "' + loc + '"';
109    eval(code);
110 }
111
112
113 // done hiding -->
114 </script>
115    </head>
116    <body onload="initMenu(); frmLoad();">
117
118 <script type="text/javascript">
119         writeHeader("Internet");
120 </script>
121
122
123 <h3>DNS Server</h3>
124
125 <p>If the <b>Automatically-assigned DNS</b> check box is selected, this router will accept
126 the first received DNS assignment from one of the PPPoA, PPPoE or MER/DHCP
127 enabled PVC(s) during the connection establishment. If the checkbox is
128 cleared, enter the primary and optional secondary DNS server IP addresses.
129 Press <b>Apply</b> to save it.
130 </P>
131
132 <P><b>Note:</b> If you select the <b>Automatically-assigned DNS</b> check box,
133 you must restart the router to get the automatically-assigned DNS addresses.</P>
134
135 <form>
136    <p><input type='checkbox' name='enableAuto' id='enableAuto' onclick='dnsClick(this)'> <label for="enableAuto">Automatically-assigned DNS</label></p>
137
138    <div id='dnsInfo'>
139       <table border="0">
140          <tr>
141             <td><label for="dnsPrimary">Primary DNS server:</label></td>
142             <td><input type='text' name='dnsPrimary' id='dnsPrimary'></td>
143          </tr>
144          <tr>
145             <td><label for="dnsSecondary">Secondary DNS server:</label></td>
146             <td><input type='text' name='dnsSecondary' id='dnsSecondary'></td>
147          </tr>
148       </table>
149    </div>
150
151    <p><input type='button' onClick='btnApply()' value='Apply'>
152         <input type='button' onClick='btnReset()' value='Restart'>
153    </p>
154 </form>
155
156
157 <script type="text/javascript">
158         writeFooter();
159 </script>
160
161 </body>
162 </html>