1828408 Members
4170 Online
109977 Solutions
New Discussion

DHCP server problem

 
SOLVED
Go to solution
NiCK_76
Respected Contributor

DHCP server problem

I have dhcp server on sles8 box. 2 nic , one for internet and another one for intranet. Dhcpd service is running. But I can get ipaddress form client box. What's wrong?
My dhcpd.conf as following:
option domain-name "heming.org";
option domain-name-servers 211.167.97.200, 211.167.97.67;
option routers 192.168.0.254;
ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;

log-facility local7;
subnet 221.137.12.0 netmask 255.255.252.0 {
}

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
}

Result of ifconfig
eth0 Link encap:Ethernet HWaddr 00:40:05:43:CB:22
inet addr:221.137.12.173 Bcast:255.255.255.255 Mask:255.255.252.0
inet6 addr: fe80::240:5ff:fe43:cb22/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:115033 errors:0 dropped:0 overruns:0 frame:0
TX packets:22620 errors:0 dropped:0 overruns:0 carrier:0
collisions:592 txqueuelen:100
RX bytes:30584325 (29.1 Mb) TX bytes:9187164 (8.7 Mb)
Interrupt:12 Base address:0xe000

eth1 Link encap:Ethernet HWaddr 00:E0:4C:10:48:B8
inet addr:192.168.0.254 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:4cff:fe10:48b8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:23469 errors:0 dropped:0 overruns:0 frame:0
TX packets:27182 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:9377984 (8.9 Mb) TX bytes:25206296 (24.0 Mb)
Interrupt:10 Base address:0xb000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
just for fun
3 REPLIES 3
Richard Allen
Frequent Advisor

Re: DHCP server problem

It would be interesting to see what dhcpd logs to the syslog on startup.

However, I think your dhcpd looks a little bit empty. Here's mine for comparison.
I am using Dynamic DNS updates and support RIS installs via a M$ RIS server so It's a bit complex but I hope it will help.


ddns-update-style ad-hoc;
ddns-domainname "blah.is";
authoritative;
pid-file-name "/var/run/dhcp.pid";

subnet 10.1.0.0 netmask 255.255.0.0 {
authoritative;
ddns-update-style ad-hoc;
ddns-domainname "blah.is";
option domain-name "blah.is";
option domain-name-servers 10.1.1.12, 10.1.1.8;
option routers 10.1.254.254;
option subnet-mask 255.255.0.0;
option broadcast-address 10.1.255.255;
option time-offset 0;
option ntp-servers 10.1.1.8, 10.1.1.12;
default-lease-time 604800;
max-lease-time 2592000;
range 10.1.11.1 10.1.11.254;
filename "oschooser\\i386\\startrom.com";
next-server 10.1.1.58;
}

zone blah.is. {
primary 10.1.1.12;
}

zone 11.1.10.in-addr.arpa. {
primary 10.1.1.12;
}
Thomas Bianco
Honored Contributor
Solution

Re: DHCP server problem

noticed your External facing interface is Eth0, and yout internal interface is Eth1, this is the reverse of triditional, as you want errant services to speak inwards first.

i'd grab me up a copy of ethereal and listen for DHCP traffic on the client. if you can't see the server sending a respose, then it might be pointing to the wrong interface.

been a long time since i set up a DHCP server on linux, so i might be missing something here.
There have been Innumerable people who have helped me. Of course, I've managed to piss most of them off.
NiCK_76
Respected Contributor

Re: DHCP server problem

Useful info from Thomas Bianco.
Setup Eth0 as internal interface and Eth1 as external interface.
just for fun