Re: Preferring routing cache over ip rule

Linux Advanced Routing and Traffic Control

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

 



You should not have any problems you are talking about.
unless your isp drops these packets

'"'someone from the Internet'"' does not know which isp you used.
so it will always see that one which ip dnat you are doing
that way mo mater which ip 'someone from the Internet'" will choose he will
receive everything via isp1 for example
but then you probably can owerload that link when others will be empty.


I am not sure how to acheive what you want,
the most easy way is simply use more than one ip for your server then server
software will do all the job.
with one ip there is no easy way to find to which connection packet belongs.
unless you use connmark module. (routing cache is one direction only)

----- Original Message ----- 
From: "Szymon Miotk" <spam@xxxxxxxxxxxxx>
To: <lartc@xxxxxxxxxxxxxxx>
Sent: Thursday, March 04, 2004 4:17 PM
Subject:  Preferring routing cache over ip rule


> Hello!
> I have problem setting up some ip routing rules.
> Let's assume following network configuration:
>
>                    ___________
> server: 10.1.1.1 |       eth1|-- ISP1
> internal --------|eth0       |
> 10.1/16          |       eth2|-- ISP2
> 10.2/16          |           |
>                   |       eth3|-- ISP3
>                   |___________|
>
> And following ip route rules
> All traffic from 10.1.1.1 via ISP1
> All traffic from 10.1/16 via ISP2
> All traffic form 10.2/16 via ISP3
>
> So users' connections go via IPS2 or ISP3 and ISP1 is dedicated link for
> the server.
>
> It's quite good, but I have a problem I cannot overcome:
>
> When someone from the Internet wants to connect to 10.1.1.1 by the ISP2,
> the return packets goes via ISP1.
> And of course '"'someone from the Internet'"' drops those packets, as they
> don't come from the right IP address.
>
> I would like to have the followin:
> 1. traffic from 10.1.1.1 goes via ISP1
> 2. traffic from 10.1 goes via ISP2
> 3. traffic from 10.2 goes via ISP3
> 4. 10.1.1.1 is accessible via every ISP
>
> # ip route show cache | grep '"'GUEST_IP'"'
> 10.1.1.1 from GUEST_IP dev eth0  src ISP2
> GUEST_IP from 10.1.1.1 via ISP1 dev eth1  src eth0_ip_address
>
> How do I prefer routing cache over ip rule?
>
> So let's explain it more clearly on a drawing:
>
>
> Situation now:
> Guest is confused, because he gets packets from the wrong IP address
>                 ___________
>                |           |
>                | |-->--eth1|>--ISP1---->-->--|
> internal -<>--|eth0       |               guest (very confused)
> 10.1.1.1      | ^--<--eth2|<---ISP2---<--<--|
>                |           |
>                |       eth3|-- ISP3
>                |___________|
>
>
> Thanks!
> Szymon Miotk
>
> _______________________________________________
> LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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