From: lartc@pro-technica.com
To: lartc@vger.kernel.org
Subject: [LARTC] Re: 2 ISP Routing Problem
Date: Mon, 05 Apr 2004 05:36:16 +0000 [thread overview]
Message-ID: <courier.4070F050.00007F93@pro-technica.com> (raw)
I read carefully "Guide to IP Layer Networking", but this don't give idea
how to make this simple ( I think ) route. My logic is:
If packet coming from source adress 1.0.1.0/24 AND destination is NOT localy
connected host ( 1.0.1.0/24 OR 2.0.1.0/24 OR 127.0.0.0/8 ), send it to ISP1
gateway 1.0.0.1.
If packet coming from source adress 2.0.1.0/24 AND destination is NOT localy
connected host ( 1.0.1.0/24 OR 2.0.1.0/24 OR 127.0.0.0/8 ), send it to ISP2
gateway 2.0.0.1.
If packet coming ( from ISP1 or ISP2 ) have destination adress 1.0.1.0/24 OR
2.0.1.0/24 send it to coresponding eth interface.
As see, there is NOT default route, all other source/destination combination
will be droped ( with ICMP host unreachable may be? ).
I can't believe, that no one use single Linux router like this....
lartc@pro-technica.com writes:
> Hello,I have single linux router ( fedora core 1 ), 2 ISP, 1 internal
> network,1 IP space from every ISP
> My scenario:
> eth0 1.0.0.2 netmask 255.255.255.252 -> ISP 1
> eth1 2.0.0.2 netmask 255.255.255.252 -> ISP 2
> eth2 1.0.1.1 netmask 255.255.255.0 -> IP space from ISP1
> eth3 2.0.1.1 netmask 255.255.255.0 -> IP space from ISP2
>
> Config I try:
> /etc/iproute2/rt_tables:
> 10 isp1
> 20 isp2
>
> ip add rule from 1.0.1.0/24 table isp1
> ip add rule from 2.0.1.0/24 table isp2
> route del default
> ip route add default via 1.0.0.1 table isp1
> ip route add default via 2.0.0.1 table isp2
>
> At this point workstations connected to eth2 and eth3 connect to internet
> fine.
> BUT: with this config I can't communicate with workstations. If I try
> 'ping 1.0.1.2' I can see thah all packets with source IP1.0.1.1 are sent
> to eth0, and packets with source IP 2.0.1.1 are sent to eth1.
>
> #ip route get from 1.0.1.1 to 1.0.1.2
> 1.0.1.2 from 1.0.1.1 via 1.0.0.1
>
> So, question is: How to setup iproute2, so kernel first consult internal
> routing table:
> 1.0.1.0/24 dev eth2 proto kernel scope link src 1.0.1.1
> 2.0.1.0/24 dev eth3 proto kernel scope link src 2.0.1.1
>
> and AFTER THIS default routes I create with 'ip route default via ...'
>
> PS: All IP's are real, I don't use 10.x.x.x...
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next reply other threads:[~2004-04-05 5:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-05 5:36 lartc [this message]
2004-04-06 4:34 ` [LARTC] Re: 2 ISP Routing Problem Martin A. Brown
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=courier.4070F050.00007F93@pro-technica.com \
--to=lartc@pro-technica.com \
--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.