Find the answer to your Linux question:
Results 1 to 8 of 8
Hi there, I have a very small home wireless network with a few Ubuntu, Windows XP, and Windows Vista machines. I use DD-WRT on the router. I can not get ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    4

    How to set up local DNS for Windows / Linux LAN?


    Hi there,

    I have a very small home wireless network with a few Ubuntu, Windows XP, and Windows Vista machines. I use DD-WRT on the router.

    I can not get local network browsing via Samba to work correctly, because none of the computers on the network can resolve computer names. On Ubuntu (Gnome) if I connect to a windows machine directly by IP address, I can access it, but if I try to browse the network it shows the computer names, but won't actually mount them, saying "Failed to connect to share". I can't ping the computernames, but I can ping the IP addresses.

    I am attaching screenshots of the setup of my DD-WRT router, but I have already experimented with all those settings and I can't seem to make any difference.

    Thanks in advance for your help!
    Attached Images Attached Images

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    The DNS setting on the router/switch are that of your ISP and thus will not have your hosts listed on it. You can use the hosts file to define your systems on your LAN. You should setup this file on all systems.

    Or if you feel like diving into it you could setup you own DNS server on one of the linux boxes and point all the other systems to it.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Posts
    4
    Thanks! Yes, that dnsmasq option on DD-WRT is supposed to be small local DNS server, but I can't figure out how to get the computers to use it. And I'd prefer to not use a hosts file.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    You have to tell them to use it. Change the IP Address of your ISP to the routers IP Address. And ensure that the routers DNS is up and running. You could check with one of the following;


    Code:
    Windows:
    nslookup www.google.com <ip of router>
    
    Linux
    dig @<ip of router> www.google.com
    Both the above will use the router to resolve.

    But this is just a caching DNS server I believe. You are still going to have to setup some sort of DNS zone somewhere if you don't want to use the hosts file.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #5
    Just Joined!
    Join Date
    Dec 2009
    Posts
    4
    Thanks again for the reply!

    The DNS addresses you see in my WAN settings are for OpenDNS, I don't use my ISP's DNS servers. The local machines are configured via DHCP on the DD-WRT router, so DHCP should be assigning all of the DNS addresses. Should DHCP be configuring the machines to first check any name against the local dnsmasq server and then if that fails to lookup on OpenDNS?

  7. #6
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    OK, if you want to resolve by host names then you have 2 choices.


    1. Use the host files on the systems to list all of the machines on the network.
    2. Setup a DNS zone for your network and populate it with the information for your network.

    All machines look in those 2 places for resolving host names.

    DNS does not work like you think. Look in one place and if the information is not there goto the next. The first DNS server listed will either have the information or go get it if it is available. As long as the first DNS server answers the second one will never be contacted. The only time the second is contaxted is when the first one doe not respond.

    If you are not into maintaining a DNS server then I would point you to the hosts file as it is the easiest for your setup. The DNSMASQ on the router sounds to be nothing more then a caching DNS which will never resolve your hosts.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  8. #7
    Just Joined!
    Join Date
    Dec 2009
    Posts
    4
    Ah, I didn't know that about the DNS lookups. But how come a pure Windows network "just works" with any standard router, including resolution of machine names? And I thought Ubuntu would have a similar name service that works out of the box.

  9. #8
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    because windows uses NetBIOS - Wikipedia, the free encyclopedia by default

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •