From owner-freebsd-questions@FreeBSD.ORG Sun Jan 22 00:06:48 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 899BA16A41F for ; Sun, 22 Jan 2006 00:06:48 +0000 (GMT) (envelope-from parv@pair.com) Received: from mta10.adelphia.net (mta10.adelphia.net [68.168.78.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AE5443D45 for ; Sun, 22 Jan 2006 00:06:47 +0000 (GMT) (envelope-from parv@pair.com) Received: from default.chvlva.adelphia.net ([68.67.248.200]) by mta10.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060122000647.UQNS8657.mta10.adelphia.net@default.chvlva.adelphia.net>; Sat, 21 Jan 2006 19:06:47 -0500 Received: by default.chvlva.adelphia.net (Postfix, from userid 1000) id 51B57B6AF; Sat, 21 Jan 2006 19:06:43 -0500 (EST) Date: Sat, 21 Jan 2006 19:06:43 -0500 From: Parv To: Dick Davies Message-ID: <20060122000643.GA1003@holestein.holy.cow> Mail-Followup-To: Dick Davies , f-q References: <20060113052959.GA15340@holestein.holy.cow> <3f1760601130150n586b0b2dr@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3f1760601130150n586b0b2dr@mail.gmail.com> Cc: f-q Subject: Re: Syntax of dhclient.conf(5) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jan 2006 00:06:48 -0000 in message <3f1760601130150n586b0b2dr@mail.gmail.com>, wrote Dick Davies thusly... > > There should be semicolons after each line. > > On 13/01/06, Parv wrote: > > I failed to find detailed syntax layout in dhclient.conf(5) man page, > > via web search, or be able to deduce from files in > > /misc/src/sbin/dhclient. I was looking for something like as given in > > (i)pf.conf(5) man pages. > > > > Could somebody point me to a detailed document documenting the syntax? > > Alternatively, please help me understand what am i missing from the > > dhclient.conf listed below which results in following parsing error > > messages ... > > > > /etc/dhclient.conf line 11: expecting identifier after option keyword. > > { > > ^ > > /etc/dhclient.conf line 18: expecting a statement. > > } > > ^ > > /etc/dhclient.conf line 32: semicolon expected. > > > > ^ > > > > ... dhclient.conf ... > > > > 1 > > 2 # FreeBSD 6.0-STABLE's dhclient empties /etc/resolv.conf & default route is > > 3 # not being assigned. Remedy this by having sane entries here in dhclient.conf. > > 4 > > 5 request subnet-mask , routers , domain-name-servers; > > 6 require routers , domain-name-servers; > > 7 > > 8 interface "em0" > > 9 { > > 10 default > > 11 { > > 12 fixed-address 192.168.2.100 > > 13 , option subnet-mask 0xffffff00 > > 14 , option routers 192.168.2.1 > > 15 } > > (if you're setting all these yourself, why are you bothering to > do dhcp on that interface?) I was/am having problems wrt iwi0 interface getting a IP address and default route. So, in this case, I was/am using em0 interface for practice. Let me add that i do not have any problems in using em0 w/ DHCP w/o any /etc/dhclient.conf. > There should be semicolons after each line in the braces, I did try, still having same exact error message being produced. > and the leading dots before option aren't something I recognize. Seems like problem w/ your font; that "leading dot" is actually a comma. In case you will be inclined to suggest to move comma from being in front of a line to the end of the previous line, i have already tried that too, still resulting in the same error message. Also from dhclient.conf(5) man page ... DESCRIPTION ... The dhclient.conf file is a free-form ASCII text file. It is parsed by the recursive-descent parser built into dhclient(8). The file may contain extra tabs and newlines for formatting purposes. ... OPTION MODIFIERS ... default { [option declaration] [, ... option declaration] } If for some set of options the client should use the value sup- plied by the server, but needs to use some default value if no value was supplied by the server, these values can be defined in the default statement. - Parv --