FUG-BR / Grupo Brasileiro de Usuarios de FreeBSD - Layer 2: Controle de Banda na Camada 2 com Dummynet.
 
26.07  
Inicio
Principal
Inicio
Noticias
Artigos
Regras da Lista
Assinar a Lista
Histrico da Lista
Forum
Keyserver
PC-BSD: Artigos
PC-BSD: Notcias
Galeria de Imagens
Contador Usurios FUG
FUGs Estaduais
Downloads
Enquetes
FAQ
Resumo do Site
Links
Pesquisar
Contato
Sobre a FUG-BR
RSS / Twitter
-
DOC-BR (FUG BR)
Introduo
Projeto DOC-BR
Handbook
FAQ Oficial
-
+ Noticias
Alertas de Seguranca
Alertas em Ports
BSD em Geral
DaemonNews (Ingles)
MyFreeBSD
Todas Categorias
-
Login
Nome de Usurio

Senha

Lembrar login
Esqueceu sua senha?
Sem conta? Crie uma


Layer 2: Controle de Banda na Camada 2 com Dummynet. PDF Imprimir E-mail
Por P. Tracanelli (FreeBSD Brasil)   
31/03/2009
Gleb Kurtsou (rfrench), estudante, participante do Google Summer of Code 2008, tem como foco a melhoria do filtro (firewall) de pacotes na Camada 2 (Layer 2) do FreeBSD. E agora uma notivade excelente, o dummynet pode atuar agora na camada OSI 2 e não mais apenas na OSI 3, gerando como resultado a possibilidade de fazer controle de banda por MAC address, independente do protocolo LLC.
 
Ou seja agora é possível impor controle de banda em protocolos na sub-camada LLC diferentes de IPv4 e IPv6, como IPX nativo entre outros. Uma das mudança sfoi a adição da directiva ether na configuração do mask do dummynet(4).
 
Segue exemplo de configuração, usando o novo framework (src-ether e dst-ether): 
 
# ipfw pipe 10 config bw 512Kb/s mask ether

# ipfw add pipe 10 src-ether 00:XX:YY:ZZ:KK:AA dst-ether 00:XX:YY:ZZ:KK:BB out via bridge0 layer2

# ipfw add pipe 10 dst-ether 00:XX:YY:ZZ:KK:BB src-ether 00:XX:YY:ZZ:KK:AA out via bridge0 layer2

E o resultado dos pipes dinamicamente criados podem ser observados com:

# ipfw pipe show
00001: 1.000 Mbit/s 0 ms 50 sl. 2 queues (64 buckets) droptail
mask: ff:ff:ff:ff:ff:ff -> ff:ff:ff:ff:ff:ff tag: 0x0000
BKT _Source Ether Addr_ _Dest. Ether Addr__ Tag Tot_pkt/bytes Pkt/Byte Drp
40 00:XX:YY:ZZ:KK:AA 00:XX:YY:ZZ:KK:BB 0 2 196 0 0 0
43 00:XX:YY:ZZ:KK:BB 00:XX:YY:ZZ:KK:AA 0 2 196 0 0 0


Ainda é possível marcar pacotes por máscara:

# ipfw add 200 pipe 1 ip from any to any tagged 1-1000 via bridge0 layer2

E a palavra chave any foi adicionada para tar match em qualquer tag:

# ipfw add 200 pipe 1 ip from any to any tagged any via bridge0 layer2

O recurso ainda não entrou oficialmente na árvore, mas pode ser testado com latches em FreeBSD -CURRENT e -STABLE:

Comentrios
JJPvgibO
Por Janelle em 27/06/2011 21:40:47
Hey, that's the greeatst! So with ll this brain power AWHFY?
GBrTfqSVqlxjzIXjtO
Por Jodha em 10/06/2012 14:09:20
em1 ? ???????, em0 ? ????. ???? ????????? ?? ????????? ???? ?????? ???? ? ????????, ? ????????? ?? ????????? ???? ?????????? em0. ??????? IP (?? em1) 10.0.0.1. ???????? ? ???, ??? ????? ?????? ?? ????? ??????? IP, ?????? ?????????????? ? ???, ???? ????? ????? deny_in. ???????? ?????? ??????? ?????????? ? ??????? ???? ???????, ?????????? ???.ipfw -q -f flushipfw add allow icmp from 192.168.10.0/24 to any via em1ipfw nat 1 cifnog if em0 deny_inipfw add nat 1 ip from 192.168.10.0/24 to any via em0ipfw add nat 1 ip from any to 10.0.0.1 in via em0ipfw add allow icmp from any to 10.0.0.1 keep-state # ?????? ??????? ???????????? ? ??? ?
NcSgzicudKSVe
Por fares em 20/07/2012 06:02:22
Since today Filesharing with uTorrent is not possible anyrome whilst connected to your VPN. Opens no connection. And no, it's not a problem of my setup as it neither works on my WinXP Guest nor on my virtual guest system.As soon as I am connected and open uTorrent nothing happens. Doesn't connect to the peers.Either with your VPNTunnel Client nor with the standard openVPN build.Did VPNTunnel now block Filesharing like they did with SMTP (Port25) times a go?What is happening?I buyed an account for one year before some days and want to use your service as offered. Till yesterday filesharing with uTorrent worked.Please fix your problem asap.Thank you.


Comente!*
Nome:
E-mail
Homepage
Ttulo:
Comentrio:

Cdigo:* Code

ltima Atualizao ( 02/04/2009 )
 
< Anterior   Prximo >
FUG-BR - Espalhando BSD
Dicas Rpidas:

/etc/make.conf:

SUP_UPDATE=YES
SUPHOST=\
    cvsup.br.FreeBSD.org
SUPFILE=/seu/supfile

# cd /usr/src
# make update
# cd /usr/ports
# make update

 






Wallpapers
FreeBSD Security Advisories
  • FreeBSD-SA-14:17.kmem
  • FreeBSD-SA-14:16.file
  • FreeBSD-SA-14:15.iconv
  • FreeBSD-SA-14:14.openssl
  • FreeBSD-SA-14:13.pam
  • FreeBSD-SA-14:12.ktrace
  • FreeBSD-SA-14:11.sendmail
  • FreeBSD-SA-14:10.openssl
  • FreeBSD-SA-14:09.openssl

  • Online:
    Ns temos 18 visitantes online


    Devil Store - Sua loja BSD
    FreeBSD Brasil LTDA

    FUG-BR: Desde 1999, espalhando BSD pelo Brasil.