Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
COMP9121 Assignment 1 2024 S2
Due: 08 Sep 2024 at 23:59
In this assignment, some questions are student number dependent; you will get zero in that question if you use another student’s number.
You need to show your progress. Giving a final answer only is not acceptable.
You can write your answers on paper and scan, or you can type your answers in your computer. Please merge all you answers in a single pdf file and upload in Canvas.
There are 10 question in total. Each question is equally weighted.
1. CRC.
(1) What is your student number? Convert your student number to binary and hexadecimal numbers.
(2) Let Dbe the binary number your derived above. The generator G starts with 1 and ends with 1, with all intermediate bits being zero, so G = 10…01. The CRC should be 1 byte in length. Calculate the CRC derived by D and G.
2. Delay.
Consider two hosts, A and B, are connected by three links and two routers as shown the figure below. Suppose node A sends two packets consecutively to B. Each packet is with the size of 100 bytes. Each router applies store and forward. There is no bit error or packet loss.
We have: Bandwidth of L1 = 0.8 Mbps. Bandwidth of L2 = 0.4 Mbps. Bandwidth of L3 = 0.8 Mbps. Length of L1 = 100 km. Length of L2 = 200 km. Length of L3 = 200 km. Propagation speed of links = 2 × 108 (m/s).
(1) What is the overall delay to deliver the two packets? (From the start of sending first packet at A till the second packet is completely received by B)
(2) At 10/k ms, where is the first bit of the second packet? k is the last two digits of your student number. (0ms is defined as the instant when A starts sending the first bit of the first packet).
3. Parity.
Using the last 6 bits of your student number in binary form (which you should have already calculated it in Question 1), to form a 6-bit information stream. Generate the parity bit and you can derive a 7-bit coded stream.
1) Send the coded stream through a random flipping channel with bit-flip probability p=0.05. Each bit is flipped independently. Assume that only the information bits may flip, and the parity bit will not flip.
Please calculate the probability that some of the bits are flipped, but this is not detected by the parity check.
2) Send the coded stream into a random lossy channel with bit-lost probability p=0.05. Each bit is lost independently. Assume that only the information bits may be lost, and the parity bit will not be lost. Please calculate the probability that some of the bits are lost, but this is not detected by the parity check.
4. CSMA-CD Performance.
2N computers have been connected in a network as illustrated. The length of each link is written in meters. Let k be the last three digits of your student number. Each computer generates 1000 packets per second with each packet being 500 bytes. The maximum rate of all links is 1 Gbps. The propagation speed in the medium is 2.0 ×108 meters/second.
(1) What is the maximum number of nodes supported in the network if CSMA-CD is used on the shared medium?
(2) Assume that hub1 is replaced with a switch. Find the maximum number of nodes supported in the network if CSMA-CD is used on the shared medium. Assume that 3/4 of the traffic is kept in its own side and 1/4 of the traffic goes to the other side.
5. Address allocation.
A company has been granted a block of IP addresses starting with 150.12.32.0/20. The address space should be allocated to four subnets A, B, C and D. Let k be the last digit of your student number.
Subnet A needs (k+18) addresses, subnet B needs (k+40) addresses, subnet C needs (k+80) addresses, and subnet D needs (k+253) addresses.
(1) The IP addresses have been assigned in the following order A, B, C, and D (subnet A has the smallest IP addresses and subnet D has the largest IP addresses). What is the starting IP address of subnets A, B, C, and D?
(2) The IP addresses have been assigned in the following order D, C, B, and A. Redo the question (1).
6. NAT. In the figure below, assume the address 134.31.44.2 is the public IP and 192.168.2.224 with subnet mask 255.255.255.248 are local IPs for the private network. Assume a web application is running on port 5500 on all hosts A, B, C, D, and E. Each web application in each host generates a packet to Server 1 (223.21.77.40, 80). We assume there is no other traffic.
(1) Assign local IP addresses to the A—E
(2) Following (1), generate the NAT translation table for all traffic in the network by considering that port numbers in the range of [63001, 63005] are available to be assigned in the NAT.
(3) Following (2), when the Server sends a reply packet to node C, what are the (IP address, port) fields in the packet header for both the source and destination?
(4) Following (3), when the packet arrives at the NAT Router, how does the NAT Router process the packet?
The correct answer may not be unique.
7. Dijkstra. In the following network, using Dijkstra’s algorithm to find the shortest distances from F to all other nodes in the network. The link costs are labelled.
8. Distance Vector. Consider the network topology presented in the figure below. The link costs are labelled.
(1) Use the distance vector algorithm to find the shortest distances from all routers to router F by filling in the table below (assume that exchanges of routing information and routing table updates are synchronous). The table allows up to 8 iterations, but you can stop whenever the algorithm converges.
|
A |
B |
C |
D |
E |
Initial |
−1,∞ |
−1,∞ |
−1,∞ |
−1,∞ |
−1,∞ |
1 |
|
|
|
|
|
2 |
|
|
|
|
|
3 |
|
|
|
|
|
4 |
|
|
|
|
|
5 |
|
|
|
|
|
6 |
|
|
|
|
|
7 |
|
|
|
|
|
8 |
|
|
|
|
|
(2) After the convergence of (1), assume that the links B − E and B − C are connected with costs shown below. Do NOT use split horizon or reverse poisoning. Fill in the table below using the distance vector algorithm to find the shortest distance from each router to router F. The table allows up to 8 iterations, but you can stop whenever the algorithm converges.
|
A |
B |
C |
D |
E |
Initial |
|
|
|
|
|
1 |
|
|
|
|
|
2 |
|
|
|
|
|
3 |
|
|
|
|
|
4 |
|
|
|
|
|
5 |
|
|
|
|
|
6 |
|
|
|
|
|
7 |
|
|
|
|
|
8 |
|
|
|
|
|