3 <meta http-equiv="Pragma" content="no-cache">
4 <LINK href="stylemain.css" type="text/css" rel="stylesheet">
5 <LINK href="colors.css" type="text/css" rel="stylesheet">
6 <script language="javascript" src="util.js"></script>
7 <script language="javascript" src="portName.js"></script>
8 <script language="javascript">
10 var glbDisplayPhysicalPort = false;
12 if (document.getElementById) onload = function () {
14 for(i=0; (a = document.getElementsByTagName('tr')[i]); i++) {
15 if ((/SrcMacAddr/i.test(a.id)) ||
16 (/SrcMacMask/i.test(a.id)) ||
17 (/DstMacAddr/i.test(a.id)) ||
18 (/DstMacMask/i.test(a.id)) ||
19 (/DscpMark/i.test(a.id))) {
26 function diffServCfgCb (cb) {
28 if (cb.checked == true) {
29 for(i=0; (a = document.getElementsByTagName('tr')[i]); i++) {
30 if ((/IpPre/i.test(a.id)) ||
31 (/IpTos/i.test(a.id))) {
34 if ((/SrcMacAddr/i.test(a.id)) ||
35 (/SrcMacMask/i.test(a.id)) ||
36 (/DstMacAddr/i.test(a.id)) ||
37 (/DstMacMask/i.test(a.id)) ||
38 (/DscpMark/i.test(a.id))) {
43 for(i=0; (a = document.getElementsByTagName('tr')[i]); i++) {
44 if ((/SrcMacAddr/i.test(a.id)) ||
45 (/SrcMacMask/i.test(a.id)) ||
46 (/DstMacAddr/i.test(a.id)) ||
47 (/DstMacMask/i.test(a.id)) ||
48 (/DscpMark/i.test(a.id))) {
57 var loc = 'qoscls.cmd?action=add';
59 with ( document.forms[0] ) {
60 if ( txtclsname.value == '' ) {
61 msg = 'Please enter QoS class name.';
66 if ( isValidName(txtclsname.value) == false ) {
67 msg = 'Please enter valid QoS class name: No special characters.';
71 if (txtclsname.value.length > 15) {
72 msg = 'Maximum QoS class name cannot exceed 15 characters.';
76 idx = priority.selectedIndex;
78 msg = 'There is no selected priority.';
84 if ( srcaddr.value == "" && srcmask.value == "" && srcport.value == "" &&
85 dstaddr.value == "" && dstmask.value == "" && dstport.value == "" &&
86 vlan8021p.selectedIndex == 0 &&
87 protocol.selectedIndex == 0 && vlan8021p.selectedIndex == 0 ) {
88 if (!(glbDisplayPhysicalPort && lanIfcName.selectedIndex != 0)) {
89 msg = 'At least one condition must be specified.'
95 if ( srcaddr.value != "" && isValidIpAddress(srcaddr.value) == false ) {
96 msg = 'Source address "' + srcaddr.value + '" is invalid IP address.';
101 if ( srcmask.value != "" && isValidSubnetMask(srcmask.value) == false ) {
102 msg = 'Source subnet mask "' + srcmask.value + '" is invalid subnet mask.';
107 if ( srcaddr.value == "" && srcmask.value != "" ) {
108 msg = 'Cannot have source subnet mask without source IP address.';
113 if ( srcport.value != "" && isValidPort(srcport.value) == false ) {
114 msg = 'Source port "' + srcport.value + '" is invalid port number or port range.';
119 if ( dstaddr.value != "" && isValidIpAddress(dstaddr.value) == false ) {
120 msg = 'Destination address "' + dstaddr.value + '" is invalid IP address.';
125 if ( dstmask.value != "" && isValidSubnetMask(dstmask.value) == false ) {
126 msg = 'Destination subnet mask "' + dstmask.value + '" is invalid subnet mask.';
131 if ( dstaddr.value == "" && dstmask.value != "" ) {
132 msg = 'Cannot have destination subnet mask without destination IP address.';
137 if ( dstport.value != "" && isValidPort(dstport.value) == false ) {
138 msg = 'Destination port "' + dstport.value + '" is invalid port number or port range.';
143 if ( (srcport.value != "" || dstport.value != "") &&
144 (protocol.selectedIndex == 0 || protocol.selectedIndex == 4) ) {
145 msg = 'TCP or UDP Protocol must be selected together with port number.';
150 if ( (vlan8021p.selectedIndex != 0) &&
151 (dstaddr.value != "" || dstaddr.value != "" ||
152 srcaddr.value != "" || srcport.value != "" || protocol.selectedIndex != 0) ) {
153 msg = '802.1p Priority cannot be selected together with IP traffic condition.';
159 loc += '&clsName=' + encodeUrl(txtclsname.value);
162 idx = priority.selectedIndex;
163 val = priority.options[idx].value;
164 loc += '&priority=' + val;
166 // Check if the DiffServ configuration is enabled
167 if (enblDiffServCb.checked == false) {
168 // IP precedence bits
169 idx = precedence.selectedIndex;
170 val = precedence.options[idx].value;
171 loc += '&precedence=' + val;
173 // IP type of service bits
174 idx = tos.selectedIndex;
175 val = tos.options[idx].value;
176 loc += '&tos=' + val;
178 idx = dscp.selectedIndex;
180 loc += '&dscpMark=' + dscp.options[idx].value;
184 // physical lan port ifc name
185 if (glbDisplayPhysicalPort)
186 loc += '&lanIfcName=' + lanIfcName.options[lanIfcName.selectedIndex].value;;
188 idx = protocol.selectedIndex;
189 val = protocol.options[idx].value;
190 loc += '&protocol=' + val;
193 if ( srcaddr.value != "" )
194 loc += '&srcAddr=' + srcaddr.value;
196 // source subnet mask
197 if ( srcmask.value != "" )
198 loc += '&srcMask=' + srcmask.value;
201 if ( srcport.value != "" )
202 loc += '&srcPort=' + srcport.value;
204 // destination address
205 if ( dstaddr.value != "" )
206 loc += '&dstAddr=' + dstaddr.value;
208 // destination subnet mask
209 if ( dstaddr.value != "" )
210 loc += '&dstMask=' + dstmask.value;
213 if ( dstport.value != "" )
214 loc += '&dstPort=' + dstport.value;
216 // DiffServ configuration
217 if ( enblDiffServCb.checked == true ) {
218 loc += '&diffServCfg=' + 3;
220 loc += '&diffServCfg=' + 0;
223 // source MAC address
224 if ( srcmacaddr.value != "" )
225 loc += '&srcMacAddr=' + srcmacaddr.value;
227 // destination MAC address
228 if ( dstmacaddr.value != "" )
229 loc += '&dstMacAddr=' + dstmacaddr.value;
232 if ( srcmacmask.value != "" )
233 loc += '&srcMacMask=' + srcmacmask.value;
235 // destination MAC mask
236 if ( dstmacmask.value != "" )
237 loc += '&dstMacMask=' + dstmacmask.value;
239 // Check if DiffServ configuration is enabled
240 //if (enblDiffServCb.checked == false) {
241 // VLAN 802.1p priority
242 idx = vlan8021p.selectedIndex;
243 val = vlan8021p.options[idx].value;
244 loc += '&vlan8021p=' + val;
246 // WAN 802.1p priority
247 idx = wanVlan8021p.selectedIndex;
248 val = wanVlan8021p.options[idx].value;
249 loc += '&wanVlan8021p=' + val;
252 var code = 'location="' + loc + '"';
263 <b>Add Network Traffic Class Rule</b><br>
265 The screen creates a traffic class rule to classify the upstream traffic,
266 assign queuing priority and optionally overwrite the IP header TOS byte. A rule
267 consists of a class name and at least one condition below. All of the specified
268 conditions in this classification rule must be satisfied for the rule to take
269 effect. Click 'Save/Apply' to save and activate the rule.
271 <p>Traffic Class Name: <input type="text" size="22" name="txtclsname"></p>
273 <input type="checkbox" name="enblDiffServCb" onClick="diffServCfgCb(this)">
274 Enable Differentiated Service Configuration
276 <b>Assign ATM Priority and/or IP Precedence and/or Type Of Service
277 for the class</b><br>
278 If non-blank value is selected for 'Mark IP Precedence' and/or
279 'Mark IP Type Of Service', the correcponding TOS byte in the IP
280 header of the upstream packet is overwritten by the selected value.
282 <b>Note: If Differentiated Service Configuration checkbox is selected,
283 you will only need to assign ATM priority. IP Precedence will not
284 be used for classification. IP TOS byte will be used for DSCP mark.
287 <table id="qosCls" cellSpacing="0" cellPadding="0" border="0">
288 <tr id="tblItmAtmPrio">
289 <td width="350">Assign ATM Transmit Priority:
291 <td> <select size="1" name="priority">
292 <option value="0" selected>
293
294
295
296
298 Low<option value="2">
299 Medium<option value="3">
304 <tr id="tblItmDscpMark">
305 <td width="350">Assign Differentiated Services Code Point (DSCP) Mark:
307 <td> <select size="1" name="dscp">
308 <option value="0" selected>
309
310
311
312
314 default(000000)<option value="56">
315 AF13(001110)<option value="48">
316 AF12(001010)<option value="40">
317 AF11(001001)<option value="32">
318 CS1(001000)<option value="88">
319 AF23(010110)<option value="80">
320 AF22(010010)<option value="72">
321 AF21(010001)<option value="64">
322 CS2(010000)<option value="120">
323 AF33(011110)<option value="112">
324 AF32(011010)<option value="104">
325 AF31(011001)<option value="96">
326 CS3(011000)<option value="152">
327 AF43(100110)<option value="144">
328 AF42(100010)<option value="136">
329 AF41(100001)<option value="128">
330 CS4(100000)<option value="184">
331 EF(101110)<option value="160">
332 CS5(101000)<option value="192">
333 CS6(110000)<option value="224">
338 <tr id="tblItmIpPre">
339 <td width="350">Mark IP Precedence:
341 <td> <select size="1" name="precedence">
342 <option value="-1" selected>
343
344
345
346
359 <tr id="tblItmIpTos">
360 <td width="350">Mark IP Type Of Service:
362 <td> <select size="1" name="tos">
363 <option value="-1" selected>
364
365
366
367
369 Normal Service<option value="2">
370 Minimize Cost<option value="4">
371 Maximize Reliability<option value="8">
372 Maximize Throughput<option value="16">
373 Minimize Delay</option>
377 <tr id="tblItmDot1p">
378 <td width="350">Mark 802.1p if 802.1q is enabled on WAN:
380 <td><select size="1" name="wanVlan8021p">
381 <option value="-1" selected>
382
383
384
385
399 <td colspan="2">
403 <td align="left" colspan="2">
404 <p><b>Specify Traffic Classification Rules</b></P>
407 <td align="left" colspan="2">
408 <P><b>Enter the following conditions either for IP level, SET-1, or for IEEE 802.1p,
413 <td colSpan="2">
421 <script language="javascript">
425 var interfaceInfo = '';
427 var brdId = '<%ejGet(boardID)%>';
429 interfaceInfo = '<%ejGetOther(bridgeInterfaceInfo, all)%>';
430 var interfaces = interfaceInfo.split('|');
432 if (interfaces.length > 1) {
433 glbDisplayPhysicalPort = true;
434 document.writeln(" <tr>");
435 document.writeln(" <td width='350'>Physical LAN Port:");
436 document.writeln(" </td>");
437 document.writeln(" <td><select size='1' name='lanIfcName'>");
438 document.writeln(" <option value='' selected>");
439 document.writeln(" \
440 \
441 \
442 ");
443 var interfaces = interfaceInfo.split('|');
445 for ( i = 0; i < interfaces.length; i++ ) {
446 dispName = getUNameByLName(brdId + '|' + interfaces[i]);
447 if (dispName.indexOf('nas_') != -1)
448 continue; // skip nas_ ifc
449 if (interfaces[i] != '')
450 document.writeln(" <option value='" + interfaces[i] + "'>" + dispName);
452 document.writeln(" </select>");
453 document.writeln(" </td>");
454 document.writeln(" </tr>");
462 <td width="350">Protocol:
464 <td><select size="1" name="protocol">
465 <option value="-1" selected>
466
467
468
469
471 TCP/UDP<option value="1">
472 TCP<option value="2">
473 UDP<option value="3">
479 <td width="350">Source IP Address:
481 <td><input type="text" size="22" name="srcaddr">
485 <td width="350">Source Subnet Mask:
487 <td><input type="text" size="22" name="srcmask">
491 <td width="350">UDP/TCP Source Port (port or port:port):
493 <td><input type="text" size="22" name="srcport">
497 <td width="350">Destination IP Address:
499 <td><input type="text" size="22" name="dstaddr">
503 <td width="350">Destination Subnet Mask:
505 <td><input type="text" size="22" name="dstmask">
509 <td width="350">UDP/TCP Destination Port (port or port:port):
511 <td><input type="text" size="22" name="dstport">
514 <tr id="tblItmSrcMacAddr">
515 <td width="350">Source MAC Address:
517 <td><input type="text" size="22" name="srcmacaddr">
520 <tr id="tblItmSrcMacMask">
521 <td width="350">Source MAC Mask:
523 <td><input type="text" size="22" name="srcmacmask">
526 <tr id="tblItmDstMacAddr">
527 <td width="350">Destination MAC Address:
529 <td><input type="text" size="22" name="dstmacaddr">
532 <tr id="tblItmDstMacMask">
533 <td width="350">Destination MAC Mask:
535 <td><input type="text" size="22" name="dstmacmask">
539 <td colSpan="2">
546 <tr id="tblItmDot1p">
549 <td><select size="1" name="vlan8021p">
550 <option value="-1" selected>
551
552
553
554
570 <center><input type='button' onClick='btnApply()' value='Save/Apply'></center>