[LARTC] Re: LARTC Digest, Vol 20, Issue 7
Message: 1 Date: Fri, 06 Oct 2006 00:06:08 -0400 From: Kevin White [EMAIL PROTECTED] Subject: [LARTC] Two upstream gateways, only use one unless it fails? To: lartc@mailman.ds9a.nl Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1; format=flowed I'm looking at setting up a system with two upstream Internet routers, the second to be used only if the first fails. There's a lot of information on using Julian's patches (the nano document), and I'm still digesting all of it. It looks pretty slick, and I think it will work...but I don't see if I can actually set up multipath and have the kernel not use the second interface unless it has to. It looks like I can only set weight and set up a percentage rule. Am I missing something? Can I say here are two routes, always use route one unless you can't? Thanks, Kevin Hi Kevin You can use multipath with different weights see below taken from lartc.org... ### cute## 4.2.2. Load balancing The second question is how to balance traffic going out over the two providers. This is actually not hard if you already have set up split access as above. Instead of choosing one of the two providers as your default route, you now set up the default route to be a multipath route. In the default kernel this will balance routes over the two providers. It is done as follows (once more building on the example in the section on split-access): ip route add default scope global nexthop via $P1 dev $IF1 weight 1 \ nexthop via $P2 dev $IF2 weight 1 This will balance the routes over both providers. The weight parameters can be tweaked to favor one provider over the other. cute## Then you can do something like this: ip route add default scope global nexthop via $P1 dev $IF1 weight 100 \ nexthop via $P2 dev $IF2 weight 1 ^^ best regards -- Paulo Ricardo Bruck - consultor Contato Global Solutions - http://www.contato.com.br fone 011 5031-4932 011 5034-1732 cel 011 9235-4327 signature.asc Description: Esta é uma parte de mensagem assinada digitalmente ___ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
[LARTC] QoS and CLASSIFY
Hi Guys After googling a little I couldn't find the correct answer.. When I use : tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.0.11 flowid 1:30 , I can shape traffic to 1:30.( works like a charm) Now instead tc filter I would like to use CLASSIFY as below: iptables -t mangle -A POSTROUTING -o eth0 -d 192.168.0.5 -j CLASSIFY --set-class 1:30 but when I comment tc filter and include iptables -t mangle..CLASSIFY nothing works. Where Am I wrong?? Scenario: #!/bin/bash # #128Kbps 192.168.0.1 # - eth1 firewall eth0 # internet-adsl-+squid---4 desktops # - +QoS 192.168.0.5 # 450Kbps .11 # .12 # .20 # modprobe sch_htb sch_prio sch_sfq cls_u32 tc qdisc del dev eth0 root tc qdisc add dev eth0 root handle 1:0 htb tc class add dev eth0 parent 1:0 classid 1:1 htb rate 450kbit ceil 450kbit tc class add dev eth0 parent 1:1 classid 1:30 htb rate 80kbit ceil 400kbit tc class add dev eth0 parent 1:1 classid 1:40 htb rate 80kbit ceil 400kbit tc class add dev eth0 parent 1:1 classid 1:50 htb rate 80kbit ceil 400kbit tc class add dev eth0 parent 1:1 classid 1:60 htb rate 80kbit ceil 400kbit tc qdisc add dev eth0 parent 1:30 handle 30: sfq perturb 10 tc qdisc add dev eth0 parent 1:40 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:50 handle 50: sfq perturb 10 tc qdisc add dev eth0 parent 1:60 handle 60: sfq perturb 10 thanks in advanced -- Paulo Ricardo Bruck - consultor signature.asc Description: Esta =?ISO-8859-1?Q?=E9?= uma parte de mensagem assinada digitalmente ___ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
[LARTC] newbie downloading not working
Hi guys Finally , after reading a lot of docs from larc/opalsoft/etc, I decided to start learning some QoS First of all I'm trying to shape only download from a iptables+squid+qos machine for 4 machines at LAN ( eth0) Can anyone help me , cause it is not working properly.. - #!/bin/bash #128Kbps 192.168.0.1 # - eth1 firewall eth0 # internet-adsl-+squid---4 desktops # - +QoS 192.168.0.5 # 450Kbps .11 # .12 # .20 # echo -e calling modules\n modprobe sch_htb sch_prio sch_sfq cls_u32 echo -e limiting download\n echo -e deleting qdisc \n tc qdisc del dev eth0 root echo -e adding HTB and SFP/PFIFO as leaves\n tc qdisc add dev eth0 root handle 1:0 htb tc class add dev eth0 parent 1:0 classid 1:1 htb rate 400kbit ceil 400kbit tc class add dev eth0 parent 1:1 classid 1:20 htb rate 300kbit ceil 400kbit tc class add dev eth0 parent 1:1 classid 1:30 htb rate 10kbit ceil 400kbit tc class add dev eth0 parent 1:1 classid 1:40 htb rate 10kbit ceil 400kbit tc class add dev eth0 parent 1:1 classid 1:50 htb rate 10kbit ceil 400kbit tc class add dev eth0 parent 1:1 classid 1:60 htb rate 10kbit ceil 400kbit tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev eth0 parent 1:30 handle 30: sfq perturb 10 tc qdisc add dev eth0 parent 1:40 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:50 handle 50: sfq perturb 10 tc qdisc add dev eth0 parent 1:60 handle 60: sfq perturb 10 tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.0.1 flowid 1:20 tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.0.11 flowid 1:30 tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.0.12 flowid 1:40 tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.0.20 flowid 1:50 tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.0.5 flowid 1:60 thx in advanced -- Paulo Ricardo Bruck - consultor signature.asc Description: Esta =?ISO-8859-1?Q?=E9?= uma parte de mensagem assinada digitalmente ___ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
[LARTC] question about correct way of shapping
Hi Guys After reading http://lartc.org/lartc.html#LARTC.QDISC http://www.docum.org/docum.org/ http://tldp.org/HOWTO/Traffic-Control-HOWTO/ http://www.opalsoft.net/qos/DS-21.htm and a wonderful figure from: http://www.opalsoft.net/qos/ds-lb-214.gif I have a newbie question. Suposse next figure: --- up 128K internet - dsl -eth1 -Linux Qos- eth0 -- LAN --- down 450k If I want shape traffic to my LAN ( sharing equally download for all users) I have to insert a rule like this tc qdisc add dev eth0 root handle 1:0 htb tc class add dev eth0 parent 1:0 classid 1:1 htb rate 400kbit and other rules and If I want shape traffic to Internet ( not allowing a single user to destroy upload) I have to insert a rule like this: tc qdisc add dev eth1 root handle 1:0 htb tc class add dev eth1 parent 1:0 classid 1:1 htb rate 100kbit and ...other rules Is it correct?? or it is better to use IMQ or dummy to shape in both directions ?? thanks in advanced -- Paulo Ricardo Bruck - consultor signature.asc Description: Esta =?ISO-8859-1?Q?=E9?= uma parte de mensagem assinada digitalmente ___ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Re: [LARTC] question about correct way of shapping
Em Qui, 2005-04-07 às 10:22 -0700, Corey Hickey escreveu: Paulo Ricardo Bruck wrote: --- up 128K internet - dsl -eth1 -Linux Qos- eth0 -- LAN --- down 450k If I want shape traffic to my LAN ( sharing equally download for all users) I have to insert a rule like this tc qdisc add dev eth0 root handle 1:0 htb tc class add dev eth0 parent 1:0 classid 1:1 htb rate 400kbit and other rules and If I want shape traffic to Internet ( not allowing a single user to destroy upload) I have to insert a rule like this: tc qdisc add dev eth1 root handle 1:0 htb tc class add dev eth1 parent 1:0 classid 1:1 htb rate 100kbit and ...other rules Is it correct?? Yes. That's the way to do it. Don't forget to add some filters (tc filter add ...) to send traffic into those queues. Yes I'll not forget 8) thanks for quickly answer Corey Just another question related w/ shapping at some documents it's describe the use of IMQ and some other the use of dummy device. What's the best method ? From what I've read we use dummy to shape both lan and wan using dummy device. It's correct? If it's correct why does we use dummy insted shape at LAn and Wan Interfaces ? I intend use TC + iptables + debian sarge, but I'm not sure about using dummy device thanks in advance -Corey -- Paulo Ricardo Bruck - consultor signature.asc Description: Esta =?ISO-8859-1?Q?=E9?= uma parte de mensagem assinada digitalmente ___ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc