MPLS and GRE Tunnels

GRE Tunnels

You can use generic routing encapsulation (GRE) as the carrier protocol for a variety of passenger protocols.

The following figure shows the IP tunnel components for a GRE tunnel. The original passenger protocol packet becomes the GRE payload and the device adds a GRE header to the packet. The device then adds the transport protocol header to the packet and transmits it.

Figure 1. GRE PDU


Segment Routing MPLS and GRE

Beginning Cisco NX-OS Release 9.3(1), you can configure both, segment routing MPLS and generic routing encapsulation (GRE) on a Cisco Nexus device. Both these technologies operate seamlessly. All MPLS traffic can be forwarded to the GRE tunnel after the MPLS tunnel termination. Similarly, you can forward all traffic from the GRE tunnel to the MPLS cloud after the GRE termination.

All PE routers can initiate, forward, or terminate the GRE traffic from or to another GRE cloud. Similarly, all tunnel transit or tunnel end nodes can configure MPLS tunnel encapsulation.

When both, the tunnel and segment routing is enabled on the Cisco Nexus 9000 switches, the following is the TTL behavior is for the respective flows:

  • Incoming IP traffic, egresses with GRE header, the TTL value in the GRE header is one less than the TTL value of the incoming IP packet.

  • Incoming IP traffic, egresses with MPLS header, the TTL value in the MPLS header is one less than the TTL value of the incoming IP packet.

  • Incoming GRE traffic, egresses with MPLS header, the TTL value in the MPLS header is default (255).

  • Incoming MPLS traffic, egresses with GRE header, the TTL value in the GRE header is default (255).

Guidelines and Limitations for Segment Routing MPLS and GRE

Segment routing MPLS and GRE have the following guidelines and limitations:

  • Ingress stats are not supported for tunnel packets.

  • Only template-mpls-heavy template is supported.

  • MPLS segment routing is not supported on the tunnel interfaces.

  • Due to a hardware limitation on the modular switches, the tunnel Tx traffic is not supported if the egress interface for the tunnel destination IP address is over the Cisco Nexus 9300-FX/FX2 platform switches.

  • Maximum four GRE tunnels are supported.

  • Beginning with Cisco NX-OS Release 9.3(3), you can configure both, segment routing MPLS and GRE on Cisco Nexus 9300-GX platform switches.

  • Tunnel Rx packet counters do not work when both segment routing MPLS and GRE coexist.

  • Cisco Nexus X98900CD-A and X9836DM-A line cards with 9808 and 9804 switches supports SR MPLS default template only.

    • Hierarchical underlay ECMP could only impose same label stack on all connected next hop members (different label stacks for different NHs are not supported yet).

    • SR MPLS PHP node does not add explicit NULL label while popping last label

    • No support for statistics, hand-offs and consistency checker in phase 1

    • In cases where Nexus 9804 switches are interworking with a node which adds explicit NULL label when performing PHP, the TTL in NULL label shall be ignored if there is a valid label present after the NULL Label. TTL from valid label shall be used for TTL decrement.

Configuring Segment Routing MPLS and GRE

You can enable MPLS segment routing as long as mutually-exclusive MPLS features such as static MPLS are not enabled.

Before you begin

You must install and enable the MPLS feature set using the install feature-set mpls and feature-set mpls commands.

You must enable the tunneling feature using the feature tunnel command.

Procedure

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

[no] feature segment-routing

Example:

switch(config)# feature segment-routing

Enables the MPLS segment routing feature. The no form of this command disables the MPLS segment routing feature.

Step 3

(Optional) show running-config | inc 'feature segment-routing'

Example:

switch(config)# show running-config | inc 'feature segment-routing'

(Optional)

Displays the status of the MPLS segment routing feature.

Step 4

(Optional) copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Step 5

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 6

feature tunnel

Example:

switch(config)# feature tunnel
switch(config-if)#

Allows the creation of a new tunnel interface.

To disable the tunnel interface feature, use the no form of this command.

Step 7

switch(config)# interface tunnel number

Enters a tunnel interface configuration mode.

Step 8

switch(config-if)# tunnel mode {gre ip }

Sets this tunnel mode to GRE.

The gre and ip keywords specify that GRE encapsulation over IP will be used.

Step 9

tunnel source {ip-address |interface-name}

Example:

switch(config-if)# tunnel source
ethernet 1/2

Configures the source address for this IP tunnel. The source can be specified by IP address or logical interface name.

Step 10

tunnel destination {ip-address |host-name}

Example:

switch(config-if)# tunnel destination
192.0.2.1

Configures the destination address for this IP tunnel. The destination can be specified by IP address or logical host name.

Step 11

tunnel use-vrf vrf-name

Example:

switch(config-if)# tunnel use-vrf blue

Step 12

ipv6 address IPv6 address

switch(config-if)# 10.1.1.1

Configures the IPv6 address.

Note

 

The tunnel source and the destination addresses are still the same (IPv4 address.)

Step 13

(Optional) switch(config-if)# show interface tunnel number

(Optional)

Displays the tunnel interface statistics.

Step 14

switch(config-if)# mtu value

Sets the maximum transmission unit (MTU) of IP packets sent on an interface.

Step 15

(Optional) switch(config-if)# copy running-config startup-config

(Optional)

Saves the change persistently through reboots and restarts by copying the running configuration to the startup configuration.

Verifying the Segment Routing MPLS and GRE Configuration

To display the segment routing MPLS and GRE configuration, perform one of the following tasks:

Command Purpose

show segment-routing mpls

Displays segment routing mpls information

Verifying Configuration for SRTE Explicit-path Endpoint Substitution

To display the required details about the SRTE Explicit-path Endpoint Substitution configuration, perform one of the following tasks:

Table 1. Verifying the SRTE Explicit-path Endpoint Substitution Configuration

Command

Purpose

show srte policy

Displays only the authorized policies.

Note

 

If the endpoint label is resolved and the first hop is reachable, the state is displayed as UP. If the endpoint label is not resolved or the first hop is not reachable, the state is displayed as DOWN.

show srte policy [all]

Displays the list of all policies available in the SR-TE.

Note

 

If the endpoint label is resolved and the first hop is reachable, the state is displayed as UP. If the endpoint label is not resolved or the first hop is not reachable, the state is displayed as DOWN.

show srte policy [detail]

Displays the detailed view of all the requested policies.

Note

 

If the endpoint label is resolved and the first hop is reachable, the state is displayed as UP. If the endpoint label is not resolved or the first hop is not reachable, the state is displayed as DOWN.

show srte policy <name>

Filters the SR-TE policy with the name and displays the list of all policies available with that name in the SR-TE.

Note

 

This command has the autocomplete feature for the policy-name. To use this feature, add a question mark or press TAB.

show srte policy color <color> endpoint <endpoint>

Displays the SR-TE policy for the color and endpoint.

Note

 

This command has the autocomplete feature for color and endpoint. To use this feature, add a question mark or press TAB.

show srte policy fh

Displays the state of the existing first hop and policy endpoints.