1tokenmt(7ipp) IP Quality of Service Modules tokenmt(7ipp)
2
3
4
6 tokenmt - Single and Two Rate Three Conformance Level Meter
7
9 The tokenmt module can be configured as a Single or a Two Rate meter.
10 Packets are deemed to belong to one of the three levels - Red, Yellow
11 or Green - depending on the configured rate(s) and the burst sizes.
12 When configured as a Single Rate meter, tokenmt can operate with just
13 the Green and Red levels.
14
15
16 Configuration parameters for tokenmt correspond to definitions in RFC-
17 2697 and RFC- 2698 as follows:
18
19
20 Configuring tokenmt as a Single Rate meter (from RFC- 2697):
21 committed_rate - CIR
22 committed_burst - CBS
23 peak_burst - EBS
24
25
26 (thus 'peak_burst' for a single rate meter is actually the 'excess
27 burst' in the RFC. However, throughout the text the parameter name
28 "peak burst" is used.)
29
30
31 Configuring tokenmt as a Two Rate meter (from RFC- 2698):
32 committed_rate - CIR
33 peak_rate - PIR
34 committed_burst - CBS
35 peak_burst - PBS
36
37
38 The meter is implemented using token buckets C and P, which initially
39 hold tokens equivalent to committed and peak burst sizes (bits) respec‐
40 tively. When a packet of size B bits arrive at time t, the following
41 occurs:
42
43 When operating as a Single Rate meter, the outcome (level)
44 is decided as follows:
45 - Update tokens in C and P
46 o Compute no. of tokens accumulated since the
47 last time packet was seen at the committed rate as
48 T(t) = committed rate * (t - t')
49 (where t' is the time the last packet was seen)
50 o Add T tokens to C up to a maximum of committed burst
51 size. Add remaining tokens ((C+T) - Commited Burst),
52 if any, to P, to a maximum of peak burst size.
53 - Decide outcome
54 o If not color aware
55 o If B <= C, outcome is GREEN and C -= B.
56 o Else, if B <= P, outcome is YELLOW and P -= B.
57 o Else, outcome is Red.
58 o Else,
59 o obtain DSCP from packet
60 o obtain color from color_map, color_map[DSCP]
61 o if (color is GREEN) and (B <= C), outcome is
62 GREEN and C -= B.
63 o Else, if (color is GREEN or YELLOW) and
64 (B <= P), outcome is YELLOW and P -= B.
65 o Else, outcome is RED.
66 Note that if peak_burst and yellow_next_actions are
67 not specified (that is, a single rate meter with two
68 outcomes), the outcome is never YELLOW.
69
70
71
72 When operating as a Two Rate meter, the outcome (level) is decided as
73 follows:
74
75 - Update tokens in C and P
76 o Compute no. of tokens accumulated since the last time a
77 packet was seen at the committed and peak rates as
78 Tc(t) = committed rate * (t - t')
79 Tp(t) = peak rate * (t - t')
80 (where t' is the time the last packet was seen)
81 o Add Tc to C up to a maximum of committed burst size
82 o Add Tp to P up to a maximum of peak burst size
83 - Decide outcome
84 o If not color aware
85 o If B > P, outcome is RED.
86 o Else, if B > C, outcome is YELLOW and P -= B
87 o Else, outcome is GREEN and C -= B & P -= B
88 o Else,
89 o obtain DSCP from packet
90 o obtain color from color_map, color_map[DSCP]
91 o if (color is RED) or (B > P), outcome is RED
92 o Else, if (color is YELLOW) or (B > C),
93 outcome is YELLOW and P -= B
94 o Else, outcome is GREEN and C -= B & P -= B
95
96
98 The tokenmt module exports the following statistics through kstat:
99
100
101 Global statistics:
102
103 module: tokenmt instance: <action id>
104 name: tokenmt statistics class <action name>
105 epackets <number of packets in error>
106 green_bits <number of bits in green>
107 green_packets <number of packets in green>
108 red_bits <number of bits in red>
109 red_packets <number of packets in red>
110 yellow_bits <number of bits in yellow>
111 yellow packets <number of packets in yellow>
112
113
115 /kernel/ipp/sparcv9/tokenmt
116
117 64-bit module (SPARC only.)
118
119
121 See attributes(5) for descriptions of the following attributes:
122
123
124
125
126 ┌─────────────────────────────┬─────────────────────────────┐
127 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
128 ├─────────────────────────────┼─────────────────────────────┤
129 │Availability │SUNWqos │
130 └─────────────────────────────┴─────────────────────────────┘
131
133 ipqosconf(1M), dlcosmk(7ipp), dscpmk(7ipp), flowacct(7ipp),
134 ipqos(7ipp), ipgpc(7ipp), tswtclmt(7ipp)
135
136
137 RFC 2697, A Single Rate Three Color Marker J. Heinanen, R. Guerin — The
138 Internet Society, 1999
139
140
141 RFC 2698, A Two Rate Three Color Marker J. Heinanen, R. Guerin — The
142 Internet Society, 1999
143
144
145
146SunOS 5.11 29 Sep 2004 tokenmt(7ipp)