Preferring routing cache over "ip rule"

Linux Advanced Routing and Traffic Control

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

 



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/

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