Dhclient.conf

Home » CentOS » Dhclient.conf
CentOS 2 Comments

Hi all :-)

on CentOS 6 I need keep the hostname from a dhcp server:

cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
HWADDR:50:56:27:0E:C8
TYPE=Ethernet UUID 924b21-e92a-4944-a054-06d1967155c1
ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=dhcp PEERDNS=yes

with this config, CentOS keep only ip from dhcp server (not gw, not dns)

where is dhclient.conf? I need to create it? If yes, where’re the default options?

thanks for help!

Pol

2 thoughts on - Dhclient.conf

  • Hi,

    In DHCP server all this parameters (like DNS, GW, Netmask) have to be configure first. if you want to set the default options for GW and DNS then please do the changes in DHCP server like below.

    Here is the example of dhcpd.conf file,

    #
    # DHCP Server Config File
    #
    ddns-update-style none;
    ignore client-updates;

    lease-file-name “/var/lib/dhcpd/dhcpd.leases”;
    authoritative;

    option domain-name “example.com”;
    default-lease-time 86400; # 24 hours max-lease-time 172800; # 48 hours

    subnet 192.168.1.0 netmask 255.255.255.0 {
    option routers 192.168.1.1;
    option subnet-mask 255.255.255.0;
    option broadcast-address 192.168.1.255;
    option domain-name-servers 192.168.1.1;
    option ntp-servers 192.168.1.1;
    range 192.168.1.101 192.168.1.200;
    }

    –Regards Ashishkumar S. Yadav