I would like to develop a script which takes a host name as argument and displays a message whether the host is on the local network or not. How can I accomplish that? Is there a file or command that I can use to list all host on the local network?
This pertains to linux machines, may be different on others: arp -a dumps your machine's "Address Resolution Protocol" cache, i.e. your active connections. ping -b pings the entire local network BUT machines have to be setup to answer.