I'm running CentOS 7 in a lab environment with one domain controller (DC - Windows 2012R2) which serves as a DNS and DHCP server as well.

CentOS is joined to the domain; it can ping the DC and a workstation by IP address with no problems, and nslookup also works properly.

When trying to ping by DNS name (e.g. ping dc instead of ping I can see that name resolution is received very fast, but the ping responses take an incredibly long time (over 5 seconds) to return. Tested the same from the workstation (Windows 8.1) and it works fine, so I believe something might be misconfigured in my CentOS server.

I user NetworkManager via the nmtui command. I have two virtual NICs on CentOS but one is disabled, the remaining one has a static IP address (which is not in the DHCP range), and has the DC's IP configured as the gateway, DNS and static route. (Side question: is it even supposed to be configured as a static route?)

  • 1
    I'd start by running strace ping .... to see what ping is getting hung up on. Additionally in another terminal window you can use tcpdump to examine the network packets as they go back and forth and fairly quickly should be able to see why the system is responding slowly when you ping. Search this site for strace and tcpdump examples, there are many that myself and others have explained on their use. – slm May 26 '15 at 11:54
  • I have no idea how to read the output of strace. I run gui less, so no second terminal. I'd try to use bg or something but currently pings are somehow very fast. If the issue will return I'll try it... – Zack May 26 '15 at 12:59
  • You can run strace and write it's output to a log file. You could do this: strace -s 2000 -o strace.log ping -c5 ..... This will attempt to ping a server 10 times (-c5). You can then review the log file, strace.log. – slm May 26 '15 at 22:01
  • Thanks, I don't need it ATM. If this will happen again I will try this. – Zack May 27 '15 at 11:06

I once had such problem on freshly installed distro (it was CentOS or Debian).the culprit was avahi deamon (mDNS) (don't know what it was trying to resolve on every ping and why). Stop this daemon if its running and try to ping again

  • Dude, your answer got me to somehow uninstall nmtui. Really bad. I'd vote you down if I could... – Zack May 26 '15 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.