• WordPress
  • cPanel
  • Softaculous
  • KVM Virtualization
  • Vmware Virtualization
  • Proxmox
Sunday, June 15, 2025
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux
No Result
View All Result
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux

How to Set up DHCP Server on Arch Linux

in Arch Linux, Linux OS
How to Set up DHCP Server on Arch Linux

Dynamic Host Configuration Protocol (DHCP) is a crucial service for any network, as it automatically assigns IP addresses and other network configuration information to devices connected to the network. In this guide, we will walk you through the process of how to set up DHCP server on Arch Linux. Let’s get started!

Prerequisites

Before we dive into setting up the DHCP server, ensure that you have the following:

  1. An Arch Linux system with a static IP address
  2. Root or sudo privileges

How to Set up DHCP Server on Arch Linux

Update Your System

First, ensure your Arch Linux system is up to date by running the following command:

sudo pacman -Syu

Install the DHCP Package on Arch Linux

Install the ISC DHCP server package by executing:

sudo pacman -S dhcp

Configure the DHCP Server on Arch Linux

After installing the DHCP server package, you need to configure it. Open the /etc/dhcpd.conf configuration file with your favorite text editor:

sudo vim /etc/dhcpd.conf

Add the following configuration to the file, making sure to replace {subnet}, {netmask}, {range_start}, {range_end}, {broadcast}, {routers}, and {dns_servers} with the appropriate values for your network:

subnet {subnet} netmask {netmask} {
  range {range_start} {range_end};
  option broadcast-address {broadcast};
  option routers {routers};
  option domain-name-servers {dns_servers};
}

For example:

subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.100 192.168.1.200;
  option broadcast-address 192.168.1.255;
  option routers 192.168.1.1;
  option domain-name-servers 8.8.8.8, 8.8.4.4;
}

Save and close the file.

Configure the DHCP Server Interface on Linux

Next, you need to specify the network interface that the DHCP server will listen on. Open the /etc/conf.d/dhcpd file:

sudo vim /etc/conf.d/dhcpd

Add the following line, replacing {interface} with the appropriate network interface name:

DHCPD_ARGS="{interface}"

For example:

DHCPD_ARGS="enp0s3"

Save and close the file.

Enable and Start the DHCP Server on Linux

Enable the DHCP server to start automatically at boot:

sudo systemctl enable dhcpd.service

Start the DHCP server:

sudo systemctl start dhcpd.service

Verify that the DHCP server is running:

sudo systemctl status dhcpd.service

Configure the Firewall

If you have a firewall running on your Arch Linux system, you need to allow DHCP traffic. Check out our guide on how to configure the firewall on Arch Linux for detailed instructions.

Conclusion

Congratulations! You have successfully set up a DHCP server on Arch Linux. This will allow you to manage IP addresses on your network automatically, making it easier to add new devices and maintain the network.

If you’re interested in learning more about managing an Arch Linux server, check out these articles:

  • How to install and configure BIND DNS server on Arch Linux
  • How to set up a cron job on Arch Linux
  • How to install and configure Fail2ban on Arch Linux
ShareTweet
Previous Post

How to Install & Configure NTP on Arch Linux

Next Post

How to Set up SSH Keys on Rocky Linux

Related Posts

How to Install Tomcat on Rocky Linux

How to Install Apache Tomcat on Rocky Linux

How to Set up NTP Server on Rocky Linux

How to Set up NTP Server on Rocky Linux

How to Install Bacula Backup Server on Rocky Linux

How to Install Bacula Backup Server on Rocky Linux

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Golden Host VPS
  • Privacy Policy
  • Terms and Conditions
  • About Us
  • Contact Us

Copyright © 2023 linuxboost.com All Rights Reserved.

  • Privacy Policy
  • Terms and Conditions
  • About Us
  • Contact Us

Copyright © 2023 linuxboost.com All Rights Reserved.