Friday, May 8, 2009

DHCP Server under Ubuntu 5:10

DHCP or the representative of the Protocol, Dynamic Host Configuration. Dynamic is actually a word can represent everything. If we are already familiar in the Linux Networking may be able to easily understand the meaning and purpose in it? DHCP Server.
I was originally still apply for pengalamatan Static Address in the office where I work. But with the growing number of PC, and to improve security. Finally, the DHCP can be a very good alternative. With DHCP Admin does not need to set one at a computer user with a static address. Let DHCP-Server that provides an address in accordance with the given range. From the side, of course, security configuration is more secure, because users will not be able to change the IP manually, and if the user deliberately alter IP then it will not be able to communicate with the network. Try following the tutorial I describe the configuration of my life. The levels are for BASIC Users like me. The packages needed are:
-Operating System: Ubuntu Breezy Badger 5:10
- DHCP Server: DHCP3
Phase Installasi and Configuration
If you already have a Ubuntu box then you need to do is simply install the DHCP package only. I use DHCP the DCP is version 3. to install run the following command:
# Sudo apt-get install dhcp3-server
wait until the process is complete, then edit the configuration file dhcp3-server in the directory / etc / default / to run the command:
# Sudo Vi / etc/default/dhcp3-server
Find the line that contains interfaces = "" then change to:
Interfaces = "eth0" (or Ethernet depending on where you will use, but if there is only 1 ethernet then type the default eth0)
Next stages of change is that there is a dhcpd.conf file in the directory / etc/dhcp3, by running the following command:
# Sudo Vi / etc/dhcp3/dhcpd.conf
Find the command line:
# Option definitions common to all supported networks ...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
Then change to:
# Option definitions common to all supported networks ...
# option domain-name "example.org";
# option domain-name-servers ns1.example.org, ns2.example.org;
# default-lease-time 600;
# max-lease-time 7200;
Then search again the following command 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;
#)
And change them to:
# A slightly different configuration for an internal subnet.
subnet 192.168.0.0 netmask 255.255.255.0 (# subnet is a range of IP which you use, in the example I use a range of IP Class C
range 192.168.0.1 192.168.0.254; # Range is a range of IP addresses used in the example I use a range of IP class C address with the range 1-254)
option domain-name-servers 202.188.0.133, 202.188.1.5; DNS # that you use, commas to enter secondary DNS
option domain-name "micokelana.com" # Name of the DHCP Server
option routers 192.168.0.1; # It is the gateway we need to connect to the internet
option broadcast-address 192.168.0.255; # It is the address for the Broadcast
default-lease-time 600;
max-lease-time 7200;
)
If you want every user to get a fixed IP, for example, user 1 will get a fixed IP 192.168.0.2, then you must add the following command:
Find the line:
# Fixed IP addresses can also be hosts for Specified. These addresses
# Should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been Specified can boot using
# BOOTP or DHCP. Hosts for which no fixed address is Specified can only
# Be Booted with DHCP, unless there is an address range on the subnet
# To which a BOOTP client is connected which has the dynamic-bootp flag
# Set.
# (host Fantasia
# Hardware ethernet 08:00:07:26: c0: a5;
# Fixed-address fantasia.fugue.com;
#)
Then you can configure the network in accordance with your place, I give the following examples:
User1 host (
hardware ethernet 08:00: FE: 26: c0: a5; # type the MAC Address User1
fixed-address 192.168.0.2; # IP address User1
)
With so Users will always have 1 IP 192.168.0.2
Do not forget to save the configuration that you created, and then restart the DHCP Server with the command:
Sudo # / etc / init.d / dhcp-server restart
The next step to adjust your stay and the number of computers on the network configuration that you create. And to experiment you can observe each line in the dhcpd.conf file, the overall configuration files are provided an explanation for the slightly less

Reference:
http://www.ubuntulinux.org
http://www.linuxhomenetworking.com

No comments:

Post a Comment