Problems with settings ends statement (was: Remove Lease via omshell)

Gmail foringer at gmail.com
Mon Jan 25 08:50:45 UTC 2010


Hello List!

I'm having a problem with removing lease over omshell.

I have the same configuration as Marc described in his mail a couple
days ago
(https://lists.isc.org/pipermail/dhcp-users/2010-January/010754.html)

But when I try to set ends statements to the value 00:00:00:00 and
update it - I receive "Permission denied" error.

Here is full log of the session:

# omshell
> server 10.0.0.2
> port 7911
> connect
obj: <null>
> new lease
obj: lease
> set ip-address = 10.0.10.13
obj: lease
ip-address = 0a:00:0a:0d
> open
obj: lease
ip-address = 0a:00:0a:0d
state = 00:00:00:02
dhcp-client-identifier = 01:00:23:7d:d2:19:7c
client-hostname = "ILOGBH94500M6"
subnet = 00:00:00:02
pool = 00:00:00:03
hardware-address = 00:23:7d:d2:19:7c
hardware-type = 00:00:00:01
ends = 4b:5e:50:0e
starts = 4b:5c:fe:8e
tstp = 4b:5e:50:0e
tsfp = 00:00:00:00
atsfp = 00:00:00:00
cltt = 4b:5c:fe:8e
flags = 00
> set ends = 00:00:00:00
obj: lease
ip-address = 0a:00:0a:0d
state = 00:00:00:02
dhcp-client-identifier = 01:00:23:7d:d2:19:7c
client-hostname = "ILOGBH94500M6"
subnet = 00:00:00:02
pool = 00:00:00:03
hardware-address = 00:23:7d:d2:19:7c
hardware-type = 00:00:00:01
ends = 00:00:00:00
starts = 4b:5c:fe:8e
tstp = 4b:5e:50:0e
tsfp = 00:00:00:00
atsfp = 00:00:00:00
cltt = 4b:5c:fe:8e
flags = 00
> update
can't update object: permission denied
obj: lease
ip-address = 0a:00:0a:0d
state = 00:00:00:02
dhcp-client-identifier = 01:00:23:7d:d2:19:7c
client-hostname = "ILOGBH94500M6"
subnet = 00:00:00:02
pool = 00:00:00:03
hardware-address = 00:23:7d:d2:19:7c
hardware-type = 00:00:00:01
ends = 00:00:00:00
starts = 4b:5c:fe:8e
tstp = 4b:5e:50:0e
tsfp = 00:00:00:00
atsfp = 00:00:00:00
cltt = 4b:5c:fe:8e
flags = 00
> 

And my config files for DHCPD server:

# cat /etc/dhcp3/dhcpd.conf | grep -v ^# | grep -v ^$
ddns-update-style none;
ddns-updates off;
option T150 code 150 = string;
local-address 10.0.0.2;
default-lease-time 86400;
max-lease-time 86400;
log-facility local7;
omapi-port 7911;
subnet 10.0.0.0 netmask 255.255.255.0{}
if exists agent.circuit-id
{
log ( info, concat( "Lease for ", binary-to-ascii (10, 8, ".",
leased-address), 
" raw option-82 info is CID: ", binary-to-ascii (10, 8, ".", option
agent.circuit-id), " AID: ",
binary-to-ascii(16, 8, ".", option agent.remote-id)));
}
include "/etc/dhcp3/opt82-classes.conf";
shared-network testing-zone {
stash-agent-options on;
subnet 10.0.10.0 netmask 255.255.255.0 {}
option routers 10.0.10.1;
option domain-name-servers 192.168.140.3;
include "/etc/dhcp3/opt82-pools.conf";
}



# cat /etc/dhcp3/opt82-classes.conf 
class "10.0.110.10-1-10.0.10.11" {match if option agent.remote-id =
00:06:00:12:cf:dc:d7:60 and option agent.circuit-id =
00:04:00:0a:01:01;}
class "10.0.110.10-2-10.0.10.12" {match if option agent.remote-id =
00:06:00:12:cf:dc:d7:60 and option agent.circuit-id =
00:04:00:0a:01:02;}
class "10.0.110.10-3-10.0.10.13" {match if option agent.remote-id =
00:06:00:12:cf:dc:d7:60 and option agent.circuit-id =
00:04:00:0a:01:03;}
class "10.0.110.10-4-10.0.10.14" {match if option agent.remote-id =
00:06:00:12:cf:dc:d7:60 and option agent.circuit-id =
00:04:00:0a:01:04;}

# cat /etc/dhcp3/opt82-pools.conf 
pool {range 10.0.10.11; allow members of "10.0.110.10-1-10.0.10.11";}
pool {range 10.0.10.12; allow members of "10.0.110.10-2-10.0.10.12";}
pool {range 10.0.10.13; allow members of "10.0.110.10-3-10.0.10.13";}
pool {range 10.0.10.14; allow members of "10.0.110.10-4-10.0.10.14";}


Oh, and I'm using modified version of dhcp3-server under Debian Lenny:

# LANG=C aptitude show dhcp3-server
Package: dhcp3-server
New: yes
State: installed
Automatically installed: no
Version: 3.1.3-2
Priority: optional
Section: net
Maintainer: Andrew Pollock <apollock at debian.org>
Uncompressed Size: 786k
Depends: debianutils (>= 2.8.2), dhcp3-common (= 3.1.3-2), lsb-base,
libc6 (>= 2.7-1), debconf (>= 0.5) | debconf-2.0
Suggests: dhcp3-server-ldap
Conflicts: dhcp
Provided by: udhcpd
Description: DHCP server for automatic IP address assignment
This is the server from version 3 of the Internet Software Consortium's
implementation of DHCP. For more information, visit
http://www.isc.org. 

Dynamic Host Configuration Protocol (DHCP) is a protocol like BOOTP
(actually dhcpd includes much of the functionality of bootpd). It
gives client machines "leases" for IP addresses and can automatically
set their network configuration. 

This server can handle multiple ethernet interfaces.


I've build it from source package and just uncomment #define USE_SOCKETS
in includes/site.h file for support of 82 option.




More information about the dhcp-users mailing list