* [LARTC] multi ADSLs links
@ 2004-08-15 23:34 ThE LinuX_KiD
2004-08-18 13:03 ` Andy Furniss
0 siblings, 1 reply; 2+ messages in thread
From: ThE LinuX_KiD @ 2004-08-15 23:34 UTC (permalink / raw)
To: lartc
hi,
I've a dedicated internet link 512k with a cisco
router,
and now, I want to upgrade bandwidth with
8 ADSLs (512k each)
then:
- build kernel 2.4.27 with pachs:
- patch-o-matic-ng-20040621 : CONNMARK, H323, etc...
- http://www.ssi.bg/~ja/#multigw Julian's patch.
- Activate "equal cost multi path"
(Advanced Router-Networking Options)
and so on
- build iptables.1.2.11
- build iproute2 with HTB patch
ADSLs are connected by modems/routers "Ericsson HM210dp"
I configure then with:
- the pppoe username and password
- nat
- A static route (in order to reach LAN network)
- LAN ip ethernet in this way:
modem/router 1 -> IP LAN : 172.16.1.1
modem/router 2 -> IP LAN : 172.16.1.2
....
modem/router 8 -> IP LAN : 172.16.1.8
In LINUX BOX, I don't make NAT because modems/routers do it.
-except if I go to internet througth Cisco router-
then, I have this:
modem1 modem2 ... modem 8
172.16.1.1 172.16.1.2 ... 172.16.1.8
| | |
| | |
+-----------------+----- ... -------+
|
|
| LINUX
------+------------------------+
| eth2: 172.16.1.100 |
| |
| eth0: 200.26.X.Y1 +--> 200.26.X.Y4 (CISCO)-->internet
| |
| eth1: 192.168.221.254 |
+-----+------------------------+
|
|
+---> RED LAN 192.168.221.0/24
Also, each modem/router haves next static route:
"192.168.221.0/24 via 172.16.1.100"
in order to reach LAN 192.168.221.0/24
Finally, I make next script:
#!/bin/sh
# flush all NICs
ip addr flush dev eth0
ip addr flush dev eth1
ip addr flush dev eth2
ip addr flush dev lo
ip link set eth0 down
ip link set eth1 down
ip link set eth2 down
ip link set lo down
# set up all nics
ip addr add 127.0.0.1/8 dev lo
ip link set lo up
ip route add 127.0.0.0/8 dev lo
ip link set eth0 up
ip addr add 200.26.X.Y1/29 brd 200.26.X.Y2 dev eth0
ip route add 200.26.X.Y3/29 dev eth0
ip link set eth1 up
ip addr add 192.168.221.254/24 dev eth1
ip route add 192.168.221.0/24 dev eth1
ip link set eth2 up
ip addr add 172.16.1.100/24 dev eth2
ip route add 172.16.1.0/24 dev eth2
# routing...
echo 1 > /proc/sys/net/ipv4/ip_forward
ip r a default proto static \
nexthop via 172.16.1.1 dev eth2 \
nexthop via 172.16.1.2 dev eth2 \
nexthop via 172.16.1.3 dev eth2 \
nexthop via 172.16.1.4 dev eth2 \
nexthop via 172.16.1.5 dev eth2 \
nexthop via 172.16.1.6 dev eth2 \
nexthop via 172.16.1.7 dev eth2 \
nexthop via 172.16.1.8 dev eth2 \
nexthop via 200.26.X.Y4 dev eth0
# (last IP is cisco's IP as default gateway of dedicated
# internet link)
# I only make NAT if packet go out internet trought Cisco
iptables -F -t nat
iptables -A POSTROUTING -t nat -o eth0 -s 192.168.221.0/24 -j
SNAT --to-source 200.26.X.Y1
# also I make next rules in order to
# reach linux box from internet.
ip ru d from 200.26.X.Y3/29 table 200
ip ru a from 200.26.X.Y3/29 table 200
ip r a default via 200.26.X.Y4 table 200 # <-- ip del CISCO
ip r a 192.168.221.0/24 src 192.168.221.254 dev eth1 table 200
MY RESULTS:
from Internet, I can reach LINUX box without problems
but...
browse web pages from LAN hosts is poor
sometimes, we get a very good browsing speed,
but some others times happens something rare:
I need to click in STOP and REFRESH in my browser
in order get access to some web pages (that happens
in diferrents ways)
any ideas ???
Thanks !!
andres
Referencias que tome:
http://bulma.net/body.phtml?nIdNoticia\x1759
http://docum.org
--
Andres Gregori
Linux System Admin
webmaster@dimensionip.com.ar
www.dimensionip.com.ar
ICQ: 23100423
MSN: webmaster@dimensionip.com.ar
Phone: +54-291-4519981
Movil: +54-291-154041973
SMS : sms@dimensionip.com.ar
- hasta 150 caracteres t.plano -
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [LARTC] multi ADSLs links
2004-08-15 23:34 [LARTC] multi ADSLs links ThE LinuX_KiD
@ 2004-08-18 13:03 ` Andy Furniss
0 siblings, 0 replies; 2+ messages in thread
From: Andy Furniss @ 2004-08-18 13:03 UTC (permalink / raw)
To: lartc
ThE LinuX_KiD wrote:
> hi,
>
> I've a dedicated internet link 512k with a cisco
> router,
> and now, I want to upgrade bandwidth with
> 8 ADSLs (512k each)
>
> then:
>
>
> - build kernel 2.4.27 with pachs:
>
> - patch-o-matic-ng-20040621 : CONNMARK, H323, etc...
> - http://www.ssi.bg/~ja/#multigw Julian's patch.
> - Activate "equal cost multi path"
> (Advanced Router-Networking Options)
> and so on
> - build iptables.1.2.11
> - build iproute2 with HTB patch
>
> ADSLs are connected by modems/routers "Ericsson HM210dp"
>
> I configure then with:
> - the pppoe username and password
> - nat
> - A static route (in order to reach LAN network)
> - LAN ip ethernet in this way:
>
> modem/router 1 -> IP LAN : 172.16.1.1
> modem/router 2 -> IP LAN : 172.16.1.2
> ....
> modem/router 8 -> IP LAN : 172.16.1.8
>
> In LINUX BOX, I don't make NAT because modems/routers do it.
> -except if I go to internet througth Cisco router-
>
>
> then, I have this:
>
> modem1 modem2 ... modem 8
> 172.16.1.1 172.16.1.2 ... 172.16.1.8
> | | |
> | | |
> +-----------------+----- ... -------+
> |
> |
>
> | LINUX
> ------+------------------------+
> | eth2: 172.16.1.100 |
> | |
> | eth0: 200.26.X.Y1 +--> 200.26.X.Y4 (CISCO)-->internet
> | |
> | eth1: 192.168.221.254 |
> +-----+------------------------+
> |
> |
> +---> RED LAN 192.168.221.0/24
>
>
> Also, each modem/router haves next static route:
>
> "192.168.221.0/24 via 172.16.1.100"
>
> in order to reach LAN 192.168.221.0/24
>
>
> Finally, I make next script:
>
>
> #!/bin/sh
>
> # flush all NICs
>
> ip addr flush dev eth0
> ip addr flush dev eth1
> ip addr flush dev eth2
> ip addr flush dev lo
>
> ip link set eth0 down
> ip link set eth1 down
> ip link set eth2 down
> ip link set lo down
>
>
> # set up all nics
>
> ip addr add 127.0.0.1/8 dev lo
> ip link set lo up
> ip route add 127.0.0.0/8 dev lo
>
> ip link set eth0 up
> ip addr add 200.26.X.Y1/29 brd 200.26.X.Y2 dev eth0
> ip route add 200.26.X.Y3/29 dev eth0
>
> ip link set eth1 up
> ip addr add 192.168.221.254/24 dev eth1
> ip route add 192.168.221.0/24 dev eth1
>
> ip link set eth2 up
> ip addr add 172.16.1.100/24 dev eth2
> ip route add 172.16.1.0/24 dev eth2
>
>
> # routing...
>
> echo 1 > /proc/sys/net/ipv4/ip_forward
>
> ip r a default proto static \
> nexthop via 172.16.1.1 dev eth2 \
> nexthop via 172.16.1.2 dev eth2 \
> nexthop via 172.16.1.3 dev eth2 \
> nexthop via 172.16.1.4 dev eth2 \
> nexthop via 172.16.1.5 dev eth2 \
> nexthop via 172.16.1.6 dev eth2 \
> nexthop via 172.16.1.7 dev eth2 \
> nexthop via 172.16.1.8 dev eth2 \
> nexthop via 200.26.X.Y4 dev eth0
>
> # (last IP is cisco's IP as default gateway of dedicated
> # internet link)
>
>
> # I only make NAT if packet go out internet trought Cisco
>
> iptables -F -t nat
> iptables -A POSTROUTING -t nat -o eth0 -s 192.168.221.0/24 -j
> SNAT --to-source 200.26.X.Y1
>
>
> # also I make next rules in order to
> # reach linux box from internet.
>
> ip ru d from 200.26.X.Y3/29 table 200
> ip ru a from 200.26.X.Y3/29 table 200
> ip r a default via 200.26.X.Y4 table 200 # <-- ip del CISCO
> ip r a 192.168.221.0/24 src 192.168.221.254 dev eth1 table 200
>
>
> MY RESULTS:
>
> from Internet, I can reach LINUX box without problems
> but...
>
>
> browse web pages from LAN hosts is poor
>
> sometimes, we get a very good browsing speed,
> but some others times happens something rare:
>
> I need to click in STOP and REFRESH in my browser
> in order get access to some web pages (that happens
> in diferrents ways)
>
> any ideas ???
I assume you have 8 different real IP addresses, not multilink.
I have no experience with load balancing but have read that some web
servers won't serve files to an unknown IP address - so you may need to
find a way to get all the tcp connections after the first one to use the
same route.
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-08-18 13:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-15 23:34 [LARTC] multi ADSLs links ThE LinuX_KiD
2004-08-18 13:03 ` Andy Furniss
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.