title: arping Error { bind: Cannot assign requested address } when trying to run it remotely
body: <p>Local Server : Lets say local1
  Remote Server: Lets say remote1</p>
  
  <p>I have the following shell script in local1 server;</p>
  
  <pre><code>#!/bin/sh
  
  comm1=`arping -c 3 -s 192.168.xxx.xx 192.168.yyy.yy | grep "reply from 192.168.yyy.yy" | awk '{print $2,$3,$4}' | tail -1 | awk '{print $3}'`
  comm2="192.168.yyy.yy"
         if [[ "$comm1" == *"$comm2"* ]]
         then
         echo "IP is up and running fine"
         else
         echo "IP is not up and running"
         fi
  </code></pre>
  
  <p>If I run the above script in local server, I am getting the desired output, which is "IP is up and running fine".</p>
  
  <p>But if I copy the same script to <code>remote1</code> server and try to execute from <code>remote1</code> server against <code>local1</code> server, it is executing the script but giving the following output;</p>
  
  <pre><code>bind: Cannot assign requested address
  IP is not up and running
  </code></pre>
  
  <p>So, <code>remote1</code> server is able to execute the script on <code>local1</code> server, but it is skipping the true condition with error as I mentioned above.</p>
  
  <p>FYI, I ran the following command on remote1 server;</p>
  
  <pre><code>ssh root@xxx.xxx.xxx.xx /root/script.sh
  </code></pre>
  
  <p>Any idea where Iam going wrong or how to overcome this error?</p>