How to Install DHCP Server in Ubuntu and Debian - Tech CCNA

Tech CCNA

Today E - Learning , is a best idea to study , therefore this website is best for network and network security concepts.

Breaking

Post Top Ad

Responsive Ads Here

Thursday, 4 January 2018

How to Install DHCP Server in Ubuntu and Debian

How to Install a DHCP Server in Ubuntu and Debian | Tech CCNA

Install a DHCP Server in Ubuntu and Debian


Before you start

Objectives : You will be able to configure DHCP server on your machine.
Prerequisites: You have to know the basic of DHCP Server.
Tags : DHCP Server, isc-dhcp-server, ubuntu , mint .

Understanding working of DHCP


DHCP stand for Dynamic Host Configuration Protocol, which is used to provide IP addresses of a specific range to client or user of our organization. DHCP used port 67/68 of UDP. So, now we will configure it step by step. Follow the following instructions to configure it in your machine.

http://www.learn-networking.in

Steps to configure DHCP Server:


Before installing ISC-DHCP-SERVER, we have to update our system :
sudo apt-get update

Now install ISC-DHCP-SERVER
sudo apt-get install isc-dhcp-server
http://www.learn-networking.in

Now configure our Network Interface with static IP:
sudo nano /etc/network/interface
http://www.learn-networking.in

auto ens38
iface ens38 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

Now, define this interface to listing dhcp discover messages :
sudo nano /etc/default/isc-dhcp-server
http://www.learn-networking.in

Now, configure /etc/dhcp/dhcpd.conf file, and define all the parameters which is used by DHCP service.
sudo nano /etc/dhcp/dhcpd.conf

option domain-name "www.learn-networking.in";
option domain-name-servers ns1.learn-networking.lan, ns2.learn-networking.lan;
default-lease-time 3600;
max-lease-time 7200;
authoritative;

subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.100;
option subnet-mask 255.255.255.0;
option domain-search "VIKASH KAUSHIK";
option domain-name-servers 192.168.1.100;
range 192.168.1.10 192.168.1.100;
range 192.168.1.110 192.168.1.200;
}

Now, restart the service of DHCP and verify our service is working or not:
Now, we have done our configuration and have to check the configuration status. We will find DHCP server status from following commands:
sudo service isc-dhcp-server restart sudo service isc-dhcp-server status
http://www.learn-networking.in

Finally, we verify DHCP on our client machine (i.e. Windows XP).
http://www.learn-networking.in
Hence, our Linux DHCP server works fine and it deals with all the client which request for IP address from it.

No comments:

Post a Comment

Pages