Linux networking – Descubriendo vecinos en la red

arp-scan -I eth1 192.168.0.0/24 10.0.0.0/8
nmap -sP 192.168.0.0/24 10.0.0.0/8
fping -g -r1 -s 192.168.0.0/24
arp-scan --interface=eth1 --localnet
for ip in $(seq 1 254); do ping -c1 -w1 192.168.0.$ip &>/dev/null; [ $? -eq 0 ] && echo "192.168.0.$ip"; done
for ip in 192.168.0.{1..254}; do if ping -c1 -w1 $ip &>/dev/null; then echo $ip; fi done

LAN IP

hostname -Iip
ifconfig | grep 'eth0' | tr -s ' ' | cut -d ' ' -f5
ifconfig | grep 'eth1' | tr -s ' ' | cut -d ' ' -f5
cat /sys/class/net/eth0/address
cat /sys/class/net/eth1/address

Router

netstat -r
route -n
traceroute -m 1 -N 1 1.2 | grep ms | perl -nle'/\((\S+)/&&print$1' | tr -d \)

Por favor consulte:

Deja un comentario