Home | Contact | About    
How to: DHCP (Fedora Core 32)
 

DHCP Server

 
 

The DHCP server in Fedora Core 32 is part of the "Network Servers" package group. It also is available as a stand-alone package called dhcp-server. (DHCP client is covered further below.)

 
 
 

1)
To install:
[root@localhost ~]# dnf install dhcp-server --allowerasing

The "yum" command could also be used in place of "dnf". In either case, the option "--allowerasing" lets old packages be removed in order to resolve dependencies.

 
 

2)
Once installed, you will need to edit the configuration file:
[root@localhost ~]# vi /etc/dhcp/dhcpd.conf

("vim" could also be used to edit if it's installed. I prefer it. "vim" is found in the "vim-enhanced" and "vim-X11" packages).

 
 

3)
You will now need to add the following lines into your file. Change "practice.com" into your actual domain name and 192.168.1.# into your actual IP addresses.

Note: the "standard" ddns-update-style is the current preference for new installations. If you are needing backward compatibility for older installations, use the "interim" style.

Lines end with a ; (semicolon) except where brackets { } are used. Comments are preceeded by a # (number / hashtag) sign.

default-lease-time 43200;   #12 hours
max-lease-time 691200;    #8 days
 
ddns-update-style stardard;   #Preferred; use interim for backward compatibility
 
ignore client-updates;
 
subnet 192.168.1.0 netemask 255.255.255.0 {
     authoritative;
     range 192.168.1.50 192.168.1.248   #can be wider or narrower if desired
     option subnet-mask 255.255.255.0;
     option broadcast-address 192.168.1.255;
     option routers 192.168.1.1;
     option domain-name-servers 192.168.1.10, 192.168.1.11;
     option domain-name "practice.com";
}
 
# Avoid conflict with automatic private IP addressing
subnet 169.0.0.0 netemask 255.0.0.0 {
     not authoritative;
}

Save the file, and exit.

 
 

4)
If the firewall is running (firewalld), and it probably is, the dhcp protocol needs to be allowed to pass through:
[root@localhost ~]# firewall-cmd --permanent --add-service=dhcp
[root@localhost ~]# firewall-cmd --reload
[root@localhost ~]# firewall-cmd --list-services

 
 

5)
Finally, enable the service allowing it to both restart now and on re-boot:
[root@localhost ~]# systemctl enable --now dhcpd

The process should now be complete, and your dhcp server should be successfully running!

 
 

DHCP Client

 
 

As with the server in Fedora Core 32, the client is available as a package called dhcp-client, and the first step is installation.

 
 

1)
To install:
[root@localhost ~]# dnf install dhcp-client --allowerasing

Again, the "yum" command could also be used in place of "dnf". In either case, the option "--allowerasing" lets old packages be removed in order to resolve dependencies.

 
 

2)
Configure:
[root@localhost ~]# nmcli connection modify eth0 ipv4.method auto
[root@localhost ~]# nmcli connection down eth0; nmcli connection up eth0

Be sure to replace "eth0" with the exact network interface reference used by your machine (e.g. enp1s0).
If you are not sure how the network interface is labeled, run the "ifconfig -a" command to see available interfaces.

 
 

 

Copyright © 2002,2020 FatFreddiesWeb.net All Rights Reserved

  Fat Freddie's Web Logo  
  651-771-9209  
  Pricing Information  
  Previews & Samples  
  FAQ's  
  How to Pages  
 
What makes Freddies different from all of the rest?