Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Two host machine's one as a client and other as a server, i am testing udp load-test in these two machines.Machine Ethernet speed is 100 Mbps but i want to send 30000 packets each of 512 bytes at 1 Mbps speed how to do? Is their any Linux command to set Ethernet speed at 1 Mbps?

share|improve this question
    
See e.g. superuser.com/questions/66574/… and stackoverflow.com/questions/1094760/… for possible solutions. –  jofel Nov 6 '12 at 12:04
add comment

2 Answers

I use a program called iperf for any sort of network related testing (man page: http://staff.science.uva.nl/~jblom/gigaport/tools/man/iperf.html)

it has switches that allow you to set the speed. You can also run one in server mode and one in client to accurately test your network.

  -a, --tcp_bandwidth \    for TCP, bandwidth to send at in bits/sec
                  #[KM]    (default no bandwidth limit used)
  -b, --bandwidth #[KM]    for UDP, bandwidth to send at in bits/sec
                           (default 1 Mbit/sec, implies -u)
share|improve this answer
add comment

Debian GNU/Linux has ethtool and net-tools to set ethernet speed

share|improve this answer
    
Maybe add some examples of command usage? As it is this is not quite enough for an answer. –  jw013 Nov 6 '12 at 16:24
add comment

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

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.