Skip to main content

Getting Network Simulation Basics Right – A Note on Seed Setting Effects for the ns-2 Random Number Generator

  • Chapter
  • First Online:
Wireless Technology

Part of the book series: Lecture Notes in Electrical Engineering ((LNEE,volume 44))

Abstract

The ns-2 network simulator is one of the most widely used packet network simulators. Since version 2.1b9, it uses the MRG32k3a random number generator (RNG) proposed by L’Ecuyer, replacing the previous minimal standard multiplicative linear congruential generator by Park and Miller to remedy the problems of sensitivity to seeds and short-period length. Unfortunately, due to bad documentation and re-use of old scripts many people still wrongly use the old API functions to explicitly set seeds. While the old RNG required this, in the current MRG32k3 implementation the same approach leads to overriding the automatic seed generation of the new generator which can result in correlation between the generated random values. Using a wired and a wireless scenario we illustrate possible effects on simulation results. As the ns-2 community relies heavily on exchanging hints and scripts, which keep re-infecting the knowledge-base even years after the introduction of the new RNG we believe that this might affect the majority of all ns-2 simulation results currently published.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 169.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. nsnam web pages, http://www.isi.edu/nsnam/, last visited: Jul. 2007.

  2. K. John: Ousterhout: Tcl and the Tk Toolkit, Addison-Wesley, Reading, MA, USA, ISBN 0-201-63337-X, 1994.

    Google Scholar 

  3. S.K. Park and R.W. Miller: Random number generation: Good ones are hard to find. Communications of the ACM, 31(10), 1192–1201, Oct. 1988.

    Article  MathSciNet  Google Scholar 

  4. B. Hechenleitner and K. Entacher: On Shortcomings of the ns-2 Random Number Generator. In T. Znati and B. McDonald, eds., Communication Networks and Distributed Systems Modeling and Simulation (CNDS), 2002.

    Google Scholar 

  5. P. L’Ecuyer: Good parameters and implementations for combined multiple recursive random number generators. Operations Research, 47(1), 159–164, 1999.

    Article  MATH  MathSciNet  Google Scholar 

  6. K. Fall and K. Varadhan (Eds.): The ns Manual (formerly ns Notes and Documentation), http://www.isi.edu/nsnam/ns/ns-documentation.html, last visited: Oct. 2006.

  7. E. Altman and T. Jimenez: ns-2 for Beginners, lecture notes, Dec. 2003, http://www-sop.inria.fr/maestro/personnel/Eitan.Altman/COURS-NS/n3.pdf, last visited: Oct. 2006.

  8. ns-users mailing list, ns-users@isi.edu, subscription on the Web via http://mailman.isi.edu/mailman/listinfo/ns-users, last visited: Jul. 2007.

  9. K. Pawlikowski, H.-D.J. Jeong, and J.-S.R. Lee: On Credibility of Simulation Studies of Telecommunication Networks. IEEE Communications Magazine, 40(1), 132–139, Jan. 2002.

    Article  Google Scholar 

  10. S. Kurkowski, T. Camp, M. Colagrosso: MANET Simulation Studies: The Incredibles, ACM SIGMOBILE Mobile Computing and Communications Review, 9(4), Oct. 2005.

    Google Scholar 

  11. P. L'Ecuyer: Random Number Generation, Chapter 2 of the Handbook of Computational Statistics, J.E. Gentle, W. Haerdle, and Y. Mori, eds., Springer-Verlag, New York, 2004, 35–70.

    Google Scholar 

  12. Pierre L’Ecuyer et al.: An object-oriented random number package with many long streams and substreams. Operations Research, 50(6), 1073–1075, 2002.

    Article  Google Scholar 

  13. M. Umlauft and P. Reichl: Experiences with the ns-2 network simulator – explicitly setting seeds considered harmful. In Proc. Wireless Telecommunications Symposium (WTS), April 2007, Pomona, CA, USA.

    Google Scholar 

Download references

Acknowledgments

This research has been partly funded by the Austrian Federal Ministry for Education, Science, and Culture, and the European Social Fund (ESF) under grant 31.963/46-VII/9/2002 and partly by the Austrian Kplus competence center program. Figures 28 reprinted from [13] with kind permission by IEEE.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Martina Umlauft .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer Science+Business Media, LLC

About this chapter

Cite this chapter

Umlauft, M., Reichl, P. (2009). Getting Network Simulation Basics Right – A Note on Seed Setting Effects for the ns-2 Random Number Generator. In: Powell, S., Shim, J. (eds) Wireless Technology. Lecture Notes in Electrical Engineering, vol 44. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-71787-6_14

Download citation

  • DOI: https://doi.org/10.1007/978-0-387-71787-6_14

  • Published:

  • Publisher Name: Springer, Boston, MA

  • Print ISBN: 978-0-387-71786-9

  • Online ISBN: 978-0-387-71787-6

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics