nslookup/dig not finding short hostname convention



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?

.



Relevant Pages

  • Re: named mystery
    ... >>bounce for dns lookup failure. ... >>server just to insure that named got the change and checked the ... > On the secondary server the zone files has: ... > When you make a change on the primary DNS server zone file be ...
    (freebsd-questions)
  • RE: sbs2003 pdc and bdc no DNS name listed.
    ... duplicate object name with CLISBS.CLILANG.LOCAL Windows SBS server. ... dnscmd utility to export the zone file. ... A service principal name (SPN) is the ... PLEASE NOTE the newsgroup SECURE CODE and PASSWORD were ...
    (microsoft.public.windows.server.sbs)
  • Re: Dynamic DNS and failed journal
    ... Try configuring your DNS server to maintain the DDNS zone file in ... If your DHCP server is ... It (updating master records) certainly works in FC4, ...
    (Fedora)
  • Re: named mystery
    ... The primary name server is running FreeBSD v 6.0 ... message from my ISP's server for lookup failure; ... may be caching responses and rejecting based on a cached response. ... sure to change the serial number in that zone file. ...
    (freebsd-questions)
  • OT (maybe) DNS delagation on RH9
    ... I have a DNS server running RH9 and Bind 9. ... At a basic level the delegation is working. ... If forwarding is enabled all queries for "corp.company.com" go to the ... Below is the protion of named.conf and the zone file: ...
    (RedHat)