Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring Different Queuing and Marking Defaults for Outbound Routing Engine and Distributed Protocol Handler Traffic

This example shows how to configure a supported router in an IPv4 network so that traffic generated by the Routing Engine and traffic generated by the distributed protocol handler are assigned to different non-default queues and marked with different nondefault DiffServ code point (DSCP) bits on all egress interfaces.

This configuration enables you to configure network-wide prioritization to control plane protocol hello packets and keepalive packets generated by the router. This feature is supported for egress interfaces hosted on MX Series routers, M120 routers, and Enhanced III FPCs in M320 routers.

Requirements

This example uses the following hardware and software components:

  • Two MX80 routers, R1 and R2, each with a 20-port Gigabit Ethernet MIC with SFP. The two routers are directly connected over an IPv4 network.

  • Junos OS Release 13.2 or later.

Before you configure this example, configure a Bidirectional Forwarding Detection (BFD) session from port ge-1/0/19 on Router R1 and port ge-1/1/0 on Router R2.

Overview

In this example, you configure an MX80 router in an IPv4 network so that traffic generated by the Routing Engine and traffic generated by the distributed protocol handler are assigned to different nondefault queues and marked with different nondefault DSCP bits.

  • Distributed protocol handler sourced traffic is placed in queue 7 on all egress interfaces. Of those packets, Layer 3 packets are marked at egress with DSCP bits 001010.

  • Routing Engine sourced traffic is placed in queue 6 on all egress interfaces. Of those packets, Layer 3 packets are marked at egress with DSCP bits 000011.

Because the MX80 router in this example has interfaces hosted on a 20-port Gigabit Ethernet MIC with SFP, you can override the default queuing and DSCP marking behavior of host outbound traffic by including configuration statements at the [edit class-of-service host-outbound-traffic] hierarchy level. In this example, you use the forwarding-class and dscp-code-point statements to specify the override values for traffic generated by the distributed protocol handler.

Note:

This configuration also affects traffic generated by the Routing Engine.

To configure different queuing and DSCP marking of Routing Engine sourced traffic, you must apply a second override configuration. You configure an IPv4 firewall filter that uses the forwarding-class and dscp actions to specify the override values, and you attach that filter to the egress of the router loopback address. This configuration affects the Routing Engine sourced traffic but not the distributed protocol handler sourced traffic.

Configuration

To configure different queuing and DSCP marking defaults for egress Routing Engine and distributed protocol handler traffic, perform these tasks:

CLI Quick Configuration

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

Router R1

Router R2

Configuring R1 Packet Counting

Step-by-Step Procedure

To configure Router R1 to count packets that arrive marked for the network-control forwarding class:

  1. Configure the IPv4 firewall filter term that counts packets marked for the network-control forwarding class.

  2. Configure the IPv4 firewall filter term that counts all other packets.

  3. Apply the firewall filter to all egress packets.

Configuring R2 Queuing and Re-Marking of Host Outbound Traffic

Step-by-Step Procedure

To configure Router R2 to place host outbound traffic in queue 7 and re-mark Layer 3 packets with DSCP bits 110000:

  1. Define the bfd_keepalive forwarding class and map it to queue 7.

  2. Configure the router to place distributed protocol handler sourced traffic (and also Routing Engine sourced traffic) in queue 7 on all egress interfaces.

  3. Configure the router to re-mark Layer 3 distributed protocol handler sourced traffic (and also Routing Engine sourced traffic) with DSCP bits 110000, which is compatible with ToS bits 1100 0000.

Configuring R2 Queuing and Re-Marking of Routing Engine Sourced Traffic

Step-by-Step Procedure

To configure Router R2 to place Routing Engine sourced traffic only in queue 6 and re-mark Layer 3 packets with DSCP bits 001010:

  1. Define the re_control forwarding class and map it to queue 6.

  2. Define the IPv4 firewall filter f_out_loopback that places matched packets in queue 6, re-marks matched Layer 3 packets with DSCP bits 001010, and accepts all matched packets.

  3. Attach the filter to the output of the router’s loopback address so that the filter actions apply to Routing Engine sourced traffic only.

  4. If you are done configuring the device, commit the configuration.

Results

From configuration mode, confirm your configuration by entering the show class-of-service, show firewall, show forwarding-options, and show interfaces commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

Router R1

Router R2

Verification

Before you begin verification, enable BFD sessions on both routers.

Confirm that the configuration is working properly.

Verifying the Queue Assignment of the Traffic That R1 Is Sending in the BFD Session

Purpose

Verify the class of service (CoS) forwarding class assignments and type of traffic sent from the BFD source endpoint on Router R1.

Action

From operational mode on Router R1, check that BFD packets are sent out the session endpoint on Router R1. With no CoS configuration present, the command output displays statistics about queued and transmitted traffic for the four forwarding classes and four egress queues in use.

Meaning

The statistics for egress queue 3 reflect BFD session traffic sent to Router R2.

Verifying That Router R1 Is Sending BFD Traffic

Purpose

Verify that Router R1 is sending BFD packets from its BFD session endpoint.

Action

From operational mode on Router R1, check that the count of BFD packets that R1 sends out the BFD session endpoint continues to increment.

Verifying That Router R2 Is Receiving BFD Traffic

Purpose

Verify that Router R2 is receiving BFD packets at its BFD session endpoint.

Action

From operational mode on router R2, check that the BFD session endpoint receives packets destined for the Routing Engine with DSCP bits set to 110000, the default DSCP CoS value for the network-control forwarding class. The DSCP bits 110000 map to ToS bits 1100 0000, or 0xC0.

Meaning

The example input packet entry confirms that the original packet was marked with tos 0xC0, which correlates to the default forwarding class network-control.