📄 node96.html
字号:
<html><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><!--Converted with jLaTeX2HTML 2002 (1.62) JA patch-1.4patched version by: Kenshi Muto, Debian Project.LaTeX2HTML 2002 (1.62),original version by: Nikos Drakos, CBLU, University of Leeds* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan* with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --><HTML><HEAD><TITLE>9.2.3 Policy</TITLE><META NAME="description" CONTENT="9.2.3 Policy"><META NAME="keywords" CONTENT="everything"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META NAME="Generator" CONTENT="jLaTeX2HTML v2002 JA patch-1.4"><META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"><LINK REL="STYLESHEET" HREF="everything.css" tppabs="http://www.isi.edu/nsnam/ns/doc/everything.css"><LINK REL="previous" HREF="node95.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node95.html"><LINK REL="up" HREF="node93.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node93.html"><LINK REL="next" HREF="node97.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node97.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html2777" HREF="node97.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node97.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html2771" HREF="node93.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node93.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html2767" HREF="node95.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node95.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html2773" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html2775" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html2778" HREF="node97.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node97.html">9.3 Configuration</A><B> Up:</B> <A NAME="tex2html2772" HREF="node93.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node93.html">9.2 Implementation</A><B> Previous:</B> <A NAME="tex2html2768" HREF="node95.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node95.html">9.2.2 Edge and core</A>   <B> <A NAME="tex2html2774" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html2776" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H2><A NAME="SECTION03623000000000000000"></A>
<A NAME="sec:dspolicy"></A><BR>9.2.3 Policy</H2>
Class <TT>Policy</TT> and its sub-classes (see <TT>dsPolicy.{cc, h}</TT>)
define the policies used by edge routers to mark incoming packets.
A policy is established between a source and destination node.
All flows matching that source-destination pair are
treated as a single traffic aggregate.
Policy for each different traffic aggregate has
an associated policer type, meter type, and initial code point.
The meter type specifies the method for measuring the state variables
needed by the policer.
For example,
the TSW Tagger is a meter that measures the average traffic rate,
using a specified time window.
When a packet arrives at an edge router,
it is examined to determine to which aggregate it belongs.
The meter specified by the corresponding policy is invoked to
update all state variables.
The policer is invoked to determine how to mark the packet
depending on the aggregate's state variables:
the specified initial code point or
a downgraded code point.
Then the packet is enqueued accordingly.
Currently, six different policy models are defined:<OL><LI>Time Sliding Window with 2 Color Marking (TSW2CMPolicer):
uses a CIR and two drop precedences.
The lower precedence is used probabilistically when the CIR is exceeded.
</LI><LI>Time Sliding Window with 3 Color Marking (TSW3CMPolicer):
uses a CIR, a PIR, and three drop precedences.
The medium drop precedence is used probabilistically
when the CIR is exceeded and the lowest drop precedence is used
probabilistic ally when the PIR is exceeded.
</LI><LI>Token Bucket (tokenBucketPolicer):
uses a CIR and a CBS and two drop precedences.
An arriving packet is marked with the lower precedence if and
only if it is larger than the token bucket.
</LI><LI>Single Rate Three Color Marker (srTCMPolicer):
uses a CIR, CBS, and an EBS to choose from three drop precedences.
</LI><LI>Two Rate Three Color Marker (trTCMPolicer):
uses a CIR, CBS, PIR, and a PBS to choose from three drop precedences.
</LI></OL>
The policies above are defined as a sub-classes of <TT>dsPolicy</TT>.
The specific meter and policer are implemented in functions
<TT>applyMeter</TT> and <TT>applyPolicer</TT>,
which are defined as virtual functions in class <TT>dsPolicy</TT>.
User specified policy can be added in the similar way.
Please refer to <TT>DumbPolicy</TT> as the simplest example.
All policies are stored in the policy table in class <TT>PolicyClassifier</TT>.
This table is an array that includes fields for
the source and destination nodes,
a policer type, a meter type,
an initial code point, and various state information as shown below:
<BLOCKQUOTE>The rates CIR and PIR are specified in bits per second:
CIR: committed information rate
PIR: peak information rate
The buckets CBS, EBS, and PBS are specified in bytes:
CBS: committed burst size
EBS: excess burst size
PBS: peak burst size
C bucket: current size of the committed bucket
E bucket: current size of the excess bucket
P bucket: current size of the peak bucket
Arrival time of last packet
Average sending rate
TSW window length</BLOCKQUOTE>
Class <TT>PolicyClassifier</TT> also contains a Policer Table to
store the mappings from a policy type and initial code point pair to
its associated downgraded code point(s).
<HR><!--Navigation Panel--><A NAME="tex2html2777" HREF="node97.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node97.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html2771" HREF="node93.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node93.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html2767" HREF="node95.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node95.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html2773" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html2775" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html2778" HREF="node97.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node97.html">9.3 Configuration</A><B> Up:</B> <A NAME="tex2html2772" HREF="node93.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node93.html">9.2 Implementation</A><B> Previous:</B> <A NAME="tex2html2768" HREF="node95.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node95.html">9.2.2 Edge and core</A>   <B> <A NAME="tex2html2774" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html2776" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <!--End of Navigation Panel--><ADDRESS>2003-09-23</ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -