Selasa, 11 November 2014

DHCP Configuration


What is Dynamic Host Configuration Protocol (DHCP)?

Dynamic Host Configuration Protocol (DHCP) is network protocol for automatically assigning TCP/IP information to client machines. Each DHCP client connects to the centrally-located DHCP server which returns that client's network configuration including IP address, gateway, and DNS servers.


Let's get started.

in terminal as root, type:
apt-get install isc-dhcp-server

Unable to locate package isc-dhcp-server

If the message appears, it indicates that the package is not available in DVD1 Debian 7.2.
what should we do to deal with this problem.
I suggest to replace the debian repository to local server Indonesia.



change the repository to a local server Indonesia.
 nano /etc/apt/sources.list

then on the bottom line, add the following list:

deb http://kambing.ui.ac.id/debian/ wheezy main non-free contrib
deb-src http://kambing.ui.ac.id/debian/ wheezy main non-free contrib
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free 
 


Then save and exit by pressing Ctrl + X on the keyboard

Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?
answer yes bay pressing y on keyboard.

Connect your PC to internet.

Then, on the terminal type:
apt-get update

after the update process is complete, then typing the command 

apt-get install isc-dhcp-server

system will start to download the package.

done.


after the package dhcp server is installed, the next step is to edit the following files:  /etc/dhcp/dhcpd.conf

look for the following line:

# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
#  range 10.5.5.26 10.5.5.30;
#  option domain-name-servers ns1.internal.example.org;
#  option domain-name "internal.example.org";
#  option routers 10.5.5.1;
#  option broadcast-address 10.5.5.31;
#  default-lease-time 600;
#  max-lease-time 7200;
#}

 
 

edit like the following :
# A slightly different configuration for an internal subnet.
subnet 192.168.100.0 netmask 255.255.255.0 {
range 192.168.100.100 192.168.100.200;
option domain-name-servers 192.168.100.1, 192.168.60.254;
option domain-name "stemsanet.net";
option routers 192.168.100.1;
option broadcast-address 192.168.100.255;
default-lease-time 600;
max-lease-time 7200;

}

Then save and exit by pressing Ctrl + X on the keyboard
Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?
answer yes bay pressing y on keyboard.
done.

the next step is to edit the following files:  /etc/default/isc-dhcp-server
look for the following line:
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES=""


edit like the following :
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth1"


Then save and exit by pressing Ctrl + X on the keyboard
Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?
answer yes bay pressing y on keyboard.

done.

Starting the DHCP server.
on the terminal type:

/etc/init.d/isc-dhcp-server start



In Client PC/Laptop, open Local Area Connection.

  DONE.

Tidak ada komentar:

Posting Komentar

Related Posts Plugin for WordPress, Blogger...