Networking Fundamentals - Class Notes
Course: CS 101 - Introduction to Networking
Instructor: Prof. Davis
Date: November 5, 2023
Topic: Application Layer Protocols - The Web & Network Services
1. The Application Layer (Layer 7)
Purpose: Provides network services directly to user applications. It's the
interface between the network and the software.
Key Concept: Uses client-server and peer-to-peer (P2P) architectures.
Protocols define:
The types of messages exchanged (e.g., request, response).
The syntax of those messages (e.g., fields within a message).
The semantics of the fields (what they mean).
Rules for when and how processes send and respond to messages.
2. Hypertext Transfer Protocol (HTTP)
The foundation of data communication for the World Wide Web.
Client-Server Model: Web browser (client) requests resources from a web
server.
Stateless Protocol: Each request from a client is independent; the server
does not remember previous requests. (State is managed via other means
like cookies).
Uses TCP: Reliable data transfer on port 80.
HTTP Request Methods:
GET: Request data from a resource.
POST: Submit data to be processed to a resource.
PUT: Replace a resource with the uploaded content.
DELETE: Delete a specified resource.
HEAD: Ask for a response identical to a GET, but without the response
body.
HTTP Response Status Codes:
1xx: Informational (e.g., 100 Continue)
2xx: Success (e.g., 200 OK, 201 Created)
3xx: Redirection (e.g., 301 Moved Permanently, 302 Found)
4xx: Client Error (e.g., 404 Not Found, 403 Forbidden)
5xx: Server Error (e.g., 500 Internal Server Error, 503 Service Unavailable)
3. HTTP Secure (HTTPS)
What it is: HTTP layered with encryption and authentication.
Purpose: Provides confidentiality (encryption), integrity (protection from
tampering), and authentication (verifying you're talking to the real server).
Uses TCP: On port 443.
How it works: Uses TLS (Transport Layer Security) or its predecessor, SSL.
TLS Handshake: The client and server agree on encryption algorithms and
exchange keys (using asymmetric cryptography).
Key Exchange: A shared "session key" is generated.
Encrypted Data Transfer: All HTTP data is encrypted using the session key
(using faster symmetric cryptography).
4. Domain Name System (DNS) - "The Phonebook of the Internet"
Purpose: Translates human-readable domain names (e.g., google.com)
into machine-readable IP addresses (e.g., 142.251.42.206).
Why it's critical: Humans can't remember IP addresses, and IP addresses
can change.
Distributed Database: No single server holds all DNS records. It's a
hierarchical, global system.
Uses UDP: On port 53 for queries (faster for simple requests). Uses TCP for
large responses like zone transfers.
DNS Hierarchy & Lookup Process:
Client checks its local cache. If not found, it asks...
Recursive Resolver (often your ISP's or Google's 8.8.8.8 DNS server). If not
in its cache, it queries the root servers.
Root DNS Server: Refers the resolver to a Top-Level Domain (TLD) server
(e.g., .com, .org).
TLD Server: Refers the resolver to the Authoritative Name Server for the
specific domain (e.g., google.com).
Authoritative Name Server: Finally holds the actual DNS record (e.g., the A
record for www.google.com) and returns the IP address to the resolver.
Resolver caches the IP and returns it to the client.
Common DNS Record Types:
Record Purpose Example
A Maps a domain name to an IPv4 address. example.com ->
93.184.216.34
AAAA Maps a domain name to an IPv6 address. example.com ->
2606:2800:220:1:248:1893:25c8:1946
CNAME Maps a domain name to another domain name (an alias).
www.example.com -> example.com
MX Directs mail to a mail server. example.com -> mail.example.com
NS Specifies the Authoritative Name Servers for a domain.
example.com -> ns1.registrar.com
5. Dynamic Host Configuration Protocol (DHCP)
Purpose: Automatically assigns IP addresses and other network
configuration parameters to devices on a network.
Eliminates the need for manual (static) IP configuration.
Uses UDP: Client uses port 68, server uses port 67.
The DORA Process:
Discover: Client broadcasts "I need an IP!"
Offer: DHCP server(s) respond with "Here's an IP you can use."
Request: Client broadcasts "I'll take that IP!"
Acknowledge: The chosen server acknowledges and sends the lease (IP,
subnet mask, gateway, DNS servers, lease time).
Assigned Parameters:
IP Address
Subnet Mask
Default Gateway
DNS Server(s)
Lease Time (how long the IP is reserved for the client)
6. Other Key Application Protocols
SMTP (Simple Mail Transfer Protocol): Used for sending email between mail
servers (port 25).
POP3/IMAP: Used by email clients to retrieve messages from a server.
FTP (File Transfer Protocol): For transferring files between a client and a
server (uses TCP ports 20 & 21).
SSH (Secure Shell): Provides a secure encrypted command-line interface
for managing network devices (port 22).
Key Takeaway: The Application Layer is the most visible part of the
network stack. Protocols like HTTP, DNS, and DHCP are what make modern
networks and the internet usable for people and applications.
Next Class: Network Hardware Deep Dive - Switches, Routers, and the
Data Link Layer (VLANs, STP).