[SOLVED] Centos 6.5: search domain not added to /etc/resolv.conf (IPv6 DNS server)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Centos 6.5: search domain not added to /etc/resolv.conf (IPv6 DNS server)
If I configure a search domain in the IPv6 Settings tab of the Network configuration for the eth0 device, the domain name is added to the DOMAIN variable in the /etc/sysconfig/network-scripts/ifcfg-eth0 file. If I then restart my network (service network restart) the search domain is not added to /etc/resolv.conf.
This causes that I can only lookup DNS names using the FQDN, and not using the hostname only.
dig myhost : does not work
dig myhost.mydomain: works
It works correctly if I manually add the search domain to /etc/resolv.conf, but if the network is restarted this file is overwritten.
Does anyone know know how to prevent overwriting /etc/resolv.conf
I will make an assumption that you are using DHCP to obtain your address since it appears that NetworkManager is generating your new /etc/resolve.conf file each time you restart the network services.
If you will open up the Network Connections, and select the Ethernet card you are using, and select edit, then IPv4 Settings, you can manually fill in the search domains. You can also add this option into your DHCP server configuration, as well. Editing the Seach Domains on the local NIC is the easiest fix if you are using a home network. If this is a production environment, I would suggest modifying the DHCP configuration, which will differ based on "what" (Linux Box, Windows Server, Network device, etc) is serving DHCP addresses.
I'm not using DHCP, in the network connections I disabled IPv4 and manually configured an IPv6 address. If I enable IPv4 the domain setting is correctly copied to /etc/resolv.conf regardless of the way the IP address is supplied (manual or via DHCP).
This server (vm) was especially setup to experiment with IPv6. The problem exhibited itself when attempting to resolve the name, and I noticed that it only worked with the FQDN and not with just the name. As far as I know the domains specified in /etc/resolv.conf are appended to the name when resolving through DNS.
Maybe this is more a question for Linux-Network forum ?
Have you given any thought to not running NetworkManager and just manually configuring the IPv6 interfaces? This should allow you to set the DNS servers and search domains, and since NetworkManager isn't running, it won't overwrite your work.
I'm really glad you brought this up, as I hope to start doing some IPv6 testing myself, soon!!
I must admit that I didn't know what the Network Manager is exactly doing. After some reading it appears that I can just as easily do without it. So I stopped and disabled the service, and now my /etc/resolv.conf is no longer overwritten