Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring CoS for GRE or IP-IP Tunnels

This topic provides an example of how to configure class of service (CoS) for GRE or IP-IP tunnels.

Requirements

No special configuration beyond device initialization is required before configuring this example.

Overview

Topology

In Figure 1, Router A acts as a tunnel ingress device. The link between interfaces ge-1/0/0 in Router A and ge-1/3/0 in Router B is the GRE or IP-IP tunnel. Router A monitors the traffic received from interface ge-1/3/0. By way of interface ge-1/0/0, Router C generates traffic to Router B.

Figure 1: CoS with a Tunnel ConfigurationCoS with a Tunnel Configuration

Configuration

To configure this example, 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 A

Router B

Router C

Configuring Router A

Procedure

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure router A:

  1. Configure the device interfaces.

  2. Configure the static routes.

  3. Apply the rewrite rule to the interface.

  4. Define the rewrite rules.

  5. Configure the firewall filter.

Results

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

If you are done configuring the device, enter commit from configuration mode.

Configuring Router B

Procedure

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure router B:

  1. Configure the device interfaces.

Results

From configuration mode, confirm your configuration by entering the show interfaces command. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

Router B

If you are done configuring the device, enter commit from configuration mode.

Configuring Router C

Procedure

Step-by-Step Procedure

To configure router C:

  1. Configure the device interfaces.

  2. Configure the static routes.

Results

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

Router C

If you are done configuring the device, enter commit from configuration mode.

Verification

To verify the configuration, run the following commands: