Networking Forums

Networking Forums > Computer Networking > Linux Networking > Problem with ISC DHCPD Lease variabels in combination with "Match if"

Reply
Thread Tools Display Modes

Problem with ISC DHCPD Lease variabels in combination with "Match if"

 
 
Niels Basjes
Guest
Posts: n/a

 
      04-08-2004, 11:16 PM
Hoi,

I'm trying something with the ISC DHCP server (version 3.0.1rc12) and
I can't get it to do what I had in mind.

I want to link certain systems to a class depending on dynamically
found information. I've reduced the problem I found to the config file
placed below and the resulting output when an unknown system is
booting.

Somehow the used class is "Do Rotterdam" even though the value that
is used to check against is "Amsterdam".
In the dhcpd.leases file correctly states the line
set do-the-special-thing = "Amsterdam";

What is happening here ? Have I misunderstood the way it works or is
this a bug in the system ?


================================================== =============
# dhcpd.conf
allow booting;
ddns-update-style none;
default-lease-time 7200;
max-lease-time 72000;
authoritative;

# Define the default value if nothing is specified
set do-the-special-thing = "Rotterdam";

log (info, concat ("GLOBAL CHECK 1: ",do-the-special-thing));

subnet 172.21.13.0 netmask 255.255.255.0 {
option domain-name-servers 172.21.13.1;
option routers 172.21.13.1;
next-server 172.21.13.1;
pool {
range 172.21.13.100 172.21.13.110;
allow unknown clients;
deny known clients;
set do-the-special-thing = "Amsterdam";
log (info, concat ("AFTER SETTING TO AMSTERDAM:
",do-the-special-thing));
}
}

log (info, concat ("GLOBAL CHECK 2: ",do-the-special-thing));

class "Do Amsterdam" {
match if do-the-special-thing = "Amsterdam";
log (info, concat ("DOING AMSTERDAM: ",do-the-special-thing));
}

log (info, concat ("GLOBAL CHECK 3: ",do-the-special-thing));

class "Do Rotterdam" {
match if do-the-special-thing = "Rotterdam";
log (info, concat ("DOING ROTTERDAM: ",do-the-special-thing));
}

log (info, concat ("GLOBAL CHECK 4: ",do-the-special-thing));
================================================== =============

My logfile output:
================================================== =============
Apr 6 23:46:34 dhcptester dhcpd: GLOBAL CHECK 1: Rotterdam
Apr 6 23:46:34 dhcptester dhcpd: GLOBAL CHECK 2: Rotterdam
Apr 6 23:46:34 dhcptester dhcpd: GLOBAL CHECK 3: Rotterdam
Apr 6 23:46:34 dhcptester dhcpd: GLOBAL CHECK 4: Rotterdam
Apr 6 23:46:34 dhcptester dhcpd: AFTER SETTING TO AMSTERDAM:
Amsterdam
Apr 6 23:46:34 dhcptester dhcpd: DOING ROTTERDAM: Amsterdam
Apr 6 23:46:34 dhcptester dhcpd: DHCPDISCOVER from 00:0c:29:4f:09:19
via eth0
Apr 6 23:46:34 dhcptester dhcpd: DHCPOFFER on 172.21.13.110 to
00:0c:29:4f:09:19 via eth0
================================================== =============



--
Niels.

Drs. ir. Niels Basjes - http://niels.basjes.nl/ - VCV 20000302
mailto:`echo 'Niels Basjes'|awk '{print$1"@"$2".nl"}'`
Hacker: One who enjoys the intellectual challenge of
creatively overcoming or circumventing limitations.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Lease obtained; lease expires" - can someone explain these? hungerdunger Broadband 27 01-20-2008 09:43 AM
Unable to obtain DHCP lease - "Data is Invalid" Alex Windows Networking 3 07-24-2006 09:21 PM
"iptables mark with filter fw" vs "u32 match" =?ISO-8859-2?Q?Pawe=B3?= Staszewski Linux Networking 3 03-05-2005 09:23 PM
IPTables: "No chain/target/match by that name" Martin Herbert Dietze Linux Networking 1 01-11-2005 04:36 PM
Strange "Unique ID" in DHCP address lease john Windows Networking 0 04-09-2004 02:10 PM



1 2 3 4 5 6 7 8 9 10 11