Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


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 device 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.

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.


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 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:

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.

To configure ToS translation on the IQE PIC, include the translation-table statement at the [edit class-of-service] hierarchy level:

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:

  1. Create and configure the translation table.
  2. Apply the translation table to the logical interface input on the Enhanced IQ PIC
  3. Verify the configuration.
    • To verify that the correct values are configured, 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:

    • 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:

  4. Save the configuration.