From owner-freebsd-questions Thu Aug 6 11:50:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA29282 for freebsd-questions-outgoing; Thu, 6 Aug 1998 11:50:36 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA29228 for ; Thu, 6 Aug 1998 11:50:29 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.8.5/8.8.8) with SMTP id LAA09542; Thu, 6 Aug 1998 11:50:11 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Date: Thu, 6 Aug 1998 11:50:10 -0700 (PDT) From: Doug White To: Dan Langille cc: freebsd-questions@FreeBSD.ORG Subject: Re: DHCP configuration (was "changes to file are lost") In-Reply-To: <199807312331.LAA26654@cyclops.xtra.co.nz> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 1 Aug 1998, Dan Langille wrote: > I've renamed the thread as the topic seems to have deviated slightly... :) > On 31 Jul 98, at 13:42, Doug White wrote: > > > On Fri, 31 Jul 1998, Dan Langille wrote: > > > > > Bummer. OK. What should I be looking at in order to automagically > > > amend the contents? In brief here's what it contains followed what I > > > want it to contain: > > > > > > search myisp.com > > > nameserver 11.22.33.44 > > > nameserver 11.22.33.45 > > > > > > ----- > > > > > > domain mydomain.com > > > nameserver 10.0.0.1 # my min-dns server > > > nameserver 11.22.33.44 > > > nameserver 11.22.33.45 > > > > > > > > > Any suggestions? > > > > Yes -- you can add a `prepend' statement to add that in, I think: > > > > prepend { > > domain-name "mydomain.com"; > > domain-name-servers 10.0.1.4; > > } > > > > Add that to /etc/dhclient.conf and it should fix you up. See the > > dhclient.conf manpage for details. > > Ahhh. Thanks. I'm finding the manual confusing and can't find any good > examples. The prepend command as shown above, won't work for me, despite > it matching what is said in the man pages. The error I get is "expecting > identifer after option keyword". This is disconcerting not to mention > disapointing. Hm, ok, will have to check that out. > However, if I add single prepend commands to /etc/dhclient.conf before the > interface "ep0" command, I do get partial success. Here's what I supply > and what I get: > > prepend domain-name "mydomain.com"; > prepend domain-name-servers 10.0.0.1; > > gives: > > search mydomain.commyisp.com > nameserver 10.0.0.10 > nameserver 11.22.33.44 # my ISP > nameserver 11.22.33.45 # my ISP > > This is strange. There are references in the man pages that I can request > that the DHCP server not send me certain information (i.e. the search > statement), but it is not clear to me how to tell it that. > > How do I eliminate the search command, replace it with "domain > mydomain.com" and not have it suffixed with "myisp.com". Maybe prepend is the wrong keyword, or try prepend domain-name "mydomain.com " Note extra space ^ Hint: dhclient's magic is done via a script, /etc/dhclient-script. If you don't want both in the search path then use the `supercede' keyword instead of `prepend'. > Another issue is that after initiating dhclient edo, I must manullay redo > my ed1 details via ifconfig ed1 10.0.0.5 255.255.255.0. Is that to be > expected? No. dhclient configures all Ethernet interfaces by default, but you can specify with interfaces to listen on via the command line, like dhclient ep0 to specifically listen on ep0. > BTW: I notice that if I change the 'interface "epo" {' to be 'interface > "ed0" {', things still work. It's always been ep0, and worked. I would > have thought it should have to be ed0 in order to work. Perhaps you have both? Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message