[GTER] Integração de Mikrotik e FreeRadius

Carlos Carneiro carlos.roberto.maciel at gmail.com
Wed Apr 16 15:31:32 -03 2008


Boniek,

Veja se isso ajuda você;
(O que está em negrito consta no dicionario enviado)

"*Mikrotik-Rate-Limit* - Datarate limitation for clients. Format is:
rx-rate[/tx-rate] [rx-burst-rate[/tx-burst-rate]
[rx-burst-threshold[/tx-burst-threshold] [rx-burst-time[/tx-burst-time]
[priority] [rx-rate-min[/tx-rate-min]]]] from the point of view of the
router (so "rx" is client upload, and "tx" is client download). All rates
should be numbers with optional 'k' (1,000s) or 'M' (1,000,000s). If tx-rate
is not specified, rx-rate is as tx-rate too. Same goes for tx-burst-rate and
tx-burst-threshold and tx-burst-time. If both rx-burst-threshold and
tx-burst-threshold are not specified (but burst-rate is specified), rx-rate
and tx-rate is used as burst thresholds. If both rx-burst-time and
tx-burst-time are not specified, 1s is used as default. Priority takes
values 1..8, where 1 implies the highest priority, but 8 - the lowest. If
rx-rate-min and tx-rate-min are not specified rx-rate and tx-rate values are
used. The rx-rate-min and tx-rate-min values can not exceed rx-rate and
tx-rate values.

*WISPr-Bandwidth-Min-Up* - minimal datarate (CIR) provided for the client
upload
*WISPr-Bandwidth-Min-Down* - minimal datarate (CIR) provided for the client
download
*WISPr-Bandwidth-Max-Up* - maxmal datarate (MIR) provided for the client
upload
*WISPr-Bandwidth-Max-Down* - maxmal datarate (MIR) provided for the client
download "

Segue exemplo de limites de velocidade Rate-Limit;
**
**
*128k* - rx-rate=128000, tx-rate=128000 (no bursts)
*64k/128M* - rx-rate=64000, tx-rate=128000000
*64k 256k* - rx/tx-rate=64000, rx/tx-burst-rate=256000,
rx/tx-burst-threshold=64000, rx/tx-burst-time=1s
*64k/64k 256k/256k 128k/128k 10/10* - rx/tx-rate=64000,
rx/tx-burst-rate=256000, rx/tx-burst-threshold=128000, rx/tx-burst-time=10s

Quanto a definição de endereços IP;

 <http://www.mikrotik.com/testdocs/ros/2.9/guide/aaa_radius_content.php>
"
*Framed-IP-Address* - IP address of HotSpot client after Universal Client
translation
*Mikrotik-Host-IP* - IP address of HotSpot client before Universal Client
translation (the original IP address of the client)

Access-Accept
*Framed-IP-Address* - IP address given to client. If address belongs to
127.0.0.0/8 or 224.0.0.0/3 networks, IP pool is used from the default
profile to allocate client IP address. If Framed-IP-Address is specified,
Framed-Pool is ignored (RFC2865)
*Framed-IP-Netmask* - client netmask. PPPs - if specified, a route will be
created to the network Framed-IP-Address belongs to via the
Framed-IP-Address gateway; HotSpot - ignored by HotSpot (RFC2865)
*Framed-Pool* - IP pool name (on the router) from which to get IP address
for the client. If Framed-IP-Address is specified, this attribute is ignored
(RFC2865)
NOTE: if Framed-IP-Address or Framed-Pool is specified it overrides
remote-address in default configuration

Mais um item interessante;
"
*Mikrotik-Wireless-Enc-Algo* - WEP encryption algorithm: 0 - no encryption,
1 - 40-bit WEP, 2 - 104-bit WEP (Wireless only)
*Mikrotik-Wireless-Enc-Key*- WEP encruption key for the client
(Wireless only)
"

Abraços

-- 
Atenciosamente,
Carlos Roberto Maciel Carneiro
carlos.roberto.maciel at gmail.com
Macaé/RJ

Tel.: (22) 3311-4312 (Macaé/RJ)
       (11) 6824-6530 (São Paulo/SP)


Em 16/04/08, Boniek Morais <boniek.morais at gmail.com> escreveu:
>
> Exatamente Paulo.
>
> A autenticação e os parametros de velocidade já consegui fazer o radius
> informar ao MK. Porém está respassando ip estático. Preciso saber agora de
> fazer o MK atribuir um ip diferente para o cliente a cada conexão (tipo
> DHCP). E descobrir também o nome do atributo para setar o burst.
>
> Se alguém souber....
>
>
> 2008/4/16 Paulo Henrique <paulohenriquef at gmail.com>:
>
> > Não tenho essa solução implementada, mas pelo que entendi você vai
> > precisar
> > do dictionary do Mikrotik pra saber como setar esses parametros, veja
> > abaixo:
> >
> > http://www.mikrotik.com/documentation//manual_2.9/dictionary.mikrotik
> >
> > A velocidade se nao me engano vai entrar no campo Rate-Limit, onde vc
> pode
> > setar down/up e parametros do burst tbem.
> >
> > Garimpando no google você deve encontrar mais coisa.
> >
> > t+
> >
> > Em 15/04/08, Boniek Morais <boniek.morais at gmail.com> escreveu:
> > >
> > > Pessoal, boa tarde.
> > >
> > > Alguém poderia me informar onde consigo documentação para integração
> de
> > > Mikrotik com FreeRadius? Encontrei algumas coisas no Wiki do Mikrotik,
> > mas
> > > se alguém já tiver implementado essa solução e puder fornecer algumas
> > > dicas
> > > eu agradeço.
> > >
> > > Estou trabalhando em um projeto para autenticação PPPoE e controle de
> > > banda
> > > no MK, mas as informações sobre login, senha, e velocidade serão
> > > cadastradas
> > > no FreeRadius e MySQL. Também será necessário cadastrar um pool de ips
> > que
> > > serão atribuídos para os clientes de forma dinâmica, alternando em
> cada
> > > conexão.
> > >
> > >
> > > Boniek Morais
> > > Isimples Telecom
> > > boniek at isimples.com.br
> > >
> > > --
> > > gter list    https://eng.registro.br/mailman/listinfo/gter
> > >
> >
> >
> >
> > --
> > Paulo Henrique Fonseca
> > paulohenriquef at gmail.com
> > --
> > gter list    https://eng.registro.br/mailman/listinfo/gter
> >
>
>
>
> --
> Best regards,
>
> BONIEK MORAIS
> Network/Systems Administrator
> Phone: +55 (37) 3281-5840
> Mobile: +55 (37) 9197-2530
> Mail: boniek.morais at gmail.com
> MSN: boniek.morais at hotmail.com
> Skype: boniek.morais
> --
> gter list    https://eng.registro.br/mailman/listinfo/gter
>



More information about the gter mailing list