Re: Two NIC cards => Possible to Configure Two Default Routes?

From: John Adams (johna_at_onevista.com)
Date: 09/26/05


Date: Mon, 26 Sep 2005 21:16:48 GMT

In article <Gd2dnWAQdrJbyaXenZ2dnUVZ_s2dnZ2d@rogers.com>,
James Knott <james.knott@rogers.com> wrote:
>beagle197@hotmail.com wrote:
>
>> Folks,
>> I have two DSL providers, can I configure two default routes that are
>> able to send and receive network packets on both interfaces (eth0 and
>> eth1) at the same time? It would seem to me that it would be possible,
>> since if eth0 receives traffic, then response would be sent back
>> through eth0. The same with eth1. I noted a lot of discussion about
>> this topic from past posts, where folks have achieved this using
>> external equipment routers, or that it was possible using Solaris OS. I
>> am guessing that some Linux folks have devised or written their
>> customized solution since they went to the extra effort to modify the
>> TCP/IP stack or tweak the networking kernel modules (but I haven't seen
>> or heard anything on this point for sure at this time). Is it possible,
>> and how can I achieve it? I tried to use a higher metric for default
>> route eth0 verses eth1, but packets were not sent on both interfaces.
>> Thanks, BEA
>
>There can only be one default route. There is no mechanism by which an app
>can determine which port a packet came in on. Transmitted packets are
>simply routed according to the routing tables in your computer.

Here's a part of my routing table:
  66.93.49.0/24 dev eth0 proto kernel scope link src 66.93.49.232
  66.93.49.0/24 dev eth1 proto kernel scope link src 66.93.49.140
  default equalize
        nexthop via 66.93.49.1 dev eth0 weight 1
        nexthop via 66.93.49.1 dev eth1 weight 1
It has two default routes, balanced for outbound. See man ip.
And yes, reply packets go back out the interface from whence they came.
Do the following to achieve this. (May be overkill)
  echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
  echo 1 > /proc/sys/net/ipv4/conf/eth0/arp_filter
  echo 1 > /proc/sys/net/ipv4/conf/eth1/arp_filter



Relevant Pages

  • Re: Traffic Load sharing
    ... the timing differences between the routes ... sending packets via alternating interfaces can lead to different ... alternating interfaces is seldom as effective as load distribution ... distribution rather than per-packet load distribution. ...
    (comp.dcom.sys.cisco)
  • RE: Multiple routes to the same destination
    ... why not alter routes in a script, you are not going to send packets belonging to the same session in multiple routes would ya? ... Multiple routes to the same destination ... round robin is really not what you want with IP packets. ...
    (freebsd-net)
  • Re: Two NIC cards => Possible to Configure Two Default Routes?
    ... > I have two DSL providers, can I configure two default routes that are ... > able to send and receive network packets on both interfaces (eth0 and ... > am guessing that some Linux folks have devised or written their ... Transmitted packets are ...
    (comp.os.linux.networking)
  • Re: OSA-Express, 100mb Token-Ring, QDIO, MTU Size Question
    ... CS IP is not the only platform which describes routes you didn't know you ... there is a sort-of hop from CS IP to the OSA and that packets to the OSA ... The key point from your NETSTAT GATE output is that any packet which is sent ... For IBM-MAIN subscribe / signoff / archive access instructions, ...
    (bit.listserv.ibm-main)
  • Re: TCP question
    ... Consecutive packets can even take different routes from sender to receiver, which can easily change the receipt order. ... will be straightened out first *or they will never reach the TCP level* ...
    (microsoft.public.vb.general.discussion)