Books indexNetwork Foundations: from mental models to data measurement

Lesson

Lesson 21: TCP, UDP and ports

Lesson 21 of 24 · Module 5: Resolution, routing and services

Learning goal

After this lesson, you can identify a transport endpoint by address, protocol and port and compare TCP and UDP within the stated use case.

Why this concept matters

Port 53 or 443 without protocol and context is not a complete endpoint. TCP and UDP offer different contracts that an application must choose deliberately.

Transport context

Address, port and protocol together identify a communication endpoint.

A port number alone proves neither service identity nor encryption.

Define the communication endpoint

  1. Write source and destination addresses.
  2. Name TCP or UDP.
  3. Identify local and remote ports.
  4. Interpret transport success, then test the application separately.

Address for host, port for application

A transport port names a logical endpoint within TCP or UDP. The protocol must be stated with the number because the port spaces are distinct.

Compare stream and datagram

State TCP or UDP with the port and interpret success only at the tested layer.

Compare transport contracts before selecting a protocol
PropertyTCPUDP
Data modelByte streamIndependent datagrams
Ordering and retransmissionMechanisms in the contractNot guaranteed by default
Message boundariesNot preservedPreserved per datagram
SelectionDriven by application needsDriven by application needs

The choice is not fast versus slow

A transport endpoint combines address, protocol and port; its success is not application success. The page records no production measurement or learner execution.

Diagnostic exercise

Takeaway and the next lesson

A transport endpoint combines address, protocol and port; its success is not application success.

Quick review

  1. Do TCP and UDP share one port space?
  2. Does TCP preserve message boundaries?
  3. What does an open port prove?
Show the explained answers
  1. No.
  2. No; it is a byte stream.
  3. Only a transport response in the tested context.

References and evidence limits