Transport Protocols · Study deck

Transport Layer Overview — Part 2

Link what the sender sees to what the receiver decides.

Broker Bex is your guide for this deck.

transport-layerdtlsreliability-review
The guide separates pump readings from a local stop and reviews the remote message path.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain: The review should identify which UDP traffic is protected, which peer identity model is accepted, what record or handshake evidence supports the claim, and which application-security questions remain outside the transport boundary.
  • Explain: The animation shows how a later read can finish a buffered message and carry the next one, then follows the receiver’s acceptance checks and shows what happens if the stream ends early.
  • Explain: Evidence: each report is a separate datagram; the gateway records message identifiers; duplicates are ignored; a later accepted report can replace an older missing report for the dashboard view.
iotclass.org

Major section

A repeatable transport review follows one flow (1/2)

A reviewable record follows the evidence from the named message to the receiver’s decision.

  • A useful review can name the message, roles, and observed transport behaviour.The configuration command’s service, gateway, and device boundaries determine whether the evidence describes a stream, datagram, protected record, or mixed path.
  • Each reliability responsibility needs an inspectable source of evidence.Configuration, traces, endpoint logs, parser results, and queue events can show where acknowledgement, retry, freshness, and duplicates are handled.

I am reviewing a configuration command from service through gateway to device. I attach observations to each responsibility so another reviewer can repeat the same narrow check.

iotclass.org

Major section

A repeatable transport review follows one flow (2/2)

  • Receiver evidence connects transport mechanics with the application’s decision.The review must show acceptance, rejection, ignoring, or action whenever the claimed command outcome depends on that receiver behaviour.
  • The closing claim states both support and remaining responsibility.An observed TCP stream can leave framing, authorization, storage, or physical action open for another record to establish.
iotclass.org

Major section

The ledger separates roles, behaviour, and ownership (1/2)

Each ledger field needs evidence for a specific responsibility along the flow.

  • Flow scope can fix the message and observation point.A specific command or handoff prevents a narrow capture result from becoming a broad claim about every message in the product.
  • Endpoint roles can reveal who terminates or changes the transport path.Gateway acknowledgement is evidence about its own boundary until downstream delivery and device action have supporting observations.

I am reading the ledger for a gateway command. I check whether each field points to an observation rather than simply repeating the chosen protocol’s name.

iotclass.org

Major section

The ledger separates roles, behaviour, and ownership (2/2)

  • Transport behaviour needs a concrete connection, datagram, or record observation.A TCP close record, UDP identity, or DTLS boundary is more reviewable than naming the protocol without the behaviour actually seen.
  • Reliability ownership identifies where acceptance decisions are made.Transport logs, application acknowledgements, sequence checks, and timeout records reveal who handles retries, freshness, ordering, and repeated messages.
iotclass.org

Major section

Telemetry acceptance depends on the recorded receiver rules

The telemetry example accepts replacement only within a recorded freshness and protection rule.

  • Each temperature report has its own datagram identity.The gateway’s recorded identifiers provide evidence for distinguishing observations in the chapter’s periodic telemetry workflow.
  • The gateway ignores duplicates and can replace a missing report.A later accepted status can supply the dashboard view under the recorded replacement behaviour rather than proving that every report arrived.
  • UDP acceptance still depends on freshness and the security boundary.The worked log uses synchronized clocks, a 60-second age limit, and DTLS ending at the gateway; the earlier candidate ledger still needs protection.
  • This telemetry conclusion leaves other message purposes open.Alarms, commands, firmware transfers, and audit history can require evidence that replaceable dashboard status does not supply.

I watch the gateway ignore report 1’s duplicate and reject report 2 at age 70 seconds. The dashboard keeps report 1 visibly stale; DTLS ends at the gateway.

iotclass.org

Major section

Gateway acceptance leaves the device action open

The configuration command needs evidence beyond the gateway’s successful TCP receipt.

  • The service-to-gateway connection can prove only that transport segment.A successful upstream exchange does not establish that the sleeping device received the complete configuration command.
  • A queued command still needs downstream delivery evidence.The gateway’s buffer and later wake event explain the handoff, but they cannot substitute for the receiver’s observation.
  • The device must supply acceptance and failure evidence.Duplicate rejection and a safe state change remain open until device-side records support the reviewed command behaviour.
  • Separate segment records preserve the limits of upstream success.Keeping service-to-gateway and gateway-to-device evidence distinct lets the reviewer connect the full claim without overstating either observation.

I have a TCP accept log at the gateway while the target device sleeps. I need to follow the buffered command downstream before calling the state change complete.

iotclass.org

Activity 1 · Draw it

✎ Follow the queued command

I have a gateway receipt, but I still need the device’s result.

Draw service, gateway queue, and sleeping device. Mark the service-to-gateway TCP boundary and the downstream boundary. Label where you need delivery, duplicate handling, and receiver-action evidence.

3 minutes · Pen and paper · Answer: Activity 1

Your answer
iotclass.org

Major section

Practitioner: Build the Transport Overview Record (continued)

In this example the device sends a temperature report every minute.

  • The gateway log and dashboard state must show acceptance, duplicate rejection, and replacement; they do not prove command delivery or device action.
  • Evidence: each report is a separate datagram; the gateway records message identifiers; duplicates are ignored; a later accepted report can replace an older missing report for the dashboard view.
  • The device and gateway clocks are synchronized for the age check.
iotclass.org

Major section

Practitioner: Build the Transport Overview Record (continued)

The gateway application owns the accept, ignore, and reject decisions and supplies the last accepted value and its age to the dashboard.

  • Decision: UDP can be accepted for this narrow telemetry flow if the security boundary and freshness rule are also recorded.
  • The dashboard marks its last accepted value stale once that report is more than 60 seconds old.
  • Times are measured from the start of this synthetic log.
iotclass.org

Major section

Practitioner: Build the Transport Overview Record (continued)

The gateway subtracts the send time from the arrival time and accepts a report only if it is at most 60 seconds old, its ID is new, and it was sent after the last accepted report.

  • The sensor sends its next scheduled report without retrying a missed one.
  • In this example, DTLS protects the device-to-gateway segment and terminates at the gateway.
  • Retest if the age limit, clock synchronization, or protection boundary changes.
iotclass.org

Major section

Practitioner: Build the Transport Overview Record (continued)

Naming that boundary prevents successful transport mechanics from being reported as complete application delivery.

  • Worked Review: Configuration CommandFlow: service sends a configuration command through a gateway to a device.
  • The animation follows C through a gateway timeout, then replays the device’s acceptance and shows how a retry returns the stored result.
  • If you can write the ledger and explain the evidence gap in a mixed gateway path, you can stop here.
iotclass.org

Major section

A port and connection leave message meaning open

Transport ports and connections cannot establish the application meaning of the bytes exchanged.

  • A port identifies the expected receiving service at an endpoint.The port number alone does not establish the actual application protocol, valid payload, user authorization, or resulting device action.
  • TCP gives the receiving application an ordered stream of bytes.Connection management, sequence space, acknowledgements, and retransmission support that stream without automatically separating the application’s commands or frames.
  • Application framing defines complete messages within the stream.A command, file, or frame needs complete-message parsing evidence beyond a socket-open event and bytes sent on the connection.
  • Receiver acceptance remains a separate part of the command claim.Ordered bytes do not establish that the payload is valid, authorized, or correctly acted on by the downstream device.

I see a service send bytes to the gateway’s expected port. I still need to inspect framing and the receiver’s decision before describing those bytes as a completed command.

iotclass.org

Major section

TCP ordering does not define command boundaries

An ordered stream still needs framing and receiver acceptance to carry a complete command.

  • Connection evidence describes establishment or failure between the named endpoints.Connection-state, close, reset, timeout, and retry observations can bound the TCP claim to the segment the reviewer actually captured.
  • TCP can manage ordering and retransmission within the connection.These mechanisms support the byte stream but leave complete application-message recognition to the framing and parsing rules.
  • A valid command needs evidence beyond ordered byte arrival.The receiver must parse the complete payload and establish the authorization and action required by the application flow.
  • Recovery behaviour belongs beside the normal stream observation.A connection that once opened cannot settle what the receiver does after close, reset, timeout, or an interrupted command exchange.

I am looking at an established TCP stream carrying a configuration command. I check how the receiver finds the complete message and what happens when the connection closes.

iotclass.org

Major section

UDP preserves packets and leaves reliability ownership explicit

Independent datagrams need explicit decisions about the consequences of loss and repetition.

  • UDP can preserve the boundaries of each independent datagram.The capture can identify a bounded packet at an endpoint or observation point without establishing the receiver’s final application decision.
  • UDP does not manage acknowledgement, retransmission, ordering, or duplicate suppression.Those responsibilities must belong to the application or another layer, or be explicitly unnecessary for the reviewed message flow.
  • Congestion and loss behaviour still need an explicit design decision.Minimal transport state does not make missing or delayed telemetry harmless without evidence for the receiver’s acceptance rules.
  • Freshness and duplicate observations define the usable datagram claim.Identity, loss tolerance, stale-message handling, and receiver logs are necessary when the dashboard depends on selecting an acceptable status report.

I am following separate status datagrams into the gateway. I need the receiver log to explain missing, late, repeated, and reordered reports.

iotclass.org

Major section

DTLS protects records at a named boundary

The DTLS boundary protects records while leaving application permission and action to separate checks.

  • DTLS can adapt the TLS security model to datagram exchanges.The record should identify exactly which UDP traffic is protected and where that protection starts and ends along the route.
  • The accepted peer identity model is part of the security claim.Handshake and identity evidence must support the relationship being reviewed rather than rely on the presence of a DTLS label.
  • Protected records need evidence for replay handling and boundary location.A gateway that terminates protection creates a handoff whose downstream responsibilities must remain visible to the reviewer.
  • Record protection does not authorize an application state change.The receiver still needs permission and payload checks before a protected command can support a claim about correct device action.

I inspect the protected UDP exchange and its accepted peer identity. I then check the command’s application permission separately from the record-protection result.

iotclass.org

Major section

Gateway mechanics need a complete handoff record

The gateway’s acknowledgement must remain tied to the segment it actually covers.

  • A gateway may buffer, translate, or terminate an incoming exchange.TCP receipt at the gateway can precede a different downstream protocol and an action that has not yet happened.
  • The acknowledgement point determines the scope of the observed success.Upstream receipt supports the gateway boundary rather than proving downstream delivery, duplicate rejection, or final device state.
  • A handoff record connects buffering with delivery and receiver evidence.Naming the owner and both segments makes the route repeatable and exposes the responsibility left open by each observation.
  • Application acceptance remains broader than any single transport observation.Framing, payload validity, authorization, and device action require their own evidence even when connection, datagram, or protected-record mechanics succeed.

I see the gateway acknowledge upstream before the device acts. I preserve both segment records so buffering cannot disappear inside a single transport success claim.

iotclass.org

Major section

Under the Hood: Streams, Datagrams, Ports, and Boundaries (continued)

The review should identify which UDP traffic is protected, which peer identity model is accepted, what record or handshake evidence supports the claim, and which application-security questions remain outside the transport boundary.

  • Bytes are delivered in order to the receiving application within the connection.
  • Confusing ordered bytes with valid commands or authorized state changes.
  • A bounded datagram was sent or observed at an endpoint or capture point.
iotclass.org

Deck summary

One flow, one supported receiver outcome

A transport decision is bounded by its message purpose, observed behaviour, and receiver evidence.

  • Message purpose determines the transport questions worth asking.A replaceable status report and a state-changing command have different freshness, loss, duplicate, and acceptance requirements even on the same route.
  • TCP, UDP, and DTLS provide different evidence boundaries.Ordered streams, independent datagrams, and protected UDP records each leave application meaning and receiver action to additional evidence.
  • Gateway handoffs require separate upstream and downstream observations.The service-to-gateway receipt cannot close the sleeping device’s delivery, duplicate handling, authorization, or action claim.
  • A repeatable decision records ownership, limits, and a retest trigger.Changes to roles, message formats, retry policy, port expectations, or protection boundaries can require another review of the flow.

I return to the pump’s remote exchange with separate records for readings and commands. I can now say what each protocol observation proves and what the receiver must still show.

iotclass.org

Retrieval practice

Recall check 1 of 2

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

Q1A gateway logs that it accepted a command from the cloud over TCP, then forwards the command to a sleeping device later. Which record keeps the review honest?

ATreat the gateway TCP accept log, queue timestamp, and later wake event as proof the device acted
BKeep separate cloud-to-gateway and gateway-to-device records, with delivery, duplicate, and receiver-action evidence
CStop at the first receiver because the sleeping-device handoff is outside transport review
DSwitch the whole path to UDP so connection state and downstream acknowledgements disappear
Show answer

Answer: B A gateway can terminate one transport path and start another, so each segment needs its own evidence and limit.

iotclass.org

Retrieval practice

Recall check 2 of 2

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

Q2A packet capture shows a TCP connection was established and bytes were sent from a service to a device gateway. What claim is too broad without more evidence?

AA transport connection existed between the service and gateway at the capture point
BBytes were sent on the observed TCP stream between those two endpoints
CThe device received, parsed, authorized, and acted on the complete application command correctly
DThe review still needs device-side parsing and action evidence before claiming success
Show answer

Answer: C The capture can support a transport-boundary claim, but receiver parsing, authorization, and device action require separate evidence.

iotclass.org

Print reference

Answers

Answer key.

  1. B · A gateway can terminate one transport path and start another, so each segment needs its own evidence and limit.
  2. C · The capture can support a transport-boundary claim, but receiver parsing, authorization, and device action require separate evidence.
iotclass.org

Print reference

Activity 1 answer

Model answer.

Draw it: The sketch shows service → gateway queue → device. The TCP receipt closes only the first segment. The downstream record needs delivery and device-side acceptance, duplicate handling, and action evidence; a queue timestamp or wake event alone is insufficient.

iotclass.org