LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 09-19-2012, 08:58 PM   #1
woow
LQ Newbie
 
Registered: May 2011
Distribution: CentOS 6.2
Posts: 11

Rep: Reputation: Disabled
DNS forward look up ( hosts resolution )


I try to set up a dns server on Centos VM and I cannot get correct resolution to the host name.
I can ping the FQN name of any host but not the host it self.

That is:

I get an error >> Host vm1 not found: 3(NXDOMAIN) <<

Code:
vm1:~ root # host localhost
localhost has address 127.0.0.1
localhost has IPv6 address ::1

vm1:~ root # ping vm1
ping: unknown host vm1

vm1:~ root # ping vm1.local.internal
PING vm1.local.internal (192.168.1.221) 56(84) bytes of data.
64 bytes from vm1.local.internal (192.168.1.221): icmp_seq=1 ttl=64 time=0.022 ms
64 bytes from vm1.local.internal (192.168.1.221): icmp_seq=2 ttl=64 time=0.039 ms

vm1:~ root # host 192.168.1.221
221.1.168.192.in-addr.arpa domain name pointer vm1.local.internal.

vm1:~ root # host vm1
Host vm1 not found: 3(NXDOMAIN)

vm1:~ root # host vm2
Host vm1 not found: 3(NXDOMAIN)

vm1:~ root # ping vm2.local.internal
PING vm2.local.internal (192.168.1.222) 56(84) bytes of data.
64 bytes from vm2.local.internal (192.168.1.222): icmp_seq=1 ttl=64 time=8.70 ms
64 bytes from vm2.local.internal (192.168.1.222): icmp_seq=2 ttl=64 time=0.328 ms
Below are the configuration files:

Code:
vm1:~ root # cat /var/named/local.internal
$TTL 1800
@	IN SOA	local.internal. root.local.internal. (
					2012092004	; serial
					1D		; refresh
					1H		; retry
					1W		; expire
					3H )		; minimum
@	IN	NS		vm1.local.internal.

	IN	MX	1	vm1.local.internal.
	IN	MX	2	vm2.local.internal.

vm1	IN	A	192.168.1.221
vm2	IN	A	192.168.1.222
Code:
vm1:~ root # cat /var/named/local.internal.reverse 
$TTL 60
@	IN	SOA	vm1.local.internal.	 root.local.internal. (
				2012091902	;	serial
					1D	;	refresh
					1H	;	retry
					1W	;	expire
					3H	); minimum

@		IN	NS	vm1.local.internal.	

221		IN	PTR	vm1.local.internal.	
222		IN	PTR	vm2.local.internal.
Code:
zone "." IN {
	type hint;
	file "named.ca";
};

zone "local.internal" IN {
	type master;
	file "local.internal";
	allow-update { none; };
};

zone "1.168.192.in-addr.arpa." IN {
     	type master;
	file "local.internal.reverse";
	allow-update { none; };
};
Can smbd give any explanation why is the host command is not resolving?

Thank you.

Last edited by woow; 09-19-2012 at 09:01 PM.
 
Old 09-20-2012, 12:42 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,906

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Hi,

You need to add one of the following:
Code:
domain local.internal
search local.internal
in /etc/resolv.conf.
See the resolv.conf manpage for more details

Regards
 
1 members found this post helpful.
  


Reply

Tags
dns, forward, lookup, resolution


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
BIND - reverse dns queries only working locally, forward dns works fine. SloS13 Linux - Networking 3 08-25-2011 12:46 PM
How to forward all DNS queries through ISP DNS server ? jcdc Linux - Networking 4 07-05-2011 11:28 PM
Resolving names: DNS Forward over /etc/hosts priority? matiasar Linux - Networking 4 01-29-2010 07:07 AM
Local network DNS resolution fails, but DNS resolution to internet is OK farge Linux - Networking 6 05-28-2008 11:49 PM
Win2k3 DNS + PFsense DNS Forwarder = No internal DNS resolution Panopticon Linux - Networking 1 11-19-2007 09:59 PM


All times are GMT -5. The time now is 04:53 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration