Syntax of dhclient.conf(5)

Parv parv at pair.com
Sat Jan 21 16:06:48 PST 2006


in message <3f1760601130150n586b0b2dr at mail.gmail.com>,
wrote Dick Davies thusly...
>
> There should be semicolons after each line.
> 
> On 13/01/06, Parv <parv at pair.com> 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

-- 



More information about the freebsd-questions mailing list