LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Help with DHCP server (https://www.linuxquestions.org/questions/linux-networking-3/help-with-dhcp-server-356025/)

Hambone_20003 08-22-2005 11:38 PM

Help with DHCP server
 
Hi I have been working with linux for sometime now however i still do not know everything that there is to know. I am trying to setup a DHCP server on Debian Sarge. I have all of the files that I think I need. They are as follows /etc/dhcpd.conf, /etc/dhcpd.leases and /etc/dhcpd.leases~. I have edited my dhcpd.conf file to look as follows

default-lease-time 21600;
max-lease-time 21600;
option domain-name-servers 63.167.144.2, 63.167.144.3;
option domain-name "netecin.net";
authoritative;

subnet 72.29.56.0 netmask 255.255.255.0 {
range 72.29.56.16 72.29.56.254;
option routers 72.29.56.1;
option subnet-mask 255.255.255.0;
option broadcast-address 72.29.56.255;
}

subnet 72.29.58.0 netmask 255.255.255.0 {
}

I had to add the subnet of 72.29.58.0 because that was the range that my server was on. If I did not have this I was unable to get the dhcp service to start. I am just doing this to test and see if I can get a dhcp server running. To start the dhcp service this is what I type /usr/sbin/dhcpd and it tells me that the dhcp server is started and listening on eth0 and sending on eth0. However I am unable to get my M$ machine to pull an address from the server. I have the server plugged into a switch as well as the M$ machine but no luck. I don't know if I have forgotten to edit something or put something in. Any help would be greatly appreciated. I am stumped as of right now. Also if someone could tell me what i need to edit to make the server start dhcp on boot I would appreciate that. Thanks in advance.

Nathanael 08-23-2005 03:06 AM

which dhcp server are you running?
can you also post how many interfaces you have, if they are bridged, and what ipaddresses they have? basically a 'ifconfig' should do the job :-)
for dhcp3 i only know following:

you need to know which interface it is supposed to be serving the dhcp offers on (in my example eth1, assuming eth2 goes to the internet)
then eth1 must have an address in this range 72.29.56.0/24
also, if you have a look in /etc/default/dhcp3-server you have the option of limiting the dhcp server to a physical device, specified by a device name, not the subnet range.

run 'cat -f /var/log/syslog' while you start up the dhcp server,
and have 'iptraf' running while you send out a dhcp request from you MS machine.

make sure syslog holds no errors for dhcp when starting the service, some of the notes in there can be pretty helpful

Hambone_20003 08-23-2005 09:04 AM

Thanks for getting back to me. I actually have two interfaces on this particular server but when I do ifconfig I only get eth0 which is fine for me I don't really need the other nic at the moment. They are not bridged togther. Internet Software Consortium DHCP server 2.0p15 is the type of server that I am running. If you need any more info please let me know. Also eth0 is fine and that is where the server says that it is pushing the information out of eth0

Nathanael 08-23-2005 09:38 AM

what ip address does eth0 have?

Hambone_20003 08-23-2005 12:18 PM

Thank you for your help I got it up and running and it is working great. I actually went into my /etc/default and then changed dhcp file to say eth0 and it brought everything up. So I appreciate your help. I thank you for taking your time to get me through this.


All times are GMT -5. The time now is 08:03 PM.