Nori Heikkinen wrote:
on Sat, 04 Jan 2003 05:19:39PM -0500, Derrick 'dman' Hudson insinuated:

A better solution is to edit /etc/dhclient.conf.  Use one of
   append  search foo.example bar.example
   prepend search foo.example bar.example
depending on the effect you want.
okay, i've been trying this, and i must not be getting the syntax right.
the manpage for dhclient.conf suggests that it should be

prepend search foo.example bar.example;

but i'm having no luck with this. has anyone done something like this?
or should i just not be running dhcp, which i guess i wasn't before ...
? hm.
thanks again,

</nori>


I just struggled with this for about 4 hours, trying every combination of options I could think of. This is what finally gives me what I want:

root@enlil:~# cat /etc/dhclient.conf
prepend domain-name-servers 192.168.0.3;
supersede domain-name "lan.invalid";

# neither "prepend domain-name .." nor "append .." worked

root@enlil:~# /etc/init.d/networking restart

root@enlil:~# cat /etc/resolv.conf
search lan.invalid
nameserver 192.168.0.3
nameserver 192.168.0.1

if you have more than one domain you'd like to search, i think they need to be seperated with spaces within the single set of quotes.

I'd been running pump, but when I saw this thread I thought I could work around manually resetting resolv.conf every time I booted via a script like this:

cat >/etc/resolv.conf << .
domain lan.invalid
search lan.invalid
nameserver 192.168.0.3
.

(i was having a similar problem as the OP, except it only happened on boot.. my leases tend to last a really long time)

I still can't find a way to get a "domain" entry in there, but the "search" option seems to take care of it. I can ping "router", which is in the lan.invalid domain.

The recommended "prepend/append search lan.invalid" (with or without quotes/semicolon) kept returning an error that there is no option called "search". This is dhcp-client 2.0pl5-14 from unstable.

I had a really hard time with my dhcp-serving netgear router-gateway setting it's own search parameter with strange characters at the end:

search nyc.rr.com\000

I saw a wishlist bug against this (135711), but there was no mention of not being able to update "search" in that bug report. And it didn't seem to effect resolving from nyc.rr.com, so I have no idea if it was related... When I ran pump it was set to something like

search nyc.rr.com rr.com


kenneth





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to