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

Randy Grimshaw rgrimsha at syr.edu
Tue Feb 13 10:35:26 UTC 2007


your message came through badly formatted and hard to read, but I
suspect that you misunderstand the mechanics of a static lease. In a
static lease the client will always receive the same address from the
dhcp server when in that subnet. The client will still need to obtain
the address from the server. If the server is absent, the mechanism
fails. There are IP profiles in some OS that work as optional
configurations to use when attached to different networks, which may be
used to simplify a manual configuration in the absence of a dhcp
server... but these should be considered unrelated to the dhcp protocol.
<><Randy


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






More information about the dhcp-users mailing list