24小时全年无休客服
本公司旗下写手皆为公司直聘 网络写手勿扰
案例中心
COMP5416/4416 Assignment
Assignment
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
COMP5416/4416 Assignment
8 questions. Q1-Q5, 8 points each. Q6-Q8, 20 points each.
1. (8%) As shown in the figure below, a file of size F = 1000 + S bytes is transmitted on an end-to-end
connection over three links, where S is the last three digits of your student number. For example, if your
student number is 490123456, then S = 456 and F = 1456 bytes. Each link is 100 km. The signal
prorogation speed is 2×108 m/s. Assume that a header of 28 bytes (UDP header and IP header) is added
to each packet. The bandwidth of all links is R = 1 Mbps. The nodes use the store-and-forward scheme.
No packet is lost and there is no bit error in the transmission.
(1) How long does it take to transmit the file if the whole file is transmitted as a single packet.
(2) We break the file into smaller packets in the store-and-forward scheme. Assume that each time you
break the file to make a new packet, you have to add 28 bytes as the header of the new packet. What
should be the optimal number of the packets? What is the overall time to transmit the file with the
optimal number of packets?
2. (8%) Consider that you want to establish a new network in domain myuni.edu.
(1) What resource records (RRs) do you need to add in the DNS hierarchy? Where do you need to add
these RRs?
(2) How is the IP address
addressed? How are the RRs in (1) used? Assume that the local DNS server dns.mypoly.com only
knows the root DNS server. Use iterative approach.
(3) Now that another host 2 requests the IP address of www.home.myuni.edu. How is this addressed.
This time the local DNS server dns.mypoly.com has known the IP addresses of TLD DNS server and
authoritative DNS server. Use iterative approach.
3. (8%). In this question, we consider the Tit-for-Tat algorithm in a P2P system. As shown in the figure
below, A and B are communicating with their top-4 partners in a P2P system. In this scenario, each peer
sends chunks to those four peers currently sending her chunks at highest rate. A’s uploading and
downloading data rates of the th partner are ! and ! respectively; B’s uploading and downloading
www.welcome.myuni.edu
111.111.111.15
root DNS server
authoritative DNS server
dns.myuni.edu
111.111.111.1
TLD DNS server
.edu DNS server
www.home.myuni.edu
111.111.111.16
requesting host 1
Local DNS server
dns.mypoly.com
requesting host 2
data rates of the th partner are !
" and !
" respective. For = 1,2,3,4, !, !
"
, !, !
" are randomly
distributed. They are independent random variables. Their distribution follows {1,2,3,4} Mbps with
probabilities ,
-. Now A optimistically unchoked B, with a sending data rate of %&. %& is a
random variable, independent of !, !
"
, !, !
"
. It also follows the distribution {1,2,3,4} Mbps with
probabilities ,
-. If A becomes a top-4 sender of B, B will start to serve A with a sending data
rate &% = %&. What is the probability that both A and B find each other a top-4 sender? Show your
mathematical derivations. Please note that top means “strictly greater than”.
" , then it is not regarded as top 4. %& must be strictly greater than one of the !
" values.
4. In the figure below, TCP Reno transmits packets with the given sequence numbers on channel. Each
packet is with the same size. At time T1, EstimatedRTT = 16 ms, and DevRTT = 8 ms. We use the
following update functions.
EstimatedRTT = 0.875 EstimatedRTT + 0.125 SampleRTT
DevRTT = 0.75 DevRTT + 0.25 |SampleRTT-EstimatedRTT|
TimeoutInterval = EstimatedRTT + 4 DevRTT
(1) Compute the value of X in ms.
(2) What ACK number does the receiver send at “ACK ?”?
(3) Suppose ssthresh=16 (segment) and cwnd=5 (segment) at T1. What is cwnd at the sender at T3,
T4, and T5?
5. (8%) Consider the following DHT networks. Transmission over each link takes 10 ms. The links are
directional as noted in the figures. When a key is found, the key holder creates a direct connection to
the query-originating node and transmits the key. The delay on that link can be ignored. For example,
if 1 is the query node and 5 is the key holder, then the delay is 40 ms. What is the average time to search
m
ACK(m+1)
m+1
10 ms 5 ms X 10 ms 10 ms 5 ms
m+2
ACK(m+2) ACK(m+3)
m+1
ACK ?
T1 T2 T3 T4 T5
for a key in the following network if the query node and key are distributed uniformly among the nodes?
Please note, the query node and the key holder may be the same and the delay is 0 in this situation.
6. (20%) In the Tutorial 1, question 1, we consider a system where two users are sharing the same
channel with utility as follows.
We have successfully derived three Nash Equilibria for this problem. We now want to investigate the
question one step further through a learning algorithm. The two users do not directly set their
transmission probability ( #, '), but to gradually “learn” the transmission probabilities iteratively. We
use ( #( ), '( )) to denote their learnt values after the th iteration.
Suppose at very beginning, ( #( ), '( )) = (0.3,0.7), where = 0. Then, the two users will update
their transmission probability as follows. For user 1, its utility is
#( ) = #( )(10 − 15 '( ))
Then, it will check that '( ) = 0.7 so that #( ) = #( )910 − 15 '( ): = −0.5 #( ). In order to
maximize #( ), #( ) should be as small as possible, and the optimal solution is #
∗
( ) = 0.
However, instead of directly setting #( + 1) to 0, #( + 1) can be updated as follows
#( + 1): = (1 − ) #( ) + #
∗
( )
where : = is the assignment operation. is a small value, called learning rate.
Similarly, user 2 will update accordingly
'( + 1): = (1 − ) '( ) + '
∗( )
The progress is repeated for iterations and we want to check how ( #( ), '( )) will change.
(1) Let =0.001, ( #(0), '(0)) = (0.3,0.7). Plot ( #( ), '( )) vs. where is from 1 to 10000. Does
the learning algorithm approach to a Nash Equilibrium after a large number of iterations?
(2) Now you can choose arbitrary valid ( #(0), '(0)) values. Does the learning algorithm approach to
a Nash Equilibrium after a number of iterations? Which Nash Equilibrium does it approach to? Discuss
how the initial values ( #(0), '(0)) will influence the final results.
[User 2 is a jammer] Now we consider another scenario that user 1 is a normal user but user 2 is a
jammer. That means, user 2’s target is to fail user 1’s transmission. If both are transmitting, user 2 will
gain a positive utility. However, if user 1 is not transmitting but user 2 is transmitting, user 2 will lose
its energy. The Utility table is as follows:
(3) Use a similar approach in the tutorial 1; calculate the transmission probabilities of ( #, ') of the
two users in the new case when a Nash Equilibrium is reached.
(4) Repeat the progress of (1) and (2) for the new case.
(5) Discuss how Nash Equilibrium in the new case (user 2 is a jammer) is different from Nash
Equilibrium in the original case (both users are normal users). (bonus point)
7. (20%) In this task, you will run a Wireshark experiment. Please follow the following procedure and
answer questions.
Please note that you will need to connect to VPN if you are not on campus. You will need to use Cisco
AnyConnect. You need to choose the correct interface in Wireshark indicating the VPN you are using.
Otherwise, you cannot see the correct packets captured.
You are only allowed to use one of the following web browsers: Google Chrome, Firefox, Safari, or
Microsoft Edge. Please update it to the latest version.