Learn
A2.1.4 | TRANSPORT AND APPLICATION PROTOCOLS
01 | AGREED RULES MAKE COMMUNICATION MEANINGFUL
A laptop sends bytes to a server, but the server needs to know what those bytes mean and how to respond. The network must also provide a way to carry the data between the correct software endpoints.
A protocol is an agreed set of communication rules. Different protocols perform different jobs and can be used together. The application’s request and the transport carrying it are not competing alternatives.
This lesson covers TCP, UDP, HTTP, HTTPS and DHCP. We will describe the service each provides, how they fit together and the limits of their guarantees.
For example, a browser may send HTTP requests through a protected connection supported by transport protocols. DHCP instead helps a device obtain network configuration before it uses ordinary remote services.
02 | TRANSPORT AND APPLICATION ARE DIFFERENT RESPONSIBILITIES
| Protocol | Main role | TCP/IP placement |
|---|---|---|
| TCP | Reliable ordered byte-stream transport | Transport |
| UDP | Datagram transport without built-in delivery/order guarantees | Transport |
| HTTP | Web request and response semantics | Application |
| HTTPS | HTTP communication protected using TLS-based security | Application service using security and transport support |
| DHCP | Automatic host network configuration | Application |
Application protocols define the messages and meaning needed by a service. Transport protocols provide communication between endpoints. IP and link technologies support the paths underneath.
A protocol can be at the application layer even if a human never clicks a button to use it. DHCP is usually handled automatically by system software, but its messages still perform an application-layer configuration function.
03 | IP ADDRESSES AND PORTS IDENTIFY DIFFERENT THINGS
An IP address helps identify an interface and support delivery across IP networks. A transport port is a logical identifier used with transport communication to direct traffic to the relevant endpoint or service. It is not a physical cable socket.
A server can provide several services on one host. Common conventions include TCP port 80 for ordinary HTTP and port 443 for HTTPS services, although configurations and protocol versions can differ. A client normally also uses its own local transport port.
A port number alone is not proof of what an application is doing or whether it is trustworthy. Firewalls and other controls may use ports as part of a policy, but the complete protocol and configuration matter.
04 | TCP: AN ORDERED BYTE STREAM
Transmission Control Protocol (TCP) provides a reliable, in-order byte stream between communicating endpoints. The application sees an ordered stream rather than a guarantee that its original write calls appear as separate messages at the receiver.
TCP uses sequence information to track byte positions, acknowledgements to report progress and retransmission mechanisms to recover data when needed. A receiver can hold later-arriving data while waiting for an earlier gap to be filled.
Flow control helps avoid overwhelming the receiver’s available capacity. Congestion-control behaviour adjusts transmission in response to network conditions. These are separate concerns from deciding the meaning of an HTTP request.
Reliable does not mean an unbreakable connection or an unlimited deadline guarantee. If a failure cannot be recovered, communication can fail. TCP alone does not encrypt application data, prove a website’s legitimacy or confirm that a user’s business operation succeeded.
05 | CONNECTION SETUP IS NOT A RECEIPT FOR THE WHOLE TASK
A normal TCP connection begins with a handshake, commonly summarised as SYN, SYN-ACK and ACK. This establishes transport state before ordinary application data exchange in the basic model.
During data transfer, acknowledgements concern receipt of transport data. They do not by themselves mean a server saved a document, approved a payment or completed a requested calculation. Application responses describe those outcomes.
For a file transfer needing every byte in order, recovery and ordered delivery are useful. However, setup, tracking, retransmission and waiting for missing data add work and may delay later bytes. The suitability depends on the application’s requirements.
Applications that need message boundaries over TCP must define them, for example through lengths or delimiters. A TCP receive operation is not guaranteed to correspond to exactly one application message.
06 | UDP: SEND DATAGRAMS WITH FEWER TRANSPORT MECHANISMS
User Datagram Protocol (UDP) sends separate messages called datagrams. UDP itself does not establish a TCP-style connection or provide automatic retransmission, in-order delivery or duplicate suppression.
A receiver can observe a missing datagram, a later one arriving first or duplicates. UDP preserves datagram boundaries when delivering received datagrams, unlike TCP’s byte-stream service.
The smaller transport mechanism can suit applications that prefer current information over waiting for a late update, such as some interactive audio/video or game traffic. This is not a guarantee that every UDP application is faster or that every stream uses UDP.
Applications and higher-level protocols can add reliability, sequencing, security and congestion control over UDP. DHCP retries messages when needed, and QUIC builds a secure reliable transport over UDP. Therefore “uses UDP” does not mean the whole application has no recovery rules.
07 | COMPARE WHAT THE TRANSPORT SUPPLIES
| Feature | TCP | UDP itself |
|---|---|---|
| Data service | Ordered byte stream | Individual datagrams |
| Setup | Connection state, normally established by handshake | No TCP-style transport handshake |
| Recovery | Acknowledgements and retransmission mechanisms | No automatic transport retransmission |
| Ordering | In-order stream delivery | No in-order delivery guarantee |
| Overheads | Connection, tracking, recovery and control work | Fewer built-in mechanisms; higher layers may add work |
| Encryption | Not supplied by TCP alone | Not supplied by UDP alone |
Choose from requirements. An intact ordered document needs a different handling strategy from a time-sensitive update that has become useless after a newer update arrives. Both can still need protection and appropriate handling of overload.
08 | OBSERVE LOSS AND REORDERING
The source is NETWORKS!, shown as three byte ranges NET, WOR and KS! for the TCP model, or three separate messages for the UDP model. Positions 0,3,6 are relative teaching offsets, not a real TCP capture.
Choose ordinary delivery, reordered arrival or a missing middle range. The TCP model buffers later bytes until the gap is filled; its loss example later supplies a retransmission. The UDP model displays received datagrams in arrival order and adds no application recovery.
The blocks are illustrations, not a claim that TCP preserves three-character message boundaries. Handshakes, timers, checksums and congestion behaviour are omitted. A real application could add recovery over UDP.
09 | HTTP: REQUEST AND RESPONSE
Hypertext Transfer Protocol (HTTP) defines application-level communication for web resources and services. A client sends a request with a method and target; the server returns a response with status information and, where appropriate, content.
GET requests a representation of a resource. POST submits data for the service to process. A method name does not make the connection encrypted: a POST sent over unprotected HTTP is not secure merely because it is POST.
In this simplified HTTP/1.1 example, the response status 200 indicates successful handling, while 404 would indicate that the requested resource was not found. A valid error response can arrive over a fully working TCP connection.
GET /lessons/networking.html HTTP/1.1 Host: example.test HTTP/1.1 200 OK Content-Type: text/html <h1>Networking lesson</h1>
HTTP is described as stateless: requests have their own semantics without automatically carrying a built-in application session history. Applications can still use cookies, tokens and server-side state to implement login sessions.
10 | HTTPS: PROTECT HTTP COMMUNICATION
HTTPS is HTTP communication protected using TLS-based security. It can provide confidentiality against network eavesdropping, integrity against undetected alteration in transit and authentication of the server endpoint through appropriate certificate validation.
A browser checks that the certificate and its trust relationship are acceptable for the intended server name. That is different from proving the site’s content is honest or logging a user into an account. Client identity may require a separate application mechanism.
Protection is between the relevant security endpoints. Data can still be exposed on a compromised endpoint or after the service decrypts and processes it. Network metadata such as some addressing and timing information can remain observable.
HTTPS therefore does not mean a site has no malware, that a user is anonymous or that its database cannot be attacked. It protects a communication channel under its security assumptions, not every aspect of the service.
11 | HOW THE WEB PROTOCOLS FIT TOGETHER
A common learning model is HTTP application messages protected by TLS over TCP, carried by IP and the local link. HTTP supplies meaning, TLS supplies channel protection and TCP supplies ordered stream transport. These are different roles used together.
HTTP/1.1 and HTTP/2 commonly use TCP. HTTP/3 instead uses QUIC, a secure transport built over UDP. That does not make HTTP/3 an example of unreliable application delivery: QUIC adds the required transport mechanisms.
You do not need detailed QUIC internals here. The important qualification is that “HTTPS always means TCP” and “UDP means nothing can be reliable or encrypted” are not universally correct.
COMMON HTTP/1.1 OR HTTP/2 PATH
HTTP application messages
TLS protection
TCP transport
IP and link access
HTTP/3 PATH
HTTP application messages
QUIC with TLS-based security
UDP underneath QUIC
IP and link access
12 | DHCP: OBTAIN NETWORK CONFIGURATION
Dynamic Host Configuration Protocol (DHCP) allows a host to obtain network configuration automatically from a suitable server. In a typical DHCPv4 arrangement, this can include an IPv4 address, subnet mask, router/default-gateway information, DNS-server information and a lease period.
The address is commonly leased for a period rather than necessarily assigned forever. Automatic configuration reduces repetitive manual entry and helps a managed address-allocation process, but configuration must still be valid and authorised.
DHCPv4 uses UDP, conventionally server port 67 and client port 68. Its own message exchange and retry behaviour are part of the application protocol. IPv6 configuration uses different mechanisms and DHCPv6 is not the same four-message DHCPv4 exchange.
DHCP does not translate domain names itself: it can tell the client which DNS servers to use. It also does not guarantee internet service simply because an address has been assigned.
13 | DISCOVER, OFFER, REQUEST, ACKNOWLEDGE
A typical initial DHCPv4 allocation is remembered as DORA: Discover, Offer, Request, Acknowledgement. The client seeks configuration, a server proposes it, the client selects/requests an offer, and the server confirms the configuration.
An Offer is a proposal, not permission to assume all configuration is already active. The client validates and applies confirmed information according to the protocol, including relevant conflict checks. Discovery and selection commonly use broadcasts; responses and later exchanges vary with the client state and network arrangement.
The addresses and lease are illustrative, not instructions for configuring a real network. Renewal is shown separately from initial discovery.
14 | LEASES, RENEWAL AND FAILURE
A client can request renewal before a lease expires. Renewal need not repeat the full initial Discover/Offer sequence; it can use an exchange based on the existing allocation. If renewal fails, a currently valid lease and an expired lease are not the same condition.
If the lease expires without an acceptable extension, the client cannot simply keep using that DHCP-leased configuration indefinitely. Exact fallback behaviour depends on the host and its other configuration mechanisms.
A missing DHCP response may prevent fresh automatic configuration even when the radio or cable link is working. Conversely, an existing static or still-valid arrangement may behave differently. Do not equate every connectivity problem with a failed cable.
An unauthorised DHCP server could supply incorrect or hostile configuration, so trusted server arrangements and suitable network protections matter. Automatic allocation is not authentication of every remote service.
15 | A LAPTOP OPENS A LEARNING RESOURCE
First the laptop has a working link and suitable configuration, perhaps obtained using DHCP. A name lookup can identify an address for the intended service; DNS is distinct from DHCP. Routing and link forwarding carry the traffic.
For a common HTTPS-over-TCP path, TCP establishes transport state, TLS establishes the protected channel and HTTP requests the resource. An HTTP response reports the application result, which might be success, a redirect or an error.
The roles complement each other. DHCP does not fetch the webpage, TCP does not decide the page’s meaning and HTTPS does not make an unavailable server answer.
The exact exchanges can be reused, cached or negotiated differently in real systems. This is a description of responsibilities, not a claim that every page request always starts every protocol from scratch.
16 | CHOOSE THE SPECIFIC PROTOCOL ROLE
Each scenario asks for one particular service. An application can use several protocols, so read whether the question asks about transport, web protection or host configuration.
17 | CORE FACTS AND IMPORTANT LIMITS
| Protocol | Purpose | Remember the limit |
|---|---|---|
| TCP | Reliable ordered byte-stream transport | Not encryption or a guarantee that an application task succeeded |
| UDP | Datagram transport with fewer built-in recovery mechanisms | Application/higher-layer rules may add reliability and security |
| HTTP | Web request/response semantics | Unprotected HTTP does not itself secure the channel |
| HTTPS | Protected HTTP communication | Does not prove content is honest or endpoints uncompromised |
| DHCP | Automatic host network configuration | Offer differs from confirmed lease; valid config does not guarantee every service |
Useful port conventions: ordinary HTTP often uses TCP 80; HTTPS commonly uses 443, with HTTP/3 using QUIC over UDP. DHCPv4 uses UDP 67 at the server and 68 at the client. A number is a convention, not a substitute for describing the function.
18 | DESCRIBE THE SERVICE, MECHANISM AND LIMITATION
For describe, state the protocol’s purpose and relevant features. For TCP, mention ordered byte-stream delivery and recovery mechanisms. For UDP, distinguish datagrams from a byte stream and separate UDP’s own guarantees from application behaviour.
For HTTP/HTTPS, describe requests, responses and what protection adds. For DHCP, describe the configuration purpose and a typical allocation sequence, then explain that leases and service reachability are different matters.
Avoid saying TCP cannot fail, UDP always loses data, POST is automatically encrypted, HTTPS guarantees a trustworthy website or an Offer already means a usable confirmed lease.
The next lesson examines the TCP/IP model in more depth and is HL-only. This lesson’s transport/application protocol functions apply at both levels.
Protocol references: TCP · UDP · HTTP semantics · DHCPv4