0% found this document useful (0 votes)
513 views

Cs1111-Computer Networks and Distributed Systems

The document discusses the results of a network simulation using Ns3. It analyzes the maximum expected throughput, bandwidth-delay product, average computed throughput, and plots of congestion window and queueing delay for different simulation scenarios. The key findings are: 1) The theoretical maximum throughput is 4.11Mbps based on the bottleneck link bandwidth of 6Mbps. 2) The bandwidth-delay product is 1068 packets. 3) The average computed throughput is typically lower than maximum throughput due to real-world factors like congestion and packet loss. 4) Increasing the queue size results in longer queueing delays and more congestion.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
513 views

Cs1111-Computer Networks and Distributed Systems

The document discusses the results of a network simulation using Ns3. It analyzes the maximum expected throughput, bandwidth-delay product, average computed throughput, and plots of congestion window and queueing delay for different simulation scenarios. The key findings are: 1) The theoretical maximum throughput is 4.11Mbps based on the bottleneck link bandwidth of 6Mbps. 2) The bandwidth-delay product is 1068 packets. 3) The average computed throughput is typically lower than maximum throughput due to real-world factors like congestion and packet loss. 4) Increasing the queue size results in longer queueing delays and more congestion.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Cs1111-computer networks and distributed systems

Network simulation using Ns3


Submitted to
Dr.sunil taruna
Submitted by:
Medishetty yashwanth
(2020btechcse108)

Institute of engineering and technology


Jk lakshmipat university
Jaipur

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:

d. Is the achieved throughput approximately equal to the maximum expected


value? If it is not, explain the reason for the difference
Theoretical maximum throughput and actual average throughput are not equivalent in
real-world scenarios since the performance of a network depends on various factors
that can fluctuate over time. Maximum throughput is the highest possible amount of
data that a network can transmit within a specific timeframe, as determined by
available bandwidth, network latency, and other technical factors. However, in
practice, achieving maximum throughput is rare due to several issues such as
congestion, packet loss, network errors, and other impediments that can affect network
performance. On the other hand, average throughput is the actual quantity of data that
is successfully transmitted over a network in a given amount of time. This is
influenced by the same factors that affect maximum throughput, but also considers
additional elements such as packet retransmission, network load, and other issues that
impact network performance.
Typically, average throughput is lower than maximum throughput in practice, mainly
due to these factors. For example, if a network experiences high congestion or packet
loss, the actual throughput achieved may be significantly lower than the maximum
throughput. Similarly, network errors, interference, or other factors can also impact
the actual throughput achieved.
e. Plot Congestion Window (CWND) with time.
f. Plot queueing delay with time.
g. Are the plots in 1(e) and 1(f) related?
Certainly, there is a connection between congestion and queuing time, and it is
possible to analyse network performance by combining the graphs of these two
metrics.
When a network is congested, packets must wait longer in queues before they can be
transmitted, increasing the queuing delays at network equipment like routers and
switches. More packet loss and longer queuing delays may result from this.
As a result, it is possible to spot instances of extreme network congestion and ensuing
queuing delays by combining a congestion graph with a queuing time graph. Network
managers can learn more about the underlying causes of congestion by analysing these
graphs collectively and then take the necessary action to lessen its effects on network
performance.
2. Change queue size to 1000 (rest of the parameter values are same as default
values)
a. What is the average computed throughput of the TCP transfer?
Code:
Average throughput:

b. Plot CWND with time.


c. Plot queueing delay with time.
d. Compare CWND plots of Q.1. and Q.2., what insights did you gain?

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:

b. Plot CWND with time.


set term postscript eps color
set output 'cwnd12.eps'
set ylabel 'cwnd' set xlabel 'time'
plot 'tcp-example12.cwnd' using 1:2

C. Plot queueing delay with time.


d. Compare CWND plots of Q.1. and Q.2., what insights did you gain?
Queuing delay is the time that a packet spends waiting in a queue before it can be transmitted. It is
influenced by various factors, including network congestion, packet size, network bandwidth, and
queue size.
Network congestion, as a factor, increases the queueing time. As the congestion in the network
increases, packets may need to wait longer in queues before being transmitted, resulting in increased
queueing time.
Packet size is also a significant factor in determining queuing time. Larger packets take longer to
transmit, and they may need to wait longer in queues, resulting in increased queueing time.
Network bandwidth also affects queuing time. If the available bandwidth is limited, packets may need
to wait longer in queues before being transmitted, resulting in increased queueing time.

You might also like