From: "Tóth Nándor" <nug@sch.bme.hu>
To: lartc@vger.kernel.org
Subject: [LARTC] multiple uplinks example script
Date: Tue, 01 Feb 2005 06:00:36 +0000 [thread overview]
Message-ID: <41FF1B04.5020706@sch.bme.hu> (raw)
Hi!
I had two uplinks till today. We stopped one of them today, so i thought
i could share my experience. (it is maybe useful for somebody)
I hadn't managed to configure it using a LARTC howto, but the Nano-howto
(http://www.ssi.bg/~ja/nano.txt) and julian's kernel patches.
I had some problems with icq connections, because it is a two step
connection (It is just theory).
1. Client --> Main server
2. Main Server --> Client ; Main server -> small server
3. Client -> small server
The problem is, when connection 1. use different uplink then connection 2.
Those icq related rules below corrected the problem.
My script:
IF0=eth2
IF1=eth1
IF2=eth3
IF3=eth0
P0_NET\x192.168.1.0/24
P1_NET=public1
P2_NET=public2
IP0\x192.168.1.254
IP1=publicip1
IP2=publicip1
#gateway
P1=publicgw1
P2=publicgw2
#table
T1!1
T2!2
T3"2
IP=/sbin/ip
# Delete everything
#$IP route flush cache
$IP route flush all
$IP route flush all table $T1
$IP route flush all table $T2
$IP route flush all table $T3
#icq rules
$IP rule delete prio 48 to 205.188.0.0/16 table $T1
$IP rule delete prio 49 to 64.12.161.153 table $T1
$IP rule delete prio 49 to 64.12.0.0/16 table $T1
$IP rule delete prio 50 table main
$IP rule delete prio $T3 table $T3
$IP rule delete prio $T1 from $P1_NET table $T1
$IP rule delete prio $T2 from $P2_NET table $T2
# The default table
$IP route add $P0_NET dev $IF0 src $IP0
$IP route add $P1_NET dev $IF1 src $IP1
$IP route add $P2_NET dev $IF2 src $IP2
# For stable icq connections
$IP rule add prio 48 to 205.188.0.0/16 table $T1
#$IP rule add prio 49 to 64.12.161.153 table $T1
$IP rule add prio 49 to 64.12.0.0/16 table $T1
$IP rule add prio 50 table main
$IP route del default table main
$IP rule add prio $T3 table $T3
$IP route add default table $T3 proto static \
nexthop via $P1 dev $IF1 weight 1 \
nexthop via $P2 dev $IF2 weight 3
$IP rule add prio $T1 from $P1_NET table $T1
$IP route add default via $P1 dev $IF1 src $IP1 proto static table $T1
$IP route append prohibit default table $T1 metric 1 proto static
$IP rule add prio $T2 from $P2_NET table $T2
$IP route add default via $P2 dev $IF2 src $IP2 proto static table $T2
$IP route append prohibit default table $T2 metric 1 proto static
$IP route flush cache
--
Udv,
Nandor
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
reply other threads:[~2005-02-01 6:00 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=41FF1B04.5020706@sch.bme.hu \
--to=nug@sch.bme.hu \
--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.