0

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.

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

1 Answer 1

1

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?).

1
  • 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. Jan 24, 2013 at 8:01

You must log in to answer this question.

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