Week 8 · Lesson 1

Introduction to the Transport Layer

Layers 1 to 3 get data from one device to another. The transport layer (Layer 4) is the first one that cares about which program inside each device gets the data — and whether the data arrives complete. This lesson builds the mental model of segmentation, ports, sockets, and the two transport protocols, TCP and UDP.

CCNA 200-301 Domain 1.0 Network Fundamentals Verified 2026-10-11
Part 1

The role: end-to-end services

The lower three layers answer logistics questions. Physical (1): how is a bit put on the wire? Data link (2): how does a frame cross this one link? Network (3): how does a packet travel across many networks to the right device? When the packet reaches the destination device, the lower layers are finished. But the device is running dozens of programs — a web browser, an email client, a voice call, a file transfer. Something must decide which of those programs receives the payload, and must guarantee the payload arrived whole. That something is the transport layer.

End-to-end

Provide end-to-end services between two applications running on two hosts.

Segmentation

Cut application data into numbered chunks at the sender; reorder and rebuild it at the receiver.

Port numbers

A 16-bit number (0–65535) that selects which application gets the data.

Sockets

An IP address plus a port number, written IP:port.

Multiplexing

Interleave segments from many applications onto one link, then de-multiplex on arrival.

Two protocols

TCP is connection-oriented and reliable; UDP is connectionless and best-effort.

Definition — transport layer The transport layer (OSI Layer 4) provides end-to-end services between two applications running on two hosts: it identifies the application (via port numbers), optionally guarantees delivery and ordering (via TCP), and keeps many conversations separate over the same network path.

“End to end” (host to host at the application level) distinguishes L4 from the layer below it. The network layer moves a packet between two IP addresses. The transport layer moves data between two applications at those addresses. A router forwarding a packet touches the network layer and never looks inside the segment; the transport header is only read at the two end hosts. This is why transport is sometimes called a host-to-host layer (RFC 1122 calls it the transport layer of the host internetwork model).

Where the transport layer sits · pick a layer

Part 2

Segmenting and reassembling data

Applications hand the transport layer a stream of data — a large file, a web page, a message. The transport layer does not try to push that entire block into one network-layer packet; network payloads are limited. Instead it segments the data into smaller pieces that fit inside IP packets:

Why segment at all? Three practical reasons. First, a maximum transmission unit (MTU) bounds how big a payload one link can carry; IP packets that exceed the path MTU must be fragmented, which is inefficient. Second, segmentation lets a partial failure stay partial: if one segment is lost, only that segment is retransmitted, not the whole file. Third, segments from one conversation can be interleaved with segments from another, which is what makes multiplexing possible.

Note Segmentation happens at the sending host and reassembly at the receiving host. The IP layer fragments and reassembles packets separately; do not confuse IP fragmentation (Layer 3) with transport segmentation (Layer 4).
Segmentation calculator · how many segments?

Part 3

Port numbers and sockets

To deliver data to the right application, the transport layer uses a port number: a 16-bit number, so it ranges from 0 to 65535. Every segment/datagram carries two of them in its header:

A socket is the IP address and port number together, written in the form IP:port — for example 192.168.1.10:55001. Four numbers identify one conversation uniquely:

Definition — socket pair A conversation is uniquely identified by four values: source IP, source port, destination IP, destination port. This 4-tuple (the two sockets) is what lets a single host run thousands of simultaneous connections without mixing their data.

The destination port selects the application on the server (the well-known port, e.g. 80 for web). The source port distinguishes which conversation at your PC each reply belongs to — two browser tabs both talking to port 80 would be identical except for the source port, so the transport layer gives each one a different source port. This is exactly what Week 1’s encapsulation lesson described: “the Transport layer adds port numbers so the right application gets the data.”

Sockets · select the application

Part 4

Multiplexing: many conversations, one link

Your PC can simultaneously download a web page, check email, run a DNS lookup, and carry a voice call. All four conversations produce segments from the same host, and all four must travel down the same Ethernet link. The transport layer achieves this by multiplexing: it interleaves segments from many applications onto one stream (distinguished by port numbers) and on arrival de-multiplexes, handing each segment to the correct application.

Web browser 192.168.1.10:55001 → :80 Email client 192.168.1.10:55002 → :25 DNS resolver 192.168.1.10:55003 → :53 VoIP phone 192.168.1.10:55004 → :5060 Transport layer segments the data, adds source and destination ports (TCP or UDP) multiplexes 4 conversations ONE link (carries all four) Server 209.165.200.226 listens: 80, 25, 53, 5060 IP address + port number = socket. Four sockets, one physical link.

Notice what the source port does: 55001 through 55004 are ephemeral (temporary) ports chosen by the client, while 80, 25, 53, and 5060 are the well-known ports the server applications listen on. Lesson 2 covers the port ranges and the well-known port table in full.

Part 5

Two protocols: TCP and UDP

The transport layer has exactly two protocols you must master:

FeatureTCPUDP
Full nameTransmission Control ProtocolUser Datagram Protocol
ConnectionConnection-oriented — establishes a session before sending dataConnectionless — sends each datagram independently
ReliabilityReliable — ACKs, retransmits, reordersBest-effort — no ACK, no retransmission
OrderingIn-order delivery guaranteedNo ordering; application may see datagrams out of order
OverheadHigh (20-byte header minimum + handshake)Low (8-byte header, no setup)
Best forFiles, email, web (where loss or reorder is unacceptable)Voice, video, DNS, live streaming (where low delay matters more than loss)
Exam tip The exam gives you an application and asks “TCP or UDP?”. Use two tests. (1) Loss-tolerant and delay-sensitive? → UDP (voice, video, live streams). (2) Needs the data intact and in order? → TCP (web pages, email, file transfer, remote access). Applications that mostly exchange small single queries — DNS, TFTP, NTP, DHCP — use UDP.

Why keep a “unreliable” protocol at all? UDP’s price is its virtue: no three-way handshake, no ACK timer, no sequence bookkeeping. A voice call would rather drop a fraction of a second of audio than replay a retransmitted packet and resync the conversation. Lesson 3 examines how TCP earns its reliability.

TCP or UDP? · pick the application

Part 6

Reliability: L4 versus L2

This is a classic confusion point, so read slowly. Both Layer 2 and Layer 4 do error checking — but at different scopes.

LayerScopeMechanismWhat it detects
Data link (2)One link, hop by hopFrame Check Sequence (FCS) trailer, checked & rebuilt at every switch/router hopCorruption of the frame on that one link
Transport (4) — TCPEnd to end, host to hostHeader checksum + sequence numbers + ACK/retransmissionLoss, corruption, reordering, or duplication across the whole path

The FCS only proves the frame survived the last link. A frame can still be dropped by a congested router queue, corrupted through an entire router stack, or lost in the middle of the Internet where no single link layer sees it. Link-layer checks, therefore, are necessary but not sufficient. The transport layer rechecks the entire segment end to end — and TCP goes further and recovers. This is the model you met in Week 5: the data-link layer guarantees delivery across one link (see Week 5, Lesson 5 — Data Link Layer in depth); the transport layer guarantees delivery between the two end applications.

Trap Ethernet’s FCS does not provide end-to-end reliability, and UDP does not provide reliability either. Only one mechanism in the entire model guarantees a recovered, ordered delivery, and that is TCP at Layer 4.
Part 7

PDU names: segment and datagram

Exams demand exact vocabulary (you learned this pattern in Week 1, Lesson 18):

Exam tip Say TCP → segment and UDP → datagram. “Packet” refers only to Layer 3. “Datagram” in some older texts means any IP unit, but on the CCNA exam a datagram is specifically the UDP PDU.

Key terms

TermMeaning
Transport layerOSI Layer 4; provides end-to-end services between applications, using ports to identify them.
SegmentationCutting application data into numbered chunks at the sender.
ReassemblyReordering and rebuilding the original stream at the receiver.
Port numberA 16-bit identifier (0–65535) selecting which application gets the data.
SocketAn IP address and port number together, written IP:port.
MultiplexingInterleaving segments from many applications onto one link.
De-multiplexingAt the receiver, routing each segment to the correct application.
TCPThe connection-oriented, reliable transport protocol; its PDU is the segment.
UDPThe connectionless, best-effort transport protocol; its PDU is the datagram.
Part 8 · Your turn

Review

Check what you have learned with these review questions.

Review · 6 questions

Sources

Sources & references

  1. Postel, J. RFC 793: Transmission Control Protocol (1981), functions of the transport layer and the segment. rfc-editor.org/rfc/rfc793.
  2. Cotton, M., Eggert, L., Touch, J., Westerlund, M. & Cheshire, S. RFC 6335: Internet Assigned Numbers Authority (IANA) Procedures for the Management of the Service Name and Transport Protocol Port Number Registry (2011). rfc-editor.org/rfc/rfc6335.
  3. IANA. Service Name and Transport Protocol Port Number Registry. iana.org.
  4. Braden, R. RFC 1122: Requirements for Internet Hosts — Communication Layers, Section 4 (“TRANSPORT LAYER PROTOCOLS”). rfc-editor.org/rfc/rfc1122.
  5. Cisco. CCNA (200-301) Exam Topics, Network Fundamentals. cisco.com.

Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.