Because there are many hosts and many VLANs in the LAN, you can always know the number of online hosts and write scripts to check the online hosts. The result is that the host is displayed in green online and the host is displayed in red offline. Usage:./pingIP segment for example:./ping192.168.0 #! /Bin/bashNETWORK = $1 forHOSTin $ (seq1254)
Because there are many hosts and many VLANs in the LAN, you can always know the number of online hosts and write scripts to check the online hosts.
The result is that the host is displayed in green online and the host is displayed in red offline.
Usage:./ping IP segment for example:./ping 192.168.0
#! /Bin/bashNETWORK = $ 1for HOST in $ (seq 1 254) do ping-c 1-w 1 $ NETWORK. $ HOST &>/dev/null & result = 0 | result = 1 if ["$ result" = 0]; then echo-e "\ 033 [32; 1 m $ NETWORK. $ HOST is up! \ 033 [0 m "else echo-e" \ 033 [; 31 m $ NETWORK. $ HOST is down! \ 033 [0 m "fidone