Networking Forums

Networking Forums > Computer Networking > Linux Networking > nslookup/dig not finding short hostname convention

Reply
Thread Tools Display Modes

nslookup/dig not finding short hostname convention

 
 
d
Guest
Posts: n/a

 
      12-27-2005, 11:25 PM
My configurations files on my DNS server (lnx03) below.

/var/named/my-zone.zone:
; Zone file for 192.168.0.x
;
$TTL 3D
@ IN SOA ns.lansys.com. hostmaster.lansys.com. (
200512051 ; serial number
8H ; refresh, seconds
2H ; retry, seconds
4W ; expire, seconds
1D ) ; minimum, seconds
;
NS ns ; Nameserver Address
;

lan4 A 192.168.0.110
lan3 A 192.168.0.111
lan5 A 192.168.0.112


/etc/hosts:

192.168.0.110 lan4 lan4.lansys.com
192.168.0.111 lan3 lan3.lansys.com
192.168.0.112 lan5 lan5.lansys.com

When I run:

ping lan4.lansys.com (works)
nslookup lan4.lansys.com (works)
dig lan4.lansys.com (works)


If I remove the hosts names from the /etc/hosts file

When I run:

ping lan4 (works)

dig lan4 (doesn't work)
; <<>> DiG 9.2.1 <<>> lan4
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 30082
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;lan4. IN A

;; AUTHORITY SECTION:
.. 9357 IN SOA A.ROOT-SERVERS.NET.
NSTLD.VERISIGN-GRS.COM. 2005122700 1800 900 604800 86400

;; Query time: 2 msec
;; SERVER: 192.168.0.200#53(192.168.0.200)
;; WHEN: Tue Dec 27 19:15:17 2005
;; MSG SIZE rcvd: 97


nslookup lan4 (doesn't works)
> nslookup lan4

Server: 192.168.0.200
Address: 192.168.0.200#53

** server can't find lan4: NXDOMAIN


I can't understand why the shorter naming convention doesn't work when
the name is present in the /etc/hosts file. Is the zone file
configured incorrectly?

 
Reply With Quote
 
 
 
 
Dr@g0n
Guest
Posts: n/a

 
      12-28-2005, 09:41 AM
Add a entry in /etc/resolv.conf
search <domain name>
domain <domainname>


then it will append domain name in each unqualified hostname

 
Reply With Quote
 
d
Guest
Posts: n/a

 
      12-28-2005, 11:58 AM
That be it. Thanks!


Dr@g0n wrote:
> Add a entry in /etc/resolv.conf
> search <domain name>
> domain <domainname>
>
>
> then it will append domain name in each unqualified hostname


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet access at convention centers -> how to hack / crack? WIFI Guy Wireless Internet 1 05-02-2009 04:43 AM
Best practice / convention for small network CCW Linux Networking 5 02-03-2009 01:00 AM
Nslookup succeeds, but ping fails to resolve hostname Curt McNamee Windows Networking 1 11-07-2006 03:04 PM
nslookup Tan Lee Yew Windows Networking 8 12-29-2005 02:26 AM
Computer naming convention hints Demetrio Condello Linux Networking 22 12-22-2003 10:33 PM



1 2 3 4 5 6 7 8 9 10 11