3

Could some kind soul please post the default content of the dhclient.conf file from /etc/dhcp/ as I've managed to delete mine :/

  • Please thank people using upvote mechanism and mark correct answer. Also no need to sign your question. We can see who you are. :) +1 good question – Piotr Kula Jun 12 '13 at 11:49
7

You can fetch the original file yourself. The Raspbian package repository can be found here. The package you are looking for can be found like this:

dpkg -S /etc/dhcp/dhclient.conf

Which yields the package isc-dhcp-client. It can be found under the letter i in the package repository: http://archive.raspbian.org/raspbian/pool/main/i/isc-dhcp/. You can download the current version (isc-dhcp-client_4.2.2.dfsg.1-5+deb70u3_armhf.deb as of today) and inspect it after download. I use the Midnight Commander (mc in a terminal) to do this. Just navigate to the deb-package and hit return in mc. You will see the contents then.

The original file can then be found at CONTENTS/etc/dhcp/ inside of the package. You can even hit the F5 key to copy the file out of the package.

This strategy works with most packages that come with default configurations.

3

here it comes:

# Configuration file for /sbin/dhclient, which is included in Debian's
#   dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
#   man page for more information about the syntax of this file
#   and a more comprehensive list of the parameters understood by
#   dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
#   not leave anything out (like the domain name, for example), then
#   few changes must be made to this file, if any.
#

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;

#send host-name "andare.fugue.com";
send host-name = gethostname();
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
    domain-name, domain-name-servers, domain-search, host-name,
    dhcp6.name-servers, dhcp6.domain-search,
    netbios-name-servers, netbios-scope, interface-mtu,
    rfc3442-classless-static-routes, ntp-servers;
#require subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;

#alias {
#  interface "eth0";
#  fixed-address 192.5.5.213;
#  option subnet-mask 255.255.255.255;
#}

#lease {
#  interface "eth0";
#  fixed-address 192.33.137.200;
#  medium "link0 link1";
#  option host-name "andare.swiftmedia.com";
#  option subnet-mask 255.255.255.0;
#  option broadcast-address 192.33.137.255;
#  option routers 192.33.137.250;
#  option domain-name-servers 127.0.0.1;
#  renew 2 2000/1/12 00:00:01;
#  rebind 2 2000/1/12 00:00:01;
#  expire 2 2000/1/12 00:00:01;
#}
0

What I always recommend when editing files is to take a backup first. One nice way of doing this is by using a version control software, such as "rcs". Once this is installed, before editing a system file, such as dhclient.leases, simply type before editing it:

sudo ci -l dhclient.leases

It will ask for a comment each time you do this, and you can "Check-In" this file each time there's a version you want to store for potential later retrieval.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.