Skip to main content

Posts

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

Recent posts

Simulate TCP Variant Comparison Under Bursty ON/OFF Traffic Model

Simulate TCP Variant Comparison Under Bursty ON/OFF Traffic Model In this assignment, we simulate and compare TCP NewReno and TCP Vegas using NS-3 under a bursty ON/OFF traffic pattern. A congested network is created to observe how both variants behave in terms of throughput, delay, and packet loss. This helps in understanding the difference between loss-based and delay-based congestion control and how each performs in real network conditions. Using TCP NewReno Code: (24BPS1039.cc) #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/netanim-module.h" #include "ns3/flow-monitor-module.h" using namespace ns3; int main () { Config::SetDefault( "ns3::TcpL4Protocol::SocketType" , TypeIdValue(TypeId::LookupByName( "ns3::TcpNewReno" ))...

Simulating ARQ Protocols in ns-3: Comparing Stop-and-Wait, GBN, and Selective Repeat Efficiency

Simulating ARQ Protocols in ns-3: Comparing Stop-and-Wait, GBN, and Selective Repeat Efficiency AIM: To design, implement, and simulate a point-to-point network topology using the NS-3.44 network simulator, and quantitatively compare the throughput efficiency of three Automatic Repeat reQuest (ARQ) protocols — Stop-and-Wait (SAW), Go-Back-N (GBN), and Selective Repeat (SR) — under systematically increasing packet error rates from 0% to 50%, using FlowMonitor statistics and GnuPlot for result visualization. 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 "ns3/mobility-module.h" using namespace ns3; /* ---- Global throughput tracker ---- */ double g_throughput[3][11] = ...

Web Server Farm Simulation with Load Balancing Using P2P Links

Web-Server Farm Simulation with Load Balancing Using P2P Links Prompt used: Using NS-3 (C++), write a complete simulation file named farm.cc to be placed in the scratch/ folder and run with ./ns3 run scratch/farm.cc . Scenario: Simulate a web-server farm with load balancing using point-to-point links. The topology should have: 1 client node 1 load balancer node 3 backend web-server nodes All links are point-to-point (set data rate to 10Mbps, delay to 2ms) The load balancer distributes UDP traffic from the client across the 3 servers in a round-robin or equal-split fashion using OnOff applications Use UdpClientServerHelper or OnOffApplication + PacketSink on each server Enable NetAnim output ( animation.xml ) so the topology is visible in NetAnim with node labels (Client, LoadBalancer, Server1, Server2, Server3) Enable FlowMonitor and at the end of the simulation print per-flow stats (throughput, delay, packet loss) to the terminal A...