How to configure 'reserved lease'??
이동호
dh1789 at gmail.com
Fri Aug 24 01:13:35 UTC 2007
I have 2 question.
My dhcp server configured as below.
dhcpd : 3.1.0
primary dhcp server
dhcpd.conf
---------------------------------------------------------------
authoritative;
ddns-update-style none;
omapi-port 7911;
default-lease-time 360;
max-lease-time 72060;
option domain-name-servers 168.126.63.1, 0.0.0.0;
option domain-name "dh1789-primary";
failover peer "dhcp-failover"
{
primary;
address 100.100.3.151;
port 52000;
peer address 100.100.3.237 ;
peer port 52001;
max-response-delay 30;
max-unacked-updates 10;
load balance max seconds 3;
mclt 1800;
split 128;
}
shared-network vlan03
{
subnet 100.100.3.0 netmask 255.255.255.0
{
pool
{
infinite-is-reserved TRUE ;
failover peer "dhcp-failover" ;
range 100.100.3.210 100.100.3.211 ;
deny dynamic bootp clients ;
}
option subnet-mask 255.255.255.0 ;
option broadcast-address 100.100.3.255 ;
option routers 100.100.3.1 ;
}
}
----------------------------------------------------------------
dhcpd : 3.1.0
secondary dhcp server
dhcpd.conf
-----------------------------------------------------------------
authoritative;
ddns-update-style none;
omapi-port 7911;
default-lease-time 3;
max-lease-time 72060;
option domain-name-servers 168.126.63.1, 0.0.0.0;
option domain-name "dh1789-secondary";
failover peer "dhcp-failover"
{
secondary;
address 100.100.3.237;
port 52001;
peer address 100.100.3.151;
peer port 52000;
max-response-delay 30;
max-unacked-updates 10;
load balance max seconds 3;
}
shared-network vlan03
{
subnet 100.100.3.0 netmask 255.255.255.0
{
pool
{
infinite-is-reserved TRUE;
failover peer "dhcp-failover" ;
range 100.100.3.210 100.100.3.211 ;
deny dynamic bootp clients ;
}
option subnet-mask 255.255.255.0 ;
option broadcast-address 100.100.3.255 ;
option routers 100.100.3.1 ;
}
}
-----------------------------------------------------------------
dhcp.conf file is created reference 'man dhcpd.conf'
man dhcpd.conf
-----------------------------------------------------------------
.
.
.
The infinite-is-reserved statement
infinite-is-reserved flag;
ISC DHCP now supports 'reserved' leases. See the sec-
tion on RESERVED LEASES below. If this flag is on, the
server will automatically reserve leases allocated to
clients which requested an infinite (0xffffffff) lease-
time.
The default is off.
.
.
.
RESERVED LEASES
It's often useful to allocate a single address to a single
client, in approximate perpetuity. Host statements with
fixed-address clauses exist to a certain extent to serve
this purpose, but because host statements are intended to
approximate 'static configuration', they suffer from not
being referenced in a littany of other Server Services,
such as dynamic DNS, failover, 'on events' and so forth.
If a standard dynamic lease, as from any range statement,
is marked 'reserved', then the server will only allocate
this lease to the client it is identified by (be that by
client identifier or hardware address).
In practice, this means that the lease follows the normal
state engine, enters ACTIVE state when the client is bound
to it, expires, or is released, and any events or services
that would normally be supplied during these events are
processed normally, as with any other dynamic lease. The
only difference is that failover servers treat reserved
leases as special when they enter the FREE or BACKUP
states - each server applies the lease into the state it
may allocate from - and the leases are not placed on the
queue for allocation to other clients. Instead they may
only be 'found' by client identity. The result is that
the lease is only offered to the returning client.
Care should probably be taken to ensure that the client
only has one lease within a given subnet that it is iden-
tified by.
Leases may be set 'reserved' either through OMAPI, or
through the 'infinite-is-reserved' configuration option
(if this is applicable to your environment and mixture of
clients).
It should also be noted that leases marked 'reserved' are
effectively treated the same as leases marked 'bootp'.
-----------------------------------------------------------------
I try run both DHCP servers.
This point occurred problem.
I configured infinite-is-reserved option true
Afer leased IP to one machine, I checked dhcpd.leases file
dhcpd.lease
--------------------------------------------------------
lease 100.100.3.210 {
starts 2 2007/08/21 09:05:59;
ends 2 2007/08/21 09:10:59;
tstp 2 2007/08/21 09:10:59;
tsfp 2 2007/08/21 10:21:37;
atsfp 2 2007/08/21 10:21:37;
cltt 2 2007/08/21 09:05:59;
binding state active;
next binding state expired;
hardware ethernet 00:0c:29:a1:1c:87;
uid "\001\000\014)\241\034\207";
}
--------------------------------------------------------
If dhcpd.conf right, marked 'reserved'
But I cann't founded 'reserved'
1 question :
How to configure infinite-is-reserved option??
In dhcpd.conf file
infinite-is-reserved TRUE; <---- right???
infinite-is-reserved on; <---- right??
else ??
I try 'reserved lease' using omshell.
--------------------------------------------------------
[root at localhost root]# omshell
> port 7911
> server 100.100.3.151
> connect
obj: <null>
> new lease
obj: lease
> set ip-address = 100.100.3.211
obj: lease
ip-address = 64:64:03:d3
> open
obj: lease
ip-address = 64:64:03:d3
state = 00:00:00:07
subnet = 00:00:00:02
pool = 00:00:00:03
ends = 00:00:00:00
starts = 46:ca:d4:08
tstp = 46:ca:d4:08
tsfp = 46:ca:d4:08
atsfp = 46:ca:d4:08
cltt = 00:00:00:00
flags = 00
> set state = 8
obj: lease
ip-address = 64:64:03:d3
state = 8
subnet = 00:00:00:02
pool = 00:00:00:03
ends = 00:00:00:00
starts = 46:ca:d4:08
tstp = 46:ca:d4:08
tsfp = 46:ca:d4:08
atsfp = 46:ca:d4:08
cltt = 00:00:00:00
flags = 00
> update
can't update object: invalid argument
obj: lease
ip-address = 64:64:03:d3
state = 8
subnet = 00:00:00:02
pool = 00:00:00:03
ends = 00:00:00:00
starts = 46:ca:d4:08
tstp = 46:ca:d4:08
tsfp = 46:ca:d4:08
atsfp = 46:ca:d4:08
cltt = 00:00:00:00
flags = 00
> set state = 00:00:00:08
obj: lease
ip-address = 64:64:03:d3
state = 00:00:00:08
subnet = 00:00:00:02
pool = 00:00:00:03
ends = 00:00:00:00
starts = 46:ca:d4:08
tstp = 46:ca:d4:08
tsfp = 46:ca:d4:08
atsfp = 46:ca:d4:08
cltt = 00:00:00:00
flags = 00
> update
can't update object: invalid argument
--------------------------------------------------------
2 question:
How to configure 'reserved lease' using omshell??
Please help and advice to me~!!
More information about the dhcp-users
mailing list