- Asked 2/11
- 2073 Chaitra · 5 marks
- 2070 Chaitra · 4 marks
Headers and trailers
Short answer
A header is control information placed before data, and a trailer is control information appended after data, usually for error detection. The sender adds transport, network, and data link headers plus a data link trailer during encapsulation; the receiver removes each header and checks the trailer during decapsulation.
What are headers and trailers and how do they get added and removed?
A header is control information (addresses, sequence numbers, checksums, etc.) placed in front of the data by a protocol layer. A trailer is control information appended after the data, usually for error detection (for example the CRC in a data link frame). Together they let the peer layer at the receiver process the data correctly.
Adding (encapsulation) at the sender
- Application data goes to the transport layer, which adds a transport header (ports, sequence number) forming a segment.
- The network layer adds an IP header (source and destination IP) forming a packet.
- The data link layer adds a header (source and destination MAC) and a trailer (CRC) forming a frame.
- The physical layer sends the frame as bits.
App data : [ DATA ]
Transport: [TH | DATA ]
Network : [NH | TH | DATA ]
Data link: [DH | NH | TH | DATA | DT]
Removing (decapsulation) at the receiver
The frame travels up. The data link layer checks the CRC trailer, reads and removes the frame header and trailer. The network layer reads and strips the IP header, the transport layer strips its header, and the pure data reaches the application.
Each layer reads only the header added by its own peer. Trailers are added at layer 2 (and some other layers) mainly for error checking.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Layered protocols, headers and trailers · Computer Networks and Security, chapter 1 · asked 2×