Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Configuring ToS Translation Tables

On the IQE 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.

On M40e, M120, M320, and T Series routers with IQE PICs, or on any system with IQ2 or Enhanced IQ2 PICs, 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. On the IQE PIC, the values configured with the translation-table statement 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.

To configure ToS translation on the IQE PIC, 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 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.

On the IQE PIC, incoming ToS bit translation is subject to the following rules:

  • Locally generated traffic is not subject to translation.
  • The to-dscp-from-dscp translation table type is not supported if an Internet precedence classifier is configured.
  • The to-inet-precedence-from-inet-precedence translation table type is not supported if a DSCP classifier is configured.
  • The to-dscp-from-dscp and to-inet-precedence-from-inet-precedence translation table types cannot be configured on the same unit.
  • The to-dscp-from-dscp and to-inet-precedence-from-inet-precedence translation table types are supported for IPv4 packets.
  • Only the to-dscp-ipv6-from-dscp-ipv6 translation table type is supported for IPv6 packets.
  • Only the to-exp-from-exp translation table type is supported for MPLS packets.

Note: Translation tables are not supported if fixed classification is configured on the logical interface.

The following example 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.

[edit class-of-service]
translation-table {to-dscp-from-dscp dscp-trans-table {to-code-point 000000 from-code-points 111111;to-code-point 000001 from-code-points 111110;to-code-point 111000 from-code-points [ 000111 100111 ];to-code-point 000111 from-code-points *;}}

You must apply the translation table to the logical interface input on the Enhanced IQ PIC:

[edit class-of-service interfaces so-1/0/0 unit 0]translation-table to-dscp-from-dscp dscp-trans-table;

A maximum of 32 distinct translation tables are supported on each IQE PIC. However, this maximum is limited by the number of classifiers configured along with translation tables because on the IQE 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;
        }
    }
}

You can issue the following operational mode commands to verify your configuration:

  • show class-of-service translation-table
  • show class-of-service interface interface-name

To verify that the correct values are configures, use the show class-of-service translation-table command. The show class-of-service translation-table command displays the code points of all translation tables configured. All values are displayed, not just those configured:

user@host> show class-of-service translation-table
Translation Table: dscp-trans-table, Translation table type: dscp-to-dscp, Index: 6761
  From Code point    To Code Point
  000000                      000111
  000001                      000111
  000010                      000111
  000011                      000111
  000100                      000111
  000101                      000111
  000110                      000111
  000111                      111000
  001000                      000111
  001001                      000111
  001010                      000111
  001011                      000111
  001100                      000111
  001101                      000111
  001110                      000111
  001111                      000111
  010000                      000111
  010001                      000111
  010010                      000111
  010011                      000111
  010100                      000111
  010101                      000111
  010110                      000111
  010111                      000111
  011000                      000111
  011001                      000111
  011010                      000111
  011011                      000111
  011100                      000111
  011101                      000111
  011110                      000111
  011111                      000111
  100000                      000111
  100001                      000111
  100010                      000111
  100011                      000111
  100100                      000111
  100101                      000111
  100110                      000111
  100111                      111000
  101000                      000111
  101001                      000111
  101010                      000111
  101011                      000111
  101100                      000111
  101101                      000111
  101110                      000111
  101111                      000111
  110000                      000111
  110001                      000111
  110010                      000111
  110011                      000111
  110100                      000111
  110101                      000111
  110110                      000111
  110111                      000111
  111000                      000111
  111001                      000111
  111010                      000111
  111011                      000111
  111100                      000111
  111101                      000111
  111110                      000001
  111111                      000000

To verify that the configured translation table is applied to the correct interface, use the show class-of-service interface interface-name command. The show class-of-service interface interface-name command displays the translation tables applied to the IQE interface:

user@host> show class-of-service interface ge-0/1/1
Physical interface: ge-0/1/1, Index: 156  From Code point    To Code Point
  Queues supported: 4, Queues in use: 4
    Scheduler map: <default>, Index: 2
    Chassis scheduler map: <default—chassis>, Index: 4
  
  Logical interface: so-2/3/0.0, Index: 68
    Object                  Name                   Type                    Index
    Rewrite                 exp-default            exp (mpls-any)             29
    Classifier              dscp-default           dscp                        7
    Classifier              exp-default            exp                        10
    Translation Table       exp—trans—table        EXP_TO_EXP              61925

ToS translation on the IQE PIC is a form of behavior aggregate (BA) classification. The IQE PIC does not support multifield classification of packets at the PIC level. For more information about multifield classification, see Multifield Classifier Overview.

Published: 2013-07-31

Supported Platforms

Published: 2013-07-31