Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CPSC 441- Computer Networks

Assignment 2

Networking & Layers

Winter 2023

Objectives

The goal of this assignment is to strengthen your knowledge in the basic of computer network and its layered structure.  In addition to UDP and TCP connections, it covers topics related to the first two layers: the application layer and the transportation layer.

Problem 1

Consider a network consisting of 3 nodes: A, B, and C. Nodes A and B are connected to each other using a link of length L1  meters, transmission rate of T1  bits/sec, and propagation speed of S1  m/sec.  Moreover, nodes B and C are connected to each other using a link of length L2  meters, transmission rate of T2  bits/sec, and propagation speed of S2  m/sec. Assuming that both links are bidirectional, answer to the questions below:

1.  Considering L1  = 50000m, T1  = 10000bits/sec, and S1  = 2.5 × 108m/sec, how long does it take to send a packet of size 250 Bytes from A to B?

2. What is the Round Trip Time  (RTT) for a packet of size B Bytes from A to C? (Packet goes from A to C and then travels back to A).

3.  Consider a scenario where packets P1 and P2 with sizes B1  and B2  Bytes are to be sent from node A destined to C. More specifically, node A starts sending packet P1  at time zero, and right after every bit of P1  has been pushed onto L1, it starts transferring the second packet (P2). When will Node C fully receive packet P2?

Problem 2

True or False? Provide justification for false answers.

1. It always leads to queuing when packet arrivals are not distributed uniformly over time.

2. In a reliable transport layer protocol, the sender must send packets in sequential order.

3.  TCP uses congestion control mechanism to avoid overloading the receiver.

4. It is preferred to use TCP as the transport layer protocol for DNS lookups.

Problem 3

In the context of packet switching network and circuit switching network, consider a net- work uses TDM to transfer files from a server to 10 clients at a data rate of 100Mbps. Each client is assigned a slot of 10Mbps. A client wants to transfer a file of size 1GB. How many slots are required for the file transfer and what is the maximum delay for the file to be transferred? Show your calculations.

Problem 4

Consider a packet-switched network with three nodes A, B, and C, and three links con- necting the nodes as follows:

A - B: 100 Mbps

B - C: 50 Mbps

A - C: 200 Mbps

Assume that node A wants to send a packet of size 1000 bits to node C. Assume that the propagation delay is negligible compared to the transmission delay.

1.  Calculate the transmission delay for each link.

2.  Calculate the end-to-end delay for each of the three paths from A to C.

3. Which path will be selected by the routing algorithm and why?

Problem 5

Consider a computer network with an access link of 10 Mbps and a cache server with a capacity of 100 MB. The average request size is 10 KB and the average hit rate of the cache is 0.8. The network is serving 1000 requests per second. Calculate the network latency for a user request under the following scenarios:

1.  The access link capacity is not upgraded and only the cache is used.

2.  The access link capacity is upgraded to 20 Mbps and the cache is used. Is it a good idea to always upgrade the access link capacity instead of using a cache?  Why or why not?

Problem 6

The attached page contains a Wireshark-like trace showing the network packets exchanged between two transport-level endpoints during a Web page download. Use your knowledge of TCP to answer the following questions.

 

1. What is the IP address of the server that answers to http request?

2. What source port number did the client use for this TCP connection?

3. What is the receive buffer size used by the client?

4.  Does the client use delayed-ACKs? Explain it.

5. What is the total number of TCP data bytes sent by the server?

Problem 7

Suppose you are building a network that will transfer data between two computer systems, using a combination of the OSI model and the TCP/IP suite. The network uses Ethernet for the physical and data link layers, IP for the network layer, and TCP for the transport layer.

1. If the maximum transmission unit (MTU) of the Ethernet link is 1500 bytes, and the IP header is 20 bytes and the TCP header is 20 bytes, what is the maximum size of the payload that can be sent in a single packet?

2. If you want to transfer a file of 100 MB, how many packets are needed to transfer the file, and what is the total overhead due to headers in bytes for the entire file transfer?

Problem 8

Consider distributing a file of F Gbits to N peers.  The server has an upload rate of us Mbps, and each peer has a download rate of di  Mbps and an upload rate of ui  Mbps.

1. For F = 20x, us = 2x, and di = 2x, and ui = x

(a)  Compute the minimum distribution formula for each of P2P and Pcs

(b) For N = 10, 50, 100, 200, 300, 400, 500, 700, and 1, 000; and x = 1, 5, 10, 30, 40, 50, 70, 100 Mbps, prepare a chart giving the minimum distribution time for each of the com-            binations of N and x for both client-server distribution and P2P distribution.

2.  Suppose that

us

Specify a distribution scheme that has a distribution time of 

3.  Suppose that

us

Specify a distribution scheme that has a distribution time of  .

4.  Conclude that the minimum distribution time is in general given by

max{NF     F   }

Submission and Demonstration

All submissions must be uploaded through the D2L dropbox.  Follow the instructions of your TA for more details.

You need to submit your assignment as a (.doc) file after naming the file by your first and last name.  For example if you name is John Doe, your submitted document would be called JohnDoe.doc’ . Note that you might be asked to demonstrate your work to your TA.

You are URGED to check your submission after uploading it on D2L, as an empty submission after the deadline will be subject to the indicated penalties.

Grading

This assignment will graded out of 100% but it will carry 12.5% of the total grade. Work should be done individually. Any source of help MUST be indicated and cited.

The following are considered in grading your assignment:

1. problem 1 will carry (4+4+7 = 15) points

2.  Problem 2 will carry 10 points, 2.5 points each

3.  Problem 3 will carry 10 points

4. problem 4 will carry 12 points, 4 points each

5.  Problem 5 will carry (5+5 =10) points

6.  Problem 6 will carry 10 points, 2 points each

7.  Problem 7 will carry (5+7 =12) points

8.  Problem 8 will carry (4+5+4+4+4 = 21 points).

Deadline

Assignments must be submitted by Sunday February 19, 2023 before 11:59 P.M. After the due time, a %20 deduction will apply on every late day or part of the day.  The first 15 minutes after the deadline is not considered as part of the delay.

Plagiarism

Any resources which have significantly helped you in making your code should be cited, and you should not copy paste code from online websites but rather write all code by hand. A tool used to check plagiarism will be ran on student submissions. This is an individual assignment and students MUST not collaborate on the assignment in terms of sharing code under any circumstances. Even after the deadline, you must not share your code or make it available for others.