Need to check the connectivity between 2 servers

Hi All,

I need an automation script to check the connectivity between 2 UNIX servers.

Could anybody please help in this regards?

regards,
janardhan

ping -c 1 192.168.1.205
PING 192.168.1.205 (192.168.1.205) 56(84) bytes of data.
64 bytes from 192.168.1.205: icmp_seq=1 ttl=61 time=2.10 ms

--- 192.168.1.205 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 2.104/2.104/2.104/0.000 ms
$ echo $?
0
$ ping -c 1 192.168.1.13   # this machine is not up now. so you will get 1 for $?
PING 192.168.1.13 (192.168.1.13) 56(84) bytes of data.
From 192.168.10.2 icmp_seq=1 Destination Host Unreachable

--- 192.168.1.13 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

$ echo $?
1