[Cialug] Network setup for linux server

Zachary Kotlarek zach at kotlarek.com
Wed Aug 31 22:17:44 CDT 2011


On Aug 31, 2011, at 5:54 PM, Charles Dunbar wrote:

> If you can't ping by name, I'd look into the /etc/resolv.conf file,
> that's where you set the DNS servers:
> 
> Can't remember if you need to restart the networking service or not
> after changing the file, but it couldn't hurt.


On a system using glibc (or ulibc or other similar libraries) as the stub resolver you don't need to restart networking for changes to /etc/resolv.conf, nor will it have any effect. The config file is read and cached per instance of glibc whenever res_init() is called.

If you're running nscd changes will be picked up quickly and automatically even for long-running running programs; nscd monitors its config files via inotify or polling and reloads them as necessary.

Without nscd new processes will pick up the change but already-running processes will need to be restarted.

Some distros patch glibc to stat /etc/resolv.conf regularly to detect changes, and a few programs that are intended to be network-change aware reload on specific events, but that's not the behavior of the vanilla library.

	Zach

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2746 bytes
Desc: not available
URL: <http://cialug.org/pipermail/cialug/attachments/20110831/5790344d/attachment.bin>


More information about the Cialug mailing list