plz help ......realated to leases allocation

hitesh sharma hitesh at elitecore.com
Tue Feb 13 10:13:10 UTC 2007


send dhcp-lease-time 60;
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, host-name;
require subnet-mask, domain-name-servers, routers;
timeout 20;
retry 30;   // i want to know about this statement
reboot 10;
select-timeout 5;
initial-interval 2;
script "/sbin/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#interface "eth0" {
#                reject 192.168.0.76;
#                send dhcp-lease-time 400;
#               send dhcp-client-identifier 00:0C:29:B1:A6:32;
#               }
 
#interface "eth1" {
#               send dhcp-client-identifier 00:0C:29:B1:A6:3C;
#                send dhcp-lease-time 600 ;
#               }

lease {
  interface "eth0";
  fixed-address 192.168.15.195;
  medium "link0 link1";
   option host-name "fixed add eth0";
  option subnet-mask 255.255.240.0;
  option broadcast-address 192.168.15.255;
  option routers 192.168.15.195;
  option domain-name-servers 192.168.15.195;
 # renew 0 2007/2/3 00:00:01;  // i also want to know @  these three
statement
 # rebind 0 2007/2/3 00:00:01;
  expire 0 2007/2/3 00:00:01;
}
 
lease {
       interface "eth1";
       fixed-address 192.168.15.197;
     option host-name "fixed add eth1";
       option subnet-mask 255.255.240.0;
       option broadcast-address 192.168.15.255;
       option routers 192.168.15.197;
       option domain-name-servers 192.168.15.197;
  #      renew 0 2007/2/3 00:00:01;
   #     rebind 0 2007/2/3 00:00:01;
         expire 0 2007/2/3 00:00:01;
      }
 
 
 
 
 
   thanks ............................
             waiting for ur reply......................................
                                                                            
          Hitesh Sharma
 
 
 
 
 
 
 
 
 
-------Original Message-------
 
From: dhcp-users at isc.org
Date: 02/13/07 04:39:17
To: dhcp-users at isc.org
Subject: Re: related to leases...........need help plzz....
 
hitesh sharma wrote:
 
>actualiy , i want to know that ,
>1>  when i am using fixed address (leases statement inside the .conf file),
>then how to limit this address , i.e. if i want to use fixed address at
>certain time?
 
Not sure what the question is. Are you asking for conditional
allocation, eg "client X can have address a.b.c.d but only between
9am and 5pm" ?
 
Firstly, I am not aware of any DHCP server offering any such
function, and in any case it would be non trivial to implement - each
time the client renews a lease you would have to compute the time the
lease is to remain valid and offer a lease that does not exceed that
time. Certainly a lot more work than "is the time within the
specified time window".
 
Remember that DHCP is NOT a security protocol, it is trivial to
bypass such restrictions by manually configuring a client. If you
need to restrict use of systems, then there are generally better ways
of doing it.
 
>2>  if , i want that , if my machine is using fixed address , but
>when any server comes inro lan , it should detect that server , and
>produce request for leases.
 
No, or at least not 'out of the box'. The server does not broadcast
it's presence, it is up to the client to ask. Yes it would be
possible to configure a system to repeatedly attempt to lease an
address and switch between the dhcp lease and another statically
configured address depending on whether you get a reply - but that
defeats the object of dhcp which is to reduce or eliminate
configuration of clients. What you are asking for would significantly
increase the administrative burden of managing clients.
 
What many clients DO support is dynamically allocated "link local"
addresses - ie they will attempt to obtain a lease by dhcp, but if
they fail then they will allocate themselves an address in the
reserved "link local" range. If a dhcp server comes onto the network,
then (normally) these clients will get a lease because the client
will keep broadcasting for a dhcp server every few minutes. This is
entirely client specific and has no effect whatsoever on the dhcp
server.
 
>  3>   In case of fixed address, the renew , expire and rebind statement is
>compulsory ? can i declare leases statement without that ? if not ,
>then what is significance of them?
 
Can you clarify the question ?
 
In general, there are no mandatory configuration options for the
client, and very few for the server.
 
>4>   i face one more problem , when i release the one of the leases
>(eth0/eth1), by using  -r flag , then after sometime , it also take
>the leases
>from server. so , how to avoid leases , when one of the or both
>interface don't want  leases , but even need to be in lan?
 
Sorry, I don't understand the question.
 
>6>    when i m releasing the lease , and i want message related to
>that ie. message no. 7 , then , how to get it ?
 
 
 
>7>    in  /var/lib/dhcp ,  in .leases file , it will comntain all leases,
>or only those are valid ?
 
It may well contain older records as well.
 
>8>    we know that , at the 50 % time of  leases, client  try the
>renew it if it successes in that , remaining   50%  leases first
>will use by client then new allocated leases , or , client will use
>new leases , n but remaining 50% leases in leases database.
 
Once a new lease is issued, the expiry time of the previous lease is
irrelevant, the new expiry time is whatever the server offers in the
new lease - this can be (if the configuration has changed) shorter
than the previous one !
 
Eg, suppose lease time is set to 4 days, and client is started at 9am
Monday, it will get a lease expiring at 9am Friday. Suppose
administrator changes lease time to 1 day after this lease is issued,
this will NOT affect the clients exiting lease. At 9am on Wednesday
(after 2 days, 50% of the original lease time), the client will renew
the lease, the server will offer it a 1 day lease, and if the client
accepts it, it will now have a lease expiring at 9am Thursday.
 
If the config had not been changed, then the new lease would also be
for 4 days and would expire 9am Sunday.
 
Bear in mind that the 50% time for attempting a renewal is only a
default, and may also be client specific 



More information about the dhcp-users mailing list