LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-16-2004, 10:02 AM   #1
vito_huang
Member
 
Registered: Oct 2004
Posts: 68

Rep: Reputation: 15
can't file dhcpd.conf


i want to configure an DHCP server, but i can not find the dhcpd.conf, also i use command service dhcpd status, it return nothing, is't means i have install dhcp??however i can still have the manpage for dhcp
 
Old 12-16-2004, 11:08 AM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
the file is usually located at /etc/dhcpd.conf... if you don't have it and you're sure dhcpd is installed, try creating it and populating it with a googled example... it weird, though, cuz the file is usually created when you install the dhcpd package...

you'll also need a lease file, which unlike the conf file, is usually NOT there by default... to create the empty lease file do a:

Code:
touch /var/state/dhcp/dhcpd.leases
your state directory might vary depending on your distro... what distro are you using??

you can check if dhcpd is running like this:

Code:
ps aux | grep dhcpd
you can start it by using the command "dhcpd" followed by the interface you want it to listen on... for example:

Code:
dhcpd eth1
 
Old 01-27-2005, 03:19 AM   #3
drhonez
LQ Newbie
 
Registered: Sep 2004
Posts: 3

Rep: Reputation: 0
you have to create the dhcpd.conf file in /etc.
very simple example:

ddns-update-style ad-hoc;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.5 192.168.1.10;
}


-thats it, create this file and then run 'service dhcpd start' and see if you get any errors, check your client ip address, you may have restart the network on the client so it'll pick up the new ip between 1 and 10.
 
Old 01-27-2005, 05:43 AM   #4
hardcorelinux
Member
 
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183

Rep: Reputation: 31
Is there any sample configuration file like all other services
 
Old 01-28-2005, 02:57 AM   #5
drhonez
LQ Newbie
 
Registered: Sep 2004
Posts: 3

Rep: Reputation: 0
what exactly do mean by 'all other services'?????????? there are config files all throughout /etc.
 
Old 01-28-2005, 05:35 AM   #6
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 296

Rep: Reputation: 31
There is a sample dhcpd.conf file. I think its in /usr/share/doc/dhcp3xxxx/
Search for it, its definately there. Copy and edit it to suit your needs, its much easier.
 
Old 01-28-2005, 07:04 AM   #7
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
here's a simple dhcpd.conf example, it's all pretty straight-forward:

Code:
ddns-update-style none;
subnet 192.168.0.0 netmask 255.255.255.0 {
        option routers 192.168.0.1;
        option subnet-mask 255.255.255.0;
        option domain-name "whatever.dom";
        option domain-name-servers 192.168.0.1;
        option broadcast-address 192.168.0.255;
        range 192.168.0.201 192.168.0.254;
        default-lease-time 43200;
        max-lease-time 86400;
        }
and if you'd wanna assign certain IPs to certain MAC addresses:

Code:
ddns-update-style none;
subnet 192.168.0.0 netmask 255.255.255.0 {
        option routers 192.168.0.1;
        option subnet-mask 255.255.255.0;
        option domain-name "whatever.dom";
        option domain-name-servers 192.168.0.1;
        option broadcast-address 192.168.0.255;
        range 192.168.0.201 192.168.0.254;
        default-lease-time 43200;
        max-lease-time 86400;

        host admin {
        hardware ethernet 0e:e0:09:06:55:69;
        fixed-address 192.168.0.100;
        option host-name "admin";
        }

        host dumbo {
        hardware ethernet 07:7c:76:5e:6e:78;
        fixed-address 192.168.0.101;
        option host-name "dumbo";
        }

        }
 
  


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
dhcpd subnet declaration problems in dhcpd.conf vcrispo Linux - Networking 6 07-15-2005 10:32 AM
dhcp.conf or dhcpd.conf? rogerbennett Linux - Networking 3 09-03-2003 12:25 PM
need help with dhcpd.conf file running two nics hwb0014 Linux - Networking 4 08-28-2002 11:47 AM
Installed DHCP on RH7.2, no dhcpd.conf file??? AnthonyM Linux - Networking 8 07-30-2002 07:21 AM
dhcpd.master or dhcpd.conf rickg Linux - Networking 0 04-11-2002 03:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:31 AM.

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
Open Source Consulting | Domain Registration