I'm experiencing performance issues with linux packet forwarding. I use an old laptop as a router, with iptables to handle masquerading and ipv4 forwarding turned on.

  • Intranet network is connected to the gigabit built-in NIC
  • Internet network cis onnected to a 32bit PCMCIA card

Measured speeds :

  • Internet <-> Router : 11.2 MB/s
  • Intranet <-> Router : 112 MB/s
  • Intranet <-> Internet : no more than 100 KB/s

I can have both interfaces downloading / uploading at the same time without any issue.

Router hardware configuration :

  • Pentium M 1.6GHz
  • 1.2 GB RAM
  • DELL Latitude D410

Software configuration :

  • Linux 2.6.32-5-686 #1 SMP Tue Mar 8 21:36:00 UTC 2011 i686 GNU/Linux (Debian 6)
  • iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  • /proc/sys/net/ipv4/ip_forward set to 1

I have no clue why this is happening, does anyone have an idea of where this performance drop could come from ?

I will try reinstalling the operating system, but I do not think it will change anything.

Thanks.

link|improve this question
feedback

1 Answer

Internet <-> Router : 11.2 MB/s

How was this measured? 100MBit/s Internet pipes are uncommon. Do you have glass fiber at your home? If you have some sort of ADSL, the 100KB/s sound reasonable.

link|improve this answer
I'm in a French engineering school which is connected to Internet through RENATER. The actual internet link is around 1Gb/s, but we're limited by 100Mb switches. – Nicolas May 21 '11 at 16:39
The we need some more info like distribution, kernel version etc. Try to disable "power management" in the BIOS - maybe your CPU just sleeps longer ;-) – Turbo J May 21 '11 at 17:00
1  
If you have a shared 1GB pipe at you school, how do you know it is free? It might just be saturated to the point where you only can get 100KB/s. This was always the case when I went to my university... – Turbo J May 21 '11 at 17:04
Have you tried testing the bandwidth between the internet and your router? You could ssh in and use wget or curl to download something large to the router. – JasonWoof May 21 '11 at 19:22
JasonWoof: That's exactly what I did. Turbo J: We're not that many students living on-site, and it's the week-end. When I manually forward a port, using netcat, it works like a charm. I'll reinstall the router tonight and get back to you when it's done. – Nicolas May 21 '11 at 19:24
show 5 more comments
feedback

Your Answer

 
or
required, but never shown

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