[LARTC] Routing with two net connections

Linux Advanced Routing and Traffic Control

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

 



Hello,

I've got a question about routing under the 2.2.15 kernel.

I have two connections to the internet, say 1.2.3.4 (gateway 1.2.3.1) and
20.20.20.20 (gateway 20.20.20.1).  

Currently, it seems I can only set one "default" gateway.  So if traffic 
comes into 1.2.3.4, and my default gw is 20.20.20.1, all the return traffic
goes out 20.20.20.1.

The weird thing is that if I set my default gw to be 20.20.20.1, pings to 
20.20.20.20 work fine, and pings to 1.2.3.4 work ok (the return goes through
20.20.20.1).  However, if I have my gw set to 1.2.3.1, I can ping 1.2.3.4 ok,
but not 20.20.20.20.  I see the return ping from 20.20.20.20 going out to
the 1.2.3.4 interface, but it never seems to get back.  Could this be some sort
of ISP configuration issue?  In my case, the 1.2.3.4 line goes to a dsl router.

Can Linux's routing be configured such that incoming traffic (http, mail, etc..) 
on 1.2.3.4 returns back thru 1.2.3.1, and traffic coming into 20.20.20.20
returns back thru its same interface (20.20.20.1)?

Bob


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