Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Linux as a DHCP server 2

Status
Not open for further replies.

columb

IS-IT--Management
Feb 5, 2004
1,231
EU
I have a class c subnet - 137.223.168.0/24
The gateway is 137.223.168.1
Various servers have fixed addresses for 137.223.168.2, 137.223.168.3, 137.223.168.4 and 137.223.168.5
The 137.223.168.4 server is a RedHat Linux box.
I've created a dhcp.conf file which looks like
Code:
#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample
#
ddns-update-style interim;
ignore client-updates;

subnet 137.223.168.0 netmask 255.255.255.0 {
        option routers                  137.223.168.1;
        option subnet-mask              255.255.255.0;
        range dynamic-bootp 137.223.168.6 137.223.168.254;
        default-lease-time 21600;
        max-lease-time 43200;
}
However, when I try to start DHCP I get
Code:
[root@bnls681u etc]# service dhcpd start
Starting dhcpd: Internet Systems Consortium DHCP Server V3.0.1
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit [URL unfurl="true"]http://www.isc.org/sw/dhcp/[/URL]
Wrote 0 leases to leases file.
Listening on LPF/eth0/00:0a:e4:13:91:e0/137.223.168/24
Sending on   LPF/eth0/00:0a:e4:13:91:e0/137.223.168/24
Can't bind to dhcp address: Address already in use
Please make sure there is no other dhcp server
running and that there's no entry for dhcp or
bootp in /etc/inetd.conf.   Also make sure you
are not running HP JetAdmin software, which
includes a bootp server.

If you did not get this software from ftp.isc.org, please
get the latest from ftp.isc.org and install that before
requesting help.

If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help.

Please do not under any circumstances send requests for
help directly to the authors of this software - please
send them to the appropriate mailing list as described in
the README file.

exiting.
                                                           [FAILED]
What am I doing wrong?

Ceci n'est pas une signature
Columb Healy
 
Yes, there's no dhcp or bootp processes running.

Ceci n'est pas une signature
Columb Healy
 
Did you verify

Code:
and that there's no entry for dhcp or bootp in /etc/inetd.conf
[\code]

Can you plese post the output of 
"lsof -Pni" 
if you still believe something is wrong....?

D.E.R. Management - IT Project Management Consulting
[URL unfurl="true"]http://www.dermanagement.com/[/URL]
 
Code:
[root@bnls681u etc]# ls /etc/inetd.conf
ls: /etc/inetd.conf: No such file or directory
[root@bnls681u etc]# lsof -Pni
COMMAND    PID   USER   FD   TYPE DEVICE SIZE NODE NAME
sshd       882   root    3u  IPv6 103988       TCP 137.223.168.4:22->137.223.145.76:2721 (ESTABLISHED)
sshd       884 healyc    3u  IPv6 103988       TCP 137.223.168.4:22->137.223.145.76:2721 (ESTABLISHED)
ssh       1467   root    3u  IPv4 109521       TCP 137.223.168.4:38761->217.33.204.123:22 (ESTABLISHED)
sshd      1468   root    3u  IPv6 109554       TCP 137.223.168.4:22->137.223.145.76:3351 (ESTABLISHED)
sshd      1470 healyc    3u  IPv6 109554       TCP 137.223.168.4:22->137.223.145.76:3351 (ESTABLISHED)
ntpd      1672    ntp    4u  IPv4 111495       UDP *:123
ntpd      1672    ntp    5u  IPv6 111496       UDP *:123
ntpd      1672    ntp    6u  IPv4 111497       UDP 127.0.0.1:123
ntpd      1672    ntp    7u  IPv4 111498       UDP 137.223.168.4:123
ntpd      1672    ntp    8u  IPv4 111499       UDP 137.223.168.4:123
sshd      2041   root    3u  IPv6   5012       TCP *:22 (LISTEN)
sendmail  2094   root    3u  IPv4   5178       TCP *:25 (LISTEN)
homeagent 3279   root    1u  IPv4  15468       UDP 137.223.168.4:32775
homeagent 3279   root    2u  IPv4   8563       TCP *:443 (LISTEN)
homeagent 3279   root    7u  IPv4   8557       UDP *:500
homeagent 3279   root    8u  IPv4   8558       UDP *:434
homeagent 3279   root   10u  IPv4   8566       UDP *:7232
homeagent 3279   root   11u  IPv4   8567       TCP *:7232 (LISTEN)
homeagent 3279   root   12u  IPv4   8568       UDP *:7233
homeagent 3279   root   13u  IPv4   8569       UDP *:67
homeagent 3279   root   14u  IPv4   8570       UDP *:32771
homeagent 3279   root   15u  IPv4  22298       UDP 137.223.168.4:32786
homeagent 3279   root   16u  IPv4  24626       UDP 137.223.168.4:32793
homeagent 3279   root   17u  IPv4  15506       UDP 137.223.168.4:32778
homeagent 3279   root   18u  IPv4  24659       UDP *:32797
homeagent 3279   root   19u  IPv4  24629       UDP *:32794
homeagent 3279   root   20u  IPv4  22330       UDP 137.223.168.4:32789
homeagent 3279   root   21u  IPv4  24630       UDP *:32795
homeagent 3279   root   22u  IPv4  24657       UDP 137.223.168.4:32796
java      3324   root    5u  IPv4   8807       TCP *:8080 (LISTEN)
java      3324   root   12u  IPv4   9343       UDP *:6968
java      3324   root   15u  IPv4   9344       TCP 127.0.0.1:8005 (LISTEN)
java      3324   root   17u  IPv4  15400       UDP 137.223.168.4:7234
java      3324   root   18u  IPv4  15401       UDP 137.223.168.4:7235
[root@bnls681u etc]#
As I don't seem to have an inetd.conf where else should I be looking?
I've tried
Code:
[root@bnls681u etc]# grep dhcp *
dhcpd.conf:#   see /usr/share/doc/dhcp*/dhcpd.conf.sample
Binary file prelink.cache matches
readahead.early.files:/var/lib/dhcp/dhclient-eth0.leases
services:dhcpv6-client  546/tcp
services:dhcpv6-client  546/udp
services:dhcpv6-server  547/tcp
services:dhcpv6-server  547/udp
[root@bnls681u etc]#

Ceci n'est pas une signature
Columb Healy
 
When a machine boots up, if it's using DHCP it broadcasts to find the DHCP server, which responds giving IP and DNS info. Surely, you can only have one machine serving up DHCP leases on a network?

Perhaps it's not your box that is the problem - is another box on your network already running a DHCP service?

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Thanks pansophic - that explains it - have a star

Ceci n'est pas une signature
Columb Healy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top