Reading Time: 3 minutes


When data is sent from one node to another on a network, it is encapsulated. The data packets are encapsulated at the sender’s end and are de-encapsulated at the receiver’s end. IP in IP encapsulation at various layers adds different features and functionalities to the transmission.

Encapsulation is a leading feature of most networks models like TCP/IP and OSI models. IP in IP is widely used because of the lower overhead and fewer layers that are encapsulated. There are some limitations as well, like IP in IP tunnel cannot carry multicast traffic or IPv6 protocol between networks. IP Multicast Routing efficiently delivers large amounts of data from one source to multiple destinations simultaneously.

Here are all the basics about IP-in-IP encapsulation and an overview of the process.

IP in IP Encapsulation Definition

IP in IP encapsulation is a protocol that is used to encapsulate one IP packet in another IP packet. To do this, the outer header of the IP packet has the Source IP, which is the entry point of the traffic tunnel. The Destination IP is the exit point.

In networking, a packet is the smallest unit of data, and a basic data packet contains information of both the receiver and sender in the header. Encapsulation is the process in which a protocol is added to the packet header. This way, when the data enters into the transport tunnel, it is no longer called data, but it is known as a segment. And when a segment gets a network layer, it is termed a packet.

Encapsulation in Network Protocols

One common example of encapsulation in networking protocols is IPv4 and IPv6 protocols. Let’s suppose you are using an IPv6 protocol for data packets, but your router only supports IPv4. Now, there is no way the information will be transmitted because of different protocols.

This is where IP in IP encapsulation comes in. With encapsulation, you can add one IP packet into another packet so the information can pass smoothly, without any blockages.

Encapsulation Process

In the case of the above example, we take the IPv6 data packet that is not supported by the router, and then we wrap the new receiving packet into a new packet called IPv4. We do not change the IPv6 packet, and it remains intact.

Since the router supports IPv6, during the encapsulation process, we add a new header of IP 20-byte in which we will have a 32 bit IP address for both source and destination of the packet. Thus, IP gets encapsulated in another IP.

Physical View of Step-by-Step Process of IP in IP Encapsulation

Here is the physical view of the entire process:


(Image: GeeksforGeeks)

  • In the above diagram, A to F are all routers on a network. Here the source router is A, and the final destination router is F. In other words, the data packet is generated at router A and has to reach the source router, F.
  • First, the IP packet reaches from A to B without any issues as both support IPv6. However, router C does not support IPv6, and it only supports IPv4. Now at this point, the IP header is not changed, and a new data packet is added to the original packet. Here the source is chosen as B and the end node as E. It means B adds IPv4 to the packet because C only supports that protocol.
  • B is linked with A through IPv6 and with C through IPv4. It means router B supports both protocols.
  • The encapsulated data packet reaches router D, and the link ends there as E supports IPv6. Here the node can directly access the actual IPv6 packet.

That is how the encapsulation process works with routers that support different versions of IP addresses. Using this technique different types of IP addresses are transmitted over networks easily.

Step by Step TCP/IP Encapsulation Process


Data encapsulation either uses TCP/IP or the OSI model in the network, and transmission takes place through different layers. Data is encapsulated at the sender’s end so it can transmit in a proper way. Similarly, on the receiver’s end, data is de-encapsulated.

Let’s take a look at the process at each end.

Encapsulation Process at Sender’s Side

  1. The Application layer in TCP/IP model or Application, Presentation, and Session layer in the OSI model takes the data in the form of data streams. It gets encapsulated and forwarded to the Transport layer.
  2. In the Transport layer, the data is streamed in upper layers and is divided into pieces. Here the data packet is encapsulated with a proper header. The header contains information regarding sequencing so the segments can be reassembled properly at the receiver’s end. Here the data is called a data segment.
  3. The Internet layer in the TCP/IP model and the Network Layer in the OSI model encapsulates data that is received from the transport layer and add another header. This header contains information regarding routing and delivery of the data. Here the data is called a data packet.
  4. Next, the data moves to the Data-Link layer where it is further encapsulated with an additional header and footer. Here the header contains information regarding switching for delivery, and the footer contains information regarding error detection. Now the data is called a data frame.
  5. The final Physical Layer receives the data and encapsulates it by covering it with proper data signals and bits.

Encapsulation IP FAQ

IP in IP is a tunneling protocol that is used for encapsulating data packets inside other IP packets. However, IP-in-IP does not encrypt data packets and is not used for VPNs. The main purpose of IP-in-IP is to set up network routes that are not normally available.

IPIP traffic is when two internal IPv4 subnets connect through public IPv4 internet. It has low overhead but can only be used to transmit IPv4 unicast traffic. Through this tunnel, you cannot send multicast traffic. It supports both IP over IP and MPLS over IP.

In TCP/IP encapsulation, data moves from the upper layer of the TCP/ICP protocol stack to the lower layer, during a transmission. Each layer includes a packet of relevant information along with the actual data, called ‘header’.

Encapsulation if data at various layers (TCP/IP) adds various features to the transmission. The most important of it is added security and reliability of data that is transmitted between two nodes on a network.

IP in IP provides tunneling in Mobile IP by establishing a virtual pipe for the data packets between a tunnel entry and an endpoint. It is achieved through a process called encapsulation where a data packet is sent via a tunnel and one IP packet is encapsulated in another IP packet.


IP in IP encapsulation is the process that adds additional information to a data packet. The extra information can either be added to the header of the footer of the data. It is done to add some features and functionalities. It is used to add proper data sequencing, flow control, network, congestion control, error detection, and more.

In this blog, we have explained everything you need to know about the process. If you have any questions, do let us know in the comments below.