Many times we need get the ip for remote, a very simple way is by using the ping command
If you execute the command in the more simple option, like show below, you only get a pretty output telling if you remote host is alive.
cloud-4@:/wp/production/srvr/diag> /usr/sbin/ping cloud-2 cloud-4 is alive
Using the -s option you get more info, incluiding the ip;
cloud-4@:/wp/production/srvr/diag> /usr/sbin/ping -s cloud-2 PING cloud-2: 56 data bytes 64 bytes from cloud-2 (22.214.171.124): icmp_seq=0. time=0.098 ms 64 bytes from cloud-2 (126.96.36.199): icmp_seq=1. time=0.087 ms 64 bytes from cloud-2 (188.8.131.52): icmp_seq=2. time=0.067 ms ^C ----cloud-2 PING Statistics---- 3 packets transmitted, 3 packets received, 0% packet loss round-trip (ms) min/avg/max/stddev = 0.067/0.084/0.098/0.016
HTH – Antonio NAVARRO