Wednesday, June 22, 2016

How To Configure DHCP Server And Client in CentOS 7 2 and RHEL7 2









Server



vim /etc/dhcp/dhcpd.conf





option domain-name "server.local";

option domain-name-servers 192.168.56.254;

default-lease-time 600;

max-lease-time 7200;

authoritative;

subnet 192.168.56.0 netmask 255.255.255.0

{

  range dynamic-bootp 192.168.56.50 192.168.56.75;

  option broadcast-address 192.168.56.255;

  option routers 192.168.56.1;

}


****************Client ************


dhcpclient -r 192.168.56.254