View Full Version : [kubuntu] local nameserver function not working

November 18th, 2008, 11:46 PM
I have had a problem with the nameserver working with the local network names ever since I upgraded. The quick fix was to lock everything down on the router dhcp and enter the addresses by hand into the file hosts. I would really like to get the system working where it is not locked down.

The system accesses the internet just fine but refuses to identify local names. one of the computers defined on my local lan is called linux-server which is at My router is defined at

if I use hosts or dig it will not find linux-server. Any hints what might be wrong. I have looked at the files resolv.conf and interfaces but discover nothing wrong. below is the information on these plus dig and host output.

hiflyer@Linux-bee:~$ cat /etc/resolv.conf

hiflyer@Linux-bee:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp


hiflyer@Linux-bee:~$ host linux-server
Host linux-server not found: 3(NXDOMAIN)

hiflyer@Linux-bee:~$ dig linux-server

; <<>> DiG 9.4.2-P2 <<>> linux-server
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 12901
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;linux-server. IN A

. 30 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2008111801 1800 900 604800 86400

;; Query time: 34 msec
;; WHEN: Tue Nov 18 17:33:33 2008
;; MSG SIZE rcvd: 105

November 19th, 2008, 12:02 AM
Do you have a nameserver running on your network?

I assume is some sort of a router, which will often just forward the requests to your ISP nameservers, which will obviously not be aware of any local hostnames.

November 19th, 2008, 12:10 AM
the router is a netgear 824v2. before I upgraded to 8.04, it used to deliver the names (or I assume it did) as they were not defined in hosts. I have logged into the router and it shows the names and the assigned ip addresses.

November 19th, 2008, 12:16 AM
Have you tried this, something I picked up from these forums, respect to the original poster:

edit /etc/nsswitch.conf

Rem (#) the line that says
hosts: xxxxxxxxxxxxxxx

to this:
hosts: files dns wins

finally, you need to install winbind
sudo apt-get install winbind

You'll then be able to ping by host name

November 19th, 2008, 12:31 AM
I did as suggested. winbind was already installed. Host still does not show the local network. dig still does show the local network.

November 19th, 2008, 12:32 AM
sorry, I missed a word. neither host nor dig show the local names.

December 6th, 2008, 05:55 AM
hiflyer, did you ever fix this? It drives me crazy to have to enter the numerical address every time as they aren't always the same.
Cheers, Mike

December 14th, 2008, 06:08 PM
Mike, sorry I have been out of the country and not checking on this thread.

Did I resolve this issue, not really. Do I know the solution probably.

Basically what is happening is one needs to set up a DNS and name server locally. I have not made a decision to do this. I will stay with the encoding in the host file for now.