COMP9121 Design of Networks and Distributed Systems
2024-01-02 11:25:01
COMP9121 Assignment 1 2023 S2
Due: 10/Sep/2023 23:59
All questions are equally weighted.
1.
CRC.
(1) What is your student number? Convert your student number to binary and hexadecimal numbers. (Warning: you will get zero if you use another student’s number.)
(2) Let D be the binary number your derived above. Let the generator G = 100101. Calculate the CRC bits.
(3) Following (2), give an example that the transmitted bits are not error-free, but the receiver cannot detect the error.
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 L
1
= 1 Mbps. Bandwidth of L
2
= 1 Mbps. Bandwidth of L
3
= 2 Mbps. Length
of L
1
= 100 km. Length of L
2
= 200 km. Length of L
3
= 200 km. Propagation speed of links = 2 × 10
8
(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) Re-calculate (1) if Bandwidth L
1
= 2 Mbps. Bandwidth of L
2
= 1 Mbps. Bandwidth of L
3
= 2 Mbps.
Other conditions do not change.
3.
Slotted Aloha.
Consider a slotted aloha system where the duration of each timeslot is 1 (unit of time).
There are
? > 3
users. Each user can only start transmission at the beginning of each time slot.
However, the transmission duration of one frame lasts for 2 time slots. If a frame overlaps with any other frames by another user, the frame fails. Let ?
denote the transmission probability of any user starting transmission at the beginning of a time slot. See the figure below. Red frames are failed frames,
and green frames are successfully frames.
Answer the following questions:
(1) Given user 1 starts transmission a frame at
? = ?
!
(
?
!
is an integer), what is the probability that user 1’s transmission is successful?
(2) Given
?
!
as an integer, what is the probability that any user starts transmission at
?
!
and the transmission is successful?
(3) What is the averaged efficiency of the system?
(4) Given
?
, what is the optimal
?
that maximises the efficiency of the system?
(5) When
? → ∞
, what is the optimal efficiency of the system? Is it better than slotted aloha? Is it better than pure aloha? Why or why not?
4.
Switch tables.
A—K are terminal machines. S
1
—S
3
are switches and Hub
1
and Hub
2
are hubs. At the beginning, the switch tables of all switches are empty. A sends frame 1 to K with [source MAC A, destination MAC K] and K sends reply frame 2 to A with [source MAC K, destination MAC A].
Answer the following questions:
(1) When does S
2
learn the MAC address of A? When does S
2
learn the MAC address of K?
(2) Can the following terminals hear frame 1 and frame 2? Why? Fill the table by Yes/No, and explain your answer.
(3) We add one direct connection between S
1
and S
3
and clear all the forwarding tables in the switches.
Then, we repeat again. A sends frame 1 to K with [source MAC A, destination MAC K] and K sends?reply frame 2 to A with [source MAC K, destination MAC A]. Explain how it may cause system error?
How can you avoid such error? (Bonus mark)
5.
MTU
. Link layer is limited by its max transmission unit (MTU). A large IP datagram may be
fragmented into smaller ones. Suppose we have a 6000-byte IP datagram (including 20-byte IP header).
MTU is 1500 bytes. How many fragmented datagrams do we generate? Calculate the length and offset
fields of these datagrams. For each datagram, it is encapsulated into a link-layer frame with 22-byte
header and 4-byte trailer. What are the sizes of frames carrying the fragmented datagrams in the link
layer?
6.
NAT.
In the figure below, assume the addresses 134.89.31.4 is public IP and 192.168.240.240 with
subnet mask 255.255.255.248 are local IPs. Assume application 1 is running on port 5500 on all hosts
A, B, C, D, and E. Each application 1 in each host generates a packet to Server 1 (140.21.77.5, 80). In
addition, application 2 is running on port 5505 on A, C, and E. Each application 2 sends a packet to
Server 2 (128.119.40.153, 443).
(1) Assign local IP addresses to the five hosts.
(2) Following (1), generate the NAT translation table for all traffic in the network by considering that
port numbers in the range of [7700, 7710] are available to be assigned in the NAT.
(3) Following (2), when Server 1 sends a reply to node C, what are (IP address, port) fields in the packet header for source and destination? When Server 2 sends a reply to node C, what are (IP address, port)
fields in the packet header for source and destination?
(4) Following (3), when C receives the replies from Server 1 and Server 2, how does C know that the packets should be delivered to application 1 and application 2 respectively?
Correct answer is not unique in this question.
文章来源:https://blog.csdn.net/2301_81917451/article/details/135334083
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!