Core Networking · Study deck

Encapsulation and PDUs

Picture a freezer sensor sending an alarm that arrives at the wrong service.

Packet Pete is your guide for this deck.

layeredfundencapsulation
Packet Pete, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain: This ownership map helps place a capture: an application log cannot prove which link frame crossed the cable, while a link capture may not explain the decoded boiler value.
  • Explain: This connects the byte budget to the chapter's design rule: optimise only after identifying which layer creates the cost and which contract would be weakened.
  • Explain: A switch can act on the link frame without understanding 23.5 C; a router can act on the network packet without owning the boiler application.
  • Explain: A payload means the useful reading or command carried inside a message.
iotclass.org

Major section

Start With the Message Getting Wrapped

The reading still looks valid, so the team must find which wrapper sent it along the wrong path.

  • A physical layer means the part that sends raw bits as signals.
  • A protocol means the shared rules for a message exchange.
  • CoAP means Constrained Application Protocol, a compact system for small devices.

Key terms

Encapsulation
Encapsulation is the story of those wrappers being added and removed without losing the payload.
iotclass.org

Major section

Start With the Message Getting Wrapped (continued)

A payload means the useful reading or command carried inside a message.

  • This runway does not prove that every layer or network is healthy.
  • A sensor reading does not cross the network as bare text.
  • Encapsulation is the story of those wrappers being added and removed without losing the payload.
iotclass.org

Major section

Overview: Wrappers Give Each Layer a Job

That visual pairing grounds each layer adds the information needed for its own scope, while treating the higher-layer result as payload in named evidence.

  • That sequence keeps overview: wrappers give each layer a job tied to what is visibly labelled.
Each layer adds the information needed for its own scope, while treating the higher-layer result as payload.
Each layer adds the information needed for its own scope, while treating the higher-layer result as payload.
iotclass.org

Major section

Practitioner: Build a Packet Trace Record

In the reverse direction, the receiver validates and removes those wrappers.

  • This sequence connects precise PDU naming to the capture point and failure clue kept in the trace record.
Protocol Data Unit names from application data to physical bits
Protocol Data Unit names from application data to physical bits
iotclass.org

Major section

Under the Hood: Overhead, MTU, and Compression

This connects the byte budget to the chapter's design rule: optimise only after identifying which layer creates the cost and which contract would be weakened.

  • The byte layout shows which wrapper owns addressing, delivery, integrity, and link-local handling.
Encapsulation at the sender and decapsulation at the receiver
Encapsulation at the sender and decapsulation at the receiver
iotclass.org

Major section

Unwrap a Boiler Reading at the Receiver

A boiler controller creates the text temperature=23.5 C, but no Ethernet wire carries that application message bare.

  • At the application layer, the reading has meaning for the boiler service.
  • The transport wrapper identifies the sending and receiving processes.
  • The link wrapper carries the packet across one local hop.

Key terms

If the destination IP
If the destination IP is wrong, the network wrapper sends an otherwise sound segment toward the wrong host.
If the destination port
If the destination port is wrong, the packet can reach the correct host but miss the boiler process.
Each layer adds the information needed for its own scope, while treating the higher-layer result as payload.
Each layer adds the information needed for its own scope, while treating the higher-layer result as payload.
iotclass.org

Major section

Unwrap a Boiler Reading at the Receiver (continued)

A switch can act on the link frame without understanding 23.5 C; a router can act on the network packet without owning the boiler application.

  • If the destination port is wrong, the packet can reach the correct host but miss the boiler process.
  • If the payload scale is wrong, every wrapper can be valid while the application still displays a false temperature.
  • Packet capture points change which wrappers are visible.
iotclass.org

Major section

Unwrap a Boiler Reading at the Receiver (continued)

A capture before a tunnel begins can show the original transport ports, while a capture outside may show only the tunnel’s network conversation.

  • A 12-byte application reading might gain an 8-byte transport header and a 20-byte network header before the link wrapper is added.
  • The network packet is then 12 + 8 + 20 = 40 bytes.
  • The data is nested, not copied into unrelated messages at every step.
iotclass.org

Major section

Unwrap a Boiler Reading at the Receiver (continued)

The damaged link frame is rejected before its higher-layer payload can be trusted.

  • The wrappers are overhead for payload efficiency, but they are required information for process and host delivery.
  • This ownership map helps place a capture: an application log cannot prove which link frame crossed the cable, while a link capture may not explain the decoded boiler value.
  • The application payload remains inside while a new local frame carries the packet onward.
iotclass.org

Deck summary

Key takeaways

The reading still looks valid, so the team must find which wrapper sent it along the wrong path.

  • A payload means the useful reading or command carried inside a message.
  • That visual pairing grounds each layer adds the information needed for its own scope, while treating the higher-layer result as payload in named evidence.
  • In the reverse direction, the receiver validates and removes those wrappers.
  • This connects the byte budget to the chapter's design rule: optimise only after identifying which layer creates the cost and which contract would be weakened.
iotclass.org

Retrieval practice

Recall check 1 of 3

Packet Pete says: answer from memory, then check your reasoning.

Q1A packet trace shows an Ethernet header around an IP header, a UDP header, and a CoAP payload. What is the correct PDU name for the captured unit?

AFrame, because Ethernet is the outer wrapper.
BPacket, because an IP header appears inside the captured unit.
CDatagram, because UDP is used by the application flow.
DData, because CoAP carries the application payload.
Show answer

Answer: A PDU naming follows the outermost active wrapper: data, segment or datagram, packet, frame, then bits on the medium.

iotclass.org

Retrieval practice

Recall check 2 of 3

Packet Pete says: answer from memory, then check your reasoning.

Q2A reviewer is checking a constrained sensor path and sees that one small reading is split across multiple link-layer transmissions. Which trace question should come first?

AWhether the selected stack and payload size are creating MTU or fragmentation pressure at the link boundary.
BWhether the application should rename the sensor reading so the packet looks smaller in the dashboard.
CWhether the trace should ignore the link layer because only application data matters.
DWhether every layer should add a duplicate copy of the payload for easier debugging.
Show answer

Answer: A A packet trace record should connect nested PDUs to the deployment decision being reviewed, including MTU and fragmentation pressure.

iotclass.org

Retrieval practice

Recall check 3 of 3

Packet Pete says: answer from memory, then check your reasoning.

Q3Why can a protocol stack with more wrappers still be the right choice for an IoT flow?

ABecause header compression can offset the byte cost of a layered stack.
BBecause the cloud path's large MTU leaves room for the extra wrappers.
CBecause a gateway can strip the wrappers before the constrained radio hop.
DBecause they may add needed addressing, reliability, security, or operations evidence.
Show answer

Answer: D Under the hood, protocol overhead is a tradeoff between byte cost and the addressing, reliability, integrity, security, and evidence each wrapper provides.

iotclass.org

Print reference

Answers

Answer key.

  1. A · PDU naming follows the outermost active wrapper: data, segment or datagram, packet, frame, then bits on the medium.
  2. A · A packet trace record should connect nested PDUs to the deployment decision being reviewed, including MTU and fragmentation pressure.
  3. D · Under the hood, protocol overhead is a tradeoff between byte cost and the addressing, reliability, integrity, security, and evidence each wrapper provides.
iotclass.org