Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm interested in stress testing my gateway server but am lost on how. Most of the stress testing applications I've seen only see how much load an app like Apache can handle, but not this.

Essentially I want to send as many packets I can into this box with one computer on one card and see how many come out the other in another computer just to get an idea of what kind of load this can handle. I'm also interested how Snort will perform. I'm not really sure how to do this though.

What tools could you recommend that could do this?

share|improve this question
add comment

4 Answers

up vote 8 down vote accepted

If you are just looking at doing raw TCP/UDP packets (network testing) I would look at iperf. It supports both UDP and TCP.

You set it up on both sides of the gateway, one will act as the client and the other the server.

share|improve this answer
    
I used this today, great program! Cross platform, easy to install, and very easy to use. Thanks! –  TheLQ Feb 1 '11 at 2:42
add comment

Simplest stress test uses netcat. That's just for the flow rate though. If you want to stress the speed of opening and closing connection, you need something else.

Anyway

Set two linux boxes (A & B) on each side of the gateway. On A, start a netcat server that serves zeros:

nc -l -p 1234 < /dev/zero

On B, connect to A using netcat also, and throw the zero away to /dev/null

nc 192.168.1.1 1234 > /dev/null

You can use iptraf to monitor the speed of the connection on either A or B or the gateway. You can also use a tool like readspeed to monitor the speed of the transfert of zeros (it's the data speed transfert, which is to the speed of the connection minus the ethernet/ip/tcp headers)

on A

$ nc -l -p 1234 < /dev/zero

on B

$ nc 192.168.1.1 1234 | ./readspeed 
61710848 octets en 0:02:03 = 74504 ko/s (75121 ko/s avg)

(That's the speed between my laptop and my server over a gigabit link).

share|improve this answer
add comment

FreeBSD and Linux have packet generator in kernel. It is very high speed. FreeBSD have ng_source node to generate packets. Linux have pktgen. but they are harder to use than userspace applications.

share|improve this answer
add comment

I'd recommend Mausezahn. It's very flexible and quite fast.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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