Routed traffic slow after ip_forward=1

Issues related to configuring your network
Post Reply
aldebaran27
Posts: 1
Joined: 2014/12/11 11:03:56

Routed traffic slow after ip_forward=1

Post by aldebaran27 » 2014/12/11 11:14:36

Hi,

I am currently using CentOS v5.11, and I have run into a problem with my routed network throughput dropping to ~1/100 of what it is supposed to be after setting "ip_forward=1". I am not currently using iptables, since this is a private network and I have no need for a firewall.
Here is an example:
SystemA: eth0=10.10.4.1/24, eth1=10.10.3.1/24, ip_forward=1
SystemB: eth1=10.10.3.2/24, ip_forward=0
SystemC: eth1=10.10.2.1/24, eth1=10.10.3.3/24, ip_forward=1

In this configuration, SystemA is routing between 10.10.4.X and 10.10.3.X, and SystemB is routing between 10.10.3.X and 10.10.2.X.

SCP SystemA->SystemC(eth1, no routing): gigabit speeds
SCP SystemA->SystemC(eth0, routing): ~10M speeds
SCP SystemB->SystemC(eth1, no routing): gigabit speeds
SCP SystemB->SystemC(eth0, routing): gigabit speeds

Then, if I turn on "ip_forward=1" on SystemB, I get:
SCP SystemB->SystemC(eth1, no routing): gigabit speeds
SCP SystemB->SystemC(eth0, routing): ~10M speeds

Any help would be much appreciated!

User avatar
Super Jamie
Posts: 310
Joined: 2014/01/10 23:44:51

Re: Routed traffic slow after ip_forward=1

Post by Super Jamie » 2014/12/13 12:44:19

I drew this to understand your network a bit better:

Code: Select all

SystemA
eth0 = 10.10.4.1/24
eth1 = 10.10.3.1/24 --.
                      |
SystemB               |
eth1 = 10.10.3.2/24 --+
                      |
SystemC               |
eth0 = 10.10.2.1/24   |
eth1 = 10.10.3.3/24 --'
Software IP routing at Layer 3 is not as fast as software packet switching at Layer 2. If you want to route fast, use a proper router which does all this in hardware.

EL6 would likely be more efficient, EL7 would probably moreso, but not blindingly fast.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Routed traffic slow after ip_forward=1

Post by TrevorH » 2014/12/13 13:21:24

But 1/100th of the speed sounds like some sort of error not a result of software routing - unless you're trying to route 10GBe with a 486 processor.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
Super Jamie
Posts: 310
Joined: 2014/01/10 23:44:51

Re: Routed traffic slow after ip_forward=1

Post by Super Jamie » 2014/12/13 21:38:17

I assumed this "10M" means 10 Megabytes per second, is 100 Megabits, which is consistent enough with my experience using Linux boxes as routers.

Post Reply