Differences between revisions 13 and 14
Revision 13 as of 2017-12-10 23:57:16
Size: 1404
Comment:
Revision 14 as of 2017-12-11 00:00:07
Size: 1574
Comment:
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:
Before installing the DHCP server, make sure that you do not have other DHCP servers running on your network. It can cause hours of debugging. Before installing the DHCP server, make sure that you do not have other DHCP servers running on your network. It can cause hours of debugging. Also remember that switching off an existing DHCP server will cause all your devices to get new IP-adresses. Some devices may have to be rebooted to work properly again.

DHCP Primary

Network

We will give the DHCP primary a static IP-address. Edit /etc/networking/interfaces and make the following changes.

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static
        address 192.168.1.36
        network 192.168.1.0
        netmask 255.255.255.0
        broadcast 192.168.1.255
        gateway 192.168.1.1

Software

Before installing the DHCP server, make sure that you do not have other DHCP servers running on your network. It can cause hours of debugging. Also remember that switching off an existing DHCP server will cause all your devices to get new IP-adresses. Some devices may have to be rebooted to work properly again.

Install the DHCP server.

apt-get install isc-dhcp-server

Configure the server

Stop the server

service isc-dhcp-server stop

Choose Network Device

Edit /etc/default/isc-dhcp-server and set the dhcp server to run on eth0.

INTERFACESv4="eth0"

Get the DDNS update key

Copy your DDNS update key from the DNS Master and save it in /etc/dhcp/ddns-update.dnskey.

Edit dhcpcd.conf

Comment out all lines in /etc/dhcp/dhcpd.conf and add the following to the bottom of the file:

include "/etc/dhcp/ddns-update.dnskey";
include "/etc/dhcp/dhcpd.conf_primary";
include "/etc/dhcp/dhcpd.conf_subnet";
include "/etc/dhcp/dhcpd.conf_static";

Start the server

service isc-dhcp-server start

None: DHCP Primary (last edited 2021-03-15 21:24:19 by Kristian Kallenberg)