A tunnel interface in a J-series Services Router running JUNOS software supports many of the same CoS features as a physical interface. A tunnel interface is a virtual or logical interface on a J-series router. It creates a virtual point-to-point link between two J-series routers at remote points over an IP network.
For example, you can configure CoS features for generic routing encapsulation (GRE) and IP-IP tunnel interfaces. Tunneling protocols encapsulate packets inside a transport protocol.
GRE or IP-IP tunnels are used with services like IPsec and NAT to set up point-to-point VPNs. JUNOS software allows you to enable CoS queuing, scheduling, and shaping for traffic exiting through these tunnel interfaces.
On a J-series Services Router, CoS queuing enabled for tunnel interfaces allows you to
Each tunnel can be shaped so that a tunnel with low-priority traffic cannot swamp other tunnels that carry high-priority traffic.
Traffic for one tunnel does not impact traffic on other tunnels.
Traffic through various tunnels is limited to not exceed a certain bandwidth.
For example, suppose you have three tunnels to three remote sites through a single WAN interface. You can select CoS parameters for each tunnel such that traffic to some sites gets more bandwidth than traffic to other sites.
You can apply different queuing, scheduling, and shaping policies to different tunnels based on user requirements. Each tunnel can be configured with different scheduler maps, different queue depths, and so on. Customization allows you to configure granular CoS policy providing for better control over tunnel traffic.
For example, CoS queuing avoids having low-priority packets scheduled ahead of high-priority packets when the interface speed is higher than the tunnel traffic speed. This feature is most useful when combined with IPsec. Typically, IPsec processes packets in a FIFO manner. However, with CoS queuing each tunnel can prioritize high-priority packets over low-priority packets. Also, each tunnel can be shaped, so that a tunnel with low-priority traffic does not swamp tunnels carrying high-priority traffic.
Figure 82 shows CoS-related processing that occurs for traffic entering and exiting a tunnel. For information on flow-based packet processing, see the JUNOS Software Security Configuration Guide
Figure 82: CoS Processing for Tunnel Traffic

On a J-series Services Router, when defining a CoS shaping rate on a tunnel interface, be aware of the following restrictions: