LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-03-2017, 04:12 AM   #1
jhkim
LQ Newbie
 
Registered: Jan 2017
Posts: 2

Rep: Reputation: Disabled
dhcp no free leases error


Hi
kernel 2.6.32.13 ...
dhcpd server faill... T_T
faill messages is daemon.err dhcpd: DHCPDISCOVER from 80:4e:81:2b:24:d7 via wlan0: network 192.168.4.0/24: no free leases.

my dhcpd.conf is
ddns-update-style none;
default-lease-time 10800;
max-lease-time 12000;
log-facility local7;
subnet 192.168.4.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.4.3 192.168.4.254;
option domain-name-servers 8.8.8.8;
option domain-name "hitek.com";
option routers 192.168.4.1;
option subnet-mask 255.255.255.0;

}

wlan0 setting

ip : 192.168.4.1
Bcast:192.168.4.255
Mask:255.255.255.0

route
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.4.0 * 255.255.255.0 U 0 0 0

dhcpd.leases~, dhcpd.leases path : /var/lib/dhcp/


Please help me with this problem.
 
Old 01-03-2017, 01:19 PM   #2
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: Devuan+lxde
Posts: 656

Rep: Reputation: 190Reputation: 190
It sounds like the leases created between whatever connects to your network and router and are set to never expire. Can't really give you much advice knowing only your systems kernel. I'd check router settings
 
Old 01-03-2017, 11:31 PM   #3
jhkim
LQ Newbie
 
Registered: Jan 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
route setting is " route add -net 192.168.4.0 gw 192.168.4.1 netmask 255.255.255.0 dev wlan0"
but i do not get ip. so this problem occurred.
 
Old 01-04-2017, 12:26 AM   #4
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
By any chance, does what this says help? (maybe not: mixed up client vs. server!)
(minor fyi: if you *edit* your Title to have dhcpd [instead of dhcp], the "Similar Threads" at bottom of this page, might be more on-target)

There might be something from a web-search of: dhcpd "no free leases" fix|solve*
(plus, the search results might add advice on exactly what info to post here; note the # icon [may need 'GoAdvanced] to pretty-post 'CODE', to make terminal commands&results clearer to read. It may take a bit of effort to find&use, but it's *very* worth it!)

I'd like to learn about this too, so I welcome other LQ'ers guidance ...

Best wishes, and WELCOME to LQ! Hope you enjoy your Linux journey (& the 'puzzles' it presents)

Last edited by Jjanel; 01-04-2017 at 12:39 AM.
 
Old 01-04-2017, 09:28 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179
"No free leases" from a DHCP server has nothing at all to do with routing.

The sole purpose of DHCP is to assign an as-yet unused IP address to "your computer" when "you first turn your computer on."

The device sends a "broadcast" message that says: "Hey, my MAC Address (hardware serial-number) is so-and-so, and I need an IP address!" A DHCP-server is supposed to respond, and give it one.

These IP-address assignments are called "leases," and they're supposed to time-out eventually. But it seems that somehow your DHCP server has run out of them. One obvious possibility is that the server is mis-configured: either it has none to offer, or not nearly enough. Another possibility is that the leases aren't expiring.
 
Old 01-04-2017, 10:23 PM   #6
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 417

Rep: Reputation: 74
With this range
Code:
range dynamic-bootp 192.168.4.3 192.168.4.254;
I'm quite curious if you have more than 200 devices. I wonder where those leases gone. Did you actually check your lease file?

[/quote]
route setting is " route add -net 192.168.4.0 gw 192.168.4.1 netmask 255.255.255.0 dev wlan0"
but i do not get ip. so this problem occurred.
[/quote]
You did not specify if you run this command on the server or client, which is actually not needed on either of them. Server has already the x.x.4.1 address, thus not needed and can make routing more unintelligible. You don't need that on the client/s either provided you have a working AP and DHCP server. Though you can use that for testing purposes. Regardless, you should have specified that so we don't assume.

Without much information and based on how you present the problem, I can only make assumptions that:
- you were trying to setup an AP
- dhcp server/gateway was intended to serve wireless clients. However, AP/dhcp was not setup properly.
 
Old 01-04-2017, 10:25 PM   #7
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 417

Rep: Reputation: 74
With this range
Code:
range dynamic-bootp 192.168.4.3 192.168.4.254;
I'm quite curious if you have more than 200 devices. I wonder where those leases gone. Did you actually check your lease file?

Quote:
route setting is " route add -net 192.168.4.0 gw 192.168.4.1 netmask 255.255.255.0 dev wlan0"
but i do not get ip. so this problem occurred.
You did not specify if you run this command on the server or client, which is actually not needed on either of them. Server has already the x.x.4.1 address, thus not needed and can make routing more unintelligible. You don't need that on the client/s either provided you have a working AP and DHCP server. Though you can use that for testing purposes. Regardless, you should have specified that so we don't assume.

Without much information and based on how you present the problem, I can only make assumptions that:
- you were trying to setup an AP
- dhcp server/gateway was intended to serve wireless clients. However, AP/dhcp was not setup properly.
 
Old 01-04-2017, 10:27 PM   #8
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth? I would say I hope so but I'm not so sure about that... I could just be a figment of your imagination too.
Distribution: Currently OpenMandriva. Previously openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,438

Rep: Reputation: Disabled
After hours of trial and error, I managed to get DHCP to assign a lease! As sundialsvcs's says, DHCP is only for assigning your PC/device an IP address. Domain name resolution is when you start talking DNS (Domain Naming System). I've coped my config below for ya;

Code:
ddns-update-style interim;                                   # Required for dhcp 3.0+ / Red Hat 8.0+
ignore client-updates;

subnet 10.10.0.0 netmask 255.255.255.0 {

        range 10.10.0.128 10.10.0.254;                   # Range of IP addresses to be issued to DHCP clients
           option subnet-mask              255.255.255.0;    # Default subnet mask to be used by DHCP clients
           option broadcast-address        10.10.0.255;    # Default broadcastaddress to be used by DHCP clients
           option routers                  192.168.0.1;      # Default gateway to be used by DHCP clients
           option domain-name              "your-domain.org";
           option domain-name-servers      40.175.42.254, 40.175.42.253;           # Default DNS to be used by DHCP clients
#          option netbios-name-servers     192.168.1.100;    # Specify a WINS server for MS/Windows clients.
                                                             # (Optional. Specify if used on your network)

#         DHCP requests are not forwarded. Applies when there is more than one ethernet device and forwarding is configured.
#       option ipforwarding off;

        default-lease-time 21600;                            # Amount of time in seconds that a client may keep the IP address
        max-lease-time 43200;

#       option time-offset              -18000;              # Eastern Standard Time
#       option ntp-servers              192.168.1.1;         # Default NTP server to be used by DHCP clients
#       option netbios-name-servers     192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless you understand Netbios very well
#       option netbios-node-type 2;

        # We want the nameserver "ns2" to appear at a fixed address.
        # Name server with this specified MAC address will recieve this IP.

#       host ns2 {
#               next-server ns2.your-domain.com;
#               hardware ethernet 00:02:c3:d0:e5:83;
#               fixed-address 40.175.42.254;
#       }

        # Laser printer obtains IP address via DHCP. This assures that the
        # printer with this MAC address will get this IP address every time.

#       host laser-printer-lex1 {
#               hardware ethernet 08:00:2b:4c:a3:82;
#               fixed-address 192.168.1.120;
#       }
}
 
  


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
dhcp no free leases brownwrap Linux - Networking 6 06-01-2017 11:59 AM
DHCP server and no free leases error zrnaqvi Linux - Networking 1 05-06-2010 12:10 PM
Wrote 0 leases to leases file - DHCP server lionel.rpm Linux - Server 3 07-22-2009 07:05 PM
DHCP on CentOS 4.7 - /var/lib/dhcp/dhcpd.leases: Permission denied Latitude Linux - Networking 1 06-05-2009 03:08 AM
DHCP SERVER ... no free leases!!!!! eder_michael11 Linux - General 2 04-25-2006 06:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:05 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration