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

Follow this chapter path with evidence at each boundary.

  • Name the system boundary.
  • Record the evidence needed there.
  • Keep the next decision tied to the source.
Name each nested unit. Place a capture at the boundary it observes. Count wrapper bytes before field release. Check application meaning separately.
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

One step down, that measurement has been wrapped and the wrapper's own name has taken over: the unit is a segment now, and the reading has become payload.

  • The same thing happens again, and again, each layer treating everything handed to it as one opaque block and adding only what its own scope needs.
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.

  • The IP packet is then 12 + 8 + 20 = 40 bytes.
  • The wrappers are overhead for payload efficiency, but they carry information required for process and host delivery.
  • On receipt, each layer checks and removes only its own wrapper before passing the enclosed unit upward.
iotclass.org

Major section

Unwrap a Boiler Reading at the Receiver (continued)

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.

  • That symmetry is why a protocol data unit changes names by layer without becoming a different original reading.
  • The data is nested, not copied into unrelated messages at every step.
  • The damaged link frame is rejected before its higher-layer payload can be trusted.
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.
  • One step down, that measurement has been wrapped and the wrapper's own name has taken over: the unit is a segment now, and the reading has become payload.
  • 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 4

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 4

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?

ACheck whether MTU and fragmentation pressure arise at the link boundary.
BRename the application reading so its dashboard label looks shorter.
CCheck application values while skipping the link-layer frame budget.
DDuplicate the payload at each layer to make the trace easier to read.
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 4

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

Retrieval practice

Recall check 4 of 4

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

Q4A capture outside a tunnel shows only the tunnel conversation. The team needs the original device transport ports. What should it do?

ACapture before encapsulation, recording the interface and protocol layer.
BUse outer tunnel ports as the original device transport ports.
CInfer inner transport ports from the outer packet length alone.
DDelete the tunnel before collecting any packet-path evidence.
Show answer

Answer: A The inner transport fields are visible before the tunnel hides them.

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.
  4. A · The inner transport fields are visible before the tunnel hides them.
iotclass.org
A · Ethernet outer wrapper: frame. A · First check MTU and fragmentation pressure. D · Wrappers can provide needed contracts. A · Capture before the tunnel for inner ports.