Loading ...
Sorry, an error occurred while loading the content.

Re: How to Find Out MAC address in short time for Multiples servers ?

Expand Messages
  • Cameron Simpson
    ... 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
    Message 1 of 4 , Oct 19, 2010
    • 0 Attachment
      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
      | or
      | 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
      arp -an

      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).

      Cheers,
      --
      Cameron Simpson <cs@...> DoD#743
      http://www.cskk.ezoshosting.com/cs/

      ... It beeped and said "Countdown initiated." Is that bad?
    Your message has been successfully submitted and would be delivered to recipients shortly.