The Application Layer sits at the very top of network architecture and provides the interface between human-facing applications (web browsers, mobile apps, email clients, file transfer tools) and the underlying network. A user never sees layers 2, 3, or 4 directly; instead, they interact with services like browsing a website, sending an email, accessing cloud storage, or opening an app. All these actions are possible only because Application Layer protocols define how data is formatted, requested, transferred, and displayed.
A formal definition is:
"The Application Layer is the top layer of the TCP/IP model responsible for providing network services directly to end users and applications, enabling communication such as web browsing, email transfer, file access, and name resolution."
Different applications require different rules. For example, a browser needs a protocol to fetch webpages (HTTP/HTTPS); emails need their own structured communication (SMTP + MIME); name lookup requires DNS; file transfer needs FTP. This tutorial covers five foundational protocols a BS student must understand both theoretically and practically.
DNS – Domain Name System
Contents
- DNS – Domain Name System
- How DNS Works (Simple Real-Life Flow)
- Wireshark Hands-On: Observing DNS Traffic
- HTTP and HTTPS – Web Access Protocols
- How HTTP Works
- Wireshark Hands-On: Observing HTTP/HTTPS
- SMTP – Sending Emails
- How SMTP Works
- Wireshark Hands-On: Observing SMTP
- FTP – File Transfer Protocol
- How FTP Works
- Wireshark Hands-On: Observing FTP
- MIME – Enabling Attachments in Emails
- How MIME Works
- Share this:
Humans think in names (google.com), while machines communicate using numeric IPs (142.250.195.78). DNS bridges this gap. Without DNS, the Internet would feel like memorizing phone numbers for every contact.
"DNS is a distributed naming system that translates human-readable domain names into machine-understandable IP addresses."
How DNS Works (Simple Real-Life Flow)
When you open a website:
- Your computer needs the IP of that domain.
- It asks a local DNS resolver.
- If not found, the resolver queries authoritative DNS servers.
- The IP is returned and cached.
- The browser connects to that IP.
DNS uses different record types, each serving a specific purpose in the name‑to‑IP translation process. An overview of the most important record types is:
A: maps a domain name to an IPv4 address.
AAAA: maps a domain name to an IPv6 address.
MX: identifies the mail server for the domain.
CNAME: creates an alias that points to another domain.
In practice, these records simply help the resolver decide which information to return when a user requests a domain. When captured in Wireshark, these records appear inside DNS responses, typically transmitted over UDP on port 53.
Wireshark Hands-On: Observing DNS Traffic
Step 1: Start Wireshark → select your active interface.
Step 2: Apply DNS filter:
dns
Step 3: Open any website, e.g., www.wikipedia.org.
You will see:
- Standard DNS query
- Standard DNS response
- “A” or “AAAA” records
In the packet details, observe:
- Query name
- Response IP
- Time taken
- Whether recursion was requested
This confirms how DNS converts names to addresses.
HTTP and HTTPS – Web Access Protocols
Every time you open a webpage, watch YouTube, search Google, or use any web app, you are using HTTP/HTTPS.
"HTTP is a stateless, request–response protocol used for transferring web resources between a client and a web server."
"HTTPS is the secure version of HTTP that uses TLS/SSL encryption to protect the confidentiality and integrity of data."
HTTP is like sending a request letter to a shopkeeper; HTTPS is the same but inside a locked envelope.
How HTTP Works
When you type a URL:
- Browser sends an HTTP request to the server.
- Server responds with an HTTP response.
- Browser renders the webpage.
A request has:
- Request line → e.g.,
GET /index.html HTTP/1.1 - Headers → host, user-agent, cookies
- Optional body → used in POST forms
HTTPS works exactly the same but encrypted.
Wireshark Hands-On: Observing HTTP/HTTPS
For HTTP:
Use filter:
http
Visit a non-HTTPS site such as http://neverssl.com.
Observe:
- GET request
- Response code (200 OK, 404 Not Found)
- Headers
- Content-Type
For HTTPS:
Use filter:
tls
You will not see the actual message content because it is encrypted, but you will observe:
- TLS handshake
- Certificate exchange
- Encrypted application data
This clearly shows the difference between HTTP (visible) and HTTPS (encrypted).
SMTP – Sending Emails
Email communication uses SMTP. When you click “Send,” your mail server transfers your message to the recipient’s server using SMTP. It is a reliable, store-and-forward mechanism.
A precise definition:
"SMTP is a protocol used to transfer outgoing email messages from a client to a mail server and between mail servers."
How SMTP Works
A simplified flow:
- SMTP client connects to SMTP server (port 25).
- Server greets with
220. - Client sends:
- HELO
- MAIL FROM:
- RCPT TO:
- DATA
- Server accepts the message.
- Server forwards it to the recipient’s mail server.
SMTP handles sending only. Receiving is handled by POP3/IMAP.
Wireshark Hands-On: Observing SMTP
Use an email client like Thunderbird.
Step 1: Start Wireshark and filter:
smtp
Step 2: Send a test email.
You will see:
- HELO / EHLO
- MAIL FROM
- RCPT TO
- DATA
- Message body
This shows the full email conversation.
FTP – File Transfer Protocol
FTP was designed to move files between computers. Although old, it is still used in hosting panels and legacy systems.
Definition:
"FTP is a protocol that enables file upload and download using separate control and data connections."
It uses two channels:
- Control Channel → Commands (port 21)
- Data Channel → File transfer (port 20)
How FTP Works
- Client connects to server on port 21.
- User logs in.
- Client sends file transfer commands.
- Server opens data channel and transfers file.
FTP has two modes:
- Active mode – server initiates data connection.
- Passive mode – client initiates connection.
Wireshark Hands-On: Observing FTP
Step 1: Use FileZilla Client or a public FTP server.
Step 2: Start Wireshark → filter:
ftp
Step 3: Log in and download a small file.
You will observe:
- USER and PASS commands
- Control messages
- Data channel establishment
MIME – Enabling Attachments in Emails
SMTP alone could not send images, PDFs, or audio. MIME extends SMTP to handle multimedia.
Definition:
"MIME is an extension of email protocols that allows transmission of text, images, audio, video, and attachments using standardized encoding formats."
How MIME Works
Inside an email message, MIME:
- Defines content type
- Divides messages into parts using boundaries
- Encodes attachments using Base64
A simple MIME snippet:
Content-Type: multipart/mixed; boundary="XYZ123"
--XYZ123
Content-Type: text/plain

