From mboxrd@z Thu Jan 1 00:00:00 1970 From: "XMundo - Soporte Tecnico" Date: Thu, 26 Aug 2004 00:58:41 +0000 Subject: [LARTC] Problems with QOS Message-Id: <023301c48b07$e03de080$fd01000a@estacion1> MIME-Version: 1 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0230_01C48AEE.AEE131E0" List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. ------=_NextPart_000_0230_01C48AEE.AEE131E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi. I=B4m making an script for load balancing of two cablemodems internet connections toward my LAN. The problem is that when I try to 'equalize' the the two internet connections with the weight=3D1 it doesn=B4t work. On the other hand, if I put 5 and 5 it works, but not at 100%, it does intermittlently, some times works and others don=B4t. example: ip route add default equalize\ nexthop via $P1 dev $IF1 weight 5\ nexthop via $P2 dev $IF2 weight 5 Besides, when I open, for example, the firefox browser, it=20 takes a lot to start navigating, sometimes it works and other times gives an error and I can=B4t navigate. >From the server it works properly, but form the clients PCs doesn=B4t. By the way, I=B4m making NAT toward the Client PCs. Do you have any idea why does it take so long to start navigating and why sometimes it works and sometimes doesn=B4t. This is the current script running in my server: #=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= P0_NET=3D10.0.1.0/24 IF0=3Deth1 IP0=3D10.0.1.1 IF1=3Deth0 IP1=3Dxxx.xxx.xxx.7 P1_NET=3Dxxx.xxx.xxx.0/24 P1=3Dxxx.xxx.xxx.1 IF2=3Deth2 IP2=3Dyyy.yyy.yyy.21 P2_NET=3Dyyy.yyy.yyy.0/24 P2=3Dyyy.yyy.yyy.1 echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter echo 0 > /proc/sys/net/ipv4/conf/eth2/rp_filter echo 3 > /proc/sys/net/ipv4/route/gc_elasticity echo 1 > /proc/sys/net/ipv4/route/gc_interval echo 0 > /proc/sys/net/ipv4/route/gc_timeout ip route flush cache ip route flush all ip route flush table modem0 ip route flush table modem1 ip rule add from $IP1 lookup modem0 ip rule add from $IP2 lookup modem1 ip route add $P1_NET dev $IF1 src $IP1 ip route add $P2_NET dev $IF2 src $IP2 ip route add $P0_NET dev $IF0 src $IP0 ip rule add from $P1_NET lookup modem0 ip route add $P0_NET dev $IF0 table modem0 ip route add 0/0 via $P1 table modem0 ip rule add from $P2_NET lookup modem1 ip route add $P0_NET dev $IF0 table modem1 ip route add 0/0 via $P2 table modem1 ip route add default equalize\ nexthop via $P1 dev $IF1 weight 5\ nexthop via $P2 dev $IF2 weight 5 #=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= ------=_NextPart_000_0230_01C48AEE.AEE131E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi.
 
I=B4m making an script = for load=20 balancing of two
cablemodems internet connections toward my = LAN.
 
The problem is that = when I try to=20 'equalize' the
the two internet connections with the weight=3D1 = it
doesn=B4t=20 work. On the other hand, if I put 5 and 5
it works, but not at 100%, = it does=20 intermittlently,
some times works and others don=B4t.
 
example:
 
ip route add default=20 equalize\
 nexthop via $P1 dev $IF1 weight 5\
 nexthop = via $P2=20 dev $IF2 weight 5
 
Besides, when I open, = for example,=20 the firefox browser, it
takes a lot to start navigating, sometimes = it works=20 and other
times gives an error and I can=B4t navigate.
 
From the server it = works properly,=20 but form the clients PCs
doesn=B4t.
 
By the way, I=B4m = making NAT toward=20 the Client PCs.
 
Do you have any idea = why does it=20 take so long to start
navigating and why sometimes it works and = sometimes=20 doesn=B4t.
 

This is the current script running in my server:
 

#=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D
 
P0_NET=3D10.0.1.0/24
IF0=3Deth1
IP0=3D10.0.1.1
 
IF1=3Deth0
IP1=3Dxxx.xxx.xxx.7
P1_NET=3Dxxx.xxx.xxx.0/24
P1= =3Dxxx.xxx.xxx.1
 
IF2=3Deth2
IP2=3Dyyy.yyy.yyy.21
P2_NET=3Dyyy.yyy.yyy.0/24
P= 2=3Dyyy.yyy.yyy.1
 
echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter
echo 0 >=20 /proc/sys/net/ipv4/conf/eth2/rp_filter
 
echo 3 > /proc/sys/net/ipv4/route/gc_elasticity
echo 1 >=20 /proc/sys/net/ipv4/route/gc_interval
echo 0 >=20 /proc/sys/net/ipv4/route/gc_timeout
 
ip route flush cache
ip route flush all
ip route flush table=20 modem0
ip route flush table modem1
 
ip rule add from $IP1 lookup modem0
ip rule add from $IP2 lookup = modem1
 
ip route add $P1_NET dev $IF1 src $IP1
ip route add $P2_NET dev = $IF2 src=20 $IP2
ip route add $P0_NET dev $IF0 src $IP0
 
ip rule add from $P1_NET lookup modem0
ip route add $P0_NET dev = $IF0=20 table modem0
ip route add 0/0 via $P1 table modem0
 
ip rule add from $P2_NET lookup modem1
ip route add $P0_NET dev = $IF0=20 table modem1
ip route add 0/0 via $P2 table modem1
 
ip route add default equalize\
 nexthop via $P1 dev $IF1 = weight=20 5\
 nexthop via $P2 dev $IF2 weight 5
 
#=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D
------=_NextPart_000_0230_01C48AEE.AEE131E0-- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/