Re: How to Find Out MAC address in short time for Multiples servers ?
On 19Oct2010 09:10, Sriharsha Kalluru <harsha2006@...> wrote:
| I thought of the same thing, In simpler way use the following command
| for i in 192.168.110.8 192.168.110.21 192.168.110.22 ; do nmap -sP $i ; done
| List the IP's in a file and enter the following command
| for i in `cat <filename> ` ;do nmap -sP $i ; done
It is surprisingly cheap and fast to fork lots of pings in parallel; I
did this for a system shutdown script several years ago:
# do it in a subshell so the only children for wait are the pings
( for base in `seq 1 254`; do ping -c 3 192.168.110.$base& done; wait )
# look up the MAC addresses
Should take about 4 seconds, largely because of the "-c 3". And you can shut
ping up with a little more work (an option or a redirection).
Cameron Simpson <cs@...> DoD#743
... It beeped and said "Countdown initiated." Is that bad?