IP-in-IP Decapsulation
Encapsulation of datagrams in a network is done for multiple reasons, such as when a source server wants to influence the route that a packet takes to reach the destination host. The source server is also known as the encapsulation server.
IP-in-IP encapsulation involves the insertion of an outer IP header over the existing IP header. The source and destination address in the outer IP header point to the endpoints of the IP-in-IP tunnel. The stack of IP headers is used to direct the packet over a predetermined path to the destination, provided the network administrator knows the loopback addresses of the routers transporting the packet. This tunneling mechanism can be used for determining availability and latency for most network architectures. It is to be noted that the entire path from source to the destination does not have to be included in the headers, but a segment of the network can be chosen for directing the packets.
The following illustration describes the basic IP-in-IP encapsulation and decapsulation model.
Use Case: Configure IP-in-IP Decapsulation
The following topology describes a use case where IP-in-IP encapsulation and decapsulation are used for different segments of the network from source to destination. The IP-in-IP tunnel consists of multiple routers that are used to decapsulate and direct the packet through the data center fabric network.
The following illustration shows how the stacked IPv4 headers are de-capsulated as they traverse through the de-capsulating routers.
Stacked IP Header in an Encapsulated Packet
The encapsulated packet has an outer IPv4 header that is stacked over the original IPv4 header, as shown in the following illustration.
Configuration
You can use the following sample configuration on the routers to decapsulate the packet as it traverses the IP-in-IP tunnel:
RP/0/RP0/CPU0:router(config)# interface tunnel-ip 10
RP/0/RP0/CPU0:router(config-if)# tunnel mode ipv4 decap
RP/0/RP0/CPU0:router(config-if)# tunnel source loopback 0
RP/0/RP0/CPU0:router(config-if)# tunnel destination 10.10.1.2/32
-
tunnel-ip: configures an IP-in-IP tunnel interface.
-
ipv4 unnumbered loopback address: enables ipv4 packet processing without an explicit address, except for loopback address.
-
tunnel mode ipv4 decap: enables IP-in-IP decapsulation.
-
tunnel source: indicates the source address for the IP-in-IP decap tunnel w.r.t the router interface.
-
tunnel destination: indicates the destination address for the IP-in-IP decap tunnel w.r.t the router interface.
Running Configuration
RP/0/RP0/CPU0:router# show running-config interface tunnel-ip 10
...
interface tunnel-ip 10
tunnel mode ipv4 decap
tunnel source Loopback 0
tunnel destination 10.10.1.2/32
This completes the configuration of IP-in-IP decapsulation.
Decapsulation Using Tunnel Source Direct
Feature Name |
Release Information |
Feature Description |
---|---|---|
Decapsulating Using Tunnel Source Direct |
Release 7.5.3 |
Tunnel source direct allows you to decapsulate the tunnels on any L3 interface on the router. You can use the tunnel source direct configuration command to choose the specific IP Equal-Cost Multipath (ECMP) links for troubleshooting, when there are multiple IP links between two devices. |
To debug faults in various large networks, you may have to capture and analyze the network traffic at a packet level. In datacenter networks, administrators face problems with the volume of traffic and diversity of faults. To troubleshoot faults in a timely manner, DCN administrators must identify affected packets inside large volumes of traffic. They must track them across multiple network components, analyze traffic traces for fault patterns, and test or confirm potential causes.
In some networks, IP-in-IP decapsulation is currently used in network management, to verify ECMP availability and to measure the latency of each path within a datacenter.
The Network Management System (NMS) sends IP-in-IP (IPv4 or IPv6) packets with a stack (multiple) of predefined IPv4 or IPv6 headers (device IP addresses). The destination device at each hop removes the outside header, performs a lookup on the next header, and forwards the packets if a route exists.
Using the tunnel source direct command, you can choose the specific IP Equal-Cost Multipath (ECMP) links for troubleshooting, when there are multiple IP links between two devices.
Tip |
You can programmatically configure and manage the Ethernet interfaces using |
Guidelines and Limitations
The following guidelines are applicable to this feature.
-
The tunnel source direct command is only compatible with 'tunnel mode decap' for IP-in-IP decapsulation.
-
The source-direct tunnel is always operationally
up
unless it is administratively shut down. The directly connected interfaces are identified using the show ip route direct command. -
All Layer 3 interfaces that are configured on the device are supported.
-
Platform can accept and program only certain number of IP addresses. The number of IP addresses depends on the make of the platform linecard (LC). Each LC can have different number of Network Processor (NP) slices and interfaces.
-
Only one source-direct tunnel per address-family is supported for configuration.
-
Regular decapsulation tunnels which have specific source address, are supported. However, the tunnel’s specific source address must not be part of any interface.
The following functionalities are not supported for the tunnel source direct option.
-
GRE tunneling mode.
-
VRF (only default VRF is supported).
-
ACL and QoS on the tunnels.
-
Tunnel encapsulation.
-
Tunnel NetIO DLL: Decapsulation is not supported if the packet is punted to slow path.
Configure Decapsulation Using Tunnel Source Direct
Configuration
The tunnel source direct configures IP-in-IP tunnel decapsulation on any directly connected IP addresses. This option is now supported only when the IP-in-IP decapsulation is used to source route the packets through the network.
This example shows how to configure IP-in-IP tunnel decapsulation on directly connected IP addresses:
Router# configure terminal
Router(config)#interface Tunnel4
Router(config)#tunnel mode ipv4 decap
Router(config)#tunnel source direct
Router(config)#no shutdown
This example shows how to configure IP-in-IP tunnel decapsulation on IPv6 enabled networks:
Router# configure terminal
Router(config)#interface Tunnel6
Router(config)#tunnel mode ipv6 decap
Router(config)#tunnel source direct
Router(config)#no shutdown
Verifying the Configuration
The following example shows how to verify IP-in-IP tunnel decapsulation with tunnel source direct option:
Router#show running-config interface tunnel 1
interface Tunnel1
tunnel mode ipv6ipv6 decapsulate-any
tunnel source direct
no shutdown
Router#show interface tunnel 1
Tunnel1 is up Admin State: up
MTU 1460 bytes, BW 9 Kbit
Tunnel protocol/transport IPv6/DECAPANY/IPv6
Tunnel source - direct
Tx 0 packets output, 0 bytes Rx 0 packets input, 0 bytes