Networking Forums

Networking Forums > Computer Networking > Linux Networking > resolv.conf

Reply
 
 
Stephen Speicher
Guest
Posts: n/a

 
      12-08-2003, 03:59 AM
I am using Red Hat Enterprise Linux 3. Can someone tell me
exactly what belongs in /etc/resolv.conf if you are using dhcp to
set the IP address and the DNS?

--
Stephen
(E-Mail Removed)

Ignorance is just a placeholder for knowledge.

Printed using 100% recycled electrons.
-----------------------------------------------------------
 
Reply With Quote
 
 
 
 
Bit Twister
Guest
Posts: n/a

 
      12-08-2003, 05:51 AM
On Sun, 7 Dec 2003 20:59:07 -0800, Stephen Speicher wrote:
> I am using Red Hat Enterprise Linux 3. Can someone tell me
> exactly what belongs in /etc/resolv.conf if you are using dhcp to
> set the IP address and the DNS?


Just an example
cat /etc/resolv.conf
search localdomain attbi.com
nameserver 204.127.202.204
nameserver 216.148.227.268
 
Reply With Quote
 
Michael Heiming
Guest
Posts: n/a

 
      12-08-2003, 07:45 AM
Stephen Speicher <(E-Mail Removed)> wrote:
> I am using Red Hat Enterprise Linux 3. Can someone tell me
> exactly what belongs in /etc/resolv.conf if you are using dhcp to
> set the IP address and the DNS?


Nothing, dhcp client should take care of it, if configured
probably.

--
Michael Heiming

Remove +SIGNS and www. if you expect an answer, sorry for
inconvenience, but I get tons of SPAM
 
Reply With Quote
 
Bill Unruh
Guest
Posts: n/a

 
      12-08-2003, 11:18 AM
Stephen Speicher <(E-Mail Removed)> writes:

]I am using Red Hat Enterprise Linux 3. Can someone tell me
]exactly what belongs in /etc/resolv.conf if you are using dhcp to
]set the IP address and the DNS?

What goes into /etc/resolv.conf is the address of the DNS server. If
your dhcp sticks it into there, that is fine. If not then you have to
stick in the address of some dns server.

 
Reply With Quote
 
Mangled&Munged
Guest
Posts: n/a

 
      12-09-2003, 03:44 PM
You can put anything you want in /etc/resolv.conf, as it will
be over-written the moment that DHCP gets the info from
the ISP. :-)

Normally, if using DHCP client, you don't put anything in
/etc/resolv.conf. It will happen auto-magically when dhcp-client
gets going. The script /sbin/dhclient-script does the work.

If you really must stick something in /etc/resolv.conf and are
a dhcp client, then you will probably want to edit
/sbin/dhclient-script.

In the script you will find the function make_resolv.conf()

Here is an example where I have added stuff to stick in
/etc/resolv.conf.

function make_resolv_conf() {
if [ -n "$new_domain_name" ] || [ -n "$new_domain_name_servers" ]; then
echo '; generated by /sbin/dhclient-script' > /etc/resolv.conf
if [ -n "$new_domain_name" ]; then
echo search $new_domain_name >> /etc/resolv.conf
fi
echo search home.org >> /etc/resolv.conf
echo nameserver 192.168.164.253 >>/etc/resolv.conf
echo nameserver 47.124.35.253 >>/etc/resolv.conf
for nameserver in $new_domain_name_servers; do
echo nameserver $nameserver >>/etc/resolv.conf
done
fi
}

Note: The above is ugly, and should not be needed if the DHCP
server is working correctly.

Note: The above discussion is for a RH box.

Enjoy,
Mangled&Munged.

"Stephen Speicher" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) caldomain...
> I am using Red Hat Enterprise Linux 3. Can someone tell me
> exactly what belongs in /etc/resolv.conf if you are using dhcp to
> set the IP address and the DNS?
>
> --
> Stephen
> (E-Mail Removed)
>
> Ignorance is just a placeholder for knowledge.
>
> Printed using 100% recycled electrons.
> -----------------------------------------------------------



 
Reply With Quote
 
Bill Unruh
Guest
Posts: n/a

 
      12-10-2003, 09:00 AM
"Mangled&Munged" <postmaster@127.0.0.1> writes:

]You can put anything you want in /etc/resolv.conf, as it will
]be over-written the moment that DHCP gets the info from
]the ISP. :-)

]Normally, if using DHCP client, you don't put anything in
]/etc/resolv.conf. It will happen auto-magically when dhcp-client
]gets going. The script /sbin/dhclient-script does the work.

]If you really must stick something in /etc/resolv.conf and are
]a dhcp client, then you will probably want to edit
]/sbin/dhclient-script.

Alternatively just put what you want into /etc/resolv.conf after dhcp
has come up.


]"Stephen Speicher" <(E-Mail Removed)> wrote in message
]news:(E-Mail Removed) caldomain...
]> I am using Red Hat Enterprise Linux 3. Can someone tell me
]> exactly what belongs in /etc/resolv.conf if you are using dhcp to
]> set the IP address and the DNS?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vpnc and resolv.conf blueparty Linux Networking 6 11-10-2011 07:07 PM
dhcpd.conf, resolv.conf and the search directive Andy Richardson Linux Networking 4 07-13-2005 08:23 AM
why are there 2 resolv.conf files? Rick Linux Networking 9 07-02-2004 05:06 PM
ipv6 and resolv.conf Hans Fugal Linux Networking 0 05-18-2004 04:02 PM
NIS, DNS and resolv.conf ncrfgs Linux Networking 2 10-02-2003 05:09 PM



1 2 3 4 5 6 7 8 9 10 11