0

I'm editing /etc/resolv.conf with the 'setup' utility and reboot my Redhat machine. I add two nameservers and a search.

When I cat the resolv.conf file, I see search is placed on the bottom of the file. In all examples I've seen, the search is at the top of the file, above the nameservers.

Is there something inherently wrong with this? I'm new to editing these types of files and don't completely understand how they are read.

2
  • The search entry is independant from the line number. You even don't need to reboot when you change the file. Change the nameserver order and check it with wireshark or tcpdump.
    – ott--
    Mar 28 '13 at 22:30
  • Looking at glibc's resolv.conf parsing at sourceware.org/git/?p=glibc.git the order is unimportant. The only ordering that seems to matter is domain and search. Mar 28 '13 at 22:46
1

The man page doesn't specify anything about the order of the operators in the config file. I also don't see any sort of RFC or POSIX standard governing this. It appears to be governed by glibc more than anything else. And nothing glibc says about their resolver indicates a need for the search parameter to be placed at the top of resolv.conf.

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.