LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-16-2010, 11:33 PM   #1
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 610

Rep: Reputation: 31
How to configure DHCP Server in Red Hat Linux ?


Hi,
I want to create a dedicated DHCP server in Red Hat Linux for a small office with a private range from 192.168.1.10 to 192.168.1.20

Kindly can u tell me the steps by which I may implement DHCP server.

thanks
garden

Last edited by gardenair; 04-16-2010 at 11:38 PM.
 
Old 04-17-2010, 01:12 AM   #2
kainosnous
Member
 
Registered: Mar 2010
Location: Tennessee, USA
Distribution: Arch, Fedora
Posts: 59

Rep: Reputation: 18
You might consider reading a few tutorials on the subject. They are rather numerous. This is the first Google result I got: http://www.yolinux.com/TUTORIALS/DHCP-Server.html

Basically, you will need to download the dhcp package. Then, you will want to edit the dhcp.conf file. Your subnet will likely be 192.168.1.0 with a netmask of 255.255.255.0 although that depends on your network (From the range that you specified you could also have a netmask of 255.255.255.224). The range option would simply be "range 192.168.1.10 192.168.1.20". You will want to pay attention to "option routers" for the gateway.

Once you edit the file, be sure to restart the dhcp server.
 
Old 04-17-2010, 02:45 AM   #3
vickey_n
LQ Newbie
 
Registered: Nov 2009
Posts: 21
Blog Entries: 1

Rep: Reputation: 3
Configure linux dhcp server step by step guide example and implementation

Hi garden

I found a best article on

How to configure linux dhcp server step by step guide Example and Implementation


Here

http://computernetworkingnotes.com/r...hcp_server.htm


Use this step by step guide to configure dhcp for network you specify


DHCP, or Dynamic Host Configuration Protocol, allows an administrator to configure network settings for all clients on a central server.

The DHCP clients request an IP address and other network settings from the DHCP server on the network. The DHCP server in turn leases the client an IP address within a given range or leases the client an IP address based on the MAC address of the client's network interface card (NIC). The information includes its IP address, along with the network's name server, gateway, and proxy addresses,including the netmask.

Read complete
http://computernetworkingnotes.com/r...hcp_server.htm

Last edited by vickey_n; 04-17-2010 at 02:50 AM.
 
Old 04-17-2010, 08:47 AM   #4
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 610

Original Poster
Rep: Reputation: 31
thanks for such kind of site. well is there any book in which I can study more about Linux DHCP . If I may say any book about Red Hat,Fedora CenOS book related to networking topic then it will be more clear.

again thanks a lot for the nice help.
 
Old 04-17-2010, 11:31 AM   #5
Fabio Paolini
Member
 
Registered: Dec 2008
Location: Brazil
Distribution: Slackware 12 Debian 5
Posts: 52

Rep: Reputation: 17
It would be a good stating point if you use the above links and then try a first dhcp configuration and if it does not work then you post here your configuration files and some error logs.

About books, if you take a look at the default dhcpd.conf file you will probably find some usefull informations and examples.


My dhcpd.conf is like that:
Code:
subnet 192.168.1.0 netmask 255.255.255.0 {
  option broadcast-address 192.168.1.255;
  option domain-name-servers 192.168.1.1, 208.67.222.222,208.67.220.220;
  option domain-name "portal-local  ";
  option routers 192.168.1.1;   #The gateway of the lan
  range 192.168.1.40 192.168.1.100; # 
  }
This is the most important part of the dhcpd.conf file. You need just to adjust it to your system and then, of course, restart your dhcp server.

Last edited by Fabio Paolini; 04-17-2010 at 11:44 AM.
 
Old 04-18-2010, 10:01 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
http://www.linuxtopia.org/online_boo...ion/index.html
http://www.linuxhomenetworking.com/
 
Old 04-19-2010, 02:23 AM   #7
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 610

Original Poster
Rep: Reputation: 31
thanks fo the reply. well when I type on the following it show the result as

[root@pc1~]#rpm -qa dhcp
[root@pc1~]#

It just show me the prompt.I think the dhcp is not installed .Please let me guide that how may I install DHCP in the machine ?
 
Old 04-19-2010, 03:49 AM   #8
bakdong
Member
 
Registered: Apr 2009
Posts: 214

Rep: Reputation: 44
Install it, configure it, start and test. Check the start up scripts to make sure it starts on reboot.

Look at yum to install, or just install from the install media using rpm -i path/to/dvd/dhcp.....
Read the man page for configuration instructions: man dhcpd, info dhcpd

The Linux Documentation Project is also a valuable source of information and 'howtos': tldp.org

Come back here if you get problems you can't sort out yourself.
 
Old 04-19-2010, 04:07 AM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally Posted by gardenair View Post
thanks fo the reply. well when I type on the following it show the result as

[root@pc1~]#rpm -qa dhcp
[root@pc1~]#

It just show me the prompt.I think the dhcp is not installed .Please let me guide that how may I install DHCP in the machine ?
Try
Code:
rpm -qa | grep -i dhcp
Before venturing into server setups, maybe you should
try to get a handle on how to install things in your
distro, how to check what's installed, and so forth?

How about a RedHat bible?

Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure Red Hat Linux as a server gschrade Red Hat 3 10-29-2003 01:32 PM
How to configure Remote Access Server using Red Hat Linux 7.2 suraj Linux - Networking 1 07-22-2002 04:08 AM
What are the client and server programs in Red Hat Linux for DHCP services? thatgentleman Linux - General 1 03-22-2002 11:20 PM
Configure Red Hat 7.2 Workstation as DHCP Client eboggess Linux - Networking 4 01-18-2002 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration