Cs1111-Computer Networks and Distributed Systems
Cs1111-Computer Networks and Distributed Systems
April 2023
Q.1. Run the simulation with the default parameters (provided in the table) and answer
the
following questions.
a. What is the maximum expected value (theoretical) of throughput (in Mbps)?
Why?
The maximum expected value of throughput in this network can be calculated based on the
bottleneck link, which is the link with the lowest bandwidth. In this case, the link between N1
and N2 has a bandwidth of 6Mbps, which is the lowest among all links.
To calculate the maximum expected throughput, we can use the formula:
Throughput = Window Size / Round Trip Time (RTT)
The window size is the number of bytes that can be sent in one round trip, and the RTT is the
time it takes for a packet to travel from the source to the destination and back.
To calculate the window size, we can use the formula:
Window Size = Bandwidth * RTT / MSS
For the link between N1 and N2, the RTT is 10ms, and the MSS is typically 1460 bytes for
Ethernet networks. Therefore, the maximum window size can be calculated as:
Window Size = 6Mbps * 0.01s / 1460 bytes
= 41.1 packets
For the link between N0 and N1, the RTT is 100ms, and the MSS is the same as before.
Therefore, the maximum window size can be calculated as:
Window Size = 15Mbps * 0.1s / 1460 bytes
= 102.7 packets
between N1 and N2
Throughput = Window Size / RTT
= 41.1 packets / 0.01s
= 4.11Mbps
The theoretical maximum expected throughput of this network is 4.11Mbps.
b. How much is Bandwidth-Delay-Product (BDP)? Express your answer in terms of the
number of packets.
The Bandwidth-Delay-Product (BDP) is a measure of the amount of data that can be in transit
on a network at any given time. It is calculated by multiplying the bandwidth of the network
by the round-trip delay between the endpoints. In ns3, we can calculate BDP in terms of the
number of packets as follows:
BDP = Bandwidth * Delay / PacketSize
Bandwidth is in bps ,Delay is in seconds, and PacketSize is in bytes.
For the link between N0 and N1:
Bandwidth = 15Mbps = 15,000,000 bps
Delay = 100ms = 0.1s
PacketSize = Maximum Segment Size (MSS) for TCP = 1460 bytes
BDP = 15,000,000 bps * 0.1s / 1460 bytes
1027 packets
For the link between N1 and N2:
Bandwidth = 6Mbps = 6,000,000 bps
Delay = 10ms = 0.01s
PacketSize = MSS for TCP = 1460 bytes
BDP = 6,000,000 bps * 0.01s / 1460 bytes = 41 packets
the BDP for the network is the sum of the BDPs for each link:
BDP = 1027 packets + 41 packets = 1068 packets
The BDP of the network is 1068 packets. This means that the maximum number of packets
that can be in transit on the network at any given time is 1068.
c. What is the average computed throughput of the TCP transfer?
Code:
average throughput:
On comparing the congestion window plot with size for queue size 50 and 1000 we find that:
when the queue size is increased, it means that the network can store more packets before
they are transmitted. This can lead to a longer queueing delay, which in turn can result in
more congestion and increased packet loss.
3.Change N1-N2 bandwidth to 10 Mbps and N1-N2 delay as 100ms (rest of the parameter
values are same as default values)
a. What is the average computed throughput of the TCP transfer?
code:
Average throughput: