Sken IP adres na UBNT: Porovnání verzí
Z Wiki UnArt Slavičín
Skočit na navigaciSkočit na vyhledávání
Bez shrnutí editace |
(→Arping) |
||
Řádek 13: | Řádek 13: | ||
done | done | ||
= | = arping = | ||
address="192.168.1."; | address="192.168.1."; | ||
iface="br0"; | |||
for i in `seq 1 254`; | for i in `seq 1 254`; | ||
do | do | ||
up=`arping -c1 -I | up=`arping -c1 -I $iface $address$i | grep "Received 1 replies" | wc -l`; | ||
if [ "$up" -eq 1 ]; | if [ "$up" -eq 1 ]; | ||
then | then |
Verze z 30. 5. 2016, 08:04
Přes SSH v konzoli (pokud je rozsah jiný než 192.168.1.0/24, upravte proměnnou address):
Ping
address="192.168.1."; for i in `seq 1 254`; do up=`ping -c1 -W1 $address$i | grep "1 packets received" | wc -l`; if [ "$up" -eq 1 ]; then echo $address$i; fi; done
arping
address="192.168.1."; iface="br0"; for i in `seq 1 254`; do up=`arping -c1 -I $iface $address$i | grep "Received 1 replies" | wc -l`; if [ "$up" -eq 1 ]; then echo $address$i; fi; done