Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On the RedHat box, I can ping a DNS entry only if I include the full name. For example: ping box.example.com works but ping box does not. Strange thing is, I can ping box from a resent version of Ubuntu and from any Windows box.

On any computer, the command dig box.example.com does show the resolved IP address in the ANSWERS SECTION. Using just the box name dig box does not show the resolved IP address.

My resolv.conf is fine.

Red Hat Linux release 9 (Shrike)

The response to dig box contains this line:

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 38217

Please remember though, this somehow magically works the other servers. Are Ubuntu and Windows somehow enhancing the DNS lookup? Please suggest where I might go from here.

share|improve this question
    
Adding domain example.com to /etc/resolv.conf allows me to ping box... Is this the best way to fix this? –  jcalfee314 Jan 23 '13 at 15:59
    
Do a man resolv.conf. I think you have answered your own question. :-) –  JasonAzze Jan 23 '13 at 16:27
add comment

1 Answer

up vote 1 down vote accepted

You need an entry domain example.com in your /etc/resolv.conf

Additionally, it may be necessary to modify the entries in the hosts line /etc/nsswitch.conf, otherwise it may happen that digworks but applications (i.e. ping, telnet, wget etc.) don't (or was it the other way round?).

share|improve this answer
    
I checked more closely: My additional remark about nsswitch applies only if your local domain is domain.local. (Only) in that case you should have hosts: files dns mdns4 there. –  Hagen von Eitzen Jan 24 '13 at 8:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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