How to Install and Setup DHCP Server on Fedora 29/Fedora 28/CentOS 7

|
Last Updated:
|
|

Ubuntu 18.04 Client

sudo vim /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      dhcp4: yes
Apply the changes and check the IP address.
sudo netplan apply
ip add
...
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:15:b4:72 brd ff:ff:ff:ff:ff:ff
    inet 192.168.43.155/24 brd 192.168.43.255 scope global dynamic enp0s3
       valid_lft 436sec preferred_lft 436sec
    inet6 fe80::a00:27ff:fe15:b472/64 scope link 
       valid_lft forever preferred_lft forever
 

Fedora 29 Client

Set the interface to obtain IP address automatically.
nmcli connection modify enp0s8 ipv4.method auto
nmcli connection down enp0s8
nmcli connection up enp0s8
Check the IP address
ip add
...
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:df:3b:07 brd ff:ff:ff:ff:ff:ff
    inet 192.168.43.100/24 brd 192.168.43.255 scope global dynamic noprefixroute enp0s8
       valid_lft 514sec preferred_lft 514sec
    inet6 fe80::3725:59fe:44a3:c665/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
Huraay!! You have successfully set up your DHCP server on.

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
koromicha
I am the Co-founder of Kifarunix.com, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others".

Leave a Comment