tunnel mode (S-, K-Series)

Use this command to configure the Layer 3 tunnel mode.

tunnel mode {gre [l2 port] | ipip [ipv6] | ipv6ip [ipv6] } {vxlan l2 port [hash mac | ip] }
no tunnel mode

Parameters

gre Specifies the Generic Routing Encapsulation (GRE) Layer 3 tunnel mode as defined by RFC 2784.
ipip Specifies an IPv4 packet over an IPv4 Layer 3 tunnel as defined by RFC 2003.
ipip ipv6 Specifies an IPv4 packet over an IPv6 Layer 3 tunnel as defined by RFC 2473.
ipv6ip Specifies an IPv6 packet over an IPv4 Layer 3 tunnel as defined by RFC 2473.
ipv6ip ipv6 Specifies an IPv6 packet over an IPv6 Layer 3 tunnel as defined by RFC 2473.
vxlan Specifies VXLAN tunnel as defined by RFC 7348.
l2 Specifies Layer 2 overlay on Layer 3.
port Name of Layer 2 port to associate with this VTEP.
hash Algorithm to use MACs or IPs for UDP source port hash.
mac Specifies the SA and DA MAC to calculate the UDP port.
ip Specifies the SIP and DIP to calculate the UDP port.

Defaults

Tunnel mode defaults to GRE.

Mode

Tunnel Interface Configuration command mode.

Usage

The tunnel mode determines the encapsulation method used by the tunnel. The tunnel packet contains two headers based upon the:

  • Source and destination IP type of the packet entering the tunnel (inner header)
  • Source and destination IP type of the tunnel (outer header)

Before the packet enters the tunnel, there is only a single IP header. When the packet enters the tunnel, this original IP header becomes the tunnel inner header. The inner header IP address type (IPv4 or IPv6) is determined by the source and destination IP address of the packet entering the tunnel. Once the packet enters the tunnel, an outer header is added to it. The IP type of the outer header is determined by the source and destination addresses configured for the tunnel using tunnel source and tunnel destination. The tunnel mode is specified as the inner address type over the outer address type. For example, if the original packet is an IPv6 packet and it is entering an IPv4 tunnel, the tunnel type is specified as IPv6 over IPv4 and you would use the keyword ipv6ip to specify the tunnel mode.

The GRE tunnel mode type is a generic type defined by FRC 2784. The GRE mode is capable of processing any of the four tunnel types and should be used if you do not want to limit the tunnel to a specific IP header combination. The other four parameter options limit the tunnel to the specified IP header combination.

Note

Note

Disable the tunnel interface using the shutdown command before changing the tunnel mode using this command. After changing the tunnel mode, enable the tunnel interface using the no shutdown command. See no shutdown for details on enabling and disabling an interface.

Use the “no” option for this command to reset the tunnel mode to the default value of GRE.

Examples

This example shows how to set the tunnel 1 mode to IPv6 over IPv4:

System(rw)->configure
System(rw-config)->interface tunnel 1
System(rw-config-intf-tun.0.1)->tunnel mode ipv6ip
System(rw-config-intf-tun.0.1)->

This example shows how to set the tunnel 1 mode to IPv4 over IPv6:

System(rw)->configure
System(rw-config)->interface tunnel 1
System(rw-config-intf-tun.0.1)->tunnel mode ipip ipv6
System(rw-config-intf-tun.0.1)->