Free Network Simulator

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

macrules34

Active Member
Mar 18, 2016
417
28
28
40
I’ve been looking for a free network in-line simulator software. I was thinking of simulating the distance between two cities, say Boston to New York City. Something that can be used with 1,10,40gb hardware. I remember using something at my previous job that was installed on a server and used the nic‘s that were installed on the server to simulate the distance.

I have tried googling this but only come up with trials or an appliance.
 

mattventura

Active Member
Nov 9, 2022
489
249
43
`netem` maybe? There's some examples here. It should work to just set up both interfaces as a bridge and apply the delay to both of them.
 

macrules34

Active Member
Mar 18, 2016
417
28
28
40
Are there any others?

The one I used (almost 10 years ago) that booted off a CD and you had to set it up every time the server rebooted.
 

oneplane

Well-Known Member
Jul 23, 2021
850
493
63
You're looking for a traffic shaper (like the 'tc' program). This can be done at multiple layers, like layer 2 or layers 3 for example.
Using netem as mentioned by matt, you can do all sorts of cool things.

A quick rip at Google gives this:
Code:
# create a bridge
sudo brctl addbr br0

# add two interfaces
sudo brctl addif br0 eth1
sudo brctl addif br0 eth2

# bring the bridge up
sudo ip link set dev br0 up

# add a delay to pretend to have a long distance link
sudo tc qdisc add dev br0 root netem delay 45ms
Some jitter for extra fun:
Code:
# Add jitter with a range of 5ms to the existing delay of 45ms
sudo tc qdisc add dev br0 parent 1:1 handle 10: netem delay 45ms 5ms
Maybe add some bandwidth limits
Code:
# Limit bandwidth to 1 Mbps with a burst of 100KB
sudo tc qdisc add dev br0 parent 10:1 handle 20: tbf rate 1mbit burst 100kbit latency 300ms
The tc program has been around for decades, so it's possible you had some sort of bootable disk that contained a GUI or TUI to control it.
 

nexox

Well-Known Member
May 3, 2023
1,121
504
113
Bear in mind that by default netem will only queue 1000 packets, so you can easily cause yourself some accidental packet loss at higher latency and throughput combinations if you don't set the qlen (or something like that) value higher.