Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Apress - Books for Professionals by Professionals

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Surveys

Features
HOWTOs
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 66 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  

dhcpcd




SYNOPSIS

       dhcpcd     [-dknrBCDHKNRSTY]     [-z <reboot     timeout>]
            [-t <timeout>]  [-c <ExecFilePath>]   [-h <hostname>]
            [-i <vendorClassID>] [-I <clientID>] [-l <leasetime>]
            [-s [ipaddr]]    [-G [gateway]]     [-w <windowsize>]
            [-L <ConfigDir>] [interface]


DESCRIPTION

       dhcpcd  is  an implementation of the DHCP client specified
       in RFC2131 (when -r option is not specified)  and  RFC1541
       (when -r option is specified).

       It  gets the host information (IP address, netmask, broad­
       cast address, etc.) from a DHCP server and configures  the
       network  interface  of the machine on which it is running.
       It also tries to renew the lease time according to RFC2131
       or RFC1541 (obsolete).


OPTIONS

       -d     With  this  flag  dhcpcd will syslog(LOG_DEBUG,...)
              messages for about every step it does.  It's recom­
              mended  to  use this option since it doesn't really
              produce too much output but will  greatly  help  in
              resolving  a  problems  if any.  dhcpcd uses LOCAL0
              syslog facility for its  output.  To  catch  dhcpcd
              debugging   output   add   the  following  line  to
              /etc/syslog.conf file:

              local0.*     /var/log/dhcpcd.log

              and then refresh syslogd daemon:

              kill -1 `cat /var/run/syslogd.pid`

       -k     Sends SIGHUP signal to the dhcpcd process  that  is
              currently  running.  If  dhcpcd  receives SIGHUP it
              will send DCHP_RELEASE message to  the  server  and
              destroy  dhcpcd  cache.  In  a case dhcpcd receives
              SIGTERM which is normally used by shutdown(8)  when
              rebooting   the   system   dhcpcd   will  not  send
              DHCP_RELEASE and will not destroy cache. When  sys­
              tem boots dhcpcd will use cache to request the same
              IP address from  DHCP  server  which  was  assigned
              before the system went down.

       -n     Sends  SIGALRM signal to the dhcpcd process that is
              currently running which forces  dhcpcd  to  try  to
              renew the lease. If dhcpcd is not running, the flag

       -H     Forces  dhcpcd  to  set hostname of the host to the
              hostname  option  supplied  by  DHCP  server.    By
              default dhcpcd will NOT set hostname of the host to
              the hostname option received from DHCP server.

       -K     Keep the searchlist from  an  existing  resolv.conf
              when replacing the file.  dhcpcd will add it to the
              domainname received from the DHCP server.

       -L <ConfigDir>
              dhcpcd will use <ConfigDir>  directory  instead  of
              default  /var/lib/dhcpcd/  to  store  configuration
              information.

       -S     Forces dhcpcd to send second DHCP_DISCOVER  message
              even  after  receiving DHCP_OFFER on the first one.
              Some DHCP servers expect the client to send  second
              DHCP_DISCOVER    message    before    replying   on
              DHCP_REQUEST.

       -R     Prevents    dhcpcd    from    replacing    existing
              /etc/resolv.conf file.

       -Y     Prevents    dhcpcd    from    replacing    existing
              /etc/yp.conf file. Domainname is not updated unless
              -D is specified.

       -N     Prevents    dhcpcd    from    replacing    existing
              /etc/ntp.conf file.

       -T     Test case, when dhcpcd goes through the DHCP  nego­
              tiation sequence but doesn't actually configure the
              interface.  It  does  however   write   the   <Con­
              figDir>/dhcpcd-<interface>.info      and      <Con­
              figDir>/dhcpcd-<interface>.cache files and it  does
              attempt      to     execute     /etc/sysconfig/net­
              work/scripts/dhcpcd-hook script.  The  pathname  of
              dhcpcd-hook  executable  script can be changed with
              -c  <ExecFilePath> option.  -T option is used  pri­
              marily for testing DHCP servers, for obtaining mul­
              tiple IP addresses for the  same  dummy  interface,
              and/or  configuring  virtual interfaces in conjunc­
              tion  with  -L   <ConfigDir>  and  -I    <ClientID>
              options.

       -z <reboottimeout>
              Specifies  (in  seconds)  for  how long dhcpcd will
              stay in the INIT-REBOOT state (requesting the  last
              IP  address  it  had again).  The default is 5 sec­
              onds, and after this time, dhcpcd will go into  the
              INIT  state (broadcasting DHCPDISCOVERs). Note that
              will  return  0  to  the parent process.  In a case
              dhcpcd  times  out  before  receiving  a  valid  IP
              address  from  DHCP  server dhcpcd will return exit
              code 1 to the parent process.

       -c <ExecFilePath>
              dhcpcd will try to  execute  <ExecFilePath>  script
              instead      of     default     /etc/sysconfig/net­
              work/scripts/dhcpcd-hook script every time it  con­
              figures  or  brings  down  the  interface.  See the
              description of dhcpcd-hook script in FILES  section
              below.

       -h <hostname>
              specifies  a  string  used  for the hostname option
              field when dhcpcd sends DHCP  messages.  Some  DHCP
              servers,  notably  those  used  by  @Home Networks,
              require the hostname option field containing a spe­
              cific string in the DHCP messages from clients.

       -i <vendorClassID>
              Specifies   the  vendor  class  identifier  string.
              dhcpcd uses the  default  vendor  class  identifier
              string  (system  name,  system release, and machine
              type) if it is not specified.

       -I <ClientID>
              Specifies the  client  identifier  string.   dhcpcd
              uses  the default client identifier (MAC address of
              the network interface) if it is not specified.

       -l <leasetime>
              Specifies (in seconds) the recommended  lease  time
              to  the  server. (Note that the server can override
              this value if it sees fit). This value is  used  in
              the  DHCP_DISCOVER message. The default is infinite
              (0xffffffff).

       -s [ipaddr]
              Sends DHCP_INFORM  message  to  DHCP  server  using
              ipaddr.   The  optional ipaddr parameter must be in
              the form xxx.xxx.xxx.xxx.  If no  ipaddr  parameter
              is given on the command line dhcpcd will use the IP
              address currently assigned to  the  interface.   If
              there  is  no  IP address currently assigned to the
              interface dhcpcd will use  previously  obtained  IP
              address    stored   in   <ConfigDir>/dhcpcd-<inter­
              face>.cache file.

       -G [gateway]
              Prevents dhcpcd from installing default routes pro­
              vided  by  DHCP  server.   If  optional  gateway ip

       /var/lib/dhcpcd/
              Default  <ConfigDir>  directory  used  for  storing
              files created by dhcpcd.  See option -L <ConfigDir>
              above.

       <ConfigDir>/dhcpcd-<interface>.info
              file in which dhcpcd saves  the  host  information.
              The  word <interface> is actually replaced with the
              network interface name like eth0 to which dhcpcd is
              attached.

       /etc/sysconfig/network/scripts/dhcpcd-hook
              script file, which dhcpcd will try to execute when­
              ever it configures or brings  down  the  interface.
              The  path  to this executable script can be changed
              with -c  <ExecFilePath> option.   Dhcpcd  passes  3
              parameters to dhcpcd-hook script:

       dhcpcd-hook <HostInfoFilePath> <up|down|new> [-d]
              The  first  parameter <HostInfoFilePath> is path to
              dhcpcd-<interface>.info file. The word  <interface>
              is  actually replaced with interface name dhcpcd is
              attached to, e.g. "eth0". The second parameter val­
              ues  <up|down|new>  mean  the  interface  has  been
              brought up with  the  same  IP  address  as  before
              ("up"),  or with the new IP address ("new"), or the
              interface has been brought down ("down"). Parameter
              -d is passed in a case dhcpcd has been started with
              -d debug flag.

       <ConfigDir>/dhcpcd-<interface>.cache
              Cache file containing the  previously  assigned  IP
              address  and  some  other things.  The word <inter­
              face> is actually replaced with the network  inter­
              face name like eth0 to which dhcpcd is attached.

       /etc/resolv.conf
              file created by dhcpcd when the client receives DNS
              and domain name options.  The old  /etc/resolv.conf
              file  is renamed to /etc/resolv.conf.sv and will be
              restored back when dhcpcd exits for any reason.

       /etc/yp.conf
              file created by dhcpcd when the client receives NIS
              options.   The  old /etc/yp.conf file is renamed to
              /etc/yp.conf.sv and is restored  back  when  dhcpcd
              exits for any reason.

       /etc/ntp.conf
              file created by dhcpcd when the client receives NTP
              options.  The old /etc/ntp.conf file is renamed  to
              /etc/ntp.conf.sv  and  is restored back when dhcpcd


BUGS

       dhcpcd  uses  time(3)  to  calculate  the lease expiration
       time.  If the system time is changed while the  client  is
       running, the lease expiration time may not be predictable.


AUTHORS

       v.<1.3
       Yoichi Hariguchi <yoichi@fore.com>
       v.1.3
       Sergei Viznyuk <sv@phystech.com>

       The -K and -x switches were  added  by  SuSE,  blame  them
       <http://www.suse.com/feedback> and not the authors.

dhcpcd 1.3               31 January 1998                dhcpcd(8)
  




Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
The Linux Tutorial can use your help.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.09 Seconds