[FUG-BR] PPPoE e seus tun

Joao Rocha Braga Filho goffredo em gmail.com
Quarta Junho 20 10:02:15 BRT 2007


On 6/20/07, ThOLOko <tholoko at gmail.com> wrote:
> Bom dia BSD Team!
>
> Se eu der um IFCONFIG no meu servidor PPPoE os tuneis que foram aberto e
> "fechados" aparecem assim:
>
> tun5: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> tun6: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> tun7: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> tun8: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> tun9: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> tun10: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> tun11: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> tun12: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> tun13: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> tun14: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> tun15: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> tun16: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> tun17: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> tun18: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
>
> Tem algum jeito de eu sumir com isso? Pois tem vezes que aparecem
> mtoooooosss mesmo!!!

Eu não me importo com a existência deles, pois me dá a informação
de quantos clientes cheguei a ter simultaneamente no meu PPPoE. E
além disto, eles são "reciclados".

Se quiser removê-los, sugiro algo assim:

ifconfig | grep '^tun' | grep -v 'UP,' | sed 's/^\(tun[0-9]*\):.*/\1/' | (
while read t
do
    echo $t
    ifconfig $t destroy
done
)

Mas MUITO cuidado, pois pode acontecer uma race condition, i.e., um
usuário pegar o túnel entre o levantamento da existência dele e a
destruição dele. Portanto, desaconselho ficar destruindo estes túneis.


João Rocha.

>
> Abraços!!!
>
> --
> ThOLOko
> -FreeBSD-
> UniX TeaM
> -------------------------
> Histórico: http://www.fug.com.br/historico/html/freebsd/
> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
>


-- 
"Sempre se apanha mais com as menores besteiras. Experiência própria."

goffredo at goffredo.eti.br
goffredo at gmail.com
http://www.goffredo.eti.br


Mais detalhes sobre a lista de discussão freebsd