Skip to main content

Posts

Showing posts from July, 2025

Random and Queuing Models using NS2 | NS2 Basics | Lecture 11

Random and Queuing Models using NS2 In this post, the readers may learn how to create random numbers for various distributions using different seeds Simulation of various queuing models like M/M/1 and M/D/1 13.1 Random Number Generation Random variables is an important concept in networks as the modelling of network traffic and other packet arrival times are mostly random models. Hence, there is a necessity to model such metrics in ns2. NS2 supports various random models using different seed generations. Seeds are numbers that help generate random numbers. The seed number 0 indicates that the random number order changes every time the simulation is run. But other than 0, the order in which the random numbers are generated same. The following listing 13.1 shows the random number generation for various distributions. This listing will just tell you how to create random number generation for various distributions. For seeing the output, refer to listing 13.2 Listing 13.1 – Random Number G...