diff options
| author | mo khan <mo@mokhan.ca> | 2025-09-07 14:09:13 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-09-07 14:09:13 -0600 |
| commit | 0f6a73bb4348c6407bcec7805fab093d13be9947 (patch) | |
| tree | fa9d284e0497cf3b45099071a4e15fec0c6174a0 | |
| parent | 9dd3524edcdbd8d320f1a3d172842e46f902b649 (diff) | |
feat: complete part 1 of assignment 1
| -rw-r--r-- | comp347/assignment1/assignment1.md | 63 |
1 files changed, 62 insertions, 1 deletions
diff --git a/comp347/assignment1/assignment1.md b/comp347/assignment1/assignment1.md index ace6045..559a80b 100644 --- a/comp347/assignment1/assignment1.md +++ b/comp347/assignment1/assignment1.md @@ -183,7 +183,68 @@ The conditional GET mechanism solves the problem of **cache consistency** - ensu ### 1.6 Email Protocol Analysis (5%) -[To be completed] +**Scenario:** Web-based email (Gmail) sent to Alice who accesses email via IMAP on smartphone over Wi-Fi. + +#### Network Protocols Involved: + +**Sender Side (Web-based Gmail):** +- **HTTP/HTTPS:** Communication between browser and Gmail web server +- **SMTP:** Gmail server sending email to Alice's mail server +- **DNS:** Domain name resolution for Alice's mail server +- **TCP:** Reliable transport for HTTP and SMTP +- **IP:** Network layer routing +- **Wi-Fi (802.11):** Wireless LAN protocol +- **Ethernet:** If Wi-Fi access point connects via wired network + +**Receiver Side (Alice's IMAP access):** +- **IMAP:** Alice's smartphone retrieving email from her mail server +- **TCP:** Reliable transport for IMAP +- **IP:** Network layer routing +- **Wi-Fi (802.11):** Wireless connection to home network +- **DNS:** Resolving mail server address + +#### Detailed Message Flow Through Protocol Layers: + +**Phase 1: Sending Email (Your Smartphone → Gmail Server)** + +1. **Application Layer:** You compose email in Gmail web interface +2. **HTTP/HTTPS:** Browser sends POST request with email data to Gmail server +3. **Transport Layer:** TCP segments the HTTP request, adds port numbers (443 for HTTPS) +4. **Network Layer:** IP adds source/destination IP addresses (your phone → Gmail server) +5. **Link Layer:** Wi-Fi frames the IP packets with MAC addresses (phone → router) +6. **Physical Layer:** Radio waves transmit frames to Wi-Fi access point + +**Phase 2: Gmail Processing and SMTP Delivery** + +1. **Gmail Server Processing:** Receives HTTP request, extracts email, prepares for SMTP delivery +2. **DNS Resolution:** Gmail server queries DNS to find Alice's mail server IP address +3. **SMTP Connection:** Gmail establishes TCP connection to Alice's mail server (port 25/587) +4. **Application Layer:** SMTP protocol transfers email from Gmail to Alice's mail server +5. **Transport Layer:** TCP ensures reliable delivery of SMTP commands and email content +6. **Network Layer:** IP routes packets through internet infrastructure +7. **Link Layer:** Various link technologies (Ethernet, fiber, etc.) carry packets + +**Phase 3: Alice Retrieving Email (Alice's Mail Server → Smartphone)** + +1. **IMAP Request:** Alice's email app sends IMAP commands to check for new messages +2. **Transport Layer:** TCP establishes connection (port 143/993), segments IMAP requests +3. **Network Layer:** IP routes packets from Alice's phone to her mail server +4. **Link Layer:** Wi-Fi frames carry IP packets (phone → Wi-Fi router → ISP) +5. **Physical Layer:** Radio waves and various physical media transmit signals + +**Phase 4: Email Delivery to Alice's Phone** + +1. **IMAP Response:** Mail server responds with email content via IMAP protocol +2. **Transport Layer:** TCP reliably delivers email data to Alice's phone +3. **Network Layer:** IP routes response packets back to Alice's phone +4. **Link Layer:** Wi-Fi receives and processes frames at Alice's phone +5. **Physical Layer:** Radio signals converted back to digital data +6. **Application Layer:** Email app displays the received message + +**Key Protocol Stack Traversals:** +- **Downward:** Each device processes from Application → Physical when sending +- **Upward:** Each device processes from Physical → Application when receiving +- **Multiple Hops:** Email traverses multiple network devices (routers, switches) between sender and receiver, each processing up to Network layer and back down --- |
