Tip & How-To about Computers & Internet

DHCP Server configuration in Linux

Linux is a UNIX based operating system. It is a server operating system. REDHAT Linux is Enterprise version of Linux. Now a day's Most of corporate sectors use red hat Linux as server in their company because it is secure very much.

Full form of DHCP "Dynamic Host Configuration Protocol. DHCP server assigns IP addresses and other network configuration information like subnet mask, broadcast address, etc to computers on a network. The DHCP assignments are the following.

Lease Request: Client broadcasts their request to DHCP server with a source address of 0.0.0.0 and a destination address of 255.255.255.255.
IP lease offer: DHCP server replies with an IP address, subnet mask, network gateway, name of the domain, name servers, duration of the lease and the IP address of the DHCP server.

Lease Selection: Client receives offer and broadcasts to al DHCP servers that will accept given offer so that other DHCP server need not make an offer.

The DHCP server then sends an ack to the client. The client is configured to use TCP/IP. Lease Renewal: When half of the lease time has expired, the client will issue a new request to the DHCP server.

Installation of DHCP server: First of all while install the RedHat Linux enterprise version server be careful about the ports and the services must be turned on. To create DHCP server in Linux first download DHCP RPM package and install with "rpm-ivh" command. Where I have done it there I have create YUM server, so easily I have download and install it by YUM (yum install dhcp version). DHCP package will locate in /usr/share/doc/at Linux file system. I copied the DHCP's files from /usr/share/doc/ to /etc/dhcpd.conf.. Then I started to configure the dhcpd.conf file to route the DHCP server in there local network. I have open the configuration file with "vi" command. Then commented out the lines from "default gateway to option netbios" because system don't read the commented lines. After that I set the range of IP address in dynamic- bootp of their local assumption of system. I have change the "next-server" with the dhcp server name and have also change the fixed address with the dhcp server IP address (end range of dynamic IP). It is very easy job to configure DHCP server. After configure the .conf file of dhcp just turn on the service with "chkconfig" command and restart the dhcp service. After that entire job I reboot the system. And after rebooting of server I turned on the other client system. While startup the client system without static IP address all of those picked up IP from dhcp server and going on successfully. I have prefer the command line mode to do the total job.
The DHCP server configure file is following:

ddns-update-style interim
ignore client-updates

subnet 192.168.1.0 netmask 255.255.255.0 {
# The range of IP addresses the server
# will issue to DHCP enabled PC clients
# booting up on the network

range 192.168.1.201 192.168.1.220;
# Set the amount of time in seconds that
# a client may keep the IP address

default-lease-time 86400;
max-lease-time 86400;

# Set the default gateway to be used by
# the PC clients

option routers 192.168.1.1;
# Don't forward DHCP requests from this
# NIC interface to any other NIC
# interfaces

option ip-forwarding off;

# Set the broadcast address and subnet mask
# to be used by the DHCP clients

option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;

# Set the NTP server to be used by the
# DHCP clients

option ntp-servers 192.168.1.100;

# Set the DNS server to be used by the
# DHCP clients

option domain-name-servers 192.168.1.100;

# If you specify a WINS server for your Windows clients,
# you need to include the following option in the dhcpd.conf file:

option netbios-name-servers 192.168.1.100;

# You can also assign specific IP addresses based on the clients'
# ethernet MAC address as follows (Host's name is "laser-printer":

host laser-printer {
hardware ethernet 08:00:2b:4c:59:23;
fixed-address 192.168.1.222;
}
}
#
# List an unused interface here
#
subnet 192.168.2.0 netmask 255.255.255.0 {
}

Posted by on

Computers & Internet Logo

Related Topics:

Related Questions:

3 Answers

What is the difference between unix and linux


UNIX is a operating system which has only command user interface, and if the unix is installed in the system you cant install any other operating system after that ... one separate system must be allocated for the unix ...

LINUX is the graphical user interface and it supports multiple operating system ..

UNIX and LINUX are almost same, almost all commands which supports in UNIX supports in LINUX too .. with some extended features just like GUI(GRAPHICAL USER INTERFACE),SECURITY,MULTI USER,MULTI TASKING,etc

COMMAND USER INTERFACE - the input is made to the computer by using commands and the output is obtained by command or by printer ...

GRAPHICAL USER INTERFACE- the input is provided to the computer through the other input devices like mouse,joystick etc
the input is provided either by command or by the just clicking the mouse on the particular icon ...

example for graphical user interface is windows,Macintosh etc ...


thank you
bye
any doubts you can reply me
i am always here to assist you
please rate my solution

Aug 19, 2008 | Microsoft Windows Server Standard 2003 for...

2 Answers

redhat es5


This model was found not to be 64bit but 32bit.

May 18, 2008 | HP Compaq ProLiant DL380 G4 Server

Not finding what you are looking for?

194 people viewed this tip

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Loading...