QoS and guaranteed bandwidth

Suporte Matik asstec at matik.com.br
Mon May 23 23:11:14 GMT 2005


Certainly you can actually only limit bandwidth but not guaranty any 
bandwidth, same for priority even if you may get a certain penalising 
effect when using queues weight but this if works is far away from 
giving you a minimum ever available bandwidth or a priority.

You may have your reason to do this queue weighting here but IMO it 
may be interesting to define global pipes for protocol[port] first 
and then penalising the other ip pipes with heigher queue weights to 
get a certain priority. 

Hans


On Monday 23 May 2005 18:19, Alexandre D. wrote: 

> I have another procedure to submit to you all:
>
> 1) sysctl net.inet.ip.fw.one_pass=0
>    this allow to set several pipes for each data
> 2) add a pipe for each user in order limit the user bandwidth:
> 	ipfw pipe $pipe config bw ${kbps}Kbit/s
> 	ipfw add $fwrule pipe $pipein ip from any to $clientip in
> 3) add a global pipe for the global bandwidth and then add a
> weighted queue for each users:
> 	for this, we use weight (ie: 1 for 128, 2 for 256...)
> 	ipfw pipe 1 config bw ${global_bw}Kbit/s
> 	ipfw queue $queue config pipe 1 weight 1	# for 128 user
> 	ipfw queue $queue config pipe 2 weight 2 # for 128k user
> 	# then redirect the traffic
> 	ipfw add $fwrule queue $queue ip from any to $clientip in
>
> of course we do the same for outgoing traffic
>
> For the guaranteed bandwidth, one more time, it is given by a
> "weight calculation".
>
> What do you think of it?
>
> Alex
>
>
> -----Message d'origine-----
> De : owner-freebsd-ipfw at freebsd.org
> [mailto:owner-freebsd-ipfw at freebsd.org]De la part de Chris
> Dionissopoulos
> Envoyé : lundi 23 mai 2005 22:27
> À : ovidiue at unixware.ro; freebsd-ipfw at freebsd.org
> Objet : Re: QoS and guaranteed bandwidth
>
> >I must have two different values for every user: guaranteed
> > bandwidth and maximum bandwidth
> >
> > Citat "Alexandre D." <alexandre.delay at 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. _______________________________________________
> freebsd-ipfw at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw
> To unsubscribe, send any mail to
> "freebsd-ipfw-unsubscribe at freebsd.org"
>
> _______________________________________________
> freebsd-ipfw at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw
> To unsubscribe, send any mail to
> "freebsd-ipfw-unsubscribe at freebsd.org"
>
>
>
>
>
>
>
> A mensagem foi scaneada pelo sistema de e-mail e pode ser
> considerada segura. Service fornecido pelo Datacenter Matik 
> https://datacenter.matik.com.br

-- 


Infomatik
 http://info.matik.com.br







A mensagem foi scaneada pelo sistema de e-mail e pode ser considerada segura.
Service fornecido pelo Datacenter Matik  https://datacenter.matik.com.br


More information about the freebsd-ipfw mailing list