What is a packet?
A packet is the unit of data transmission at the network layer (L3). It is in the form of packets that data is transmitted between different networks.
Short version: a packet is data packaged according to the rules of the network layer so that it can be routed.
Why a packet is needed
The data link layer can only deliver data inside a single network. A packet is needed to:
- transmit data through several networks
- indicate the IP address of the sender and the receiver
- allow routers to decide where to send the data next
What a packet consists of
1. Packet header (IP header)
The service part, which contains:
- the source IP address
- the destination IP address
- routing information
- auxiliary fields (for example, TTL, protocol type)
Routers analyze only the header, not the data itself.
2. Payload
Inside a packet is data from the transport layer:
- a TCP segment or UDP datagram
- application data (indirectly, inside the segment)
The network layer:
- does not check the content of this data
- does not guarantee its delivery
What is important to understand
- a packet is L3
- a packet does not contain MAC addresses
- a packet can be:
- transmitted
- fragmented
- dropped by a router
Relationship with other layers
- transport layer → segment
- network layer → packet
- data link layer → frame
- physical layer → bits
During transmission:
- the packet stays the same
- frames change at every segment of the network
What a packet does NOT do
Important for an interview A packet:
- does not guarantee delivery
- does not control speed
- does not track transmission order
- does not correct errors
That is handled by the transport layer.
In short, for an interview
A packet is a unit of network layer data containing an IP header and a payload, used for transmitting data between networks and for routing.
Short Answer
Interview readyA concise answer to help you respond confidently on this topic during an interview.