Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring Traffic Class Maps

This example shows the configuration of traffic class maps on a T4000 router with Type 5 FPC. Beginning with Junos OS Release 17.2, this example is also valid on MX Series routers with MPCs. The example is organized in the following sections:

Requirements

This example uses the following hardware and software components:

  • One T4000 router running Junos OS Release 14.2 or later

  • One customer edge (CE) router

Before you configure the traffic class maps, be sure you have:

  • Installed a Type 5 FPC in the T4000 router.

  • Connected the CE router to the T4000 router.

Overview and Topology

This example shows the configuration of traffic class maps on a T4000 router that is connected to a CE router. The topology for this example consists of a T4000 router with Type 5 FPC connected to a CE router.

Figure 1: Configuring Traffic Class Maps on T4000 Router with Type 5 FPCConfiguring Traffic Class Maps on T4000 Router with Type 5 FPC

As shown in Figure 1, the CE router forwards the traffic to interface xe-4/0/0 and xe-4/0/1 on the T4000 router.

The traffic class maps need to be configured on the T4000 router with Type 5 FPC and associated with the interface xe-4/0/0 and the interface xe-4/0/1 so that the packets can be prioritized and classified based on the user-defined configuration. When ingress oversubscription occurs, the T4000 router uses the user-defined traffic class map to process the packets.

This example shows how to create the following traffic class maps with CoS code points and associate these code points with the traffic class.

  • IPv4 precedence traffic class map with code points 000 001, 010 011, and 100 101. Map these code points to the real-time, network-control, and best-effort traffic classes, respectively.

  • MPLS EXP traffic class map with code points 000 001, 010 011, and 100 101. Map these code points to the real-time, network-control, and best-effort traffic classes, respectively.

  • IEEE 802.1 traffic class map with code points 000 001, 010 011, and 100 101. Map these code points to the real-time, network-control, and best-effort traffic classes, respectively.

  • DSCP traffic class map with code points 100001 100010 100011, 010011 010100 010101, and 101001 101010 101011. Map these code points to the real-time, network-control, and best-effort traffic classes, respectively.

  • IEEE 802.1ad traffic class map with code points 0000 0001 1000 1001, 0010 0011 1010 1011, and 0100 0101 1100 1101. Map these code points to the real-time, network-control, and best-effort traffic classes, respectively.

The traffic class maps IPv4 precedence, MPLS EXP, and IEEE 802.1 are associated with the interface xe-4/0/0. The traffic class maps DSCP and IEEE 802.1ad are associated with the interface xe-4/0/1.

Configuration

To configure the traffic class map, perform the following tasks:

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them in a text file, remove any line breaks, change any details necessary to match your network configuration, and paste the commands into the CLI at the [edit] hierarchy level.

Configuring Interfaces

Step-by-Step Procedure

Configure the interfaces. These interfaces need to be associated with traffic class maps.

  1. Configure the interface xe-4/0/0 with unit 0 as its logical interface, inet as protocol family, and 198.51.100.0/24 as the IP address.

  2. Configure the interface xe-4/0/1 with unit 0 as its logical interface, inet as protocol family, and 198.51.100.1/24 as the IP address. Also, enable the VLAN tagging and configure a VLAN ID (for example, 111) to receive and transmit VLAN-tagged frames on the interface.

Configuring Traffic Class Maps for the Code Points and Mapping the Code Points to a Traffic Class

Step-by-Step Procedure

You can prioritize and classify the traffic entering a Packet Forwarding Engine by configuring a traffic class map based on the code points and associating the map with the traffic class.

  1. Create an IPv4 precedence traffic class map inetp and map its code points 000 001, 010 011, and 100 101 to the real-time, network control, and best-effort traffic classes, respectively.

  2. Create an MPLS EXP traffic class map mpls_exp and map the code points 000 001, 010 011, and 100 101 to the real-time, network control, and best-effort traffic classes, respectively.

  3. Create a IEEE 802.1 traffic class map 802.1p and map the code points 000 001, 010 011, and 100 101 to the real-time, network control, and best-effort traffic classes, respectively.

  4. Create a DSCP traffic class map dscp_v4 and map the code points 100001 100010 100011, 010011 010100 010101, and 101001 101010 101011 to the real-time, network control, and best-effort traffic classes, respectively.

  5. Create a IEEE802.1ad traffic class map 802.1ad and map the code points 0000 0001 1000 1001,0010 0011 1010 1011, and 0100 0101 1100 1101 to the real-time, network control, and best-effort traffic classes, respectively.

Associating Interfaces with Traffic Class Maps

Step-by-Step Procedure

You need to associate the configured traffic class maps with the interfaces on which you want to prioritize and classify the input traffic.

  1. Associate the traffic class maps inetp, mpls_exp, and 802.1p with the interface xe-4/0/0.

  2. Associate the traffic class map dscp_v4 and 802.1ad with the interface xe-4/0/1.

Results

Verification

Verifying Mapping of Code Points to Input Traffic Classes

Purpose

Verify that the code points of traffic class maps are mapped to the corresponding traffic classes.

Action

In operational mode, enter the show class-of-service traffic-class-map command.

Meaning

The display output fields Traffic-class-map and Code-point type indicate the configured traffic class map and the type of code point information, respectively.

The fields Code point and Traffic class show the mapping between the code points and the traffic class.

Verifying Mapping of Interfaces to Traffic Class Maps

Purpose

Verify that the configured interfaces are mapped to the corresponding traffic class maps.

Action

In operational mode, enter the show class-of-service forwarding-table traffic-class-map mapping command.

Meaning

The output shows that:

  • Interface xe-4/0/0 is associated with the traffic class maps INET-Precedence, MPLS EXP, and IEEE-802.1.

  • Interface xe-4/0/1 is associated with the traffic class maps DSCP and IEEE-802.1AD.

Verifying Traffic Class Information on the Interface

Purpose

Verify the packet information based on the configured traffic class map.

Action

In operational mode, enter the show interfaces xe-4/0/0 extensive and show interfaces xe-4/0/1 extensive commands.

Meaning

The Preclassifier statistics field shows the information for received, transmitted, and dropped packets for each of the configured traffic class map.

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
17.2
Beginning with Junos OS Release 17.2, this example is also valid on MX Series routers with MPCs.