summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-09-29 18:48:22 -0600
committermo khan <mo@mokhan.ca>2025-09-29 18:48:22 -0600
commitb9ad78b210dafe6a4d7f0a71d398e24e88dbf6fc (patch)
tree13b1f1843a07db499d89e92a03d2fdcd6583d4bd
parent69b9dced70fffbf288153983aba51b3b4ec06ec5 (diff)
reset assignment 1
-rw-r--r--assignments/1/README.md149
1 files changed, 51 insertions, 98 deletions
diff --git a/assignments/1/README.md b/assignments/1/README.md
index 79a7363..de8f378 100644
--- a/assignments/1/README.md
+++ b/assignments/1/README.md
@@ -293,138 +293,91 @@ Reference: Kurose & Ross, 8th ed., Sec. 2.2 (HTTP/HTTPS basics), Sec. 2.3 (Elect
# Part 2: Long Answer Questions (70%)
-I provide short, clear answers first, then 1-2 sentences of reasoning.
+> I provide short, clear answers first, then 1-2 sentences of reasoning.
## 2.1 File Transfer Analysis (20%)
-> (20%) Consider that you are submitting your assignment in a compressed file from your computer at home to the university server that is hosting your online course. Your large file is segmented into smaller packets before it is sent into the first link. Each packet is 10,000 bits long, including 100 bits of header. Assume the size of the assignment file is 10 MB.
->
+> (20%) Consider that you are submitting your assignment in a compressed file from your computer at home to the university server that is hosting your online course.
+> Your large file is segmented into smaller packets before it is sent into the first link.
+> Each packet is 10,000 bits long, including 100 bits of header.
+> Assume the size of the assignment file is 10 MB.
+
+
> a) How many packets will the assignment file be segmented into?
+
+It will take 8080 packets to upload a 10 MB assignment file.
+
+Each packet with 10,000 bits with 100 bits reserved for the header. This leaves
+9,900 bits for the payload in each packet. A 10 MB file is equal to 80,000,000
+bits. So to calculate the total packets necessary we take the total # of bits
+divided by the payload size of each packet.
+
+* Packet: 10,000 bits
+ * Header: 100 bits
+ * Payload: 9,900 bits
+* File: 10 MB = 80,000,000 bits
+* Total Packets: 80,000,000 / 9,900 = 8080
+
> b) How many links can be identified using TRACERT or Traceroute between your computer and the university server? What are they?
+
+I identified at least 7 links.
+
+Later hops filtered probes, so the total hop count to the destination could not be observed with ICMP/UDP traceroute.
+
+| hop | address | description |
+| --- | ------- | ----------- |
+| 1 | _gateway (192.168.0.1) | home router |
+| 2 | 10.139.230.1 | ISP gateway (private address inside Telus network) |
+| 3 to 6 | | no reply (likely ICMP/UDP filtered) |
+| 7 | QUBCPQBIDR03.bb.telus.com (154.11.15.105) and 154.11.15.107 | Telus backbone |
+| 8 to 30 | | no reply |
+
> c) What is the speed for each identified link based on your best calculation? Show your work.
> d) Assume you start uploading the assignment at t0. At what time will the last packet be pushed into the first link?
> e) At what time will the last packet arrive at the university server?
-Given: File = 10 MB = 80,000,000 bits; packet = 10,000 bits with 100-bit header, so payload = 9,900 bits.
-Measured in Calgary (Wi-Fi):
-- Download: 374.18, 505.75, 481.44 Mb/s -> average ~453.79 Mb/s
-- Upload: 496.73, 390.19, 402.87 Mb/s -> average ~429.93 Mb/s
-Use average upload R_up ~ 430 Mb/s for this upload calculation.
-
-a) Number of packets
-- Answer: ceil(80,000,000 / 9,900) = 8,081 packets.
-
-b) Links (via traceroute)
-- Answer: In all three traces to www.athabascau.ca, the last responding hop was 7 (Telus backbone). Later hops filtered probes, so the total hop count to the destination could not be observed with ICMP/UDP traceroute.
-- Identified hops from Run 1 (morning):
- - Hop 1: _gateway (192.168.0.1) - home router
- - Hop 2: 10.139.230.1 - ISP gateway (private address inside Telus network)
- - Hops 3-6: no reply (likely ICMP/UDP filtered)
- - Hop 7: QUBCPQBIDR03.bb.telus.com (154.11.15.105) and 154.11.15.107 - Telus backbone
- - Hops 8-30: no reply
- - Destination: www.athabascau.ca (3.175.64.80) - no reply
-
-c) Speed for each identified link
-- Answer (best estimate):
- - Home Wi-Fi/access uplink: measured average upload ~430 Mb/s (local bottleneck when sending)
- - ISP/regional/backbone: typically >= 1-10 Gb/s
-- Reason: Per-link bandwidth cannot be inferred from traceroute RTT; we use measured access speeds and typical provider capacities.
-
-d) Time when the last packet enters the first link
-- Total bits across the first link (including headers): 8,081 x 10,000 = 80,810,000 bits
-- Time = 80,810,000 / 430,000,000 ~ 0.188 s
-- Answer: t0 + 0.188 s (approx)
-
-e) Time when the last packet arrives at the server
-- Add ~10-20 ms for propagation/processing (consistent with ~18.8 ms RTT to the last responding hop): 0.188 s + 0.010-0.020 s ~ 0.198-0.208 s
-- Answer: about t0 + 0.20-0.21 s
-
-Method note on traceroute filtering
-- Many networks de-prioritize or block ICMP/UDP TTL-expired replies. This can hide intermediate and destination hops even when the path is fine. Using TCP to port 443 often elicits more replies, but the assignment requires traceroute; therefore I report the last responding hop and include the full outputs for verification.
-
Reference: Kurose & Ross, 8th ed., Ch. 1 (delays, throughput, store-and-forward; traceroute context).
## 2.2 Propagation Delay and Bandwidth-Delay Product (20%)
-> (20%) Consider that you are submitting another assignment from your home computer to the university server, and you have worked out a list of network links between your computer and the university server.
->
+> (20%) Consider that you are submitting another assignment from your
+home computer to the university server, and you have worked out a list
+of network links between your computer and the university server.
+
> a) Based on your best estimate and calculation, what is the total distance your assignment data will travel to reach the university server?
> b) Suppose the propagation speed over all the links is the same 2*10^8 meters/sec. What is propagation delay T_prop from your computer to the university server?
> c) Further assume all the links have the same speed R bps. What is the bandwidth-delay product R*T_prop?
> d) Now suppose the assignment file is sent continuously as one big file. What is the maximum number of bits that will be in the links at any given time?
> e) Based on the results from c and d, what does the bandwidth-delay product imply?
-Assume total fiber distance home -> campus ~ 1,800 km; propagation speed ~ 2 x 10^8 m/s.
-
-a) Total distance
-- Answer: 1.8 x 10^6 meters.
-
-b) Propagation delay T_prop
-- Answer: 1.8 x 10^6 / (2 x 10^8) = 9 x 10^-3 s = 9 ms (one way).
-
-c) Bandwidth-delay product R x T_prop
-- Using the measured average upload R ~ 430 Mb/s:
-- R x T_prop = 430 x 10^6 x 9 x 10^-3 = 3,870,000 bits (~3.87 Mb)
-
-d) Max bits in links at any time (continuous send)
-- Answer: ~3.87 Mb (equal to the bandwidth-delay product).
-
-e) What the product implies
-- Answer: Minimum in-flight/window size of ~3.9 Mb to fully use the path at ~430 Mb/s across a 9 ms one-way path; sets buffer/window requirements.
-
Reference: Kurose & Ross, 8th ed., Sec. 1.4 (propagation delay) and Ch. 3 (BDP intuition via TCP throughput/window sizing).
## 2.3 Web Cache Implementation and Performance (20%)
> (20%) You have learned that a Web cache can be useful in some cases. In this problem, you will investigate how useful a Web cache can be at a home. First, you need to download Apache server and install and run it as a proxy server on a computer on your home network. Then, write a brief report on what you did to make it work and how you are using it on all your devices on your home network.
> Assume your family has six members. Each member likes to download short videos from the Internet to watch on their personal devices. All these devices are connected to the Internet through Wi-Fi. Further assume the average object size of each short video is 100 MB and the average request rate from all devices to servers on the Internet is three requests per minute. Five seconds is the average amount of time it takes for the router on the ISP side of your Internet link to forward an HTTP request to a server on the Internet and receive a response.
->
-> a) What is the average time alpha for your home router to receive a video object from your ISP router?
-> b) What is the traffic intensity mu on the Internet link to your home router if none of the requested videos is cached on the proxy server?
-> c) If average access delay beta is defined as alpha/(mu-1), what is the average access delay your family members will experience when watching the short videos?
-> d) If the total average response time is defined as 5+beta, and the miss rate of your proxy server is 0.5, what will be the total average response time?
-Proxy setup summary (implemented and included):
-- Start: bin/server (httpd -f etc/apache/apache.conf), Cache root: var/cache/apache2, Proxy port: 8081. Devices can be set to use http://<proxy-host>:8081.
+> a) What is the average time alpha for your home router to receive a video object from your ISP router?
-Given for analysis: object size F = 100 MB = 800 Mb; aggregate request rate lambda = 3/min = 0.05/s; ISP router overhead = 5 s; measured average downlink R ~ 453.79 Mb/s.
+> b) What is the traffic intensity mu on the Internet link to your home router if none of the requested videos is cached on the proxy server?
-Definitions:
-- alpha = time to receive object over the access link (no queuing) = F / R.
-- mu = traffic intensity on the link = lambda x alpha.
-- beta = average access delay on the link = alpha / (1 - mu). (Using 1 - mu; mu - 1 would be negative for a stable system.)
+> c) If average access delay beta is defined as alpha/(mu-1), what is the average access delay your family members will experience when watching the short videos?
-Answers with measured average R:
-- a) alpha = 800 / 453.79 ~ 1.763 s
-- b) mu = 0.05 x 1.763 ~ 0.088
-- c) beta = 1.763 / (1 - 0.088) ~ 1.763 / 0.912 ~ 1.932 s
-- d) Total average response time with miss rate 0.5: 0.5 x (5 + 1.932) + 0.5 x (approx 0) ~ 3.466 s
+> d) If the total average response time is defined as 5+beta, and the miss rate of your proxy server is 0.5, what will be the total average response time?
Reference: Kurose & Ross, 8th ed., Sec. 2.2 (Web caching), Sec. 1.4 (M/M/1 intuition for access delay).
## 2.4 File Distribution: Client-Server vs P2P (10%)
-> (10%) You have learned that a file can be distributed to peers in either client-server mode or peer-to-peer (P2P) mode. Consider distributing a large file of F = 21 GB to N peers. The server has an upload rate of Us = 1 Gbps, and each peer has a download rate of Di = 20 Mbps and an upload rate of U. For N = 10, 100, and 1,000 and U = 300 Kbps, 7000 Kbps, and 2 Mbps, develop a table giving the minimum distribution time for each of the combination of N and U for both client-server distribution and P2P distribution. Comment on the features of client-server distribution and P2P distribution and the differences between the two.
-
-Given: F = 168 x 10^9 bits; U_s = 1 x 10^9 bps; D_i = 20 x 10^6 bps; U in {0.3, 7, 2} x 10^6 bps; N in {10, 100, 1000}.
-Formulas:
-- Client-Server: T_cs = max(NF / U_s, F / D_min), with D_min = 20 Mb/s -> F / D_min = 8,400 s.
-- P2P: T_p2p = max(F / U_s, F / D_min, N F / (U_s + N U)). F / U_s = 168 s.
-
-Results (seconds):
-- N = 10: T_cs = 8,400. T_p2p = 8,400 for all U (the 8,400 s download cap dominates).
-- N = 100:
- - U = 0.3 Mb/s: T_cs = 16,800; T_p2p = 16,311
- - U = 7 Mb/s: T_cs = 16,800; T_p2p = 9,882
- - U = 2 Mb/s: T_cs = 16,800; T_p2p = 14,000
-- N = 1,000:
- - U = 0.3 Mb/s: T_cs = 168,000; T_p2p = 129,231
- - U = 7 Mb/s: T_cs = 168,000; T_p2p = 21,000
- - U = 2 Mb/s: T_cs = 168,000; T_p2p = 56,000
-
-Takeaways:
-- Client-server grows linearly with N; the server is the bottleneck.
-- P2P scales with total peer upload (N x U). With enough peer upload, P2P is much faster and often bounded by each peer’s 20 Mb/s download (8,400 s minimum).
+> (10%) You have learned that a file can be distributed to peers in either
+client-server mode or peer-to-peer (P2P) mode. Consider distributing a
+large file of F = 21 GB to N peers. The server has an upload rate of Us =
+1 Gbps, and each peer has a download rate of Di = 20 Mbps and an upload
+rate of U. For N = 10, 100, and 1,000 and U = 300 Kbps, 7000 Kbps, and
+2 Mbps, develop a table giving the minimum distribution time for each
+of the combination of N and U for both client-server distribution and
+P2P distribution. Comment on the features of client-server distribution
+and P2P distribution and the differences between the two.
Reference: Kurose & Ross, 8th ed., Sec. 2.6 (P2P file distribution model and formulas).