Journey of a packet in internet.
Network Technology

Journey of a packet in internet.

Author

Techills Team

Published on July 4, 2025

Journey of a Packet in Internet

Introduction

Understanding how packets travel across networks is fundamental to understanding modern networking. This post explores the journey of a data packet from its creation to its destination.

Overview of a packet's journey through the internet

Overview of a packet's journey through the internet

Packet Creation and Encapsulation

Application creates a packet to be forwarded on the network and passes it on to lower layers following the OSI model:

Transport Layer

The second is called transport layer that is responsible for end-to-end communication between two computers. The protocol that can be used is TCP or UDP. How these two protocols differ is a discussion in itself.

Network Layer

Once a packet is generated at the transport layer, it gets passed on to the network layer having source and destination IP within the packet. Most critical field added in IP or network layer is Time To Live (TTL) which is used by intermediate switches/routers to decide if packet has to be forwarded or not.

Data Link Layer

Packet is moved to data link or MAC layer after network layer, where destination and source MAC address of machines are appended. We shall observe how these fields are modified after each two neighbors.

Physical Layer

Data link layer sends this packet to physical layer and it is delivered as stream of "0" and "1" over available physical medium.

Packet encapsulation through the network layers

Packet encapsulation through the network layers

Processing a Packet at Router

Now packet has reached an intermediate router that lies in between source and destination. Router accepts the packet and does three basic operations:

1.
Routing: Determining the best path
2.
Forwarding: Moving the packet to the appropriate interface
3.
Encapsulation: Preparing the packet for the next hop

Routing

Whenever router receives a packet, it strips out first of all MAC layer header and looks at the IP header containing destination IP address. Upon receiving destination IP, router glances into its database to identify where it should forward this packet so that packet reaches destination. These databases are referred to as routing tables.

There are three possibilities that can occur when router checks routing table for destination IP:

1.

If there is direct entry for destination IP, then we obtain name of interface packet has to be forwarded on.

2.

If there is no direct entry, then IP is converted to network IP by using mask and checked again. Longest prefix match has to be performed to determine best forwarding interface.

3.

If anything doesn't match, then router just sends it to default destination set.

Router performing routing table lookup

Router performing routing table lookup

Forwarding

After the completion of routing process, packet is forwarded from ingress interface to egress interface, which is typically referred to as forwarding. Process switching, fast switching and CEF switching are three methods of forwarding.

Before the third step, router decrements the TTL and re-computes checksum of packet and inserts it back.

Encapsulation

Third process is encapsulation. Please note that L3 or layer 3 or network layer destination IP address never ever changes in the journey of IP packet, except in cases like NAT or VPN.

Only one thing that does change is source and destination MAC addresses at data link layer.

Router keeps next hops' MAC address, which it needs to send the packet to, in it, it replaces destination and source MAC address in it and send it to physical layer.

Packet transformation between ingress and egress interfaces

Packet transformation between ingress and egress interfaces

Processing Packet at Destination Host

When the packet finally reaches its destination, these steps occur:

1.

Packet arrives at network card (physical layer), which generates an interrupt to CPU and CPU reads in packet

2.

At data link layer, the destination MAC address is checked to see if the packet is intended for this machine. If yes, the packet is handed up to the network layer.

3.

At IP layer, packet checking like checksum verification is done and then passed to respective transport layer.

4.

Transport layer sends it to the corresponding port so that it reaches the correct application.

Conclusion

This journey of a packet from source to destination showcases the elegance of layered network architecture. Each layer serves a specific purpose, adding necessary information for successful delivery of data across networks..',

Author

Techills Team

The Techills team combines expertise in networking, IT infrastructure, and emerging technologies to deliver insights that help businesses navigate the complex technology landscape. Our experts have years of experience implementing and managing software-defined solutions for enterprises worldwide.

About Our Team

Ready to Transform Your IT Infrastructure?

Contact our team today to learn how our services can help you optimize your IT assets and implement sustainable network solutions.