[LARTC] Multiple Internet Connection, established connection dropping issues

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To begin with I have not applied and am not using the patches provided
by Julian Anastasov.
http://www.linuxvirtualserver.org/~julian/

I do not believe at the moment they apply to the problem I am having. If
they are I will go through the process of applying the patch. They
mostly have to due with what happens when a connection dies. At the
moment both of my connections are live, and I am having other problems.

I am trying to use more than one internet connection and seem to keep
running into the same problem no matter how I address it.

At the moment you can establish a connection using either line without a
problem. After a little while the connection will be dropped as the
linux router attempts to use a different interface. The connection will
only be re-connected after the new route has expired in the route's
cache. Then the connection can continue on the same interface it was
originally established under for a period of time until the whole thing
repeats itself.

What I would like to happen is if a connection from the outside is
established, the linux router will continue to keep the connection on
the same interface until the user drops the connection. At which time if
the connection is re-established by the user the linux router then could
use a different interface but it should only use the interface that the
connection was established under.

I have made some progress playing around with the gc_interval gc_timeout
and gc_elasticity. 

I also started looking at the code behind the routing and gc logic in
the route.c file in the linux kernel source. It appears that the gc does
not compare which routes to keep or which routes to drop. It just does
sort of a first come first out sweep.

Also it is my assumption from the code and experimentation that the
gc_elasticity effects the amounts of routes which are cleared out by the
gc. So if you decrease the gc_interval and gc_timeout it may still take
a while to clear out the route in cache, by gc 8 routes at a time, the
default. I have increased it gradually to 256 the size of the route
cache, and my gc_interval and gc_timeout appear to be a little more
accurate based on the time it takes in real life to re-establish the
connection.

So aside from the route caching issue I really want to know why in the
middle of a connection the router will stop using one interface and
begin using another.

I have tried both 

ip route default equalize
and just
ip route default

for the multipath route table. 

I have also tried both 

ip route append default table 20 metric 1 proto static
and
ip route append prohibit default table 20 metric 1 proto static

for each interface.

So each interface has a table showing which gateway to use. Those tables
have a higher priority and should be checked/used before the multipath
table. As per examples in both

http://www.linuxvirtualserver.org/~julian/nano.txt
http://www.linuxvirtualserver.org/~julian/dgd-usage.txt

Each of those examples do things a little differently so that alone is
fairly confusing.

Bottom line I am stuck at the moment with it dropping and
re-establishing connections no matter what I do. I have been able to
decrease the time it takes to re-establish, but I believe that also
effects the time the connection will last for before needing to be
re-established.

On the other hand, if a request is sent from inside to the outer world
without having a connection from the outside world previously
established it then could use the multipath route.

I would assume the routing tables, rules, and their priorities would
effect this but it does not seem to do the job.

I also tried to turn off rp_filter, just to see if it could come in one
interface and go out another. Once again no noticeable difference. I did
not try setting the rp_filter to 2, for increased filtering.

Has anybody else experienced this or know of a solution. My gut is
telling me that the logic in the route cache gc might need to be
improved, but I am not sure that is really it or not. Knowing my luck
the solution is right under my nose and I am missing it.

I am about ready to daisy chain the routers and attempt to use both
connections that way if I can get out on both using a single ip as the
gateway.

My deepest gratitude to anyone who can help or come up with a solution.
I am more than willing to pay back the favor in some manor or another.

FYI,
	I am currently using kernel 2.2.19 that comes as part of the old Linux
Router Project version 2.9.8. I have made attempts to compile my own
kernel, but have not had any luck booting off of it due to the use of a
ram disc as the root file system. Basically I wanted to replace the
Linux Router Kernel with mine, but seem to run into problems mounting
the root file system. Errors and problems for another list. If the
version of my kernel is the problem or if I need Julian's patches that
is the route I will take. Also if it matters I am using a 75mhz pentium
with 24mb ram. Using a 16 mb ram disk, with 8mb left over to use for
memory. It seems to screem, but my gc may be delayed by the processor
not being able to keep up?


-- 
Sincerely,
William L. Thomson Jr.
Obsidian-Studios, Inc.
439 Amber Way
Petaluma, Ca. 94952
Phone  707.766.9509
Fax    707.766.8989
http://www.obsidian-studios.com
-- 
Sincerely,
William L. Thomson Jr.
Support Group
Obsidian-Studios Inc.
439 Amber Way
Petaluma, Ca. 94952
Phone  707.766.9509
Fax    707.766.8989
http://www.obsidian-studios.com



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux