DEV Community

Tejas Shinkar
Tejas Shinkar

Posted on Edited on

Network Protocols โ€” ARP, FTP, SMTP, HTTP, HTTPS, DNS and DHCP

๐ŸŒ Network Protocols

ARP, FTP, SMTP, HTTP, HTTPS, DNS and DHCP

Series: Networking Fundamentals for Cloud & DevOps โ€” Part 6 of 6

We have already seen how hosts, switches, routers, MAC addresses and IP addresses work together. Now we move one level higher and look at the protocols that define how different types of communication happen.


1. Protocol

A protocol is a set of rules/messages that devices follow to communicate.

Think of a protocol as a common language with defined rules.

For example:

  • If two devices need to resolve an IP address to a MAC address โ†’ ARP
  • If a client needs to transfer a file โ†’ FTP
  • If a client needs to send an email โ†’ SMTP
  • If a browser needs web communication โ†’ HTTP/HTTPS
  • If a host needs to convert a domain name into an IP address โ†’ DNS
  • If a host needs its network configuration automatically โ†’ DHCP

A quick overview:

Protocol Full Form Main Job
ARP Address Resolution Protocol IP โ†’ MAC
FTP File Transfer Protocol Transfer files
SMTP Simple Mail Transfer Protocol Send email
HTTP HyperText Transfer Protocol Web communication
HTTPS HTTP Secure Secure HTTP using TLS
DNS Domain Name System Domain name โ†’ IP
DHCP Dynamic Host Configuration Protocol Automatically gives network configuration

The important thing is not just memorizing the names.

Each protocol solves a different communication problem.


2. ARP

ARP = Address Resolution Protocol. ARP solves this problem:

"I know the IP address, but what is the MAC address?"

Suppose a host knows 9.1.1.22 but needs the corresponding MAC address. It broadcasts an ARP Request:

Host 9.1.1.11: "Who has 9.1.1.22?"

The host with that IP responds:

Host 9.1.1.22: "My MAC is b3b3."

So the mapping becomes 9.1.1.22 โ†’ b3b3.

ARP = IP โ†’ MAC mapping

This connects directly to what we learned earlier:

IP address โ†’ ARP โ†’ MAC address โ†’ Ethernet frame

ARP is mainly concerned with finding the Layer 2 address needed for communication on the local network.


3. FTP

FTP = File Transfer Protocol. FTP is used for file transfer โ€” a client sends a request to the FTP server for a file, e.g. file.pdf.

Client โ”€โ”€ RETR file.pdf โ”€โ”€โ†’ FTP Server
Client โ†โ”€โ”€โ”€โ”€ file.pdf โ”€โ”€โ”€โ”€โ”€ FTP Server
Enter fullscreen mode Exit fullscreen mode

RETR essentially means:

Retrieve/download this file.

FTP โ†’ File transfer


4. SMTP

SMTP = Simple Mail Transfer Protocol. SMTP is used for sending email. Conceptually:

Client โ”€โ”€ HELLO โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ SMTP Server
Client โ”€โ”€ email โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ SMTP Server
Enter fullscreen mode Exit fullscreen mode

The protocol defines how the email-sending communication takes place between the client and mail server, and between mail servers.

SMTP = sending mail


5. HTTP

HTTP = HyperText Transfer Protocol. HTTP is used for web communication. A browser/client can request a resource from a web server:

Client โ”€โ”€ GET /index.html โ”€โ”€โ†’ Web Server
Client โ†โ”€โ”€โ”€โ”€โ”€โ”€ 200 OK โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Web Server
Enter fullscreen mode Exit fullscreen mode

The client asks for a resource, and the web server responds. This is the basic protocol underneath the request/response model used by the web.

HTTP โ†’ Web communication


6. HTTPS

HTTPS = HTTP + TLS security. HTTPS is HTTP communication protected using TLS.

HTTP + TLS security โ†’ HTTPS

TLS provides security mechanisms such as encryption and authentication for the communication. Conceptually, the connection between client and server is encrypted end-to-end (Client โ•โ•โ• encrypted HTTPS connection โ•โ•โ•โ†’ Web Server).

HTTP = Web communication. HTTPS = Secure web communication.

HTTPS is what allows a browser to communicate with a web server while protecting the connection against unauthorized observation or modification.


7. DNS

DNS = Domain Name System. DNS solves a different problem from ARP.

ARP asks:

"I know the IP. What is the MAC?"

DNS asks:

"I know the website/domain name. What is its IP?"

Suppose you want to access site.com. Your computer needs the server's IP address, so it asks a DNS server:

"What is the IP address of site.com?"

The DNS server responds: site.com โ†’ 160.8.23.154.

DNS = Domain name โ†’ IP

The key distinction is:

ARP: IP โ†’ MAC. DNS: Name โ†’ IP.


8. Four Things a Host Needs for Internet Connectivity

A host generally needs four important pieces of network configuration:

  1. IP Address
  2. Subnet Mask
  3. Default Gateway
  4. DNS Server

For example:

  • IP: 9.1.1.11
  • Mask: 255.255.255.0
  • Gateway: 9.1.1.1
  • DNS: 8.8.8.8

Each one has a different job.

IP Address

Identifies the host on the network.

IP โ†’ Which host am I?

Subnet Mask

Determines which addresses belong to the local network.

Subnet Mask โ†’ Which network am I in?

Default Gateway

Provides the router used to reach other networks.

Default Gateway โ†’ How do I reach other networks?

DNS

Converts domain names into IP addresses.

DNS โ†’ What IP belongs to this domain name?

So:

  • IP โ†’ identifies the host
  • Subnet mask โ†’ determines the local network
  • Default gateway โ†’ router used to reach other networks
  • DNS โ†’ converts names into IP addresses

These four pieces work together whenever a host needs to communicate beyond its immediate network.


9. DHCP

DHCP = Dynamic Host Configuration Protocol. DHCP automatically provides network configuration to a client.

Without DHCP, a host would need to be manually configured with values such as:

  • IP = 9.1.1.11
  • Subnet = 255.255.255.0
  • Gateway = 9.1.1.1
  • DNS = 8.8.8.8

With DHCP, the client can obtain these settings automatically from a DHCP server. The basic process is:

  1. Client โ†’ DHCP Discover
  2. Server โ†’ DHCP Offer
  3. Client โ†’ DHCP Request
  4. Server โ†’ DHCP ACK

D โ†’ O โ†’ R โ†’ A โ€” Discover, Offer, Request, ACK

The result is that the host receives its network configuration automatically.

DHCP automatically gives a host its network configuration.


Quick Revision

  • ARP โ†’ IP โ†’ MAC
  • DNS โ†’ Name โ†’ IP
  • DHCP โ†’ IP + Mask + Gateway + DNS
  • HTTP โ†’ Web communication
  • HTTPS โ†’ Secure web communication
  • FTP โ†’ File transfer
  • SMTP โ†’ Send email

The Big Picture

These protocols solve different problems, but they work together when a host accesses something on the Internet. A simplified sequence could look like:

  1. DHCP โ†’ get IP + subnet mask + gateway + DNS
  2. DNS โ†’ convert domain name โ†’ destination IP
  3. Routing โ†’ decide whether destination is local or remote
  4. ARP โ†’ resolve the next-hop IP โ†’ MAC
  5. HTTP / HTTPS โ†’ communicate with the web server

So don't think of these protocols as isolated terms. They are different pieces of the same networking process:

DHCP โ†’ network configuration ยท DNS โ†’ find destination IP ยท Routing โ†’ find next hop ยท ARP โ†’ find next-hop MAC ยท HTTP/HTTPS โ†’ exchange web data

And other protocols solve other application-level problems:

FTP โ†’ file transfer. SMTP โ†’ email.

The important mental model is:

Protocols exist because different parts of communication need different rules.


Part 6 of 6 โ€” Networking Fundamentals for Cloud & DevOps
This completes the current networking fundamentals sequence and provides the protocol foundation needed for deeper AWS networking concepts.

Top comments (0)