dhcp server liuxLinux serverNETWORK ADMINISTRATIONS

Using Classes on ISC-DHCP-SERVER

HOw to use classes on ISC-DHCP-SERVER

Hi,

In this video I’ll show you how to use Classes on ISC-DHCP-SERVER to configure smaller pools for different clients.
I’ll be using Ubuntu Server for the ISC-DHCP-SERVER service, Ubuntu Desktop, Windows 10 and Tinycore as clients on this experiment.

You can get tinycore at:

http://tinycorelinux.net/downloads.html

####Here are the commands:

cd /etc/dhcp
nano dhcpd.conf

####The configuration:

class “UBUNTU” {
match if (substring(option host-name,0,6) = “UBUNTU”);
}

class “WINDOWS” {
match if (substring(option host-name,0,7) = “WINDOWS”);
}

class “TINYCORE” {
match if (substring(hardware,1,5) = 08:00:27:AA:AA);
}

subnet 10.10.0.0 netmask 255.255.255.0 {
pool {
range 10.10.0.11 10.10.0.20;
option subnet-mask 255.255.255.0;
option routers 10.10.0.254;
option domain-name-servers 1.1.1.1,8.8.8.8;
default-lease-time 1800;
max-lease-time 3600;
allow members of “UBUNTU”;
}
pool {
range 10.10.0.21 10.10.0.30;
option subnet-mask 255.255.255.0;
option routers 10.10.0.254;
option domain-name-servers 1.1.1.1,8.8.8.8;
default-lease-time 1800;
max-lease-time 3600;
allow members of “WINDOWS”;
}
pool {
range 10.10.0.31 10.10.0.40;
option subnet-mask 255.255.255.0;
option routers 10.10.0.254;
option domain-name-servers 1.1.1.1,8.8.8.8;
default-lease-time 600;
max-lease-time 1200;
allow members of “TINYCORE”;
}
}

####Starting the service and checking status:

systemctl restart isc-dhcp-server

systemctl status isc-dhcp-server

Please check my other videos and Playlist dedicated to DHCP for service installation.

#### Monitoring:

tcpdump -vv -i enp0s9 port 67
NOTE: adapt to your ethernet interface

dhcp-lease-list

Hope you have enjoyed this video. Please comment below. Thanks!

Regards,
Rodrigo Matias
LINUX TECH SCHOOL

source

by Linux Tech School

linux dhcp server

Alice AUSTIN

Alice AUSTIN is studying Cisco Systems Engineering. He has passion with both hardware and software and writes articles and reviews for many IT websites.

Leave a Reply

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