Dummynet and TrueNAS Core clients/subnets

RegularJoe

Patron
Joined
Aug 19, 2013
Messages
330
Hi All,

I have some developers that want to see how painful it is to use a smb share from Argentina to Canada. I know with FreeBSD I can use dummynet, does anyone have any experience with TrueNAS/FreeNAS and dummynet? Any good GUI's or templates? I will need to setup shared queues and subnets as well.

Right now the lab runs on vmware so I was thinking it would be easy to do this on the TrueNAS Guest.

If this is impossible I can move to a physical test box and jus go buy a netgate appliance.

Thanks,
Joe
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Dummynet isn't compiled into FreeNAS, so you would need to "kldload dummynet.ko"

Then it's just all the normal crap. You probably want to make sure sysctl net.inet.ip.fw.one_pass=0 and then build yourself an /etc/rc.firewall.

We have our own rc.firewall smart firewall here that we use for FreeBSD, and the additions we add for dummynet are not expected to work generally, so I'm just going to go off the cuff here.

ipfw pipe 1 delete
ipfw pipe 1 config bw 50Mbit/s
ipfw add 50000 pipe 1 ip from any to me in

This ruleset would create a rate-limited pipe for all inbound traffic to the FreeBSD host. There are three big practical things to do with dummynet; one is bandwidth limiting, one is latency simulation, one is packet loss.

You can probably cram the kldload and sysctl into your rc.firewall file too come to think of it.
 
Top