From: gypsy <gypsy@iswest.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] problem with ip route and multiple lans
Date: Sat, 11 Jun 2005 18:42:26 +0000 [thread overview]
Message-ID: <42AB3092.782C0E40@iswest.com> (raw)
In-Reply-To: <20050611110456.71B203B799D@poczta.interia.pl>
Pawel wrote:
>
> Hi, I have a little problem to setup iproute in my network
> It looks like this:
>
> ---- ----- ------
> R1 R2 R3
> ---- ----- ------
> | | |
> | | |
> -------------------------------
> ETH1 ETH2 ETH3
>
> ETH0 ETH4 -------------> DMZ
> ------------------------------
> |
> |
> |
> --------------
> Internal Router
> --------------
>
> LAN1 LAN2 LAN3
>
> I've add 3 records to rt_tables file T1, T2 and T3, and wrote scritp:
>
> ##
> --------------------------------
> #1ISP
> P1_NET1="83.16.76.112"
> ETH1="eth1"
> IP1="83.16.76.114"
> R1="83.16.76.113"
>
> #2ISP
> P2_NET2="80.55.42.32"
> ETH2="eth2"
> IP2="80.55.42.34"
> R2="80.55.42.33"
>
> #3ISP
> P3_NET3!2.160.117.112
> ETH3="eth3"
> IP3="212.160.117.114"
> R3="212.160.177.113"
>
> #INTERNAL LAN
> P0_NET="192.168.100.0"
> ETH0="eth0"
> IP0="192.168.100.1
>
> #DMZ
> P4_NET="10.1.1.0"
> ETH4="eth4"
> IP4="10.1.1.1"
>
> ip route add $P1_NET1 dev $ETH1 src $R1 table T1
> ip route add default via $IP1 table T1
>
> ip route add $P2_NET2 dev $ETH2 src $R2 table T2
> ip route add default via $IP2 table T2
>
> ip route add $P3_NET dev $ETH3 src $R3 table T3
> ip route add default via $R3 table T3
>
> ip route add $P1_NET1 dev $ETH1 src $IP1
> ip route add $P2_NET2 dev $ETH2 src $IP2
> ip route add $P3_NET3 dev $ETH3 src $IP3
>
> ip rule add from $IP1 table T1
> ip rule add from $IP2 table T2
> ip rule add from $IP3 table T3
>
> ip route add default scope global nexthop via $R1 dev $ETH1 weight 1 \
> nexthop via $R2 dev $ETH2 weight 1 \
> nexthop via $R3 dev $ETH3 weight 1
> ---------------------------------------------
>
> Using this script i have conection from my NAT to the all ISPs, but not to LANs.
> I know that this script have a lack of routing to my LANs
> but i have no idea, how build that routing using iproute.
> In present configuration i use route command
> /sbin/route add -net 192.168.10.0 netmask 255.255.255.0 gw 192.168.100.2 dev eth0
> /sbin/route add -net 192.168.20.0 netmask 255.255.255.0 gw 192.168.100.2 dev eth0
> /sbin/route add -net 192.168.30.0 netmask 255.255.255.0 gw 192.168.100.2 dev eth0
> but this doesnt work with iprote command.
>
> Thanks for any answer.
>
> ----------------------------------------------------------------------
> Znajdz swoja milosc na wiosne... >>> http://link.interia.pl/f187a
This works for me:
ip link set lo up
ip addr flush dev lo
ip addr add 127.0.0.1/8 brd + dev lo
# Can now ping localhost
ip link set $IFI up
ip addr flush dev $IFI
ip addr add dev $IFI local $IPI/32 brd $BRDI
# Can now ping any host on the internal interface.
--
gypsy
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
prev parent reply other threads:[~2005-06-11 18:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-11 11:04 [LARTC] problem with ip route and multiple lans Pawel
2005-06-11 18:42 ` gypsy [this message]
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=42AB3092.782C0E40@iswest.com \
--to=gypsy@iswest.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.