Configure ToS Translation Tables
On some PICs, the behavior aggregate (BA) translation tables are included for every
logical interface (unit) protocol family configured on the logical
interface. The proper default translation table is active even if you do not include
any explicit translation tables. You can display the current translation table
values with the show class-of-service classifiers command.
You can configure a physical interface (port) or logical interface (unit) with up to three translation tables. For example, you can configure a port or unit with BA classification for IPv4 DSCP, IPv6 DSCP, and MPLS EXP. The number of frame relay data-link connection identifiers (DLCIs) (units) that you can configure on each PIC varies based on the number and type of BA classification tables configured on the interfaces.
You can replace the ToS bit value on the incoming packet header on a logical
interface with a user-defined value. The new ToS value is used for all
class-of-service processing and is applied before any other class-of-service or
firewall treatment of the packet. The values you configure with the
translation-table statement at the [edit
class-of-service] hierarchy level determines the new ToS bit
values.
Four types of translation tables are supported: IP precedence, IPv4 DSCP, IPv6 DSCP, and MPLS EXP. You can configure a maximum of eight tables for each supported type. If a translation table is enabled for a particular type of traffic, then behavior aggregate (BA) classification of the same type must be configured for that logical interface. In other words, if you configure an IPv4 translation table, you must configure IPv4 BA classification on the same logical interface.
The from-code-points statement establishes the values to match on
the incoming packets. The default option is used to match all
values not explicitly listed, and, as a single entry in the translation table, to
mark all incoming packets on an interface the same way. The
to-code-point statement establishes the target values for the
translation. If an incoming packet header ToS bit configuration is not covered by
the translation table list and a * option is not specified, the ToS
bits in the incoming packet header are left unchanged.
You can define many translation tables, as long as they have distinct names. You
apply a translation table to a logical interface at the [edit
class-of-service interfaces] hierarchy level. Translation tables always
translate “like to like.” For example, a translation table applied to MPLS traffic
can only translate from received EXP bit values to new EXP bit values. That is,
translation tables cannot translate (for instance) from DSCP bits to INET precedence
code points.
Incoming ToS bit translation is subject to the following rules:
-
Locally generated traffic is not subject to translation.
-
The
to-dscp-from-dscptranslation table type is not supported if an Internet precedence classifier is configured. -
The
to-inet-precedence-from-inet-precedencetranslation table type is not supported if a DSCP classifier is configured. -
The
to-dscp-from-dscpandto-inet-precedence-from-inet-precedencetranslation table types cannot be configured on the same unit. -
The
to-dscp-from-dscpandto-inet-precedence-from-inet-precedencetranslation table types are supported for IPv4 packets. -
Only the
to-dscp-ipv6-from-dscp-ipv6translation table type is supported for IPv6 packets. -
Only the
to-exp-from-exptranslation table type is supported for MPLS packets.
Translation tables are not supported if fixed classification is configured on the logical interface.
A maximum of 32 distinct translation tables are supported on each PIC. However, this
maximum is limited by the number of classifiers configured along with translation
tables because on the PIC the hardware tables are not always merged. For example, if
a translation table and a classifier are both configured on the same logical
interface (such as unit 0), there is only one hardware table and
only one table added to the 32 translation table limit. However, if the translation
table is configured on unit 0 and the classifier on
unit 1 on the same physical interface, then two hardware tables
are used and these two tables count toward the 32 maximum.
If you try to configure mutually exclusive translation tables on the same interface unit, you will get a warning message when you display or commit the configuration:
ge-0/1/1 {
unit 0 {
translation-table {
##
## Warning: to-dscp-from-dscp and to-inet-precedence-from-inet-precedence not allowed on same unit
##
to-inet-precedence-from-inet-precedence inet-trans-table;
to-dscp-from-dscp dscp-trans-table;
}
}
}ToS translation is a form of behavior aggregate (BA) classification.
To configure ToS translation , include the translation-table
statement at the [edit class-of-service] hierarchy level:
[edit class-of-service] translation-table { (to-dscp-from-dscp | to-dscp-ipv6-from-dscp-ipv6 | to-exp-from-exp | to-inet-precedence-from-inet-precedence) table-name { to-code-point value from-code-points (* | [ values ]); } }
The following example procedure translates incoming DSCP values to the new values
listed in the table. All incoming DSCP values other than 111111,
111110, 000111, and 100111
are translated to 000111: