Skip to main content

Posts

Simulate a hybrid CSMA network with 30 nodes and analyse fairness using Flow Monitor

Recent posts

Study the Impact of Initial Congestion Window on TCP Startup Throughput

Study the Impact of Initial Congestion Window on TCP Startup Throughput Aim: To study the impact of the initial congestion window (IW) on TCP startup throughput using NS-3 simulation. Objectives: To analyze TCP performance during the slow start phase. To compare throughput for different values of initial congestion window (IW). To observe how quickly TCP reaches optimal bandwidth utilization for different IW values. Simulation Parameters: Simulator: NS-3 TCP Variant: TCP NewReno (default) Simulation Time: 3 seconds Topology: Point-to-Point (2 nodes) Bandwidth: 1 Mbps Delay: 100 ms Packet Size: Default Application: BulkSend Application IW Values Tested: 1, 2, 4, 10 segments Source Code: #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/internet-module.h" #include "ns3/point-to-point-module.h" #include "ns3/applications-module.h" #include ...

Performance Evaluation of TCP NewReno and TCP Cubic under Varying Round Trip Times Using NS-3

AIM To analyze Packet Loss Ratio (PLR) and Packet Delivery Ratio (PDR) in a congested point-to-point router network with mixed TCP and UDP traffic using NS-3 simulation. 1. Introduction to Network Congestion Network congestion is a fundamental challenge in packet-switched computer networks. It manifests when the aggregate demand for bandwidth exceeds the physical capacity of network resources, such as intermediary routers or transmission links. When traffic volume outpaces a router's processing speed or link bandwidth, the router's buffer (queue) begins to fill. Once this queue reaches maximum capacity, subsequent incoming packets are discarded—a process known as tail-dropping. These dropped packets result in severe queuing delays, wasted bandwidth, and degraded application-level performance. 2. Performance Metrics To empirically evaluate network reliability and the severity of congestion during simulation, two primary performance metrics are analyzed: Pac...

Simulation of TCP NewReno vs. TCP Cubic with Varying Round Trip Time (RTT) and Throughput Analysis using NS-3

Simulation of TCP NewReno vs. TCP Cubic with Varying Round Trip Time (RTT) and Throughput Analysis using NS-3 2. ONE-PAGE WRITE-UP 2.1 Introduction The Transmission Control Protocol (TCP) is the backbone of reliable communication over the Internet. It uses congestion control algorithms to manage traffic and prevent network collapse. This experiment compares two widely-used TCP algorithms — NewReno and Cubic — under three different Round Trip Time (RTT) conditions using the NS-3 network simulator, measuring throughput, convergence time, and packet loss. 2.2 TCP NewReno TCP NewReno improves TCP Reno's Fast Recovery by correctly handling multiple packet losses within one congestion window. It uses AIMD (Additive Increase Multiplicative Decrease): the congestion window grows by 1 MSS per RTT during slow start / congestion avoidance and is halved on loss. Since throughput ∝ 1/RTT (Mathis equation), NewReno underperforms on high-latency links. 2.3 TCP Cubic TCP Cubi...

Study the Effect of Buffer Size on Packet Loss in a Point-to-Point Router with UDP CBR Traffic

Study the Effect of Buffer Size on Packet Loss in a Point-to-Point Router with UDP CBR Traffic Problem Statement: Study the effect of buffer size on packet loss in a point-to-point router with UDP CBR traffic. Source Code: #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/internet-module.h" #include "ns3/point-to-point-module.h" #include "ns3/applications-module.h" #include "ns3/flow-monitor-module.h" #include "ns3/netanim-module.h" #include <fstream> // Required for writing data to the text file using namespace ns3; int main ( int argc, char *argv[]) { // 1. Default Variables and Command Line Parsing uint32_t bufferSize = 10 ; // Default buffer size in packets CommandLine cmd; cmd.AddValue ( "bufferSize" , "Max number of packets in Queue" , bufferSize); cmd.Parse (argc, argv); // 2. Node Creation NodeC...