1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Local DNS on router?

Discussion in 'Tomato Firmware' started by mdopro1, Mar 8, 2014.

  1. mdopro1

    mdopro1 Reformed Router Member

    I just picked up Asus N900 and running latest shabby firmware on it. I love it all, however I have a question - the reason I did all this.

    I have some non-windows based machines on my network that don't resolve hostname. So at present time I have to go from computer to computer and update hosts file on each of them to resolve hostname to IP address.

    I want to know how I can do this at router level so I can leave hosts file empty?
  2. eibgrad

    eibgrad Addicted to LI Member

    Use the built-in DNS server in tomato (DNSMasq). You just need to add address records for each host. Let’s assume the local domain name is “lan”:


    Of course, you have to tell the DHCP server to use the DNS server in its configuration.
    darkknight93 likes this.
  3. mdopro1

    mdopro1 Reformed Router Member

    I appreciate it. That's exactly what I was looking for.

    One more question without creating a new thread. I need to use WPS feature to attach a security camera to the router. Is there a different way of handling that? I didn't see any settings in tomato.
  4. eibgrad

    eibgrad Addicted to LI Member

    Tomato doesn't support WPS. You need to manually configure the wireless security of the camera (SSID, key, etc.).
  5. mdopro1

    mdopro1 Reformed Router Member

    Done. I took a laptop connected to wifi, connected each camera to Ethernet, bridged the connection to establish wifi and then setup the camera... just hope I don't have to do this again for a long time. Configuring several cameras with just WPS button isn't easy.

    Now, another question. I have a file server that has 2 physical Ethernet connections. I previously load balance it manually by assigning certain computers to go through 1 IP address and others through 2nd. I see the option to put in 2 MAC addresses in static DHCP table. What is that going to do and would it load balance? Or is there more to it than just putting in 2 MAC addresses?
  6. koitsu

    koitsu Network Guru Member

    No, the 2nd MAC address in the static DHCP table is to indicate to the DHCP server "MAC address #1 or #2 will be delegated (given) this IP address".

    Regarding your "load balancing" of your file server (re: interface X has address X, interface Y has address Y, and different clients on your LAN resolve the file server hostname to either address X or Y depending on the client IP): there is no way that I know to do that with dnsmasq, meaning return a different A record based on the IP address of the client doing the DNS lookup.

    There are other methodologies you could use, but I wouldn't recommend any of them. Instead, I'd recommend you just stick with using one NIC. Is your home file server really so over-utilised on your LAN that you really need two NICs for it? Seriously.
  7. mdopro1

    mdopro1 Reformed Router Member

    It's not just a file server it's also an application server and does some other research related tasks as well, so yes, there is a lot of load on this machine. There are about 40 IP addresses that access this one poor server for various things like running outlook database that's over 2GB in size. Various machines do different tasks, some clients also do mathematical work on this server too.

    I'm running a small business on this one router *gasp*

    A little time ago I did have issues accessing this server even though a single connection wasn't being used 100% but then adding a 2nd NIC and balancing work solved that problem.

    I guess the title of thread may mislead, DNSmasq question was for non-windows based equipment that other clients access with IP address, I'd rather access them with name and that's already accomplished. Now I'm just recycling the same thread for other things.

    I still don't understand why would I assign in 2 MAC addresses to 1 IP if it's not for load balancing.
  8. Grimson

    Grimson Networkin' Nut Member

    It's useful if you use a device (like a laptop) wired (in a dock) and wireless (on the couch), or if a device has two wireless cards/Ethernet ports, and you want to make sure it's always getting the same IP.

    This might help a bit, but it's not a perfect solution: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2009q3/003312.html
    Last edited: Mar 9, 2014
  9. eibgrad

    eibgrad Addicted to LI Member

    Correct. And I think it's important to point out (because it might not be obvious) that there's an assumption being made here that you only have ONE of those network adapters active at any given time, any others are disabled. As the OP suggested, it wouldn't otherwise make sense. It's just a convenience for someone who wants to retain the same IP regardless of the network adapter they happen to be using at the time.
  10. mdopro1

    mdopro1 Reformed Router Member

    I now understand 2 MAC addresses. I'm reading the link too. Thanks all.
  11. ceckin

    ceckin LI Guru Member

    Its a bad idea to use DNS for load-balancing. You can however force dnsmasq to query a dns server for certain domains and you can put a simple server on your machine where you would script the reply to achieve the desired result (automated load-balancing), but even then its a bad idea.
  12. mdopro1

    mdopro1 Reformed Router Member

    I realized that the way I was doing it is still going to work - I just wanted to be lazy. My requirements are simple. Some computers are handling outlook so they go through Ethernet 1 and others do a lot of file movement, they go through Ethernet 2. Some non-windows machines are spread around the 2 ethernets.. Since almost everything is assigned static IP addresses, it's really a plug and forget kind of setup. Even better, I can assigned 2 different machine names unique to each MAC address so when mapping a drive I just use alternating names and that alone balances the load going to this server. I'm thinking a third Ethernet card would do good for serving WSUS updates to all Windows based machines.

    All in, the router and firmware has helped make load balancing more manageable - thanks to all support here I now have a better understanding of how tomato works.

Share This Page