Layer 7: The Application Layer
Explore the top layer of the OSI model, where applications access network services through protocols such as HTTP, DNS, SMTP, and FTP.
In this lesson, you will learn to:
- By the end of this lesson, learners will be able to describe the role of the Application layer, distinguish between applications and application-layer protocols, and give examples of common Layer 7 protocols.
Layer 7: The Application Layer
This lesson focuses on Layer 7, the Application layer. Learners will understand that the Application layer is not the application itself, but the set of protocols and services applications use to communicate over a network. Real examples show how a browser uses HTTP and DNS.
The Top of the Stack
The Application layer is where users and applications interact with the network. It is the closest layer to the people using a computer or phone. But there is a very common misunderstanding that must be cleared up immediately: the Application layer is not the application itself.
A web browser such as Chrome or Firefox is a program. It is not part of the OSI model. The Application layer is the set of network services and protocols that the browser uses to do its work. When you type a web address, the browser uses application-layer protocols to request the page and receive the response.
Think of the Application layer as the front desk of a hotel. The front desk is the point where guests make requests. The hotel itself has many departments behind the scenes, but guests interact with the front desk. In the same way, applications interact with the network through the Application layer.
What the Application layer provides
The Application layer gives applications access to network services. It handles tasks such as:
- Identifying the remote service or resource being requested.
- Formatting the request in the language of a specific protocol.
- Passing the request down to the Presentation layer.
When two applications communicate, they agree on the application-layer protocol they will speak. That agreement is what allows a browser from one vendor to talk to a web server from another vendor. The browser and server do not need to be written by the same company. They only need to follow the same protocol, such as HTTP.
Application Layer Protocols
The Application layer includes many protocols, each designed for a specific kind of service. A protocol is a set of rules that both sides follow so communication can succeed.
Common Application layer protocols
| Protocol | Full Name | Common Use |
|---|---|---|
| HTTP | Hypertext Transfer Protocol | Loading web pages |
| HTTPS | HTTP Secure | Encrypted web traffic |
| DNS | Domain Name System | Resolving names to IP addresses |
| SMTP | Simple Mail Transfer Protocol | Sending email |
| POP3 | Post Office Protocol v3 | Retrieving email |
| IMAP | Internet Message Access Protocol | Accessing email on a server |
| FTP | File Transfer Protocol | Transferring files |
| SSH | Secure Shell | Secure remote administration |
| DHCP | Dynamic Host Configuration Protocol | Assigning IP addresses automatically |
Each protocol has a purpose. HTTP moves web content. DNS translates human-friendly names such as threatintelligencelab.com into numerical IP addresses. SMTP, POP3, and IMAP handle different parts of email. DHCP gives a device its network configuration when it joins a network.
How protocols relate to port numbers
Application-layer protocols are often associated with well-known port numbers. A port is a numerical label that helps the receiving device know which application should receive the data. Examples include:
- HTTP: port 80
- HTTPS: port 443
- DNS: port 53
- SMTP: port 25
Port numbers are formally handled at the Transport layer, but they are usually discussed together with application protocols because they connect a service to an application. When you see a firewall rule that allows traffic to port 443, it is usually allowing HTTPS traffic.
How a Web Request Uses Layer 7
Let us trace a simple web request to see how the Application layer works in practice.
A user opens a browser and types https://threatintelligencelab.com. Several application-layer protocols are involved before the page appears.
Step 1: DNS resolves the name
The browser needs to know the server’s IP address. It sends a DNS request to a DNS server. The DNS server looks up the name and returns the IP address. DNS is an Application layer protocol.
Step 2: HTTPS requests the page
Now the browser has an IP address. It creates an HTTPS request asking the server for the page. HTTPS is HTTP protected by encryption. The browser sends the request to the server using the HTTPS protocol.
Step 3: The server responds
The web server receives the request, finds the page, and sends back the HTML, images, and other resources. The browser interprets those resources and displays the page.
Notice that the user only interacted with the browser. The browser used multiple Application layer protocols quietly in the background. DNS found the address. HTTPS fetched the content. If either protocol failed, the page would not load, even though the network cable was perfectly fine.
This example shows why Layer 7 issues can be confusing. A user may say “the internet is down” when the real problem is a DNS failure. The link, frames, packets, and segments all worked. The Application layer name resolution failed. That is why troubleshooting by layer is so powerful.