All of lore.kernel.org
 help / color / mirror / Atom feed
From: Szymon Miotk <spam@crocom.com.pl>
To: lartc@vger.kernel.org
Subject: [LARTC] Preferring routing cache over "ip rule"
Date: Thu, 04 Mar 2004 14:17:37 +0000	[thread overview]
Message-ID: <40473A81.1010308@crocom.com.pl> (raw)

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@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

                 reply	other threads:[~2004-03-04 14:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40473A81.1010308@crocom.com.pl \
    --to=spam@crocom.com.pl \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.