LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 07-28-2002, 03:52 PM   #1
AnthonyM
Member
 
Registered: Mar 2002
Location: Toronto, Ontario
Posts: 43

Rep: Reputation: 15
Question Installed DHCP on RH7.2, no dhcpd.conf file???


I just installed DHCP on my RedHat 7.2, and I noticed no dhcpd.conf file was created (the dhcpd.leases file is created in the /var/lib/dhcp directory, where I thought this file should either be in /etc or /var/dhcp).

Am I suppossed to create the dhcpd.conf file manually???



Thanks in advance.
 
Old 07-28-2002, 05:07 PM   #2
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
yes, you need to put one in /etc/
here is an example, a search for the howto will show you some more options...

server-identifier 192.168.0.1;
server-name "server";
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
option domain-name-servers 192.168.0.1, 192.168.1.1;
option domain-name "mydomain.net";

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.11 192.168.1.100;
}

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.11 192.168.0.100;
}
subnet 68.0.0.0 netmask 255.0.0.0 {
}

host fishdog {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address 192.168.0.2;
}

host wildthing {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address 192.168.0.3;
}

host spareparts {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address 192.168.0.4;
}

host firedragon {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address 192.168.0.5;
}

host firedragon {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address 192.168.0.6;
}
 
Old 07-28-2002, 05:12 PM   #3
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
if you leave out your internet subnet or any subnet that you do not want it to run on then start it like this

dhcpd eth1 eth2

you can put this mod in your init script, or just include the subnet like I did here...


subnet 68.0.0.0 netmask 255.0.0.0 {
}


with no range.
 
Old 07-28-2002, 05:14 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
if you read the dhcpd documentatino then you will see that it does tell you to make your own or use an example at /usr/share/doc/dhcpd/dhcp.conf or such like. always read the docs, it saves a lot of time...
 
Old 07-28-2002, 05:16 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
david, i've been fiddling with DHCP recently and been looking at the fixed addresses.... doesn't that kinda go to make DHCP a bit pointless in the first place to some extent? i guess all that info is put into one place but still.....
 
Old 07-28-2002, 05:17 PM   #6
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
I forgot to mention, you will need a dhcpd.leases file
like this...

touch /var/lib/dhcp/dhcpd.leases
 
Old 07-28-2002, 05:21 PM   #7
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
yes your right, however I like using dhcp for my laptops since I move around with them, and connect to dhcp servers. I also want them to have the same address when I connect at home so the /etc/hosts file is correct, and I know where they are.

If you never move the client then I guess it does make since to just set it static.
 
Old 07-29-2002, 02:47 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
have you any experience of setting dhcpd to do DNS updates? i know it's only dhpcd 3.0+ but i've not found any info on how to do it nicely...
 
Old 07-30-2002, 07:21 AM   #9
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
No, I have not. But I am using named, so the dns is on my server. I set the clients dns to my servers ip. Currently I use dhcpcd on my server, so the dns from my isp will update /etc/resolv.conf if it changes.
 
  


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
can't file dhcpd.conf vito_huang Linux - Networking 6 01-28-2005 07:04 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
dhcpd.master or dhcpd.conf rickg Linux - Networking 0 04-11-2002 03:34 PM


All times are GMT -5. The time now is 06:14 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration