Tunnel Interfaces
Tunnel Modes
A tunnel makes two distant devices appear directly connected over a logical interface. When a packet is sent out on the tunnel interface, it is encapsulated in the “carrier” protocol and sent over a physical interface.The most used carrier protocols are GRE, IP-in-IP and IPv6, and this can be set using the tunnel mode.
When configuring a tunnel you must set a tunnel source, a destination and the carrier protocol:
The tunnel source can be defined as either the Layer3 address or as an interface, but the destination can only be an address on the remote device. The tunnel mode specifies the carrier protocol. For IPv4, the most commonly used methods of tunneling are GRE and IPIP.
After this, you can define the encapsulating protocol’s address on the tunnel interface:
When you have isolated networks running IPv6, you can connect them over an IPv4 backbone using tunnels. Common options are:
More details about configuring IPv6 tunnels can be found here
Another option is to have ipv6 as the transport protocol:
The transported protocols can be IPv4 or IPv6, based on the type of address defined on the tunnel interface.
GRE (Generic Routing Encapsulation)
GRE is defined as IP Protcol 47. It adds a 20 byte IP header and 4 byte GRE header to an existing packet so that it can be routed based on this new information.
GRE Keepalives
GRE supports sending and monitoring keepalives to determine the status of a tunnel interface.
Path MTU Discovery
Tunneling packets means an extra encapsulation header that is added to the packet which can make the packet too big on some links. To set the MTU value on a tunnel you can set it manually or use auto-discovery:
The discovery will run for a limited ammount of time unless the infinte keyword is used. Using SIZE, you can configure a minimum size of the discovered MTU that can be accepted. If the timer expires, the router will choose a MTU equal to the default interface MTU-20 Bytes for IP-in-IP or default interface MTU-24 Bytes for GRE. Path MTU discovery is only available on GRE and IPIP tunnels.
VRF Support
The transport protocol of one tunnel can run in one VRF, while the transported protocol can run in another VRF. By default, both the transport and the transported protocols run in the global VRF. You can change the VRF of the transporting protocol with:
Source and destination addresses of the tunnel must run in this VRF. To change the VRF of the transported protocol, use:
The addresses defined on the tunnel will run in this VRF.
Last updated