Docsity

COMPUTER NETWORKING DEEP DIVE.pdf, Summaries of Computer Science

Toggle sidebar
bg1
1
௱
COMPUTER NETWORKING: DEEP DIVE
2 1. The Foundational Models
3 These models standardize how different computing systems communicate over a network.
4 The OSI Model (7 Layers)
5 *The theoretical framework. Mnemonic: Please Do Not Throw Sausage Pizza Away.*
6
7 Physical: Transmits raw bitstreams over physical media (cables, radio waves). Data
unit: Bits.
8 Data Link: Node-to-node transfer. Handles error detection and MAC addressing. Data
unit: Frames. (Switches operate here).
9 Network: Routing packets across different networks. Handles logical addressing (IP).
Data unit: Packets. (Routers operate here).
10 Transport: End-to-end communication. Handles reliability, flow control, and
multiplexing (Ports). Data unit: Segments.
11 Session: Establishes, maintains, and terminates communication sessions.
12 Presentation: Data translation, encryption, and compression (e.g., JPEG, SSL/TLS).
13 Application: Where user-facing apps interact with the network (HTTP, DNS, FTP). Data
unit: Data.
14
15 The TCP/IP Model (4 Layers)
16 The practical framework actually used on the Internet.
17
18 Network Access (Combines OSI Physical + Data Link)
19 Internet (OSI Network)
20 Transport (OSI Transport)
21 Application (Combines OSI Session + Presentation + Application)
22
23 2. Core Network Devices
24 Know what they do and which OSI layer they operate on.
25
26 Hub (Layer 1): "Dumb" device. Broadcasts incoming data to all connected ports.
Causes high collisions. (Largely obsolete).
27 Switch (Layer 2): "Smart" device. Uses MAC addresses to send data only to the
specific destination port. Reduces network traffic.
28 Router (Layer 3): Connects different networks together (e.g., your home LAN to the
WAN/Internet). Uses IP addresses to determine the best path for a packet.
29 Firewall (Layer 3-7): Monitors and filters incoming/outgoing network traffic based
on security rules.
30
31 3. The Transport Layer: TCP vs. UDP
32 This is the most heavily tested networking concept.
33 Feature
34
35 TCP (Transmission Control Protocol)
36
37 UDP (User Datagram Protocol)
38 Connection
39
40 Connection-oriented (requires handshake)
41
42 Connectionless (fire and forget)
43 Reliability
44
45 High. Guarantees delivery and order.
46
47 Low. No guarantees. Packets may drop/reorder.
48 Speed
49
50 Slower (due to overhead and error checking)
51
52 Very fast (minimal overhead)
53 Use Cases
54
55 Web browsing (HTTP), Email (SMTP), File Transfer (FTP)
56
57 Video streaming, VoIP, Online Gaming, DNS queries
58 The TCP 3-Way Handshake:
59 Before sending data, TCP establishes a connection:
60
pf3

Partial preview of the text

Download COMPUTER NETWORKING DEEP DIVE.pdf and more Summaries Computer Science in PDF only on Docsity!

1 し COMPUTER NETWORKING: DEEP DIVE

2 1. The Foundational Models 3 These models standardize how different computing systems communicate over a network. 4 The OSI Model (7 Layers) 5 The theoretical framework. Mnemonic: Please Do Not Throw Sausage Pizza Away. 6 7 Physical: Transmits raw bitstreams over physical media (cables, radio waves). Data unit: Bits. 8 Data Link: Node-to-node transfer. Handles error detection and MAC addressing. Data unit: Frames. (Switches operate here). 9 Network: Routing packets across different networks. Handles logical addressing (IP). Data unit: Packets. (Routers operate here). 10 Transport: End-to-end communication. Handles reliability, flow control, and multiplexing (Ports). Data unit: Segments. 11 Session: Establishes, maintains, and terminates communication sessions. 12 Presentation: Data translation, encryption, and compression (e.g., JPEG, SSL/TLS). 13 Application: Where user-facing apps interact with the network (HTTP, DNS, FTP). Data unit: Data. 14 15 The TCP/IP Model (4 Layers) 16 The practical framework actually used on the Internet. 17 18 Network Access (Combines OSI Physical + Data Link) 19 Internet (OSI Network) 20 Transport (OSI Transport) 21 Application (Combines OSI Session + Presentation + Application) 22 23 2. Core Network Devices 24 Know what they do and which OSI layer they operate on. 25 26 Hub (Layer 1): "Dumb" device. Broadcasts incoming data to all connected ports. Causes high collisions. (Largely obsolete). 27 Switch (Layer 2): "Smart" device. Uses MAC addresses to send data only to the specific destination port. Reduces network traffic. 28 Router (Layer 3): Connects different networks together (e.g., your home LAN to the WAN/Internet). Uses IP addresses to determine the best path for a packet. 29 Firewall (Layer 3-7): Monitors and filters incoming/outgoing network traffic based on security rules. 30 31 3. The Transport Layer: TCP vs. UDP 32 This is the most heavily tested networking concept. 33 Feature 34 35 TCP (Transmission Control Protocol) 36 37 UDP (User Datagram Protocol) 38 Connection 39 40 Connection-oriented (requires handshake) 41 42 Connectionless (fire and forget) 43 Reliability 44 45 High. Guarantees delivery and order. 46 47 Low. No guarantees. Packets may drop/reorder. 48 Speed 49 50 Slower (due to overhead and error checking) 51 52 Very fast (minimal overhead) 53 Use Cases 54 55 Web browsing (HTTP), Email (SMTP), File Transfer (FTP) 56 57 Video streaming, VoIP, Online Gaming, DNS queries 58 The TCP 3-Way Handshake: 59 Before sending data, TCP establishes a connection: 60

61 SYN: Client sends a synchronize packet to the server. 62 SYN-ACK: Server acknowledges and sends its own synchronize packet back. 63 ACK: Client acknowledges the server's packet. Connection established. Data transfer begins. 64 65 4. The Network Layer: IP & Routing 66 67 IP Addresses: Logical addresses assigned to devices. 68 IPv4: 32-bit (e.g., 192.168.1.1). Running out of addresses. 69 IPv6: 128-bit (e.g., 2001:0db8::ff00:0042:832f). Solves the exhaustion problem. 70 Public vs. Private IPs: Private IPs (e.g., 192.168.x.x, 10.x.x.x) are used inside local networks and are not routable on the public internet. 71 NAT (Network Address Translation): The process your home router uses to translate multiple private IP addresses on your local network into a single public IP address for the internet. 72 Subnetting & CIDR: Dividing a network into smaller pieces. 73 Example: 192.168.1.0/24. The /24 means the first 24 bits are the network prefix, leaving 8 bits for hosts (allowing 254 usable IP addresses). 74 75 5. Essential Application Protocols 76 DNS (Domain Name System) 77 The phonebook of the internet. Translates human-readable domain names to IP addresses. 78 79 Port: 53 (Uses UDP for standard queries, TCP for large transfers like zone transfers). 80 How it works (The Resolution Process): 81 You type google.com. Your OS checks its local cache. 82 If not found, it asks the Recursive DNS Server (usually your ISP). 83 The Recursive server asks the Root Server (.com). 84 The Root server points to the TLD (Top Level Domain) Server. 85 The TLD server points to the Authoritative Name Server for google.com. 86 The Authoritative server returns the IP address to your computer. 87 88 HTTP / HTTPS (HyperText Transfer Protocol) 89 The foundation of the World Wide Web. 90 91 Ports: HTTP = 80, HTTPS = 443. 92 HTTPS: HTTP encrypted via TLS/SSL. 93 TLS Handshake: Uses Asymmetric encryption (public/private keys) to securely exchange a session key, then switches to Symmetric encryption (shared secret key) for the actual data transfer because it's much faster. 94 HTTP Methods: GET (retrieve), POST (submit data), PUT (update/replace), DELETE (remove). 95 Status Codes: 96 2xx (Success): 200 OK, 201 Created. 97 3xx (Redirection): 301 Moved Permanently, 304 Not Modified (Cache hit). 98 4xx (Client Error): 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found. 99 5xx (Server Error): 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable. 100 101 DHCP (Dynamic Host Configuration Protocol) 102 Automatically assigns IP addresses to devices on a network. 103 104 Process (DORA): Discover (client broadcasts), Offer (server offers an IP), Request (client requests it), Acknowledge (server confirms). 105 106 6. Modern Web & Cloud Architecture 107 How modern applications handle millions of users. 108 109 Load Balancers: Distributes incoming network traffic across multiple servers to ensure no single server is overwhelmed. (Operates at Layer 4 or 7). 110 CDN (Content Delivery Network): A geographically distributed network of proxy servers. Caches static content (images, CSS, JS) on servers physically closer to the user to reduce latency. 111 Proxies: An intermediary server. 112 Forward Proxy: Sits in front of clients (used for filtering/bypassing geo-blocks). 113 Reverse Proxy: Sits in front of backend servers (used for load balancing,