LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 09-08-2005, 05:19 PM   #1
HiOctane21
Member
 
Registered: Feb 2004
Location: SoCal
Distribution: OpenBSD, Ubuntu, RedHat, Fedora Core, OpenSuse
Posts: 57

Rep: Reputation: 15
DHCPD no free leases


I'm getting an error similar to this

DHCPDISCOVER from 00:40:96:40:38:f8 via eth0: network 10.0.0.0/24: no free lease

Can someone help me please?

Thanks
 
Old 09-08-2005, 05:34 PM   #2
fur
Member
 
Registered: Dec 2003
Distribution: Debian, FreeBSD
Posts: 310

Rep: Reputation: 35
Can you post your dhcpd.conf file?
 
Old 09-08-2005, 05:38 PM   #3
HiOctane21
Member
 
Registered: Feb 2004
Location: SoCal
Distribution: OpenBSD, Ubuntu, RedHat, Fedora Core, OpenSuse
Posts: 57

Original Poster
Rep: Reputation: 15
ddns-update-style none;

#Define WPAD-URL as a valid code
#Used for Automatically detect proxy settings

option wpad code 252 = text;

shared-network SHLAX-NET {

authoritative;

# Deny unknown
subnet 192.168.9.0 netmask 255.255.255.0 {
#Known clients get this pool
pool {
option routers 192.168.9.254;
option domain-name "sheratonlax.thekorgroup.local";
option domain-name-servers 192.168.9.33;
option netbios-name-servers 192.168.9.33;

#Automatically detect settings - Used for AutoProxy configuration
#option wpad "http://wpad/wpad.dat/\n";

range 192.168.9.101 192.168.9.200;
default-lease-time 604800;
max-lease-time 1296000;

deny unknown-clients;

group {
host jsmithLAN { hardware ethernet 00:0d:56:ad:b1:f4; }
host hskp-geac { hardware ethernet 00:60:97:13:e0:9d; }
host aidan-lap { hardware ethernet 00:12:3f:0e:dd:5d; }
host jsmithWireless { hardware ethernet 00:90:4b:66:06:7a; }
host hsi-printer { hardware ethernet 00:80:44:0c:d6:d2; }
} #end group
} #end pool
} #end subnet

subnet 172.18.50.0 netmask 255.255.255.0 {
# Unknown clients get this pool
pool {
option routers 172.18.50.1;
option domain-name "no-internet.local";
option domain-name-servers 172.18.50.33;

range 172.18.50.100 172.18.50.200;
default-lease-time 1800;
allow unknown-clients;
} #end pool
} #end subnet
}




Thanks
 
Old 09-08-2005, 06:03 PM   #4
HiOctane21
Member
 
Registered: Feb 2004
Location: SoCal
Distribution: OpenBSD, Ubuntu, RedHat, Fedora Core, OpenSuse
Posts: 57

Original Poster
Rep: Reputation: 15
I just deleted dhcpd.leases and rebooted. Things seem to be in places now. Anyone is welcome to post a more justified answer.

Thanks
 
Old 01-24-2009, 06:48 PM   #5
chriv
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
Lightbulb Workaround for this issue

Quote:
Originally Posted by HiOctane21 View Post
I'm getting an error similar to this
DHCPDISCOVER from 00:40:96:40:38:f8 via eth0: network 10.0.0.0/24: no free lease
Thanks
This and similar errors RECENTLY started happening to me too. It appears that dhcpd made a significant change in how it handles ranges assigned to a subnet. It appears that if you have any hosts with a fixed-address that exists in your range, the entire range is ignored for anything other than your host entries! This IMHO is a step backwards, but here is my workaround (declare every address in your range as a range itself):
Code:
    interface eth0;
    pool {
        range 192.168.0.1 192.168.0.1;          
        range 192.168.0.2 192.168.0.2;          
        range 192.168.0.3 192.168.0.3;          
        range 192.168.0.4 192.168.0.4;          
        range 192.168.0.5 192.168.0.5;          
        range 192.168.0.6 192.168.0.6;          
        range 192.168.0.7 192.168.0.7;          
        range 192.168.0.8 192.168.0.8;          
        range 192.168.0.9 192.168.0.9;          
        range 192.168.0.10 192.168.0.10;          
        range 192.168.0.11 192.168.0.11;          
        range 192.168.0.12 192.168.0.12;          
        range 192.168.0.13 192.168.0.13;          
        range 192.168.0.14 192.168.0.14;          
        range 192.168.0.15 192.168.0.15;          
        range 192.168.0.16 192.168.0.16;          
        range 192.168.0.17 192.168.0.17;          
        range 192.168.0.18 192.168.0.18;          
        range 192.168.0.19 192.168.0.19;          
        range 192.168.0.20 192.168.0.20;          
        range 192.168.0.21 192.168.0.21;          
        range 192.168.0.22 192.168.0.22;          
        range 192.168.0.23 192.168.0.23;          
        range 192.168.0.24 192.168.0.24;          
        range 192.168.0.25 192.168.0.25;          
        range 192.168.0.26 192.168.0.26;          
        range 192.168.0.27 192.168.0.27;          
        range 192.168.0.28 192.168.0.28;          
        range 192.168.0.29 192.168.0.29;          
        range 192.168.0.30 192.168.0.30;          
        range 192.168.0.31 192.168.0.31;          
        range 192.168.0.32 192.168.0.32;          
        range 192.168.0.33 192.168.0.33;          
        range 192.168.0.34 192.168.0.34;          
        range 192.168.0.35 192.168.0.35;          
        range 192.168.0.36 192.168.0.36;          
        range 192.168.0.37 192.168.0.37;          
        range 192.168.0.38 192.168.0.38;          
        range 192.168.0.39 192.168.0.39;          
        range 192.168.0.40 192.168.0.40;          
        range 192.168.0.41 192.168.0.41;          
        range 192.168.0.42 192.168.0.42;          
        range 192.168.0.43 192.168.0.43;          
        range 192.168.0.44 192.168.0.44;          
        range 192.168.0.45 192.168.0.45;          
        range 192.168.0.46 192.168.0.46;          
        range 192.168.0.47 192.168.0.47;          
        range 192.168.0.48 192.168.0.48;          
        range 192.168.0.49 192.168.0.49;          
        range 192.168.0.50 192.168.0.50;          
        range 192.168.0.51 192.168.0.51;          
        range 192.168.0.52 192.168.0.52;          
        range 192.168.0.53 192.168.0.53;          
        range 192.168.0.54 192.168.0.54;          
        range 192.168.0.55 192.168.0.55;          
        range 192.168.0.56 192.168.0.56;          
        range 192.168.0.57 192.168.0.57;          
        range 192.168.0.58 192.168.0.58;          
        range 192.168.0.59 192.168.0.59;          
        range 192.168.0.60 192.168.0.60;          
        range 192.168.0.61 192.168.0.61;          
        range 192.168.0.62 192.168.0.62;          
        range 192.168.0.63 192.168.0.63;          
        range 192.168.0.64 192.168.0.64;          
        range 192.168.0.65 192.168.0.65;          
        range 192.168.0.66 192.168.0.66;          
        range 192.168.0.67 192.168.0.67;          
        range 192.168.0.68 192.168.0.68;          
        range 192.168.0.69 192.168.0.69;          
        range 192.168.0.70 192.168.0.70;          
        range 192.168.0.71 192.168.0.71;          
        range 192.168.0.72 192.168.0.72;          
        range 192.168.0.73 192.168.0.73;          
        range 192.168.0.74 192.168.0.74;          
        range 192.168.0.75 192.168.0.75;          
        range 192.168.0.76 192.168.0.76;          
        range 192.168.0.77 192.168.0.77;          
        range 192.168.0.78 192.168.0.78;          
        range 192.168.0.79 192.168.0.79;          
        range 192.168.0.80 192.168.0.80;          
        range 192.168.0.81 192.168.0.81;          
        range 192.168.0.82 192.168.0.82;          
        range 192.168.0.83 192.168.0.83;          
        range 192.168.0.84 192.168.0.84;          
        range 192.168.0.85 192.168.0.85;          
        range 192.168.0.86 192.168.0.86;          
        range 192.168.0.87 192.168.0.87;          
        range 192.168.0.88 192.168.0.88;          
        range 192.168.0.89 192.168.0.89;          
        range 192.168.0.90 192.168.0.90;          
        range 192.168.0.91 192.168.0.91;          
        range 192.168.0.92 192.168.0.92;          
        range 192.168.0.93 192.168.0.93;          
        range 192.168.0.94 192.168.0.94;          
        range 192.168.0.95 192.168.0.95;          
        range 192.168.0.96 192.168.0.96;          
        range 192.168.0.97 192.168.0.97;          
        range 192.168.0.98 192.168.0.98;          
        range 192.168.0.99 192.168.0.99;          
        range 192.168.0.100 192.168.0.100;          
        range 192.168.0.101 192.168.0.101;          
        range 192.168.0.102 192.168.0.102;          
        range 192.168.0.103 192.168.0.103;          
        range 192.168.0.104 192.168.0.104;          
        range 192.168.0.105 192.168.0.105;          
        range 192.168.0.106 192.168.0.106;          
        range 192.168.0.107 192.168.0.107;          
        range 192.168.0.108 192.168.0.108;          
        range 192.168.0.109 192.168.0.109;          
        range 192.168.0.110 192.168.0.110;          
        range 192.168.0.111 192.168.0.111;          
        range 192.168.0.112 192.168.0.112;          
        range 192.168.0.113 192.168.0.113;          
        range 192.168.0.114 192.168.0.114;          
        range 192.168.0.115 192.168.0.115;          
        range 192.168.0.116 192.168.0.116;          
        range 192.168.0.117 192.168.0.117;          
        range 192.168.0.118 192.168.0.118;          
        range 192.168.0.119 192.168.0.119;          
        range 192.168.0.120 192.168.0.120;          
        range 192.168.0.121 192.168.0.121;          
        range 192.168.0.122 192.168.0.122;          
        range 192.168.0.123 192.168.0.123;          
        range 192.168.0.124 192.168.0.124;          
        range 192.168.0.125 192.168.0.125;          
        range 192.168.0.126 192.168.0.126;          
        range 192.168.0.127 192.168.0.127;          
        range 192.168.0.128 192.168.0.128;          
        range 192.168.0.129 192.168.0.129;          
        range 192.168.0.130 192.168.0.130;          
        range 192.168.0.131 192.168.0.131;          
        range 192.168.0.132 192.168.0.132;          
        range 192.168.0.133 192.168.0.133;          
        range 192.168.0.134 192.168.0.134;          
        range 192.168.0.135 192.168.0.135;          
        range 192.168.0.136 192.168.0.136;          
        range 192.168.0.137 192.168.0.137;          
        range 192.168.0.138 192.168.0.138;          
        range 192.168.0.139 192.168.0.139;          
        range 192.168.0.140 192.168.0.140;          
        range 192.168.0.141 192.168.0.141;          
        range 192.168.0.142 192.168.0.142;          
        range 192.168.0.143 192.168.0.143;          
        range 192.168.0.144 192.168.0.144;          
        range 192.168.0.145 192.168.0.145;          
        range 192.168.0.146 192.168.0.146;          
        range 192.168.0.147 192.168.0.147;          
        range 192.168.0.148 192.168.0.148;          
        range 192.168.0.149 192.168.0.149;          
        range 192.168.0.150 192.168.0.150;          
        range 192.168.0.151 192.168.0.151;          
        range 192.168.0.152 192.168.0.152;          
        range 192.168.0.153 192.168.0.153;          
        range 192.168.0.154 192.168.0.154;          
        range 192.168.0.155 192.168.0.155;          
        range 192.168.0.156 192.168.0.156;          
        range 192.168.0.157 192.168.0.157;          
        range 192.168.0.158 192.168.0.158;          
        range 192.168.0.159 192.168.0.159;          
        range 192.168.0.160 192.168.0.160;          
        range 192.168.0.161 192.168.0.161;          
        range 192.168.0.162 192.168.0.162;          
        range 192.168.0.163 192.168.0.163;          
        range 192.168.0.164 192.168.0.164;          
        range 192.168.0.165 192.168.0.165;          
        range 192.168.0.166 192.168.0.166;          
        range 192.168.0.167 192.168.0.167;          
        range 192.168.0.168 192.168.0.168;          
        range 192.168.0.169 192.168.0.169;          
        range 192.168.0.170 192.168.0.170;          
        range 192.168.0.171 192.168.0.171;          
        range 192.168.0.172 192.168.0.172;          
        range 192.168.0.173 192.168.0.173;          
        range 192.168.0.174 192.168.0.174;          
        range 192.168.0.175 192.168.0.175;          
        range 192.168.0.176 192.168.0.176;          
        range 192.168.0.177 192.168.0.177;          
        range 192.168.0.178 192.168.0.178;          
        range 192.168.0.179 192.168.0.179;          
        range 192.168.0.180 192.168.0.180;          
        range 192.168.0.181 192.168.0.181;          
        range 192.168.0.182 192.168.0.182;          
        range 192.168.0.183 192.168.0.183;          
        range 192.168.0.184 192.168.0.184;          
        range 192.168.0.185 192.168.0.185;          
        range 192.168.0.186 192.168.0.186;          
        range 192.168.0.187 192.168.0.187;          
        range 192.168.0.188 192.168.0.188;          
        range 192.168.0.189 192.168.0.189;          
        range 192.168.0.190 192.168.0.190;          
        range 192.168.0.191 192.168.0.191;          
        range 192.168.0.192 192.168.0.192;          
        range 192.168.0.193 192.168.0.193;          
        range 192.168.0.194 192.168.0.194;          
        range 192.168.0.195 192.168.0.195;          
        range 192.168.0.196 192.168.0.196;          
        range 192.168.0.197 192.168.0.197;          
        range 192.168.0.198 192.168.0.198;          
        range 192.168.0.199 192.168.0.199;          
        range 192.168.0.200 192.168.0.200;          
        range 192.168.0.201 192.168.0.201;          
        range 192.168.0.202 192.168.0.202;          
        range 192.168.0.203 192.168.0.203;          
        range 192.168.0.204 192.168.0.204;          
        range 192.168.0.205 192.168.0.205;          
        range 192.168.0.206 192.168.0.206;          
        range 192.168.0.207 192.168.0.207;          
        range 192.168.0.208 192.168.0.208;          
        range 192.168.0.209 192.168.0.209;          
        range 192.168.0.210 192.168.0.210;          
        range 192.168.0.211 192.168.0.211;          
        range 192.168.0.212 192.168.0.212;          
        range 192.168.0.213 192.168.0.213;          
        range 192.168.0.214 192.168.0.214;          
        range 192.168.0.215 192.168.0.215;          
        range 192.168.0.216 192.168.0.216;          
        range 192.168.0.217 192.168.0.217;          
        range 192.168.0.218 192.168.0.218;          
        range 192.168.0.219 192.168.0.219;          
        range 192.168.0.220 192.168.0.220;          
        range 192.168.0.221 192.168.0.221;          
        range 192.168.0.222 192.168.0.222;          
        range 192.168.0.223 192.168.0.223;          
        range 192.168.0.224 192.168.0.224;          
        range 192.168.0.225 192.168.0.225;          
        range 192.168.0.226 192.168.0.226;          
        range 192.168.0.227 192.168.0.227;          
        range 192.168.0.228 192.168.0.228;          
        range 192.168.0.229 192.168.0.229;          
        range 192.168.0.230 192.168.0.230;          
        range 192.168.0.231 192.168.0.231;          
        range 192.168.0.232 192.168.0.232;          
        range 192.168.0.233 192.168.0.233;          
        range 192.168.0.234 192.168.0.234;          
        range 192.168.0.235 192.168.0.235;          
        range 192.168.0.236 192.168.0.236;          
        range 192.168.0.237 192.168.0.237;          
        range 192.168.0.238 192.168.0.238;          
        range 192.168.0.239 192.168.0.239;          
        range 192.168.0.240 192.168.0.240;          
        range 192.168.0.241 192.168.0.241;          
        range 192.168.0.242 192.168.0.242;          
        range 192.168.0.243 192.168.0.243;          
        range 192.168.0.244 192.168.0.244;          
        range 192.168.0.245 192.168.0.245;          
        range 192.168.0.246 192.168.0.246;          
        range 192.168.0.247 192.168.0.247;          
        range 192.168.0.248 192.168.0.248;          
        range 192.168.0.249 192.168.0.249;          
        range 192.168.0.250 192.168.0.250;          
        range 192.168.0.251 192.168.0.251;          
        range 192.168.0.252 192.168.0.252;          
        range 192.168.0.253 192.168.0.253;          
        range 192.168.0.254 192.168.0.254;          
    }
 
Old 06-16-2011, 11:58 AM   #6
charleyhinton
LQ Newbie
 
Registered: Jun 2011
Posts: 1

Rep: Reputation: Disabled
Lightbulb Let me break it down for you

Alright, I got into a pissing contest with the Network Engineer here about why a device wouldn't complete an IP lease, here is my win:

I've placed X's in IP addresses for security.

1. DHCP Block in /etc/dhcp.master (includes failover config for our HA dhcp cluster, dont get lost/overwhelmed):

Quote:
subnet 19x.60.23x.120 netmask 255.255.255.248 {
option subnet-mask 255.255.255.248;
option broadcast-address 19x.60.23x.127;
option routers 19x.60.23x.121;
pool {
failover peer "dhcp-failover";
deny dynamic bootp clients;
range 19x.60.23x.122 19x.60.23x.126;
}
}
2. An example lease in /var/lib/dhcpd/dhcpd.leases(the file that shows all leases for your defined DHCP ranges):

Quote:
lease 19x.60.23x.122 {
starts 4 2011/06/16 14:18:36;
ends 4 2011/06/16 20:18:36;
tstp 4 2011/06/16 11:18:36;
tsfp 4 2011/06/16 23:18:36;
atsfp 4 2011/06/16 23:18:36;
cltt 4 2011/06/16 14:18:36;
binding state active;
next binding state expired;
hardware ethernet 00:24:8d:82:4e:04;
uid "\001\000$\215\202N\004";
}
Now, since my DHCP network is 19x.60.23x.120 255.255.255.248, as defined by Step 1., .120 is the network, .121 is the Gateway. .122-126 are usable addresses, and .127 would be the broadcast address.

Imagine there being a lease for .122-126 in the dhcp.leases file as defined in step 2., so I dont inflate this reply with superfluous confusion.

when a 6th device tries to lease an address on this network via DHCP, you'll see this in /var/log/dhcpd:

Quote:
Jun 15 15:48:10 sprodhcp01 dhcpd: DHCPDISCOVER from 64:31:50:38:f0:bc via 19x.60.23x.121: network 19x.60.23x.120/29: no free leases
going back to Step 2., notice that there is a stard/end (end being expiration) to the lease:

Quote:
starts 4 2011/06/16 14:18:36;
ends 4 2011/06/16 20:18:36;
Plain and simple, a new device isn't giong to get an IP address until leases have expired. Adding a "new" device to the network and you're not able to get an IP via DHCP (even if there are under the limited amount of devices on the DHCP network)? Clear the leases out of /var/lib/dhcpd/dhcpd.leases, save, and try again.

No, arp caches are not the issue here. clearing the arp cache on your routers/switches doesn't free up DHCP space, and it doesn't give a single switch port a free slot for your new device to ARP up with.

This entire battle came from the following arp entry in a cisco router:

Protocol Address Age (min) Hardware Addr Type Interface
Internet 20x.8x.9x.2x4 0 Incomplete ARPA



I hope this is helpful.
 
Old 10-02-2013, 11:21 PM   #7
graeyhat
Member
 
Registered: Oct 2013
Location: USA, a place where an open-source document (The Constitution) is the law of the land.
Distribution: Debian (because of their underlying philosophies) running AwesomeWM (because of its functionality).
Posts: 34

Rep: Reputation: Disabled
#Hello. I came across this thread about a half dozen times this past weekend during my research on how to connect to a WiFi network via the command line. I found the solution eventually somewhere else (I can't remember where) but because this thread seemed to keep popping up in my Google searches, I feel compelled to share my notes (in case some other sorry soul is in the same situation I was in):

ifconfig -a

ifconfig wlan0 up

iwlist wlan0 scan

nano /etc/wpa_supplicant.conf

####Enter the following (without the '#'s of course (and replace the stuff between the quotes)):

# network={
# ssid="wifi_name"
# psk="wifi_key"
# }

####Save and exit (ctrl-o, ctrl-x).

wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext

dhclient -d wlan0

Last edited by graeyhat; 10-02-2013 at 11:23 PM.
 
  


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 Has No free leases? FishGills Linux - Networking 7 01-24-2009 06:49 PM
find out all free leases from dhcpd saavik Linux - Networking 2 07-27-2005 02:03 AM
DHCPD problem - no free leases ms_lyon Linux - Networking 3 02-26-2003 10:52 AM
dhcpd server leases wont work :( hath Linux - Networking 4 02-21-2002 05:21 PM
dhcpd server not letting go of leases Jase Linux - Networking 10 01-17-2002 05:57 PM


All times are GMT -5. The time now is 07:57 AM.

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