rfc3290.txt
来自「RFC 的详细文档!」· 文本 代码 · 共 1,553 行 · 第 1/5 页
TXT
1,553 行
purposes, if at all. Therefore, equivalent functional datapath
elements may be modeled at both the ingress to and egress from an
interface.
Note that it is not mandatory that each of these functional datapath
elements be implemented at both ingress and egress; equally, the
model allows that multiple sets of these elements may be placed in
series and/or in parallel at ingress or at egress. The arrangement
of elements is dependent on the service requirements on a particular
interface on a particular router. By modeling these elements at both
ingress and egress, it is not implied that they must be implemented
in this way in a specific router. For example, a router may
implement all shaping and PHB queuing at the interface egress or may
instead implement it only at the ingress. Furthermore, the
classification needed to map a packet to an egress queue (if present)
need not be implemented at the egress but instead might be
implemented at the ingress, with the packet passed through the
routing core with in-band control information to allow for egress
queue selection.
Specifically, some interfaces will be at the outer "edge" and some
will be towards the "core" of the Diffserv domain. It is to be
expected (from the general principles guiding the motivation of
Diffserv) that "edge" interfaces, or at least the routers that
contain them, will implement more complexity and require more
configuration than those in the core although this is obviously not a
requirement.
3.3. Shaping and Policing
Diffserv nodes may apply shaping, policing and/or marking to traffic
streams that exceed the bounds of their TCS in order to prevent one
traffic stream from seizing more than its share of resources from a
Diffserv network. In this model, Shaping, sometimes considered as a
TC action, is treated as a function of queuing elements - see section
7. Algorithmic Dropping techniques (e.g., RED) are similarly treated
since they are often closely associated with queues. Policing is
modeled as either a concatenation of a Meter with an Absolute Dropper
or as a concatenation of an Algorithmic Dropper with a Scheduler.
These elements will discard packets which exceed the TCS.
3.4. Hierarchical View of the Model
From a device-level configuration management perspective, the
following hierarchy exists:
Bernet, et. al. Informational [Page 12]
RFC 3290 Diffserv Informal Management Model May 2002
At the lowest level considered here, there are individual
functional datapath elements, each with their own configuration
parameters and management counters and flags.
At the next level, the network administrator manages groupings of
these functional datapath elements interconnected in a DAG. These
functional datapath elements are organized in self-contained TCBs
which are used to implement some desired network policy (see
Section 8). One or more TCBs may be instantiated at each
interface's ingress or egress; they may be connected in series
and/or in parallel configurations on the multiple outputs of a
preceding TCB. A TCB can be thought of as a "black box" with one
input and one or more outputs (in the data path). Each interface
may have a different TCB configuration and each direction (ingress
or egress) may too.
At the topmost level considered here, the network administrator
manages interfaces. Each interface has ingress and egress
functionality, with each of these expressed as one or more TCBs.
This level of the hierarchy is what was illustrated in Figure 2.
Further levels may be built on top of this hierarchy, in particular
ones for aiding in the repetitive configuration tasks likely for
routers with many interfaces: some such "template" tools for Diffserv
routers are outside the scope of this model but are under study by
other working groups within IETF.
4. Classifiers
4.1. Definition
Classification is performed by a classifier element. Classifiers are
1:N (fan-out) devices: they take a single traffic stream as input and
generate N logically separate traffic streams as output. Classifiers
are parameterized by filters and output streams. Packets from the
input stream are sorted into various output streams by filters which
match the contents of the packet or possibly match other attributes
associated with the packet. Various types of classifiers using
different filters are described in the following sections. Figure 3
illustrates a classifier, where the outputs connect to succeeding
functional datapath elements.
The simplest possible Classifier element is one that matches all
packets that are applied at its input. In this case, the Classifier
element is just a no-op and may be omitted.
Bernet, et. al. Informational [Page 13]
RFC 3290 Diffserv Informal Management Model May 2002
Note that we allow a Multiplexor (see Section 6.5) before the
Classifier to allow input from multiple traffic streams. For
example, if traffic streams originating from multiple ingress
interfaces feed through a single Classifier then the interface number
could be one of the packet classification keys used by the
Classifier. This optimization may be important for scalability in
the management plane. Classifiers may also be cascaded in sequence
to perform more complex lookup operations whilst still maintaining
such scalability.
Another example of a packet attribute could be an integer
representing the BGP community string associated with the packet's
best-matching route. Other contextual information may also be used
by a Classifier (e.g., knowledge that a particular interface faces a
Diffserv domain or a legacy IP TOS domain [DSARCH] could be used when
determining whether a DSCP is present or not).
unclassified classified
traffic traffic
+------------+
| |--> match Filter1 --> OutputA
------->| classifier |--> match Filter2 --> OutputB
| |--> no match --> OutputC
+------------+
Figure 3. An Example Classifier
The following BA classifier separates traffic into one of three
output streams based on matching filters:
Filter Matched Output Stream
-------------- ---------------
Filter1 A
Filter2 B
no match C
Where the filters are defined to be the following BA filters
([DSARCH], Section 4.2.1):
Filter DSCP
------ ------
Filter1 101010
Filter2 111111
Filter3 ****** (wildcard)
Bernet, et. al. Informational [Page 14]
RFC 3290 Diffserv Informal Management Model May 2002
4.1.1. Filters
A filter consists of a set of conditions on the component values of a
packet's classification key (the header values, contents, and
attributes relevant for classification). In the BA classifier
example above, the classification key consists of one packet header
field, the DSCP, and both Filter1 and Filter2 specify exact-match
conditions on the value of the DSCP. Filter3 is a wildcard default
filter which matches every packet, but which is only selected in the
event that no other more specific filter matches.
In general there are a set of possible component conditions including
exact, prefix, range, masked and wildcard matches. Note that ranges
can be represented (with less efficiency) as a set of prefixes and
that prefix matches are just a special case of both masked and range
matches.
In the case of a MF classifier, the classification key consists of a
number of packet header fields. The filter may specify a different
condition for each key component, as illustrated in the example below
for a IPv4/TCP classifier:
Filter IPv4 Src Addr IPv4 Dest Addr TCP SrcPort TCP DestPort
------ ------------- -------------- ----------- ------------
Filter4 172.31.8.1/32 172.31.3.X/24 X 5003
In this example, the fourth octet of the destination IPv4 address and
the source TCP port are wildcard or "don't care".
MF classification of IP-fragmented packets is impossible if the
filter uses transport-layer port numbers (e.g., TCP port numbers).
MTU-discovery is therefore a prerequisite for proper operation of a
Diffserv network that uses such classifiers.
4.1.2. Overlapping Filters
Note that it is easy to define sets of overlapping filters in a
classifier. For example:
Filter IPv4 Src Addr IPv4 Dest Addr
------ ------------- --------------
Filter5 172.31.8.X/24 X/0
Filter6 X/0 172.30.10.1/32
A packet containing {IP Dest Addr 172.31.8.1, IP Src Addr
172.30.10.1} cannot be uniquely classified by this pair of filters
and so a precedence must be established between Filter5 and Filter6
in order to break the tie. This precedence must be established
Bernet, et. al. Informational [Page 15]
RFC 3290 Diffserv Informal Management Model May 2002
either (a) by a manager which knows that the router can accomplish
this particular ordering (e.g., by means of reported capabilities),
or (b) by the router along with a mechanism to report to a manager
which precedence is being used. Such precedence mechanisms must be
supported in any translation of this model into specific syntax for
configuration and management protocols.
As another example, one might want first to disallow certain
applications from using the network at all, or to classify some
individual traffic streams that are not Diffserv-marked. Traffic
that is not classified by those tests might then be inspected for a
DSCP. The word "then" implies sequence and this must be specified by
means of precedence.
An unambiguous classifier requires that every possible classification
key match at least one filter (possibly the wildcard default) and
that any ambiguity between overlapping filters be resolved by
precedence. Therefore, the classifiers on any given interface must
be "complete" and will often include an "everything else" filter as
the lowest precedence element in order for the result of
classification to be deterministic. Note that this completeness is
only required of the first classifier that incoming traffic will meet
as it enters an interface - subsequent classifiers on an interface
only need to handle the traffic that it is known that they will
receive.
This model of classifier operation makes the assumption that all
filters of the same precedence be applied simultaneously. Whilst
convenient from a modeling point-of-view, this may or may not be how
the classifier is actually implemented - this assumption is not
intended to dictate how the implementation actually handles this,
merely to clearly define the required end result.
4.2. Examples
4.2.1. Behavior Aggregate (BA) Classifier
The simplest Diffserv classifier is a behavior aggregate (BA)
classifier [DSARCH]. A BA classifier uses only the Diffserv
codepoint (DSCP) in a packet's IP header to determine the logical
output stream to which the packet should be directed. We allow only
an exact-match condition on this field because the assigned DSCP
values have no structure, and therefore no subset of DSCP bits are
significant.
Bernet, et. al. Informational [Page 16]
RFC 3290 Diffserv Informal Management Model May 2002
The following defines a possible BA filter:
Filter8:
Type: BA
Value: 111000
4.2.2. Multi-Field (MF) Classifier
Another type of classifier is a multi-field (MF) classifier [DSARCH].
This classifies packets based on one or more fields in the packet
(possibly including the DSCP). A common type of MF classifier is a
6-tuple classifier that classifies based on six fields from the IP
and TCP or UDP headers (destination address, source address, IP
protocol, source port, destination port, and DSCP). MF classifiers
may classify on other fields such as MAC addresses, VLAN tags, link-
layer traffic class fields, or other higher-layer protocol fields.
The following defines a possible MF filter:
Filter9:
Type: IPv4-6-tuple
IPv4DestAddrValue: 0.0.0.0
IPv4DestAddrMask: 0.0.0.0
IPv4SrcAddrValue: 172.31.8.0
IPv4SrcAddrMask: 255.255.255.0
IPv4DSCP: 28
IPv4Protocol: 6
IPv4DestL4PortMin: 0
IPv4DestL4PortMax: 65535
IPv4SrcL4PortMin: 20
IPv4SrcL4PortMax: 20
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?