summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assignments/1/README.md119
1 files changed, 16 insertions, 103 deletions
diff --git a/assignments/1/README.md b/assignments/1/README.md
index 77ebd00..8fe516b 100644
--- a/assignments/1/README.md
+++ b/assignments/1/README.md
@@ -19,8 +19,8 @@ linestretch: 1.0
>
> If you are not familiar with the utility, read the Microsoft article, "How to Use TRACERT".
-| Run | Visible hops | RTT used (ms) |
-| --- | ------------- | ------------- |
+| Run | Visible hops | RTT used (ms) |
+| --- | ------------- | ------------- |
| 1 | 7 | ((19.010 + 18.257 + 18.230) / 3) = 18.50 |
| 2 | 7 | ((18.821 + 18.985 + 18.966) / 3) = 18.92 |
| 3 | 7 | ((18.500 + 18.464 + 19.680) / 3) = 18.88 |
@@ -34,7 +34,7 @@ linestretch: 1.0
Trace 1
-```
+```bash
traceroute to www.athabascau.ca (3.175.64.80), 30 hops max, 60 byte packets
1 _gateway (192.168.0.1) 3.364 ms 3.332 ms 3.316 ms
2 10.139.230.1 (10.139.230.1) 4.615 ms 4.601 ms 4.588 ms
@@ -70,7 +70,7 @@ traceroute to www.athabascau.ca (3.175.64.80), 30 hops max, 60 byte packets
Trace 2
-```
+```bash
traceroute to www.athabascau.ca (3.175.64.80), 30 hops max, 60 byte packets
1 _gateway (192.168.0.1) 2.602 ms 2.580 ms 2.573 ms
2 10.139.230.1 (10.139.230.1) 6.959 ms 6.953 ms 6.947 ms
@@ -106,7 +106,7 @@ traceroute to www.athabascau.ca (3.175.64.80), 30 hops max, 60 byte packets
Trace 3
-```
+```bash
traceroute to www.athabascau.ca (3.175.64.80), 30 hops max, 60 byte packets
1 _gateway (192.168.0.1) 2.449 ms 3.640 ms 3.633 ms
2 10.139.230.1 (10.139.230.1) 4.962 ms 4.955 ms 4.925 ms
@@ -152,12 +152,9 @@ traceroute to www.athabascau.ca (3.175.64.80), 30 hops max, 60 byte packets
| 2 | Link | Frame | Node-to-node transfer over a physical link with error detection | Ethernet, Wi-Fi, PPP |
| 1 | Physical | Bit | Transmission of raw bits over physical medium | IEEE 802.3, 802.11 |
-Reference: Kurose & Ross, 8th ed., Ch. 1 (Internet structure and protocol stack overview).
-
## 1.3 Packet-Switched vs Circuit-Switched Networks (5%)
-> (5%) What are packet-switched network and circuit-switched network,
-respectively? Develop a table to summarise their features, pros, and cons.
+> (5%) What are packet-switched network and circuit-switched network, respectively? Develop a table to summarise their features, pros, and cons.
| Aspect | Packet-Switched | Circuit-Switched |
| ------------------- | ----------------------------------- | --------------------------------------- |
@@ -174,8 +171,6 @@ respectively? Develop a table to summarise their features, pros, and cons.
| Performance | Variable delay and jitter possible | Predictable, consistent latency |
| Examples | Internet, Ethernet | PSTN, leased lines |
-Reference: Kurose & Ross, 8th ed., Sec. 1.3 (circuit vs packet switching).
-
## 1.4 Network Delays and Traffic Intensity (5%)
> (5%) What are processing delay, queuing delay, transmission delay,
@@ -212,8 +207,6 @@ This causes the queue to grow unbounded, leading to:
When p <= 1, the system can keep up with arrivals.
-Reference: Kurose & Ross, 8th ed., Sec. 1.4 (delays in packet switching and traffic intensity).
-
## 1.5 Web Caching and Conditional GET (5%)
> (5%) What is Web-caching? When may Web-caching be more useful in a
@@ -245,8 +238,6 @@ This would be useful in a university setting because many students request the
same data so serving the same cached content to different students is likely
safe and will reduce the outbound internet link load and traffic.
-Reference: Kurose & Ross, 8th ed., Sec. 2.2 (HTTP, Web caching, conditional GET).
-
## 1.6 Email Protocol Analysis (5%)
> (5%) Suppose you have a Web-based email account, such as Gmail,
@@ -282,8 +273,6 @@ Receiving Email:
2. The MUA will download the mail message to the device and synchronize any
changes via IMAP with the mail server.
-Reference: Kurose & Ross, 8th ed., Sec. 2.2 (HTTP/HTTPS basics), Sec. 2.3 (Electronic mail: SMTP, IMAP/POP), Sec. 2.5 (DNS).
-
# Part 2: Long Answer Questions (70%)
> I provide short, clear answers first, then 1-2 sentences of reasoning.
@@ -320,12 +309,14 @@ Later hops filtered probes, so the total hop count to the destination could not
| --- | ------- | ----------- |
| 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) |
+| 3 to 6 | | no reply |
| 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.
+My ISP speed is 960 Mbps up and down. I don't know how to calculate the speed for each identified link using RTT data.
+
> d) Assume you start uploading the assignment at t0. At what time will the last packet be pushed into the first link?
Total bits transmitted on the first link = 8,081 packets * 10,000 bits/packet = 80,810,000 bits.
@@ -336,97 +327,30 @@ My home ISP speed is 960 Mbps up and down.
> e) At what time will the last packet arrive at the university server?
-## 2.2 Propagation Delay and Bandwidth-Delay Product (20%)
+The last packet will arrive at approximately (0.084s + 0.015s) ~ 0.099 seconds after t0.
+
+- Transmission delay (first link): 0.084s
+- One-way propagation delay: ~15ms (estimated from traceroute RTT/2 + additional hops)
+- Total: 0.084s + 0.015s = 0.099s after t0
-> (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.
+## 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.
> 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?
-Assumptions based on 2.1’s traceroute:
-
-- One‑way propagation ≈ 20 ms (conservative; RTTs to late hops were ~18.5–19 ms, destination likely nearby beyond filtered hops).
-- Propagation speed s = 2×10^8 m/s.
-
-a) Total path distance (one‑way):
-
-- d = s × T_prop ≈ 2×10^8 × 0.020 = 4.0×10^6 m ≈ 4,000 km.
-
-b) Propagation delay T_prop (one‑way):
-
-- T_prop ≈ 0.020 s (from above). If using d explicitly: T_prop = d/s.
-
-c) Bandwidth‑delay product (BDP):
-
-- BDP = R × T_prop (bits).
-- Example with R = 20 Mbps: BDP = 20×10^6 × 0.020 = 400,000 bits ≈ 0.4 Mb ≈ 50 kB.
-
-d) Maximum in‑flight bits when sending a long file continuously equals the BDP:
-
-- N_in_flight_max = R × T_prop (same as c).
-
-e) Implication:
-
-- BDP is the “pipe size” in bits. To fully utilize a path of rate R and delay T_prop, the sender must be able to have roughly BDP bits outstanding (e.g., TCP window ≥ BDP). If the window is smaller than BDP, the path is underutilized; larger mainly increases in‑flight data without improving steady‑state throughput.
-
-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?
-Setup (what I did):
-
-- Installed Apache and enabled forward proxy and caching (mod_proxy, mod_proxy_http, mod_cache, mod_cache_disk). Configured listen on 3128, CacheEnable disk /, and LAN‑only access controls (Require ip 192.168.0.0/16, etc.).
-- Pointed device proxy settings to http://proxy-host:3128; verified cache hits via Apache logs.
-
-Given/derived parameters:
-
-- Average object size S = 100 MB = 800 Mb.
-- Aggregate request rate λ = 3 requests/min = 0.05 s^-1.
-- Let last‑mile download rate be R (bps). For numerics, use R = 50 Mbps (replace with your actual rate in the formulas below).
-
-a) Average transfer time α over the last‑mile link:
-
-- α = S / R = 800 Mb / R.
-- Numeric (R = 50 Mb/s): α = 800/50 = 16 s.
-
-b) Traffic intensity (utilization) μ on the Internet link:
-
-- μ = λ × α = λ × (S/R) = (0.05) × (800/R) = (40 Mb/s)/R.
-- Numeric (R = 50 Mb/s): μ = 40/50 = 0.8.
-
-c) Average access delay β. Using the standard M/M/1 form β = α/(1 − μ):
-
-- β = (S/R) / (1 − λS/R).
-- Numeric: β = 16 / (1 − 0.8) = 80 s.
-
-d) Total average response with miss rate m = 0.5:
-
-- Miss path time T_miss ≈ 5 + β (given 5 s Internet round component plus access delay).
-- Hit path time T_hit ≈ small (serve from LAN cache); take 0.01 s.
-- T_avg ≈ m·T_miss + (1 − m)·T_hit ≈ 0.5·(5 + 80) + 0.5·0.01 ≈ 42.5 s.
-
-Formulas to reuse with your actual R:
-
-- α = 800/R; μ = 40/R; β = α/(1 − μ); T_avg ≈ 0.5·(5 + β).
-
-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
@@ -475,17 +399,6 @@ P2P D_p2p (minutes), U in Mbps:
- U=7: max(2.8, 140.0, 350.0) = 350.0
- U=2: max(2.8, 140.0, 933.3) = 933.3
-Comments:
-
-- Client–server grows linearly with N because the server must upload N copies (N·F/Us term dominates for moderate/large N).
-- P2P is self‑scalable: as N grows, aggregate peer upload N·U increases, reducing the N·F/(Us + N·U) term; for small N, peers’ download constraint F/Di dominates.
-- With higher peer upload (e.g., U=7 Mbps) and large N, P2P outperforms client–server by large factors while the server seeds only one copy (F/Us bound).
-
-Reference: Kurose & Ross, 8th ed., Sec. 2.6 (P2P file distribution model and formulas).
-
# References
- Kurose, J. F., and Ross, K. W. Computer Networking: A Top-Down Approach (8th ed.). Pearson.
- - Ch. 1 The Internet and the Network Edge (delays, switching, traceroute)
- - Ch. 2 Application Layer (HTTP/caching, E-mail/SMTP/IMAP, DNS, P2P distribution)
- - Ch. 3 Transport Layer (BDP intuition via TCP window/throughput)