Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

I already faced a Linux router which wouldn't forward more than about 100kB/s for each connection.

The issue was the Ethernet interface to the ISP equipment was set to half duplex. Fixed by disabling auto-negotiation and manually forcing full duplex. This could be done via ethtool:

sudo ethtool -s eth1 speed 100 duplex full autoneg off
share|improve this 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.

share|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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .