むかしは、ブロードキャスト にping
ブロードキャストping 打てばだいたいわかったんですよ。
ping 192.168.2.255
ping 応答しないやつとか、ブロードキャストping に応答しないWindowsがいるので
nmap コマンドを教えてもらいました
nmap -sP 192.168.2.0/24
ローカルのIPを列挙してくれる
これは便利
takuya@rena:~/Desktop$ nmap -sP 192.168.2.0/24 Starting Nmap 6.46 ( http://nmap.org ) at 2014-10-07 01:30 JST Nmap scan report for 192.168.2.1 Host is up (0.0016s latency). Nmap scan report for 192.168.2.2 Host is up (0.0071s latency). Nmap scan report for 192.168.2.5 Host is up (0.0042s latency). (中略 Nmap scan report for 192.168.2.137 Host is up (0.0029s latency). Nmap scan report for 192.168.2.164 Host is up (0.047s latency). Nmap scan report for 192.168.2.171 Host is up (0.041s latency). Nmap done: 256 IP addresses (13 hosts up) scanned in 3.23 seconds