ELEC1401 Chap.4 Layering, Services and Encapsulation
Layering, Services and Encapsulation
Layering, Services and Encapsulation turns a complex communication path into interacting responsibilities. A higher layer uses a service exposed by the layer below, while peer entities at the same logical layer follow a protocol. These relationships have different directions: services cross local vertical interfaces, and protocols describe logical horizontal communication.
As an application message moves down the sender stack, transport, network and link functions add control information. The resulting segment, packet and frame name different encapsulation levels. A router removes incoming link framing, examines the network packet and creates new link framing for the next hop; it does not normally consume the application message.
At the receiver, matching headers are processed in reverse until the payload reaches its process. Modular interfaces let implementations change independently, although extra headers and rigid boundaries introduce overhead and can hide useful cross-layer information.
What this chapter covers
- 01
Layer services
- 02
Peer protocols
- 03
Vertical interfaces
- 04
Encapsulation and headers
- 05
Segments, packets and frames
- 06
Router processing and decapsulation
Worked example · free
Trace encapsulation through one router
- 2At Host A, add transport and network control, then frame the packet for the A-to-R link.
- 2At R, remove incoming link framing, inspect network information and create framing for the R-to-B link.
- 2At Host B, process headers upward until the original application message reaches the destination process.
Key terms
- Service interface
- A boundary through which one layer requests capability from an adjacent layer.
- Encapsulation
- Addition of control information as data moves down a protocol stack.
- Payload
- The data a layer carries without interpreting as its own control information.
Layering, Services and Encapsulation FAQ
What is the difference between a service and a protocol?
A service describes what one layer offers to the layer above inside a system. A protocol defines message rules and actions between peer entities at the same logical layer across communicating systems.
Does a router remove every header?
No. A router processes incoming local-link framing and examines network-layer information for forwarding. It creates new link framing for the next hop while normally leaving the transport payload and application message for the destination.
Why is layering useful?
Stable interfaces let one implementation change without forcing every application and lower technology to change together. The separation supports reuse and testing, though it adds control overhead and can conceal cross-layer information.
What changes when a router forwards onto another link?
The router removes the incoming hop-specific frame, examines network information and creates new framing for the outgoing link. The transport data and application payload continue toward the endpoint. This is why a medium change can remain hidden from the application above stable interfaces.
Exam move
Choose a simple application message and trace it down the sender stack, across one router and up the receiver stack. Write the protocol data unit name at every stage and colour the control information added by transport, network and link functions. At the router, cross out only the incoming link wrapper, then draw the outgoing wrapper for the next hop.
This visual routine prevents the claim that every intermediate device consumes the application. Build a separate two-column table for service and protocol. Place local application-to-transport requests under service and transport-peer rules under protocol. Practise explaining the direction of each relation without relying on the words vertical and horizontal alone.
For modularity questions, name the interface that stays stable and the implementation that changes. Then add one cost, such as header overhead or duplicated work, so the answer is balanced. Use segment, packet and frame precisely; if a question uses packet generically, declare the layer you mean.
Review by starting at the receiver and reversing the path, because decapsulation exposes whether you truly understand header ownership. End every trace with the destination process, not merely the destination host. For timed responses, use three sentences: the layer's service, the peer control it uses and the lower-layer service it relies upon.
Build a header inventory that says which endpoint or intermediate device reads each field. Change the local-link technology after the router and explain why the outgoing frame changes while the application payload remains. For standards questions, divide the contract into syntax, meaning and procedure, then classify a malformed field, an unsupported value and a legal message arriving in the wrong state.
Draw peer communication as a logical relation and actual delivery as a down-across-up path so the two views are not confused. Test modularity by replacing one implementation while holding the interface stable, and name one benefit plus one overhead. Finally, narrate decapsulation from received signal to destination socket and verify that every removed wrapper has a matching function at the sender.
Working through Layering, Services and Encapsulation in ELEC1401? Sia is AskSia’s AI Electrical Engineering tutor — ask any ELEC1401 Layering, Services and Encapsulation question and get a clear, step-by-step explanation grounded in how ELEC1401 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.