Send a ping to each IP on a subnet

后端 未结 13 1193
时光说笑
时光说笑 2020-12-07 10:21

Is there a command line based way to send pings to each computer in a subnet? Like

for(int i = 1; i < 254; i++)
    ping(192.168.1.i);

t

13条回答
  •  攒了一身酷
    2020-12-07 10:41

    Under linux, I think ping -b 192.168.1.255 will work (192.168.1.255 is the broadcast address for 192.168.1.*) however IIRC that doesn't work under windows.

提交回复
热议问题