[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: resolv.conf misbehaving



Hi Danny,

> My apologies, I must have missed your reply
>
>> Warning : this setup is wrong and may not work as you expect. All 
>> listed nameservers should be equivalent. Multiple nameservers are only 
>> for redundancy, not to provide multiple sources.
>> 
>> If you query the first server for an information out of its scope, it 
>> may reply negatively (status: NXDOMAIN or NOERROR, ANSWER: 0) and the 
>> next server won't be queried. So in the end you won't get your answer.
>
> However, what would be the point of giving resolv.conf multiple nameserver
> options then (if I understand you correctly), if one cannot "force" (for lack 
> of a better word) it, or even arbitrarily change the order in which servers can
> be queried? So it would be absolutely pointless in even trying?

Multiple dns servers are for REDUNDANCY. So if one fails and is no longer available you will automatically use the next one available.

> The setup I had (Debian 3.0) worked. Unfortunately smart devices and more wireless 
> laptops demanded attention.So I upgraded (clean install) to Debian 7.0. All I want to
> do is for all wireless devices to get DHCP from Debian (not the router) and query
> Debian (not the router) for name resolution. Simple as that.

Ok, so
1: Make sure to either disable DHCP in the router or make sure the router cannot answer those devices
2: Enable DHCP (isc-dhcp-server) on your linux machine
3: in the /etc/dhcp/dhcp.conf file have a line that points to the proper dns server

Me, I have a linux box conneted to the LAN and the and the router on the same NIC. Internally I use 172.16.17.0/24 and my router is on 192.168.178.1
In my /etc/dhcp/dhcpd.conf file I have:
#network definition
shared-network internal.xxx.xx. {
  subnet 172.16.17.0 netmask 255.255.255.0 {
    option routers 172.16.17.1;
    option domain-name-servers 172.16.17.1, 194.109.104.104;
    option ntp-servers 172.16.17.1;
    range 172.16.17.20 172.16.17.39;
    range dynamic-bootp 172.16.17.40 172.16.17.45;
    default-lease-time 86400;   # one day
    max-lease-time 172800;      # two days
  }
  subnet 192.168.178.0 netmask 255.255.255.0 {
  }
}

This provides all information to the clients. If you want the router to handle all the traffic directly and not via the linux machine then change the "option routers ..." line. But...
If you want it all in one network range then change that part of the setup too.
For me, my linux box routes between several segments which my ISP router knows nothing about, which is why it is the default route for my network. Also, it is why I run my own dns server. Because there I CAN tell it where to look for the proper information if it is not available on the default "internet" dns servers.

Bonno Bloksma


Reply to: