[CLUG-tech] traffic shaping

Louis Young louis at kwikpay.co.za
Tue Feb 14 15:26:06 SAST 2006


Thanks. Will have a squiz. I actually had something a little less
zero-day in mind 

> -----Original Message-----
> From: clug-tech-bounces at clug.org.za 
> [mailto:clug-tech-bounces at clug.org.za] On Behalf Of Geoffrey Chisnall
> Sent: 14 February 2006 03:22
> To: OSS Technical Questions and Answers
> Subject: Re: [CLUG-tech] traffic shaping
> 
> ive only set up tc using it for outgoing traffic, not 
> incoming traffic.
> 
> basically i have this script
> 
> --------------------------------------------------------------
> ----------------
> #!/bin/bash
> 
> tc qdisc del dev eth0 root handle 1:
> 
> tc qdisc add dev eth0 root handle 1: htb default 30
> 
> tc class add dev eth0 parent 1: classid 1:1 htb rate 1024kbps 
> ceil 2048kbps tc class add dev eth0 parent 1:1 classid 1:10 
> htb rate 900kbps ceil 2048kbps tc class add dev eth0 parent 
> 1:1 classid 1:20 htb rate 80kbps ceil 512kbps tc class add 
> dev eth0 parent 1:1 classid 1:30 htb rate 40kbps ceil 64kbps 
> tc class add dev eth0 parent 1:1 classid 1:40 htb rate 4kbps 
> ceil 64kbps
> 
> #####TWO WEBSITES#####
> tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src
> 10.10.1.1 flowid 1:10
> tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src
> 10.10.1.2 flowid 1:10
> 
> 
> ####Mail, FTP, WEB#############
> tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src
> 10.10.1.3 flowid 1:20
> 
> ######Other#########
> tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst
> 10.100.0.0/16 flowid 1:30
> 
> 
> ######Misc###########
> tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src 
> 10.10.1.4 flowid 1:40
> 
> -----------------------------------------------------------
> 
> 
> then i have setup ipac-ng to actually see the various rules 
> working with 
> the graph.
> 
> about the NAT issues, im not too certain if it has any issues with it.
> 
> 
> on another note...i would also love to know how the incoming 
> traffic can 
> be setup using this.
> 
> 
> 
> Louis Young wrote:
> 
> >>i've set it up and running farely sweet me thinks.
> >>    
> >>
> >
> >How? Using tc?
> >
> >  
> >
> >>took me a while to get up cause i had no idea what i was 
> >>doing...but now that's it's up, it is very easy to setup again.
> >>    
> >>
> >
> >Another concern I have is, are there any issues with NAT that you are
> >aware?
> >
> >Cheers
> >Louis
> >
> >  
> >
> 
> 
> -- 
> Clug-tech mailing list
> Clug-tech at clug.org.za
> To (un)subscribe:
> http://lists.clug.org.za/mailman/listinfo/clug-tech
> Wiki: http://wiki.clug.org.za
> IRC: irc.zanet.net #clug
> 
> 


More information about the Clug-tech mailing list