Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Classification Based on Outer Header of Decapsulation Tunnel

date_range 14-Dec-23

By default, when a packet exits a tunnel, the terminating router removes the tunnel (outer) header and forwards the packet based on the classification in the inner header. On supported routers that act as a terminating router for a tunnel, you can forward the packet based on the classification you assign to the outer header at the underlay (ingress) interface.

Overview of Classification Based on Outer Header of Decapsulation Tunnel

A flexible tunnel interface (FTI) is a type of logical tunnel interface that uses static routing and BGP protocols to exchange routes over a tunnel that connects endpoints to routers. You can configure GRE, IPIP, or UDP tunnels on the logical interfaces of an FTI. For information on configuring FTIs, see Configuring Flexible Tunnel Interfaces.

For an IP packet entering the tunnel, the ingress router (as shown in Figure 1) encapsulates the packet with the tunnel header (the outer IP header). This tunnel header directs the packet through the tunnel to the egress router.

Figure 1: FTI Tunnel FTI Tunnel

By default, when the packet exits the tunnel, the egress router removes the tunnel (outer) header and forwards the packet based on the classification in the inner header. You can forward the packet based on the classification you assign to the outer header at the underlay (ingress) interface of the egress router. You do this by first setting the no-default option at the [edit class-of-service interfaces ftin unit 0 classifiers] hierarchy level. You then assign the desired classifier to the underlay interface of the egress router.

Note:

Applying the no-default option disables the application of any default classifier to the routing instance. In this case, applying the no-default option specifically prevents classification based on the inner header, enabling classification based on the outer header.

Configuring Classification Based on Outer Header of Decapsulation Tunnel

This section describes how to configure the classification of a packet exiting a tunnel on a terminating router to be based on the outer (underlay) header of the packet.
  1. Ensure the flexible tunnel interface that terminates the tunnel is indeed configured for tunnel termination.

    For example:

    content_copy zoom_out_map
    [edit interfaces]
    user@host# show fti0
    unit 0 {
        tunnel {
            encapsulation gre|ipip|udp {
                tunnel-termination;
                ...
            }
        }
    }
  2. Apply the no-default option for classifiers on the flexible tunnel interface.

    For example:

    content_copy zoom_out_map
    [edit class-of-service]
    user@host# set interfaces fti0 unit 0 classifiers no-default
    user@host# show interfaces
    fti0 {
        unit 0 {
            classifiers {
                no-default;
            }
        }
    }
    
  3. Apply the desired classifier for packets exiting the tunnel to the underlay (ingress) interface.

    For example:

    content_copy zoom_out_map
    [edit class-of-service]
    user@host# set interfaces et-0/0/0 unit 0 classifiers dscp dscp1
    user@host# show interfaces
    et-0/0/0 {
        unit 0 {
            classifiers {
                dscp dscp1;
            }
        }
    }
    fti0 {
        unit 0 {
            classifiers {
                no-default;
            }
        }
    }
    
  4. Commit your changes.
footer-navigation