DHCP Server on Mint

$ sudo apt install isc-dhcp-server
[sudo] password for adull: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  isc-dhcp-server-ldap
The following NEW packages will be installed:
  isc-dhcp-server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 381 kB of archives.
After this operation, 864 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian/ jessie/main isc-dhcp-server amd64 4.3.1-6+deb8u2 [381 kB]
Fetched 381 kB in 10s (38.1 kB/s)                                                                                                                                      
Preconfiguring packages ...
Selecting previously unselected package isc-dhcp-server.
(Reading database ... 122029 files and directories currently installed.)
Preparing to unpack .../isc-dhcp-server_4.3.1-6+deb8u2_amd64.deb ...
Unpacking isc-dhcp-server (4.3.1-6+deb8u2) ...
Processing triggers for systemd (215-17+deb8u7) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up isc-dhcp-server (4.3.1-6+deb8u2) ...
Generating /etc/default/isc-dhcp-server...
Job for isc-dhcp-server.service failed. See 'systemctl status isc-dhcp-server.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
Processing triggers for systemd (215-17+deb8u7) ...
$ sudo nano /etc/default/isc-dhcp-server

     INTERFACES=""
to
     INTERFACES="eth0"
$ sudo nano /etc/dhcp/dhcpd.conf

#Network : 192.168.10.0/24
#Range : 192.168.10.10 ( Starting IP ) – 192.168.10.100 ( Ending IP )
#Gateway : 192.168.10.1
#Primary DNS : 192.168.10.1
#Sec DNS : 8.8.4.4

subnet 192.168.10.0 netmask 255.255.255.0 {  #network
 range 192.168.10.10 192.168.10.100; # Range
 option domain-name-servers 192.168.10.1, 8.8.4.4; #Pri DNS , Sec DNS
 option domain-name "nano.in.th"; #Domain name
 option routers 192.168.10.1; #Gateway
 option broadcast-address 192.168.10.255; #Broadcast
 default-lease-time 600;
 max-lease-time 7200;
}
$ sudo nano /etc/network/interfaces

allow-hotplug eth0
iface eth0 inet static
	address 192.168.10.1
	netmask 255.255.255.0
	network 192.168.10.0
	broadcast 192.168.10.255
	gateway 192.168.10.1
	dns-nameservers 8.8.4.4
	dns-nameservers 192.168.0.1
	dns-nameservers 192.168.10.1
	dns-search nano.in.th
$ sudo service isc-dhcp-server restart
Advertisements

About NanoSoftTech

NanoSoftTech
This entry was posted in Debian, Linux Mint. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s