Network - Application Layer Flashcards
Application Layer
The application layer is the top layer of the network that interacts directly with users. It includes websites, emails, and file transfers.
π Example: When you visit Google.com, your browser uses the application layer protocol HTTP to request the webpage.
The Application Layer is the part of a network that apps use to send and receive data.
What it does:
Lets programs like web browsers, emails, and chats work online.
Uses rules (protocols) like HTTP (websites), SMTP (email), FTP (file transfer), and DNS (web addresses).
Network Applications
Programs that use the internet to send and receive data, like email, video calls, and social media.
π Example: WhatsApp and Zoom are network applications because they rely on the internet to send messages.
Network applications are programs that need the internet to work. They send and receive data between devices.
Client-Server Paradigm
The Client-Server Paradigm is a way computers communicate in a network.
How It Works:
Client (e.g., your web browser) requests a service.
Server (e.g., a web server) processes the request and sends back data.
Peer-to-Peer (P2P) Architecture
Computers (peers) share files and communicate directly without a central server.
π Example: BitTorrent allows users to download files from other users instead of a single website.
Process Communication
Process Communication is how programs (processes) talk to each other in a computer or network.
Examples: Client-server model, HTTP requests, sockets.
Sockets
A socket is a virtual door through which programs send and receive data.
π Example: When you stream music, the music app opens a socket to connect to the server.
Addressing Processes
To send data to the correct program, we use an IP address and a port number.
π Example: HTTP uses port 80, and email servers use port 25.
Application Layer Protocols
Rules that define how applications communicate over the internet.
π Example: HTTP for web browsing, SMTP for emails, and DNS for translating website names into IP addresses.
HTTP (Hypertext Transfer Protocol)
A protocol used by web browsers to request and load web pages.
π Example: When you type www.sdu.dk, your browser uses HTTP to fetch the page.
HTTP vs. HTTPS
HTTP sends data without encryption (not secure).
HTTPS encrypts data using TLS for security.
π Example: Bank websites use HTTPS to protect sensitive information.
Persistent vs. Non-Persistent HTTP
Persistent HTTP keeps the connection open for multiple requests.
Non-persistent HTTP closes the connection after each request.
π Example: Modern browsers use persistent HTTP to load pages faster.
HTTP Request & Response
Request: The client asks for a web page.
Response: The server sends back the page.
π Example: A browser requests βindex.htmlβ, and the server sends the file.
HTTP Status Codes
Numbers that show the result of a request.
π Example:
200 OK β The request was successful.
404 Not Found β The page does not exist.
Cookies
Small pieces of data stored in your browser to remember login details or track activity.
π Example: A shopping website remembers items in your cart using cookies.
Web Caching
A system that stores copies of web pages to load them faster.
π Example: Google caches frequently visited pages so they load instantly.
DNS (Domain Name System)
Translates website names into IP addresses.
π Example: When you type www.facebook.com, DNS translates it to an IP address like 157.240.22.35.
DNS Hierarchy
DNS hierarchy is the structured system that helps find websites by translating domain names (like google.com) into IP addresses.
DNS has multiple layers:
1οΈβ£ Root Servers β Store information about top-level domains (.com, .org, .dk).
2οΈβ£ TLD Servers β Handle requests for specific domain extensions (.com, .dk).
3οΈβ£ Authoritative Servers β Store IP addresses for websites.
π Example: If you visit sdu.dk, DNS finds the right IP address for the website.
Why It Matters?
DNS hierarchy speeds up website access by breaking down requests step by step.
Without it, weβd have to remember IP addresses instead of domain names!
DNS Queries
A DNS query is a request made by a computer to find the IP address of a website (e.g., βWhat is the IP of google.com?β).
DNS Caching
Browsers and DNS servers store website IP addresses temporarily to speed up future requests.
π Example: If you visit YouTube, your browser remembers its IP for faster loading next time.
Email Protocols
Different protocols handle sending and receiving emails:
SMTP (Simple Mail Transfer Protocol) β Sends emails.
IMAP (Internet Message Access Protocol) β Retrieves emails and keeps them on the server.
π Example: Gmail uses IMAP so you can access emails from multiple devices.
Transport Layer Security (TLS)
TLS encrypts data to protect online communication (used in HTTPS and emails).
π Example: TLS prevents hackers from reading login details when you enter passwords.
Digital Signatures
A security method that proves an email or document is authentic.
π Example: A company digitally signs an email to prove itβs not fake.
OpenPGP & S/MIME
Both encrypt emails to keep them private π.
OpenPGP β You create and share keys yourself. Works with any email.
S/MIME β Uses trusted certificates (CA). Built into email apps like Outlook.
OpenPGP = More control
S/MIME = Easier to use
π OpenPGP Example:
You and a friend exchange public keys.
You encrypt an email using their public key.
Only they can decrypt it with their private key.
π§ S/MIME Example:
Your company gives you a digital certificate.
You send an encrypted email to a colleague.
Their email app automatically decrypts it using the certificate.
HTTP/2 and HTTP/3
HTTP/2 is faster than HTTP/1.1 because it sends multiple requests at once.
HTTP/3 uses QUIC (based on UDP) for even faster performance.
π Example: Streaming services use HTTP/2 to load videos faster.