[CUWiN-Dev] adding nameservers to node config

Chase Phillips shepard at ameth.org
Sun May 15 19:33:04 CDT 2005


On Sun, 15 May 2005, tom wrote:

> I was at Mike Lehman's house today and I think I've refined his setup to the
> point of usability. The trick is, his router doesn't give out DNS servers
> along with a DHCP lease. Or if it does, it gives out the incorrect ones.
> Mike's computer has a pair of DNS servers that it uses, and when I used
> these I could connect to the Internet from my laptop through his node. I did
> this by specifying the DNS servers on my own computer, though, not on the
> node.

Might be worth finding out if the router is handing out DNS servers with
the lease.  Maybe that could be fixed and the issue on the node would
resolve itself?

> So the question becomes how to permanently add these nameservers to the
> node. I believe they can just be added to /etc/resolv.conf, but I don't know
> if that file persists after reboot. And a software upgrade would certainly
> wipe them, but I think that's unavoidable and not necessarily too
> problematic (we will just need to be careful about reinstating these servers
> after an upgrade).

/etc/resolv.conf won't persist across reboots.  For that to work it will
also need to be modified at /permanent/etc/resolv.conf.  (bryan will
correct me if I've got the path wrong.)  /permanent is mounted read-only
so you'll need to remount it read-write before making any modifications.
He also recommends doing something like

  sh# cp /permanent/etc/resolv.conf /permanent/etc/garbage

after you've completed making changes to /permanent/etc/resolv.conf to
workaround a known issue with storing data prior to shutting down a node.

How recent is the software on Mike's node?  If it's less than a year old,
it may be using dhcpselect.  When dhcpselect runs dhclient,
/etc/resolv.conf will probably get overwritten.  In some cases, then,
changes made to /etc/resolv.conf won't persist between reboots, either.

There could be a flag for dhclient to only use the network address info
(and not the DNS info) offered by the lease.  Hacking dhcpselect to call
dhclient with that flag might keep it from touching /etc/resolv.conf.
This would be a useful modification to dhcpselect if you're willing to
look into it.

Chase


More information about the CU-Wireless-Dev mailing list