Lập Trình Linux

How to configure DHCP Server in centos 7, redhat7, fedora linux (Complete Server & client)

How to configure DHCP Server in Ubuntu linux 18.04 (Complete Server & client)


What is DHCP Server ?

DHCP (Dynamic Host Configuration Protocol) is a network protocol that enables a server to automatically assign an IP address and provide other related network configuration parameters to a client on a network, from a pre-defined IP pool.

This means that each time a client (connected to the network) boots up, it gets a “dynamic” IP address, as opposed to “static” IP address that never changes. The IP address assigned by a DHCP server to DHCP client is on a “lease”, the lease time can vary depending on how long a client is likely to require the connection or DHCP configuration.

In this tutorial, we will cover how to install and configure a DHCP server in CentOS/RHEL and Fedora distributions.

Testing Environment Setup

We are going to use following testing environment for this setup.

DHCP Server – CentOS 7
DHCP Clients – Centos 7 and Windows 10

How Does DHCP Work?

Before we move any further, let’s briefly explain how DHCP works:

When a client computer (configured to use DHCP) and connected to a network is powered on, it forwards a DHCPDISCOVER message to the DHCP server.
And after the DHCP server receives the DHCPDISCOVER request message, it replies with a DHCPOFFER message.
Then the client receives the DHCPOFFER message, and it sends a DHCPREQUEST message to the server indicating, it is prepared to get the network configuration offered in the DHCPOFFER message.
Last but not least, the DHCP server receives the DHCPREQUEST message from the client, and sends the DHCPACK message showing that the client is now permitted to use the IP address assigned to it.

source : www.techmint.com


follow us on facebook :-

Website Link :-


Công Nghệ
Học Excel Cơ Bản | 75 Tô màu có điều kiện cho cả dòng dữ liệu trong Excel đúng cách
Phần Mềm
Cách ĐẶT LẠI iPhone không mất dữ liệu
Tin tức dịch corona mới nhất ngày 11 tháng 3,2020 | Cập nhật dịch Covid-19
  • very nicely explained, Thanks

  • not working dont waste our time

  • Tell me whether client side will have bridge or Nat configuration

  • Nice earrape intro.

  • Nice video, regards from Mexico!

  • I receive error failed to start dhcp.service unit not found. I think this is due to nic. i have nic enp0s3. What should i do

  • Nice Explanation Sir. Thankx for this video

  • Sir please explain iscsi configuration

  • https://www.youtube.com/watch?v=ekfKJH289dg&feature=youtu.be

  • thank u sir….

  • what kind configurations you chose in kvm virtual network interfaces on host vm and others vm ??

  • Well Explained

  • nais men, tengs

  • Thanks a lot, very good explanation, but could you please do this with vlans?

  • Ru using VMware or which software I also want to try like you for practicing..am new to server so pls help me out to kick start..

  • not able to configure dhcp, i m doing on kvm where it is giving the error, while all entries are correct. help me out

  • Excellent !!, Thanks very much Bro..

  • Sir i have seen your video , u have explain very smartly, i have also configured but need one more help how to setup for please help to solve my problem. and if possible please share your contact Number

  • Hi nice video
    wanted to know where in the DHCP server do you see the client table lease?


  • Failed to start DHCPv4 Server Daemon . Help me

  • Love the way u teach sir!! Any chance you can do pxeboot with kickstart? For centos.. would highly appreciate but ur work is amazing nevertheless!!

  • n hn h

    Author Reply

    hi my server is runnig perfectly, but i have problem at client side. i want to ask if there is any setting or sometithnig that we need to do at client side? also i want to ask about centos client is it different user or different virtual machine? thanks

  • Super

  • Red hat Certified Engineer 🙂