Skip to main content

Posts

Simulate Stop-and-Wait ARQ over a point-to-point link with varying bit-error rates (0–20%) | NS3 Project 30

Recent posts

Simulate and trace TCP Slow-Start, Congestion Avoidance, and Fast Recovery phases | NS3 Project 29

Analysis of TCP Congestion Control Phases Simulating TCP NewReno on a Dumbbell Topology in NS-3 1. Project Overview This project simulates a Dumbbell Topology to observe how TCP NewReno manages network congestion. By creating a bottleneck link with limited bandwidth (1 Mbps), we force the TCP protocol to transition through its three primary phases: Slow-Start, Congestion Avoidance, and Fast Recovery. 2. LLM Source Documentation To develop the source code ( 24bps1052.cc ), the following AI assistant was utilised: LLM Used: Gemini 3 Flash (Google) Prompt Provided: "Hey, can you help me write an ns-3.44 script for my networking lab? I need to save it as scratch/23bps1xxx.cc. I need a Dumbbell Topology with 4 nodes: Node 0 and 1 connect to Node 2 (the router), and Node 2 connects to Node 3. Set the link between 2 and 3 to 1Mbps so it becomes a bottleneck. Use TCP NewReno for the simulation. I need to generate a trace file called cwnd_...

Simulation of Link-State routing (Dijkstra) in a 12-router wired network | NS3 Project 28

Simulate Link-State Routing Using OLSR in NS-3 Performance and Convergence Analysis in a 12-Router Wired Network Requirements Topology: Create a network with 12 nodes connected in a grid/mesh topology. Link Costs: Assign different link costs by varying propagation delay or data rate across links. Traffic Generation: Generate UDP traffic between a source node (R0) and a destination node (R11). Failure & Recovery: Introduce a link failure at 40 seconds and restore the link at 44 seconds. Metrics: Measure and display the convergence time of the routing protocol. Tracing: Enable ASCII/PCAP tracing and generate NetAnim visualization. Diagram: Provide a Mermaid diagram representing the 12-node network topology. The prompt above represents the refined, final instruction formulated after iterative tuning with Gemini and ChatGPT alongside standard NS-3 OLSR examples. Network Topology The network topology used in this simulation c...

To study the impact of channel error rate on Stop-and-Wait vs. GBN efficiency in a point-to-point link | NS3 Project 27

Impact of Channel Error Rate on Stop-and-Wait vs. Go-Back-N Efficiency Performance Evaluation Over a Point-to-Point Link in NS-3 Theory Behind This Behaviour Stop-and-Wait and Go-Back-N are flow control protocols that differ fundamentally in how they utilize the communication channel. In Stop-and-Wait , the sender transmits a single packet and remains idle until an acknowledgement (ACK) is received before sending the next packet. This mechanism incurs significant propagation and idle overhead, particularly when channel propagation delay or packet error rates increase, resulting in low throughput and poor channel efficiency. In contrast, Go-Back-N (GBN) uses a sliding-window mechanism that enables multiple unacknowledged packets to be transmitted consecutively via pipelining. If an error or packet drop occurs, the receiver discards the corrupted packet along with all subsequent out-of-order packets, prompting the sender to retransmit the window starting from the lost se...

Study the effect of delayed ACKs on TCP throughput in a point-to-point link | NS3 Project 26

Study the Effect of Delayed ACKs on TCP Throughput Performance and Latency Evaluation in a Point-to-Point NS-3 Link Simulation Script (tcp-delayed-ack.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/flow-monitor-module.h" using namespace ns3; NS_LOG_COMPONENT_DEFINE("TcpDelayedAckStudy"); int main(int argc, char *argv[]) { bool delayedAck = true; uint32_t delayedAckCount = 2; // ACK every N segments std::string tcpVariant = "TcpNewReno"; double simTime = 10.0; CommandLine cmd; cmd.AddValue("delayedAck", "Enable delayed ACKs", delayedAck); cmd.AddValue("delayedAckCount", "Segments before ACK", delayedAckCount); cmd.Parse(argc, argv); // --- TCP Configuration --- Config::S...