Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Question 1 (TCP, 20%). In the following network, node A transmits packets that pass through B–D, and arrive at the destination
The bit rate of all links is R = 1 Mbit/sec. The maximum packet size in the network is 1500 Bytes. Ignore the header size.
The one-way propagation delay on each link is 20 msec.
(1) How long does it take to transmit N = 50 packets if TCP Reno is used. At the beginning, ssthresh is 6 segment size (9000 bytes). B–D use Store-and-Forward. No packet is lost. TCP timer does not expire. There is no bit-error in transmission.
The size of ACK packets is negligible. The size of TCP header is negligible. Please also ignore TCP handshake delay and TCP termination delay.
(2) Repeat (1) when the sender transmits N = 250 packets.
Question 2 (BER vs SNR with different modulation schemes, 20%). We aim to plot BER vs SNR curves of two modulation schemes in this question.
(1) BPSK. In wireless communication, we can transmit 0 and 1 through signals ?1 and 1 respectively. Both ?1 and 1 signals have power of 1, so that the mean signal power is 1. This is called Binary Phase Shift Keying (BPSK). Due to the existence of noise, the received signal is ?1+n or 1+n respectively, where n is the noise term. n follows Gaussian distribution n ~ N(0, σ2).σ2 is the power of the noise, and thus σ1
2 is SNR. If the received signal is ≥ 0, it is decoded as 1; if the received signal is < 0,it is decoded as 0. We assume that 0 and 1 are sent with equal probabilities. Compute average BER vs SNR of BPSK when SNR = [0,5,10,15,20,25] dB. Hint: What is dB?
(2) 4PAM. Now we consider another modulation scheme, where each signal can represent two bits. We can transmit 00, 01, 11,10 through signals ?3, ?1, 1, and 3 respectively. The mean signal power of the signal is 32+12+12+324 = 5. This is called 4 pulse-amplitude modulation (4PAM). Still, due to the existence of noise, the received signal is ?3 + n, ?1 + n, 1 + n, or 3 + n respectively, where n is the noise term. Still, n follows Gaussian distribution n ~ N(0, σ2). σ2 is the power of the noise, and thus σ5 2 is SNR. If the received signal is in (?∞, ?2], (?2, 0], (0, 2], and (2, ∞), it is decoded as 00, 01, 11, and 10 respectively.
We assume that 00, 01, 11, and 10 are sent with equal probabilities. Compute average BER vs SNR of 4PAM when SNR =[0,5,10,15,20,25] dB. Note that if 00 is decoded as 01, it is regarded as one bit error; if 00 is decoded as 11, it is regarded as two bit errors.
To compute Q function, you can use Python math.erfc() function. math.erfc() returns result of erfc function, and Q(x) = 1 2 erfc( √x2 ).
(3) Plot the BER vs SNR curves of BPSK and 4PAM. You should derive a figure like Page 45 in the slides of Week 8. Discuss why improved data rate can cause higher BER. Discuss why the transmitted signal should be 00, 01, 11, and 10 at ?3, ?1, 1,and 3 respectively for 4PAM. Why not 00, 01, 10, and 11?3
Question 3 (Network Policing, 20%). Alice, Bob, and Chris are three users sharing one bottleneck link. We utilise token buckets and queues to mark, schedule, and police their traffic. The bottleneck link has a bandwith of 4Mbps and it can buffer at most Mbit data. Alice’s traffic is a VoIP session and Alice has declared 1 Mbps data rate and 1 Mbit burst size. Bob’s traffic is a VoIP session and Bob has declared 2 Mbps data rate and 1 Mbit burst size. Chris’s traffic is an HTTP session without declared data rate or burst size. Each packet has a size of 1000 byte. We prioritise the traffic as follows: Alice’s conforming traffic = Bob’s conforming traffic > Chris’s traffic > Alice’s non-conforming traffic = Bob’s non-conforming traffic.
Queue
token bucket A
Arriving traffic (Alice)
Arriving traffic (Chris)
Arriving traffic (Bob)
token bucket B
Bottleneck Link
(1) Design the policies at the two token buckets and the rule at the queue to satisfy the above requirements.
(2) The above design in (1) has one disadvantage: When both Alice and Bob are non-conforming, and the system has enough capability to handle some of the non-conforming traffic, it cannot handle the non-conforming traffic in a fair way. Discuss the following scenario: In a long period of time, Alice is transmitting with a constant rate of 2 Mbps; Bob is transmitting with a constant rate of 100 Mbps; Chris is inactive. There is no burst traffic. Discuss what will happen.
(3) Modify the design in (1) to address the issues in (2). If the system has capability to handle a partial or all non-conforming traffic, non-conforming traffic will be handled in a fair way. Please note that this is an open question. You can add token bucket,queue, or other modules at any place in the system. Your will get full mark as long as your design works correctly. Bonus marks may be granted if your design is smart.