1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
|
---
title: "COMP-347: Computer Networks"
author: "Munir Khan (ID: 3431709)"
date: "September 2025"
subtitle: "Assignment 1"
institute: "Athabasca University"
geometry: margin=1in
fontsize: 11pt
linestretch: 1.0
---
# Part 1: Short Answer Questions (30%)
## 1.1 Traceroute Analysis (5%)
> (5%) Run Traceroute, TRACERT (on Windows), or another similar utility between a source and a destination in the country in which you reside. Do this at three different times of the day. Summarize your findings at each of the times with respect to the following, and explain your findings:
>
> - average and standard deviation of the round-trip delays
> - number of routers in the path
>
> If you are not familiar with the utility, read the Microsoft article, "How to Use TRACERT".
| 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 |
- Average RTT across runs: (18.50 + 18.92 + 18.88) / 3 = 18.77 ms
- Standard deviation (sample): sqrt((0.0729 + 0.0225 + 0.0121) / 2) = ~0.23 ms
- (18.50 - 18.77)^2 = 0.0729
- (18.92 - 18.77)^2 = 0.0225
- (18.88 - 18.77)^2 = 0.0121
- Number of routers observed in the path: at least 7
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
3 * * *
4 * * *
5 * * *
6 * * *
7 154.11.15.107 (154.11.15.107) 19.010 ms QUBCPQBIDR03.bb.telus.com (154.11.15.105) 18.257 ms 18.230 ms
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
```
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
3 * * *
4 * * *
5 * * *
6 * * *
7 QUBCPQBIDR03.bb.telus.com (154.11.15.105) 18.821 ms 18.985 ms 18.966 ms
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
```
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
3 * * *
4 * * *
5 * * *
6 * * *
7 QUBCPQBIDR03.bb.telus.com (154.11.15.105) 18.500 ms 18.464 ms 154.11.15.107 (154.11.15.107) 19.680 ms
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
```
## 1.2 Internet Protocol Stack Layers (5%)
> (5%) What are the five layers in the Internet protocol stack? Develop a table to summarise what each layer does.
| Layer | Name | PDU | Function | Key Protocols |
| ----- | ---- | --- | -------- | ------------- |
| 5 | Application | Message | End-user services and data exchange | HTTP, DNS, SMTP, FTP |
| 4 | Transport | Segment | Process-to-process delivery with error control and flow control | TCP, UDP |
| 3 | Network | Datagram | Host-to-host routing across networks using logical addressing | IP, ICMP, IGMP |
| 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 |
## 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.
| Aspect | Packet-Switched | Circuit-Switched |
| ------------------- | ----------------------------------- | --------------------------------------- |
| Connection Model | Connectionless | Connection-oriented |
| Resource Allocation | Shared dynamically | Dedicated for session |
| Path Determination | Per packet, can vary | Fixed for entire session |
| Bandwidth Usage | Efficient, statistical multiplexing | Reserved even when idle |
| Setup Required | None | Required before communication |
| Transmission Mode | Store-and-forward | Dedicated end-to-end circuit |
| Reliability | Best-effort delivery | Guaranteed once connected |
| Cost | Lower, pay per usage | Higher, pay for reserved capacity |
| Scalability | High | Limited by number of circuits |
| Fault Tolerance | Rerouting around failures | Circuit failure breaks call |
| Performance | Variable delay and jitter possible | Predictable, consistent latency |
| Examples | Internet, Ethernet | PSTN, leased lines |
## 1.4 Network Delays and Traffic Intensity (5%)
> (5%) What are processing delay, queuing delay, transmission delay,
and propagation delay, respectively? Where does each delay occur? What
is traffic intensity? Why should the traffic intensity be no greater
than one (1) when designing a computer network?
| Delay | Label | Location | Description |
| ----- | ----- | -------- | ----------- |
| Processing | `d_proc` | routers/switches | Time to examine header/make forwarding decision |
| Queuing | `d_queue` | routers/switches | Time waiting in the output queue |
| Transmission | `d_trans` | each sender on a link | Time to push all bits onto the link |
| Propagation | `d_prop` | on the medium of delivery | Time for signal to travel |
> What is traffic intensity? Why should the traffic intensity be no
greater than one (1) when designing a computer network?
Traffic intensity is the ratio of the bit arrival rate to the link's transmission capacity, representing the fraction of time the link is busy.
Formula: `p = La/R`
Where:
- L = packet size (bits)
- a = average arrival rate (packets/sec)
- R = link transmission rate (bits/sec)
When p > 1, bits arrive faster than they can be transmitted (La > R).
This causes the queue to grow unbounded, leading to:
- Infinite queuing delays
- Buffer overflow and packet loss
- Network instability
When p <= 1, the system can keep up with arrivals.
## 1.5 Web Caching and Conditional GET (5%)
> (5%) What is Web-caching? When may Web-caching be more useful in a
university? What problem does the conditional GET in HTTP aim to solve?
Web caching comes in a few forms. One form is client side caching that allows
browser to cache content and re-serve that content to end users if specific
conditions are met. The second form for caching is server side caching. Server
side caching may happen when an expensive computation is computed once or rarely
and stored in a server cache to be re-used for subsequent requests. It may also
be storing static assets in content delivery networks (CDN's) that are
strategically deployed closer to end-users to deliver content faster without
needing to reach back to an origin server to retrieve the content on every
request. In the case of a university setting, it is likely that students are
accessing the same content and therefor serving cached content might be faster
than computing from scratch or fetching from the origin server for each unique
student request.
The following HTTP Headers are useful with caching.
- [`Pragma`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Pragma)
- [`Expires`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Expires)
- [`If-Modified-Since`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/If-Modified-Since)
- [`If-None-Match`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/If-None-Match)
- [`E-tag`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/ETag)
- [`Cache-Control`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control)
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.
## 1.6 Email Protocol Analysis (5%)
> (5%) Suppose you have a Web-based email account, such as Gmail,
and you have just sent a message to a friend, Alice, who accesses her
mail from her mail server using IMAP. Assume that both you and Alice
are using a smartphone to access emails via Wi-Fi at home. List all
the network protocols that may be involved in sending and receiving
the email. Discuss in detail how the message went from your smartphone
to Alice's smartphone - that is, how the message went through all the
network protocol layers on each of the network devices involved in the
communication. Ignore everything between your ISP and Alice's ISP.
The protocols that are likely involved are:
- Application: HTTPS, SMTP, IMAP, DNS
- Transport: TCP
- Network: IP
- Link/Physical: Wi-Fi, Ethernet
Sending Email:
1. Open Web-based email account in browser. This will require HTTP over TLS
which implicitly uses TCP/IP or QUIC/IP depending on the vendor and browser.
2. The browser will POST to an HTTP endpoint hosted on a web server.
3. The web server will receive the email message and deliver it via SMTP to the
recipients mail server. This may get relayed multiple times before eventually
landing in the recipients mailbox on the mail server.
Receiving Email:
1. Alice will open their preferred mail user agent (MUA) to connect to their
IMAP server to retrieve the new mail message.
2. The MUA will download the mail message to the device and synchronize any
changes via IMAP with the mail server.
Browser -> HTTPS over TCP/IP -> webmail server accepts message and (via SMTP over TCP/IP) relays to recipient's mail server -> recipient's IMAP client connects to mail server (IMAP over TCP/TLS) and downloads the message.
# Part 2: Long Answer Questions (70%)
> 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.
> a) How many packets will the assignment file be segmented into?
It will take (8,080 + 1) 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: ceil(80,000,000 / 9,900) = ceil(8,080.808...) = 8,081
> 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 |
| 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.
Traceroute gives path and RTT but not bandwidth. The only reliable known speed here is my ISP speed anything else would be a guess.
> d) Assume you start uploading the assignment at t0. At what time will the last packet be pushed into the first link?
Total bits sent to the first link = 8,081 packets * 10,000 bits = 80,810,000 bits.
My home ISP speed is 960 Mbps up and down.
- 80,810,000 / 960,000,000 ~ 0.084 seconds after t0.
> e) At what time will the last packet arrive at the university server?
The last packet will arrive at approximately (0.084s + 0.018) ~ 0.102 seconds after t0.
The traceroute showed an approximate RTT of 18 ms. Using that plus the transmission time above of ~0.084 seconds equals ~0.102 seconds after t0.
## 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?
The distance is approximately 3,600 km.
Propagation delay is represented by: `d_prop = d / s`
Where:
- d = distance in meters
- s = speed in meters/second
So Distance is equal to `d = d_prop * s` where s is the speed of light fibre ~(2 * (10^8))
Propagation time: 0.018 s
Distance =
- speed fibre * `d_prop`
- 2×10^8 m/s × 0.018 s ~ 3,600,000 m ~ 3,600 km.
> 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?
The propagation delay is 9 ms.
Because the propagation delay is the RTT/2 for one-way and not the full round trip of 18 ms.
> c) Further assume all the links have the same speed R bps. What is the bandwidth-delay product R*T_prop?
The bandwidth-delay is ~2.16 MB for R = 960 Mbps.
BDP = R × `T_prop`.
BDP = 960,000,000 * 0.018 ~ 17280000 bits ~ 17.28 Mb ~ 2.16 MB.
> 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?
The maximum is 2.16 MB.
When sender is pushing continuously, the number of bits simultaneously populating the path equals link rate × end-to-end propagation time.
> e) Based on the results from c and d, what does the bandwidth-delay product imply?
The bandwidth-delay product is used in TCP tuning window size and buffer sizing.
It helps keep the pipe full.
## 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.
1. I installed the apache web server.
1. I created a configuration file in `etc/apache/apache.conf`
1. I started the server with `httpd -D FOREGROUND -d . -f etc/apache/apache.conf`
1. I configured my proxy settings to point to localhost:8081
```bash
ServerRoot "${PWD}"
Listen 8081
PidFile var/httpd.pid
ErrorLog var/error.log
LoadModule mpm_prefork_module /usr/local/Cellar/httpd/2.4.65/lib/httpd/modules/mod_mpm_prefork.so
LoadModule authz_core_module /usr/local/Cellar/httpd/2.4.65/lib/httpd/modules/mod_authz_core.so
LoadModule unixd_module /usr/local/Cellar/httpd/2.4.65/lib/httpd/modules/mod_unixd.so
LoadModule log_config_module /usr/local/Cellar/httpd/2.4.65/lib/httpd/modules/mod_log_config.so
LoadModule proxy_module /usr/local/Cellar/httpd/2.4.65/lib/httpd/modules/mod_proxy.so
LoadModule proxy_http_module /usr/local/Cellar/httpd/2.4.65/lib/httpd/modules/mod_proxy_http.so
LoadModule proxy_connect_module /usr/local/Cellar/httpd/2.4.65/lib/httpd/modules/mod_proxy_connect.so
LoadModule cache_module /usr/local/Cellar/httpd/2.4.65/lib/httpd/modules/mod_cache.so
LoadModule cache_disk_module /usr/local/Cellar/httpd/2.4.65/lib/httpd/modules/mod_cache_disk.so
CacheRoot "${PWD}/var/cache/apache2"
CacheEnable disk /
CacheDirLevels 2
CacheDirLength 1
CacheMaxFileSize 100000000
<VirtualHost *:8081>
ProxyRequests On
ProxyVia On
AllowCONNECT 443 80
<Proxy *>
Require all granted
</Proxy>
CacheHeader on
CacheDetailHeader on
</VirtualHost>
```
> a) What is the average time alpha for your home router to receive a video object from your ISP router?
It takes approximately ≈ 5.83 s to receive a video object.
- Family members: 6.
- Average object size (video) L = 100 MB = 100 × 10^6 bytes = 800 × 10^6 bits (i.e. 800,000,000 bits)
- Average request rate (all devices) a = 3 requests/min = 0.05 requests/s
- ISP router round-trip for request/response: 5 seconds (given)
- ISP link capacity R = 960 Mbps
Transmission time for object across ISP link = 800,000,000 / 960,000,000 ~ 0.83333 s + 5 seconds
= 5 + 0.83333 ~ 5.8333 seconds.
> 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?
The traffic intensity is approximately 4.17% utilization.
Traffic intensity `mu = (L * a) / R`
`L * a` = 800,000,000 bits × 0.05 req/s = 40,000,000 bits/s.
mu = 40,000,000 / 960,000,000 ~ 0.0416667.
> 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?
The average access delay is ~6 s.
Compute: beta = 5.8333 / (1 − 0.0416667) = 5.8333 / 0.9583333 ≈ 6.0869 s.
As utilization grows, expected access delay increases approximately as a/(1−mu) in simple queueing approximations.
> 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?
The average response time is ~5s
The total average response time (for a cache miss) is 5 + beta.
If cache miss rate = 0.5 and hits are served locally quickly, the expected total average response time across all requests:
Average = hit_rate * (fast local time ~ 0) + miss_rate * (5 + beta) = 0.5 × (5 + 6.0869) ~ 0.5 × 11.0869 ~ 5.54345 s.
Half the requests miss and incur the full remote fetch, the other half are served from cache almost instantly.
## 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:
- File: F = 21 GB = 168 Gb
- upload rate: Us = 1 Gbps
- download rate: Di = 20 Mbps
- U = {0.3, 7, 2} Mbps;
- N = {10, 100, 1000}
- Client–server: D_cs = max{ N·F/Us, F/Di }.
- P2P: D_p2p = max{ F/Us, F/Di, N·F/(Us + N·U) }.
Constants:
- F/Di = 168/20 = 8,400 s = 140.0 min.
- F/Us = 168/1 = 168 s = 2.8 min.
Client–server D_cs (minutes):
- N=10: max(1,680 s, 8,400 s) = 8,400 s = 140.0 min
- N=100: max(16,800 s, 8,400 s) = 16,800 s = 280.0 min
- N=1000: max(168,000 s, 8,400 s) = 168,000 s = 2,800.0 min
P2P D_p2p (minutes), U in Mbps:
- N=10:
- U=0.3: max(2.8, 140.0, 27.9) = 140.0
- U=7: max(2.8, 140.0, 26.2) = 140.0
- U=2: max(2.8, 140.0, 27.5) = 140.0
- N=100:
- U=0.3: max(2.8, 140.0, 271.8) = 271.8
- U=7: max(2.8, 140.0, 164.7) = 164.7
- U=2: max(2.8, 140.0, 233.3) = 233.3
- N=1000:
- U=0.3: max(2.8, 140.0, 2,153.8) = 2,153.8
- U=7: max(2.8, 140.0, 350.0) = 350.0
- U=2: max(2.8, 140.0, 933.3) = 933.3
# References
- Kurose, J. F., and Ross, K. W. Computer Networking: A Top-Down Approach (8th ed.). Pearson.
|