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

2 Answers 2


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

  • This does not seem to work for localhost / connections. Dec 12, 2019 at 17:21

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.

  • 2
    Please add details as to how ns-2 answers the question - the linked cannot be relied upon to remain over time.
    – Paul
    Jul 28, 2012 at 3:27
  • haven't tested it, but I notice that there's an updated build at the page you've linked..
    – ptim
    Jan 23, 2015 at 3:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.