The Journey of Data: Encapsulation and De-encapsulation
If you are wondering how data is wrapped..
Data Encapsulation (Sending Side):
Application Layer (Layer 7): Data is created (e.g., HTTP request).
Transport Layer (Layer 4): Adds a header (TCP/UDP), creating a segment/datagram.
Header contains sequence numbers and port numbers
Network Layer (Layer 3): Adds an IP header, creating a packet.
Header contains source/destination IP addresses.
Data Link Layer (Layer 2): Adds a header (e.g., Ethernet) and trailer, creating a frame.
Header include soure/destination MAC addresses
Physical Layer (Layer 1): Frame is converted to bits for transmission.
Data De-encapsulation (Receiving Side):
Physical Layer (Layer 1): Bits are received.
Data Link Layer (Layer 2): Header and trailer are removed, revealing the packet.
Network Layer (Layer 3): IP header is removed, revealing the segment.
Transport Layer (Layer 4): TCP/UDP header is removed, revealing the original data.
Application Layer (Layer 7): Data is delivered to the application.
Things to remember:
These terms all refer to units of data transmitted over a network, but they operate at different levels of the OSI model.
Datagram/Segment: Transport Layer (Layer 4) data units.
Datagram: unit of data transmitted over a network, particularly in connectionless protocols like UDP
Packet: Network Layer (Layer 3) data unit.
Frame: Data Link Layer (Layer 2) data unit.
Mnenomic to help you remember: SPF cream → TND dynamite