LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 08-26-2014, 09:19 AM   #1
JohanHarmsen
LQ Newbie
 
Registered: Aug 2014
Location: Netherlands
Distribution: Mint, Centos
Posts: 3

Rep: Reputation: Disabled
Centos 6.5: search domain not added to /etc/resolv.conf (IPv6 DNS server)


hello

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

Thanks in advance

Johan
 
Old 08-26-2014, 01:25 PM   #2
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 98
Johan,

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.
 
Old 08-27-2014, 02:54 AM   #3
JohanHarmsen
LQ Newbie
 
Registered: Aug 2014
Location: Netherlands
Distribution: Mint, Centos
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hello

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 ?

Thanks for your help anyway !

Johan
 
Old 08-27-2014, 08:45 AM   #4
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 98
Johan,

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.

thoughts??

I'm really glad you brought this up, as I hope to start doing some IPv6 testing myself, soon!!

Last edited by netnix99; 08-27-2014 at 09:06 AM.
 
Old 08-27-2014, 10:20 AM   #5
JohanHarmsen
LQ Newbie
 
Registered: Aug 2014
Location: Netherlands
Distribution: Mint, Centos
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hello

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

Thanks for the hint !

Johan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS - resolv.conf with custom tld (top level domain) domain directive rubanek Linux - Networking 1 06-04-2013 01:11 PM
[SOLVED] resolv.conf - dns server outdated gene292 Linux - Networking 3 09-12-2011 12:41 PM
Newbie DNS server & /etc/resolv.conf problem (CentOS 5.x) aspasia Linux - Newbie 0 03-24-2008 06:10 PM
resolv.conf DNS search ( Anyway to continue searching next entry?) starsky Linux - Networking 5 08-22-2006 10:01 PM
dns server and /etc/resolv.conf freeosfreesoul Linux - Laptop and Netbook 2 09-02-2005 07:45 PM


All times are GMT -5. The time now is 05:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration