Date: Mon, 23 May 2005 23:27:26 +0300 From: "Chris Dionissopoulos" <dionch@freemail.gr> To: <ovidiue@unixware.ro>, <freebsd-ipfw@freebsd.org> Subject: Re: QoS and guaranteed bandwidth Message-ID: <008801c55fd5$d6e7dec0$0100000a@R3B> References: <MAEBLPAGHGPMOKCBICBNIEGLCFAA.alexandre.delay@free.fr> <1116872082.42921d92b020d@webmail.unixware.ro>
next in thread | previous in thread | raw e-mail | index | archive | help
>I must have two different values for every user: guaranteed bandwidth and > maximum bandwidth > > Citat "Alexandre D." <alexandre.delay@free.fr>: This adds a little complexity to the previous procedure. Variables: ~~~~~~~~ $N = group number of users [1,2,.....] $USER_MAX_BW[$N] max bandwidth of a single user in group $N. $USER_MIN_BW[$N] min bandwidth of a single user in group $N. $USERS_SUBNET[$N], a group subnet (of users) in CIDR format. $WAN_INTERFACE, your gateway wan interface name. Procedure: ======== 1. Calculate your priority ~~~~~~~~~~~~~~~~~~~ The rule says that the priority in WFQ is calculated if you divide your total bandiwdth with the minimum allocated bandwidth to each user. So we have: $WFQ_Priority[$N] = $USER_MAX_BW[$N] / $USER_MIN_BW[$N]. 2.Add a proper Pipe and Queue ~~~~~~~~~~~~~~~~~~~~~~~~~ ipfw pipe $N config bw $USER_MAX_BW[$N] queue 20Kbytes ipfw queue $N pipe $N weight $WFQ_Priority[$N] mask src-ip 0xffffffff queue 10kbytes ipfw add queue $N ip from $USERS_SUBNET[$N] to any xmit out $WAN_INTERFACE example: ======= 2 groups of users: Group1 - 192.168.0.0/28 , Bandwidth = min 32Kbps - max 256kbps Group2 - 192.168.0.16/28 , Bandwidth = min 32Kbps - max 384Kbps $wan = fxp0 (I assume that your line has at least the minimum bandwidth you guarantee. in our case is 32users x 32kbps = 1024Kbps ) 1.priorities: $wfq[1] = 256 / 32 = 12 $wfq[2] = 384/ 32 = 16 2.ipfw commands: ipfw pipe 1 config bw 256Kb/s queue 20Kbytes ipfw queue 1 pipe 1 weight 12 mask src-ip 0xffffffff queue 10kbytes ipfw add queue 1 ip from 192.168.0.0/28 to any xmit out fxp0 ipfw pipe 2 config bw 384Kb/s queue 20Kbytes ipfw queue 2 pipe 2 weight 16 mask src-ip 0xffffffff queue 10kbytes ipfw add queue 2 ip from 192.168.0.16/28 to any xmit out fxp0 So simple! Chris. ____________________________________________________________________ http://www.freemail.gr - δωρεάν υπηρεσία ηλεκτρονικού ταχυδρομείου. http://www.freemail.gr - free email service for the Greek-speaking.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?008801c55fd5$d6e7dec0$0100000a>
