14

I'm looking for an open source/free network emulator tool that I could use on Mac OS X, to simulate a slow network connection, limited bandwidth and other network characteristics such as dropped packets etc for both UDP/TCP connections (or even on the physical layer).

I'm looking for the simplest solution that would allow me to run TCP/UDP servers and have a few clients connect to them on localhost emulating various network connections.

I'm mainly wondering if I can use something like Linux's netem on Mac OS X (or even better cross-platform Windows/Linux/Mac).

Perhaps I can run VirtualBox and a Linux kernel running netem, has anyone had luck with that?

Related: Simulating a low-bandwidth, high-latency network connection on Linux

Dougnukem
  • 333

2 Answers2

11

The developer tools in 10.7 come with a prefPane for emulating a limited network connection:

enter image description here

Via Network Link Conditioner in Lion ยป Matt Legend Gemmell

Gareth
  • 19,080
Lri
  • 42,502
  • 8
  • 126
  • 159
1

Try ns-2:

Ns-2 is a discrete event simulator targeted at networking research. Ns-2 provides substantial support for simulation of TCP, routing, and multicast protocols over wired and wireless (local and satellite) networks.

Installing NS2 on a MacOS X / Intel Based

I've tried to install ns2-allinone-2.29.3/.2 onto an intel mac based system. After some problems during the compile phase, the simulator part (ns) seems to be fully working. Nam, instead, got some strange errors, related to Xlib. In my knowledge, this strange behaviour is related to some changes to api part of Xlib into macos/intel version. Attached is the error, that i've when try to run nam onto my mac intel based.

tengu:~/Desktop/ns-allinone-2.29/nam-1.11 valvoline$ ./nam 
Xlib: sequence lost (0x10006 > 0x9) in reply type 0x0!
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  1 (X_CreateWindow)
  Resource id in failed request:  0xa
  Serial number of failed request:  6
  Current serial number in output stream:  9

You can go here for a full blown tutorial on Ns-2.

James Mertz
  • 26,529
ghoppe
  • 6,558
  • 25
  • 21