[prev in list] [next in list] [prev in thread] [next in thread]
List: dhcp-users
Subject: =?big5?B?UmWhRyBBc3NpZ24gRml4IElQIGJ5IE9wdGlvbiA4Mg==?=
From: Billy Ng <mondeo1055 () yahoo ! com>
Date: 2009-11-17 2:15:07
Message-ID: 709238.18089.qm () web54402 ! mail ! re2 ! yahoo ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi Glenn,
After removed the quote from the dhcpd.conf, the client still obtained the 10.1.1.x address.
I've tried to log the agent.remote-id to syslog by:
if exists agent.remote-id {
log ( info, concat( "DHCPAGENT for lease of ",
binary-to-ascii (10, 8, ".", leased-address), " on agent ",
substring(option agent.remote-id, 2, 6)));
}
But from the log, I can't see the agent.remote-id:
Nov 17 10:03:48 LRMAPP01 dhcpd: DHCPAGENT for lease of 10.1.1.51 on agent
Any idea?
Best Regards,
Billy
________________________________
±H¥ó¤H¡R Glenn Satchell <Glenn.Satchell@uniq.com.au>
¦¬¥ó¤H¡R dhcp-users@lists.isc.org
¶Ç°e¤é´Á¡R 2009/11¤ë/16 (¤@) 7:55:03 PM
¥DÃD¡G Re: Assign Fix IP by Option 82
Ugh, now I see it:
> class "fix-1" {
> match if option agent.remote-id = "2:a:0:0:a:1:1:fe:b:0:0:0";
> }
the match line should not have the quotes, so it becomes:
match if option agent.remote-id = 2:a:0:0:a:1:1:fe:b:0:0:0;
With the quotes there it's looking for the literal string: "2",
"colon", "a", "colon" and so on... Without the quotes it represents the
list of hexadecimal octet values.
So it wasn't matching.
regards,
-glenn
>Date: Sun, 15 Nov 2009 20:13:54 -0800 (PST)
>From: Billy Ng <mondeo1055@yahoo.com>
>Subject: Re¡G Assign Fix IP by Option 82
>To: Users of ISC DHCP <dhcp-users@lists.isc.org>
>X-BeenThere: dhcp-users@lists.isc.org
>
> Hi Glenn,
>
> Thanks for your info. I've tried your recommendation in my dhcpd.conf. But the
client still obtained the second pool IP address. Just wonder if the
"agent.remote-id" matched to the class defined in the conf file.
>
> DHCPD message:
> Nov 16 12:07:09 LRMAPP01 dhcpd: DHCPDISCOVER from 00:00:e8:00:99:b7 via eth1
> Nov 16 12:07:10 LRMAPP01 dhcpd: DHCPOFFER on 10.1.1.51 to 00:00:e8:00:99:b7
(client) via eth1
> Nov 16 12:07:10 LRMAPP01 dhcpd: DHCPREQUEST for 10.1.1.51 (10.1.1.10) from
00:00:e8:00:99:b7 (client) via eth1
> Nov 16 12:07:10 LRMAPP01 dhcpd: DHCPACK on 10.1.1.51 to 00:00:e8:00:99:b7
(client) via eth1
> Nov 16 12:07:10 LRMAPP01 dhcpd: DHCPREQUEST for 10.1.1.51 (10.1.1.10) from
00:00:e8:00:99:b7 (client) via 10.1.1.254
> Nov 16 12:07:10 LRMAPP01 dhcpd: DHCPACK on 10.1.1.51 to 00:00:e8:00:99:b7
(client) via 10.1.1.254
>
> DHCPD.lease:
>
> lease 10.1.1.51 {
> starts 1 2009/11/16 04:07:52;
> ends 1 2009/11/16 05:07:52;
> cltt 1 2009/11/16 04:07:52;
> binding state active;
> next binding state free;
> hardware ethernet 00:00:e8:00:99:b7;
> uid "\001\000\000\350\000\231\267";
> client-hostname "client";
> }
> lease 10.1.1.51 {
> starts 1 2009/11/16 04:07:52;
> ends 1 2009/11/16 05:07:52;
> cltt 1 2009/11/16 04:07:52;
> binding state active;
> next binding state free;
> hardware ethernet 00:00:e8:00:99:b7;
> uid "\001\000\000\350\000\231\267";
> option agent.remote-id 2:a:0:0:a:1:1:fe:b:0:0:0;
> client-hostname "client";
> }
>
> DHCPD.conf:
>
> subnet 172.16.1.0 netmask 255.255.255.0 {
> option broadcast-address 172.16.1.255;
> option routers 172.16.1.1;
> option domain-name "domain2.com";
> option subnet-mask 255.255.255.0;
> pool {
> allow members of "fix-1";
> range 172.16.1.10;
> deny dynamic bootp clients;
> }
> }
>
> subnet 10.1.1.0 netmask 255.255.255.0 {
> option domain-name "domain0.com";
> option broadcast-address 10.1.1.255;
> #range 10.1.1.51 10.1.1.60;
> pool {
> range 10.1.1.51 10.1.1.60;
> deny members of "fix-1";
> }
> }
>
> Best Regards,
> Billy
>
>
>
> ________________________________
> ±H¥ó¤H¡R Glenn Satchell <Glenn.Satchell@uniq.com.au>
> ¦¬¥ó¤H¡R dhcp-users@lists.isc.org
> ¶Ç°e¤é´Á¡R 2009/11¤ë/16 (¤@) 11:16:20 AM
> ¥DÃD¡G Re: Assign Fix IP by Option 82
>
> Hi Billy
>
> This is normal behaviour as that class is also allowed by default in
> the second range. You need to add
>
> pool {
> range 10.1.1.51 10.1.1.60;
> deny members of "fix-1";
> }
>
> in the second subnet.
>
> As you can see, this works ok for a small number of hosts, but if you
> want to assign hundreds or more then it doesn't scale too well.
>
> regards,
> -glenn
>
> >Date: Sun, 15 Nov 2009 18:33:27 -0800 (PST)
> >From: Billy Ng <mondeo1055@yahoo.com>
> >
> > Here is my dhcpd.conf:
> >
> > ddns-update-style none;
> > default-lease-time 3600;
> > max-lease-time 7200;
> > deny bootp;
> > stash-agent-options true;
> >
> > class "fix-1" {
> > match if option agent.remote-id = "2:a:0:0:a:1:1:fe:b:0:0:0";
> > }
> >
> > shared-network NET1 {
> > subnet 172.16.1.0 netmask 255.255.255.0 {
> > option broadcast-address 172.16.1.255;
> > option domain-name "domain2.com";
> > option subnet-mask 255.255.255.0;
> > pool {
> > allow members of "fix-1";
> > range 172.16.1.10;
> > deny dynamic bootp clients;
> > }
> > }
> >
> > subnet 10.1.1.0 netmask 255.255.255.0 {
> > option domain-name "domain0.com";
> > option broadcast-address 10.1.1.255;
> > range 10.1.1.51 10.1.1.60;
> > }
> >
> > }
> >
> > But the client still obtained the IP address from the pool 10.1.1.x.
> >
> > lease 10.1.1.51 {
> > starts 1 2009/11/16 02:14:42;
> > ends 1 2009/11/16 03:14:42;
> > cltt 1 2009/11/16 02:14:42;
> > binding state active;
> > next binding state free;
> > hardware ethernet 00:00:e8:00:99:b7;
> > uid "\001\000\000\350\000\231\267";
> > client-hostname "client";
> > }
> > lease 10.1.1.51 {
> > starts 1 2009/11/16 02:14:42;
> > ends 1 2009/11/16 03:14:42;
> > cltt 1 2009/11/16 02:14:42;
> > binding state active;
> > next binding state free;
> > hardware ethernet 00:00:e8:00:99:b7;
> > uid "\001\000\000\350\000\231\267";
> > option agent.remote-id 2:a:0:0:a:1:1:fe:b:0:0:0;
> > client-hostname "client";
> > }
> >
> > Is the agent.remote-id value of the class match statement equal to the
> > dhcpd.leases file value? And refer to the dhcpd.leases, there're 2
> > records and the first one without the "agnent.remote-id". Just wonder
> > if it is a normal behavior. Thanks.
> >
> > Best Regards,
> > Billy
> >
> >
_______________________________________________
dhcp-users mailing list
dhcp-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users
Yahoo!»´ä´£¨Ñºô¤W¦w¥þ§ð²¤¡A±Ð§A¦p¦ó¨¾½d¶ «È! ½Ð«e©¹ http://hk.promo.yahoo.com/security/ ¤F¸Ñ§ó¦h!
[Attachment #5 (text/html)]
<html><head><style type="text/css"><!-- DIV {margin:0px;} \
--></style></head><body><div style="font-family:arial, helvetica, \
sans-serif;font-size:13pt"><div><span class="Apple-style-span" style="font-size: \
small;">Hi Glenn,</span></div><div><span class="Apple-style-span" style="font-size: \
small;"><br></span></div><div><span class="Apple-style-span" style="font-size: \
small;">After removed the quote from the dhcpd.conf, the client still obtained the \
10.1.1.x address.</span></div><div><span class="Apple-style-span" style="font-size: \
small;"><br></span></div><div><span class="Apple-style-span" style="font-size: \
small;">I've tried to log the agent.remote-id to syslog by:</span></div><div><span \
class="Apple-style-span" style="font-size: small;"><br></span></div><div><span \
class="Apple-style-span" style="font-size: small;"><div>if exists agent.remote-id \
{</div><div> log ( info, concat( "DHCPAGENT for lease \
of ",</div><div> binary-to-ascii (10, 8, \
".", leased-address), " on agent ",</div><div> \
substring(option agent.remote-id, 2, \
6)));</div><div>}</div><div><br></div><div>But from the log, I can't see the \
agent.remote-id:</div><div><br></div><div>Nov 17 10:03:48 LRMAPP01 dhcpd: DHCPAGENT \
for lease of 10.1.1.51 on agent </div><div><br></div><div>Any \
idea?</div><div><br></div><div>Best Regards,</div><div>Billy</div></span></div><div \
style="font-family:arial, helvetica, sans-serif;font-size:13pt"><br><div \
style="font-family:arial, helvetica, sans-serif;font-size:13px"><font size="2" \
face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">±H¥ó¤H¡R</span></b> \
Glenn Satchell <Glenn.Satchell@uniq.com.au><br><b><span style="font-weight: \
bold;">¦¬¥ó¤H¡R</span></b> dhcp-users@lists.isc.org<br><b><span style="font-weight: \
bold;">¶Ç°e¤é´Á¡R</span></b> 2009/11¤ë/16 (¤@) 7:55:03 PM<br><b><span \
style="font-weight: bold;">¥DÃD¡G</span></b> Re: Assign Fix IP by Option \
82<br></font><br>Ugh, now I see it:<br><br>> class "fix-1" {<br>> \
match if option agent.remote-id = "2:a:0:0:a:1:1:fe:b:0:0:0";<br>> \
}<br><br>the match line should not have the quotes, so it \
becomes:<br><br> match if option agent.remote-id = \
2:a:0:0:a:1:1:fe:b:0:0:0;<br><br>With the quotes there it's looking for the literal \
string: "2",<br>"colon", "a", "colon" and so on... Without the quotes it represents \
the<br>list of hexadecimal octet values.<br><br>So it wasn't \
matching.<br><br>regards,<br>-glenn<br><br>>Date: Sun, 15 Nov 2009 20:13:54 -0800 \
(PST)<br>>From: Billy Ng <<a ymailto="mailto:mondeo1055@yahoo.com" \
href="mailto:mondeo1055@yahoo.com">mondeo1055@yahoo.com</a>><br>>Subject: Re¡G \
Assign Fix IP by Option 82<br>>To: Users of ISC DHCP <<a \
ymailto="mailto:dhcp-users@lists.isc.org" \
href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a>><br>>X-BeenThere: \
<a ymailto="mailto:dhcp-users@lists.isc.org" \
href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>><br>> \
Hi Glenn,<br>> <br>> Thanks for your info. I've tried your recommendation in my \
dhcpd.conf. But the <br>client still obtained the second pool IP address. Just wonder \
if the <br>"agent.remote-id" matched to the class defined in the conf file.<br>> \
<br>> DHCPD message:<br>> Nov 16 12:07:09 LRMAPP01 dhcpd: DHCPDISCOVER from \
00:00:e8:00:99:b7 via eth1<br>> Nov 16 12:07:10 LRMAPP01 dhcpd: DHCPOFFER on \
10.1.1.51 to 00:00:e8:00:99:b7 <br>(client) via eth1<br>> Nov 16 12:07:10 LRMAPP01 \
dhcpd: DHCPREQUEST for 10.1.1.51 (10.1.1.10) from <br>00:00:e8:00:99:b7 (client) via \
eth1<br>> Nov 16 12:07:10 LRMAPP01 dhcpd: DHCPACK on 10.1.1.51 to \
00:00:e8:00:99:b7 <br>(client) via eth1<br>> Nov 16 12:07:10 LRMAPP01 dhcpd: \
DHCPREQUEST for 10.1.1.51 (10.1.1.10) from <br>00:00:e8:00:99:b7 (client) via \
10.1.1.254<br>> Nov 16 12:07:10 LRMAPP01 dhcpd: DHCPACK on 10.1.1.51 to \
00:00:e8:00:99:b7 <br>(client) via 10.1.1.254<br>> <br>> DHCPD.lease:<br>> \
<br>> lease 10.1.1.51 {<br>> starts 1 2009/11/16 04:07:52;<br>> \
ends 1 2009/11/16 05:07:52;<br>> cltt 1 2009/11/16 04:07:52;<br>> \
binding state active;<br>> next binding state free;<br>> hardware \
ethernet 00:00:e8:00:99:b7;<br>> uid \
"\001\000\000\350\000\231\267";<br>> client-hostname "client";<br>> \
}<br>> lease 10.1.1.51 {<br>> starts 1 2009/11/16 \
04:07:52;<br>> ends 1 2009/11/16 05:07:52;<br>> cltt 1 2009/11/16 \
04:07:52;<br>> binding state active;<br>> next binding state \
free;<br>> hardware ethernet 00:00:e8:00:99:b7;<br>> uid \
"\001\000\000\350\000\231\267";<br>> option agent.remote-id \
2:a:0:0:a:1:1:fe:b:0:0:0;<br>> client-hostname "client";<br>> }<br>> \
<br>> DHCPD.conf:<br>> <br>> subnet 172.16.1.0 netmask 255.255.255.0 \
{<br>> option broadcast-address 172.16.1.255;<br>> \
option routers 172.16.1.1;<br>> option domain-name \
"domain2.com";<br>> option subnet-mask 255.255.255.0;<br>> \
pool {<br>> allow members of \
"fix-1";<br>> range 172.16.1.10;<br>> \
deny dynamic bootp clients;<br>> }<br>> \
}<br>> <br>> subnet 10.1.1.0 netmask 255.255.255.0 {<br>> \
option domain-name "domain0.com";<br>> option \
broadcast-address 10.1.1.255;<br>> #range 10.1.1.51 \
10.1.1.60;<br>> pool {<br>> range \
10.1.1.51 10.1.1.60;<br>> deny members of \
"fix-1";<br>> }<br>> }<br>> <br>> Best \
Regards,<br>> Billy<br>> <br>> <br>> <br>> \
________________________________<br>> ±H¥ó¤H¡R Glenn Satchell <<a \
ymailto="mailto:Glenn.Satchell@uniq.com.au" \
href="mailto:Glenn.Satchell@uniq.com.au">Glenn.Satchell@uniq.com.au</a>><br>> \
¦¬¥ó¤H¡R <a ymailto="mailto:dhcp-users@lists.isc.org" \
href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>> \
¶Ç°e¤é´Á¡R 2009/11¤ë/16 (¤@) 11:16:20 AM<br>> ¥DÃD¡G Re: Assign Fix IP by Option \
82<br>> <br>> Hi Billy<br>> <br>> This is normal behaviour as that class \
is also allowed by default in<br>> the second range. You need to add<br>> \
<br>> pool {<br>> range 10.1.1.51 \
10.1.1.60;<br>> deny members of "fix-1";<br>> \
}<br>> <br>> in the second subnet.<br>> <br>> As you can see, \
this works ok for a small number of hosts, but if you<br>> want to assign hundreds \
or more then it doesn't scale too well.<br>> <br>> regards,<br>> \
-glenn<br>> <br>> >Date: Sun, 15 Nov 2009 18:33:27 -0800 (PST)<br>> \
>From: Billy Ng <<a ymailto="mailto:mondeo1055@yahoo.com" \
href="mailto:mondeo1055@yahoo.com">mondeo1055@yahoo.com</a>><br>> ><br>> \
> Here is my dhcpd.conf:<br>> > <br>> > ddns-update-style \
none;<br>> > default-lease-time 3600;<br>> > max-lease-time 7200;<br>> \
> deny bootp;<br>> > stash-agent-options true;<br>> > <br>> > \
class "fix-1" {<br>> > match if option \
agent.remote-id = "2:a:0:0:a:1:1:fe:b:0:0:0";<br>> > }<br>> > <br>> \
> shared-network NET1 {<br>> > subnet 172.16.1.0 netmask \
255.255.255.0 {<br>> > option broadcast-address \
172.16.1.255;<br>> > option domain-name "domain2.com";<br>> \
> option subnet-mask 255.255.255.0;<br>> > pool \
{<br>> > allow members of "fix-1";<br>> \
> range 172.16.1.10;<br>> > \
deny dynamic bootp clients;<br>> > }<br>> > \
}<br>> > <br>> > subnet 10.1.1.0 netmask 255.255.255.0 {<br>> \
> option domain-name "domain0.com";<br>> > \
option broadcast-address 10.1.1.255;<br>> > range 10.1.1.51 \
10.1.1.60;<br>> > }<br>> > <br>> > }<br>> > <br>> \
> But the client still obtained the IP address from the pool 10.1.1.x.<br>> \
> <br>> > lease 10.1.1.51 {<br>> > starts 1 2009/11/16 \
02:14:42;<br>> > ends 1 2009/11/16 03:14:42;<br>> > cltt 1 \
2009/11/16 02:14:42;<br>> > binding state active;<br>> > \
next binding state free;<br>> > hardware ethernet \
00:00:e8:00:99:b7;<br>> > uid "\001\000\000\350\000\231\267";<br>> \
> client-hostname "client";<br>> > }<br>> > lease 10.1.1.51 \
{<br>> > starts 1 2009/11/16 02:14:42;<br>> > ends 1 \
2009/11/16 03:14:42;<br>> > cltt 1 2009/11/16 02:14:42;<br>> \
> binding state active;<br>> > next binding state \
free;<br>> > hardware ethernet 00:00:e8:00:99:b7;<br>> > \
uid "\001\000\000\350\000\231\267";<br>> > option agent.remote-id \
2:a:0:0:a:1:1:fe:b:0:0:0;<br>> > client-hostname "client";<br>> > \
}<br>> > <br>> > Is the agent.remote-id value of the class match \
statement equal to the<br>> > dhcpd.leases file value? And refer to the \
dhcpd.leases, there're 2<br>> > records and the first one without the \
"agnent.remote-id". Just wonder<br>> > if it is a normal behavior. \
Thanks.<br>> > <br>> > Best Regards,<br>> > Billy<br>> > \
<br>> > <br><br>_______________________________________________<br>dhcp-users \
mailing list<br><a ymailto="mailto:dhcp-users@lists.isc.org" \
href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br><a \
href="https://lists.isc.org/mailman/listinfo/dhcp-users" \
target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br></div></div><div \
style="position:fixed"></div>
<!-- cg16.c2.mail.re1.yahoo.com compressed Wed Nov 4 17:57:46 PST 2009 -->
</div><br>
<hr size=1>Yahoo!»´ä´£¨Ñºô¤W¦w¥þ§ð²¤¡A±Ð§A¦p¦ó¨¾½d¶ «È!<a \
href="http://hk.promo.yahoo.com/security/"><b>¤F¸Ñ§ó¦h</b></a></body></html>
_______________________________________________
dhcp-users mailing list
dhcp-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic