Disable Route Optimization in Linux

Carlos Ribeiro carribeiro at gmail.com
Mon Feb 5 14:46:42 UTC 2007


On 2/3/07, Bruce <bcorbin at cfl.rr.com> wrote:
> Greetings,
>
> I'm working toward building up a couple of test fixtures that require me
> to generate multiple channels of Ethernet traffic.  I have some Perl
> code that will allow me to send and receive traffic using specified
> local and peer ports.  I seem to have only one problem that is
> preventing me from getting started.  Linux is optimizing all my traffic
> to go through the default port.
>
> To be more specific, let's assume I have a 8 port switch to be tested.
> Assume I have two Linux boxes with a quad NIC card in each.  Assume the
> 8 ports from the two quad NIC cards all get plugged into the switch.  To
> test each switch port I need to be able to generate traffic from all 8
> ports of the two quad NIC cards.  Linux optimizes my routes and sends
> all traffic through the default eth port, even when I specify another port.
>
> Is there any way to turn off the router in Linux or at least override it
> with my desired routes?  I have tried many combinations of "route add",
> "route del", "ip route add x.x.x.x via y.y.y.y.  So far I am striking
> out.  Any help would be appreciated.
>
> I am using Ubuntu 6.10 desktop on an Intel architecture box.

The problem is that you are trying to generate traffic at the layer 3
level, which will NOT work. Linux is just doing its job. You have two
options: use the driver directly (i know it's possible, I just don't
know how to do it)...

What you want to do is called "port aggregation" in networking jargon.
It's also known as "EtherChannel" (that's the Cisco name for it), or
"bonding", and it was standardized as IEEE 802.3ad. Using an
aggregated link you can balance traffic over all active links (up to
eight max).

There is support for EtherChannel in the Linux Kernel since 2.4:

http://www.kernel.org/pub/linux/kernel/people/marcelo/linux-2.4/Documentation/networking/bonding.txt

It will be probably necessary for you to recompile your kernel,
install extra modules, etc - but that's the way to go IMHO.
-- 
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: carribeiro at gmail.com
mail: carribeiro at yahoo.com




More information about the ubuntu-users mailing list