Mark Lidstone wrote:
Hi Andy, The situation is this: there are a total of four companies represented in our building. We've all been looking at upgrading our Internet connections from ADSL, and as we're all owned by the same parent company it made sense to buy our bandwidth "in bulk". As such we're hoping to get a 4Mb/4Mb pipe of some description. One of the drivers for going ahead with this is the fact that one of the companies wants to start using some reasonably funky video conferencing equipment. The four companies are not paying the same amount each for the connection. Each company has agreed to pay an amount that represents their expected usage of the system. To keep things fair, we would like to shape the traffic on the link to reflect the amounts people are paying. Also, the video conferencing equipment (as it will be available to all the companies in the building) will need a guaranteed chunk of bandwidth itself. We've looked at getting our ISP to provide the traffic shaping, but they want to charge a large setup fee and quite a bit of money per quarter to 'maintain' it (to leave the settings alone, in other words). I'm looking at using a spare box we have here as a means of shaping our outgoing traffic as an alternative. The idea is that downstream traffic will still be better off than with a 20:1 contended ADSL. The traffic will be split by IP, so the latest incarnation of the rules I have are: SQ="tc qdisc add dev eth0" SC="tc class add dev eth0" SF="tc filter add dev eth0" tc qdisc del dev eth0 root $SQ root handle 1:0 htb $SC parent 1:0 classid 1:1 htb rate 4mbit $SC parent 1:1 classid 1:2 htb rate <rate>kbit ceil 4mbit $SC parent 1:1 classid 1:3 htb rate <rate>kbit ceil 4mbit $SC parent 1:1 classid 1:4 htb rate <rate>kbit ceil 4mbit $SC parent 1:1 classid 1:5 htb rate <rate>kbit ceil 4mbit $SC parent 1:1 classid 1:6 htb rate <rate>kbit ceil 4mbit $SQ parent 1:2 handle 120: pfifo limit 50 $SQ parent 1:3 handle 130: pfifo limit 50 $SQ parent 1:4 handle 140: pfifo limit 50 $SQ parent 1:5 handle 150: pfifo limit 50 $SQ parent 1:6 handle 160: pfifo limit 50 $SF parent 1:0 protocol ip prio 1 u32 match ip src 1.1.1.5/32 flowid 1:6 $SF parent 1:0 protocol ip prio 2 u32 match ip src 1.1.1.1/32 flowid 1:2 $SF parent 1:0 protocol ip prio 3 u32 match ip src 1.1.1.2/32 flowid 1:3 $SF parent 1:0 protocol ip prio 4 u32 match ip src 1.1.1.3/32 flowid 1:4 $SF parent 1:0 protocol ip prio 5 u32 match ip src 1.1.1.4/32 flowid 1:5 It's just a very simple 5-child HTB with pfifo queues.
If you give the htb video class prio 0 and the rest 1 then this would be OK. There are tweaks that you can do if you want the latency even lower or you could use hfsc - I don't know what jitter is acceptable for you, as it is I guess 25ms @ 4mbit link speed.
You can't use 4mbit as a ceil for a 4mbit link as this figure will include overheads that htb doesn't see. I would prefer bfifo to pfifo and make sure the video class has some spare rate and the rates add up.
I might split things down more later, but this should get things going. It's just a pity that the ISP want to charge stupid amounts of money for the shaping.
If it's Xdsl in the UK I think they have to pay BT - maybe not with 1:1 products though.
You can still shape or police ingress traffic - the results can't be guarenteed but you can do alot better than doing nothing. You do need to sacrifice some bandwidth, depending on your traffic type/link speed and what latency/jitter you need about 10-20% - with 4mbit the results will be better than with lower speeds.
Andy. _______________________________________________ LARTC mailing list LARTC@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc