Posts Tagged ‘pfSense’

Simple network emulation

Sunday, May 23rd, 2010

I needed to set up a test environment for a client server application that emulates different network speeds and latency. Running a Google query for “wan emulation” or “network emulation” returns many different results, most of them paid apps and boxes. Then I remembered a podcast I listened to recently about pfSense. I downloaded the nightly version 2.0 beta and installed it on an old box we had laying around with 2 network cards. The installation process was very straightforward. After installing, I had to tell pfSense which network interface is the wan side – in my case connected to the GraphTech internal lan, and which is the lan – in my case connected to the server I was testing. Now it is all a matter of setting up the system using the simple web interface from the server machine on the lan side. I set up a 1:1 nat between the pfSense and the server I am testing and a firewall rule to map all traffic to the server. I also set up a few limiters - the queues that fakes different network speeds and added them to the firewall rule as In/Out rules. All I need to do now in order to test different upload and download speeds, latency and even unordered packets is to change the In/Out queues in the firewall rule!