• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2Note all these are mere examples which can be customized to your needs
3
4AFCBQ
5-----
6AF PHB built using CBQ, DSMARK,GRED (default in GRIO mode) ,RED for BE
7and the tcindex classifier with some algorithmic mapping
8
9EFCBQ
10-----
11EF PHB built using CBQ (for rate control and prioritization),
12DSMARK( to remark DSCPs), tcindex  classifier and  RED for the BE
13traffic.
14
15EFPRIO
16------
17EF PHB using the PRIO scheduler, Token Bucket to rate control EF,
18tcindex classifier, DSMARK to remark, and RED for the BE traffic
19
20EDGE scripts
21==============
22
23CB-3(1|2)-(u32/chains)
24======================
25
26
27The major differences are that the classifier is u32 on -u32 extension
28and IPchains on the chains extension. CB stands for color Blind
29and 31 is for the mode where only a CIR and CBS are defined whereas
3032 stands for a mode where a CIR/CBS + PIR/EBS are defined.
31
32Color Blind (CB)
33==========-----=
34We look at one special subnet that we are interested in for simplicty
35reasons to demonstrate the capability. We send the packets from that
36subnet to AF4*, BE or end up dropping depending on the metering results.
37
38
39The algorithm overview is as follows:
40
41*classify:
42
43**case: subnet X
44----------------
45  if !exceed meter1 tag as AF41
46	else
47	    if !exceed meter2  tag as AF42
48	        else
49		  if !exceed meter 3 tag as AF43
50		      else
51			 drop
52
53default case: Any other subnet
54-------------------------------
55  if !exceed meter 5 tag as AF43
56      else
57	 drop
58
59
60One Egress side change the DSCPs of the packets to reflect AF4* and BE
61based on the tags from the ingress.
62
63-------------------------------------------------------------
64
65Color Aware
66===========
67
68Define some meters with + policing and give them IDs eg
69
70meter1=police index 1 rate $CIR1 burst $CBS1
71meter2=police index 2 rate $CIR2 burst $CBS2   etc
72
73General overview:
74classify based on the DSCPs and use the policer ids to decide tagging
75
76
77*classify on ingress:
78
79switch (dscp) {
80    case AF41: /* tos&0xfc == 0x88 */
81	if (!exceed meter1) break;
82    case AF42: /* tos&0xfc == 0x90 */
83	if (!exceed meter2) {
84	    tag as AF42;
85	    break;
86	}
87    case AF43: /* tos&0xfc == 0x98 */
88	if (!exceed meter3) {
89	    tag as AF43;
90	    break;
91	} else
92	  drop;
93    default:
94	if (!exceed meter4) tag as BE;
95	else drop;
96}
97
98On the Egress side mark the proper AF tags
99