De acordo com as Leis 12.965/2014 e 13.709/2018, que regulam o uso da Internet e o tratamento de dados pessoais no Brasil, ao me inscrever na newsletter do portal DICAS-L, autorizo o envio de notificações por e-mail ou outros meios e declaro estar ciente e concordar com seus Termos de Uso e Política de Privacidade.
Colaboração: Denis Martins de Brito
Data de Publicação: 29 de Agosto de 2007
Montei este Script para descobrir quais das varias redes da empresa utilizam um determinado roteador. Ta simples pois eu precisava de uma resposta rápida mas é possivel afinar muito mais este script.
#!/bin/bash ####################################################################################### #########################AUTOR: DENIS MARTINS DE BRITO################################# ############################DATA DE CRIAÇÃO: 08/08/2007################################ ####################################################################################### # # # # #Este script procura por redes que utilizam o roteador inserido como parametro. # #Não esquecer de alterar o script para ser compativel com a sua busca. # ####################################################################################### route add -net 131.0.0.0 netmask 255.0.0.0 gw $1 for((i=1; i <= 255; i++)); do if ! ping -c 2 131.$i.0.1 ; then echo "131.$i.0.0 não usa o roteador $1 " >> Outro_router else echo "131.$i.0.0 usa o roteador $1 " >> Router_$1 fi done route delete -net 131.0.0.0 netmask 255.0.0.0 gw $1 exit
This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
Comentários