Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just installed a new VM, and looked in the resolve.conf file , in order to check on some issues related to DNS resolution.

$ more /etc/resolv.conf
; generated by /sbin/dhclient-script
search uchc.edu
nameserver 10.3.8.10
nameserver 10.3.8.12
nameserver 155.37.50.100

I noticed that , somehow, the resolv.conf is smart enough to add the "search uchc.edu" line, which is appropriate. I always assumed that our networking folks edited startup files for us... But now, I'm realizing that maybe there is some sophisticated logic to how the resolv.conf get auto created by the OS networking utilities on startup.

So my question is : How is it that resolv.conf is first initialized in linux ? Are there specific programs that run in the kernel that set the parameters for resolv.conf ?

Thanks! And please forgive my ignorance - im more of a software developer than a systems guy.... but im trying to catch up.

share|improve this question

migrated from stackoverflow.com Nov 2 '11 at 20:24

This question came from our site for professional and enthusiast programmers.

    
This is off-topic for SO, but the answer is: You're set up to use a dynamic IP and the DHCP server for your network responds with all that info (along with the IP address for your machine). –  Brian Roach Nov 2 '11 at 16:29
3  
The comment in the second line says it all. –  Maxim Yegorushkin Nov 2 '11 at 16:52
    
Wow -- it seems like a very relevant question because many coders , like me, must nowadays develop against a VM and know how the VM is setting its network up, so that they can reliably connect to it from a host machine. I would plead others to keep it open. –  jayunit100 Nov 2 '11 at 18:13

1 Answer 1

up vote 5 down vote accepted

Your local DHCP server has been configured with those settings, and sends them to every client when it gives out an IP address.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.