All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] [reformat]please, check out this configuration(load shareing)
@ 2002-01-21  1:39 Lee, Myoung Ho
  0 siblings, 0 replies; only message in thread
From: Lee, Myoung Ho @ 2002-01-21  1:39 UTC (permalink / raw)
  To: lartc


My Testing Network:

+---------------------------+     +-------------+
|              Internet                   |---| z.z.z.z         |
+---------------------------+     +-------------+
     |                         |
     |                         |  
     | ppp0 x.x.x.x      |ppp0 y.y.y.y
+-----------+           +-------------+
|   Server1    |eth1     |Server2         |
|                  |-------|                    |
+-----------+     eth1+----------- -+
         |
         |  eth2 172.31.0.254/16

Server1 eth1:  172.30.0.1/16, Server2:  172.30.0.2/16


Server1's ip rule show
0:             from all     lookup local
32765:      from 172.31.0.0/16  to  z.z.z.z   lookup 10
.....                    lookup main
....                     lookup 253

Server1's ip route show:
x.x.x.1           dev ppp0  proto kernel scope link src  x.x.x.x
172.30.0.0/16  dev eth1   proto kernel scope  link src  172.30.0.1
172.31.0.0/16  dev eth2   proto
................................172.31.0.254
127.0.0.0/8 .... lo
default
          nexthop  via 172.30.0.2   dev eth1  weight 1
          nexthop  dev    ppp0  weight 1

 ip route show table 10:
default   dev eth1    scope link

iptables rule:
 iptables   -t nat  -A POSTROUTING  -s 172.31.0.0/16 -d 0.0.0.0/0 \
 -o  ppp0   -j MASQUERADE
 iptables   -t nat  -A POSTROUTING  -s 172.31.0.0/16 -d 0.0.0.0/0 \
 -o  eth1   -j SNAT --to 172.30.0.1


Server2's ip rule show:
0:             from all     lookup local
.....                    lookup main
....                     lookup 253

Server2's ip route show:
y.y.y.1           dev ppp0  proto kernel scope link src  y.y.y.y
172.30.0.0/16  dev eth1   proto kernel scope  link src  172.30.0.1
127.0.0.0/8 .... lo
default
          nexthop  via y.y.y.1   dev ppp0

iptables rule:
 iptables   -t nat  -A POSTROUTING  -s 172.30.0.0/16 -d 0.0.0.0/0 \
 -o ppp0   -j MASQUERADE

My purposes are:
1:  load sharing with  ppp0 and eth1.
2.  when trying connect to z.z.z.z, It should use eth1.
( Now, for test, eth1 is private network but final purpose It will be
changed to public network.)

In this situation, the 172.31.0.0/16 network can't establish connection  to
z.z.z.z.
When I delete the rule (ip rule del from 172.31.0.0/16 to z.z.z.z lookup
10), The connection is established.

And the other question,
Why the source IP of the packet that going out from eth1 have ppp0's IP
address?
(In my result, It's really happened..

What's wrong in upper configuration?

thanks.



_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-01-21  1:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-21  1:39 [LARTC] [reformat]please, check out this configuration(load shareing) Lee, Myoung Ho

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.