2

I am running a Solaris 11 system over a local private network 192.168.100.0/24 and I run ping -s to get continuous ping.

From the Gateway to my server I get

root@mygateway:~# ping -s 192.168.100.42
PING 192.168.100.42: 56 data bytes
64 bytes from 192.168.100.42: icmp_seq=0. time=0.311 ms
64 bytes from 192.168.100.42: icmp_seq=1. time=0.255 ms
64 bytes from 192.168.100.42: icmp_seq=2. time=0.271 ms

But when I ping from my server to the gateway, ping is not showing any output, but then after 3 minutes, it outputs results for ALL the last 3 minutes with high times, and continues to work with good times.

root@myserver:~# date; ping -s 192.168.100.101
Tuesday, January 27, 2015 09:17:13 AM GMT
PING 192.168.100.101: 56 data bytes
64 bytes from 192.168.100.101: icmp_seq=0. time=0.467 ms
64 bytes from 192.168.100.101: icmp_seq=1. time=161000.816 ms
64 bytes from 192.168.100.101: icmp_seq=2. time=160001.061 ms
64 bytes from 192.168.100.101: icmp_seq=3. time=159001.295 ms
...
...
...
64 bytes from 192.168.100.101: icmp_seq=201. time=0.234 ms
64 bytes from 192.168.100.101: icmp_seq=202. time=0.254 ms

ssh from my server to my gateway works properly.

Appreciate your advice.

6
  • 1
    I wonder if you're seeing a hang due to reverse dns lookup failure. What happens if you try 'ping -sn 192.168.100.101'?
    – paulos
    Jan 27, 2015 at 11:08
  • I am pinging using an IP and there is no DNS configured for this server. ping -sn 192.168.100.101 doesn't ping.
    – RaamEE
    Jan 27, 2015 at 11:34
  • What about traceroute 192.168.100.101?
    – duenni
    Jan 27, 2015 at 11:47
  • traceroute finds the correct interface to go out through, but then stalls for 50 seconds before output that is OK. root@myserver:~# time traceroute 192.168.100.101 traceroute: Warning: Multiple interfaces found; using 192.168.100.41 @ net0 traceroute to 192.168.100.101 (192.168.100.101), 30 hops max, 40 byte packets 1 192.168.100.101 (192.168.100.101) 0.420 ms 0.353 ms 0.193 ms real 0m49.629s user 0m0.002s sys 0m0.006s
    – RaamEE
    Jan 27, 2015 at 11:55
  • 1
    Hence reverse dns lookup, ie resolving an IP address to a name. The -n switch disables name resolution. I don't have a solaris box to hand to check the exact syntax of the ping command. Try ping -n -s 192.168.100.101, or ping -ns 192.168.100.101, and for that matter traceroute -n 192.168.100.101
    – paulos
    Jan 27, 2015 at 11:58

2 Answers 2

2

The hang you are seeing is most likely due to a name resolution failure.

Solaris by default will attempt a reverse DNS lookup to map the IP address you pinging to a meaningful name. The ping output isn't printed to screen until the name resolution has completed, or in this case timed out. Once the timeout has completed you'll see all of the responses received so far printed to screen at about the same time with erroneous time data, and every subsequent ping will carry on as normal.

This is most easily solved by adding the '-n' switch to your ping command to prevent it attempting the lookup ie

ping -s -n 192.168.100.101

You could also look into adding reverse zones to your DNS server (assuming you have one) or simply adding the hostname/IP mapping to your hosts file if it's a small deployment.

1

Following @paulos help, I've looked into the DNS settings on my server.

cat /etc/resolv.conf

shows that DNS servers were configured on the server, but since it was last used, these servers were shutdown. So, the solution in this case was to shutdown the DNS client

svcadm disable svc:/network/dns/client:default

and reboot.

Some reference links:

Managing Network Configuration When in Manual Mode

DNS client configuration steps in Oracle Solaris 11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .