LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-16-2014, 09:22 AM   #1
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Rep: Reputation: 60
DNS Search Order


I am using Ubuntu 12.04 LTS and am having trouble getting this desktop to correctly query the correct DNS servers in resolving hostnames. I disabled adding dhcp servers from the network dhcp server under /etc/dhcp/dhclient.conf
Code:
 request subnet-mask, broadcast-address, time-offset, routers,
	domain-name, host-name,
	netbios-name-servers, netbios-scope, interface-mtu,
	rfc3442-classless-static-routes, ntp-servers;
I added the correct dns servers and dns search order under /etc/resolvconf/resolv.conf.d/base && tail

base
Code:
nameserver 10.8.0.19 10.0.0.18 10.0.0.19
tail
Code:
search testdomain.local corporate.mydomain.com mydomain.local
changed the host.conf to use bind first
Code:
order bind,hosts
multi on
modified nsswitch.conf to use dns first
Code:
hosts:          files dns mdns4_minimal [NOTFOUND=return] mdns4
The domain in particular is the testdomain.local(test lab). The way I have it above, it resolves perfectly fine but there is a long delay in going to the internet. If I switch them around and make it last:

Code:
nameserver 10.0.0.18 10.0.0.19 10.8.0.19
Code:
search  corporate.mydomain.com mydomain.local testdomain.local
the internet works lightning quick but I cannot resolve anything from the testdomain.local period but everything else works fine. Help
 
Old 04-16-2014, 09:39 AM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Nice post!

Couple things:

1) Generally, we define multiple 'search domains' like this:

Code:
domain corporate.mydomain.com
search mydomain.local testdomain.local
2) There are some commands in /etc/network/interfaces involved with this setup: dns-search/dns-domain.

You can get accurate timings of the lookups with

Code:
time dig whateveryouaretesting.com
Additional thoughts... Are you using network manager? Did you disable the dnsmasq local server? Is IP6 enabled?

Last edited by szboardstretcher; 04-16-2014 at 09:41 AM.
 
1 members found this post helpful.
Old 04-16-2014, 04:58 PM   #3
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
Many thanks for the reply,

I disabled NM and dont use it(hardset everything except for ip address). I believe I disable dnsmasq local server
Code:
cupsd      650       root    9u     IPv6               9596       0t0        TCP ip6-localhost:631 (LISTEN)
cupsd      650       root   10u     IPv4               9597       0t0        TCP localhost:631 (LISTEN)
smbd       775       root   27u     IPv4               6930       0t0        TCP *:445 (LISTEN)
smbd       775       root   28u     IPv4               6932       0t0        TCP *:139 (LISTEN)
rpcbind    804       root    8u     IPv4               6940       0t0        TCP *:111 (LISTEN)
rpcbind    804       root   11u     IPv6               6943       0t0        TCP *:111 (LISTEN)
sshd       842       root    3r     IPv4               8280       0t0        TCP *:22 (LISTEN)
sshd       842       root    4u     IPv6               8285       0t0        TCP *:22 (LISTEN)
rpc.statd  845      statd    9u     IPv4               8308       0t0        TCP *:59175 (LISTEN)
rpc.statd  845      statd   11u     IPv6               8314       0t0        TCP *:57337 (LISTEN)
ypbind     964       root    5u     IPv4               8408       0t0        TCP *:717 (LISTEN)
mysqld    1089      mysql   10u     IPv4               8598       0t0        TCP localhost:3306 (LISTEN)
python    3180       root    7u     IPv4              25988       0t0        TCP *:5252 (LISTEN)
python    3189       root    7u     IPv4              25988       0t0        TCP *:5252 (LISTEN)
python    3192       root    7u     IPv4              25988       0t0        TCP *:5252 (LISTEN)
python    3192       root   12u     IPv4              26877       0t0        TCP *:4242 (LISTEN)
perl      3206      saint    7u     IPv4              25988       0t0        TCP *:5252 (LISTEN)
perl      3206      saint   13u     IPv4              26001       0t0        TCP *:1414 (LISTEN)
I didnt mess around with IPV6 settings. I will play around with what you suggested and see what I can come up with.
 
  


Reply



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
Order of DNS Server look ups sochana Linux - Newbie 5 01-24-2012 04:42 AM
[SOLVED] Wireless Network Search Order unist Linux - Newbie 3 04-19-2011 11:41 PM
postfix canonical search order jittinan2 Linux - Software 1 06-18-2008 02:58 PM
RedHat Dynamic loader shared library search order is backward rjbdevr Red Hat 0 03-26-2008 04:39 PM
Shell-script: search item in any order macone Programming 3 08-13-2002 10:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:55 PM.

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
Open Source Consulting | Domain Registration