[FUG-BR] controlar banda e permitir emprestimo

Enio .'. Marconcini eniorm em gmail.com
Terça Setembro 13 10:26:15 BRT 2011


2011/9/12 Enio .'. Marconcini <eniorm em gmail.com>

>
>
> 2011/9/12 Alexandre Correa <alexandre em sabbath.com.br>
>
>> a ideia eh voce criar uma queue principal com 12mb... e dentro dela vc
>> criar
>> as filhas, de 3 e 9 mb.. com os parametros ...
>>
>>
>>
> Sim, Alexandre, foi o que eu pensei, mas primeiro eu preciso ativar com o
> altq, e qual NIC eu indico
>
> altq on $nic?
>
> sendo que o link dividido sai cada parte por uma interface.... a dúvida é
> essa
>
> se fosse apenas duas interface (uma no router e outra na rede interna)
> bastaria um altq on $nic_interna cbq bandwidth 12Mb queue { rede1 rede2}
>
> não é mesmo?
>
>
> --
> *ENIO RODRIGO MARCONCINI*
>
> @eniomarconcini <http://twitter.com/eniomarconcini>
> skype: eniorm
> facebook.com/eniomarconcini <http://www.facebook.com/eniomarconcini>
>
> *"UNIX was not designed to stop its users from doing stupid things,
> as that would also stop them from doing clever things."
> *
>
>
>

Alexandre, o que acha?

# cat
/etc/pf.conf
# MACROS
nic_externa = "xl0"
nic_pref = "xl1"
nic_ig = "xl2"

# TABLES
table <prefeitura> persist { 186.200.39.32/27 }
table <ig> persist { 186.200.39.64/27 }


# OPTIONS
set skip on lo0


# QUEUES
altq on $nic_externa cbq bandwidth 12Mb queue { pref_out, ig_out }
altq on $nic_pref cbq bandwidth 12Mb queue { pref_in, ig_in }
queue pref_out bandwidth 3Mb cbq(default, borrow, red)
queue ig_out bandwidth 9Mb cbq(borrow, red)
queue pref_in bandwidth 3Mb cbq(default, borrow, red)
queue ig_in bandwidth 9Mb cbq(borrow, red)

# FILTER RULES
pass out quick on $nic_externa from <prefeitura> to any queue pref_out flags
S/SA modulate state
pass out quick on $nic_externa from <ig> to any queue ig_out flags S/SA
modulate state

pass out quick on $nic_pref from any to <prefeitura> queue pref_in flags
S/SA modulate state
pass out quick on $nic_ig from any to <ig> queue ig_in flags S/SA modulate
state




-- 
*ENIO RODRIGO MARCONCINI*
@eniomarconcini <http://twitter.com/eniomarconcini>
skype: eniorm
facebook.com/eniomarconcini <http://www.facebook.com/eniomarconcini>

*"UNIX was not designed to stop its users from doing stupid things,
as that would also stop them from doing clever things."
*


Mais detalhes sobre a lista de discussão freebsd