Hi all,

I work in a public institution, and its computer network has 4 subnets
with CIDR mask 24, i.e., each subnet may have up to 254 hosts. My
doubt is: is it possible to implement some rules using altq + pf so
that every machine has bandwidth limited to 192Kb/s, without the need
to create macros for each machine at pf.conf ? In other words, can I
create a rule for the entire subnet x.y.z.0/24 , and make every
machine belonging to this subnet be limited to 192 Kb/s ?

For example:



    ===============================================


    fxp_if="fxp0"
    em_if="em0"

    dti="10.0.0.0/24"
    oc="20.0.0.0/24"
    ies="30.0.0.0/24"
    dfi="40.0.0.0/24"


    altq on { $fxp_if, $em_if } cbq bandwidth 100Mb queue { dti, oc, ies, dfi }
    queue dti bandwidth 192Kb cbq(default)


# Each machine inside dti subnet will have 192Kb , not the entire network


    queue oc bandwidth 192Kb cbq #idem para oc


#  same for oc


    queue ies bandwidth 192Kb cbq #idem para ies


# same for ies



    queue dfi bandwidth 192Kb cbq #idem para dfi


# same for dfi


    block log all

    pass quick on { $fxp_if, $em_if } from $dti to any queue dti
    pass quick on { $fxp_if, $em_if } from $oc to any queue oc
    pass quick on { $fxp_if, $em_if } from $ies to any queue ies
    pass quick on { $fxp_if, $em_if } from $dfi to any queue dfi

 =================================================

I'd like that each machine inside dti subnet had 192Kb, but the entire
network. I've searched in lots of websites about a solution that could
meet my needs, but I could not find a thing. If anyone does know
something that could help me, I'd be very thankful.

Thanks in advance for the time wasted reading this e-mail.


-- 
Joao Salvatti
Undergraduating in Computer Science
Federal University of Para - UFPA
web: http://www.openbsd-pa.org
e-mail: [EMAIL PROTECTED]

Reply via email to