Option 82 or subnet: who wins?

David McGaughey mcgoy1 at clearwire.net
Sat Mar 14 15:37:00 UTC 2009


Guess that I am confused about what "global" means for a class.  If it means
all class definitions are global, then by definition, it should not matter
in what other context they are defined.  An example would be global
variables in PERL.  If global means that classes may only be defined in a
global context, then I'm really surprised that dhcpd didn't complain about
it not being so!

 

My problem is not for a shared network.  It's two separate vlans (networks)
on a single switch, each with their own subnet definition.  These two
network definitions have two different dhcp definitions.  One where the
pools are based not just on originating network subnet, but also on option
82.  The other dhcp definition is just based on subnet.  What I observe is
that the leases are combining information from both definitions to clients
who should not be using option 82 - based on the subnet (vlan) which their
port is a member of on the switch.  That is to say, from the network their
request is coming from.

 

Rearranging the class definitions into a global context did not fully
resolve the issue.  It just looks like a bug to me - subnet should win -
every time!  And information from different lease subnets should never  be
mixed in a client's lease.

 

David <http://mcgoy.plumbearcat.com/>  McGaughey

Lubbock, Texas

mcgoy at plumbearcat.com

(806)438-7363

 

-----Original Message-----
From: Austin Gabel [mailto:agabel at gmail.com] 
Sent: Friday, March 13, 2009 2:11 PM
To: mcgoy at plumbearcat.com; Users of ISC DHCP
Subject: Re: Option 82 or subnet: who wins?

 

Class declarations are global. Take it out of the subnet declaration.  If
these two subnets are on the same vlan they should be in a 'shared-network'
declaration. The class should also be outside of this shared network. Then
put a deny members of "ms_rm116_sw2650_hp1.0.17"; option in the 192.168.50.0
network.




On Fri, Mar 13, 2009 at 11:56 AM, David McGaughey <mcgoy1 at clearwire.net>
wrote:

Greetings list!  And my apology if I've missed this somewhere in my
googling.  I've a situation where I have an option 82 definition for a port
on a switch and a separate subnet definition. If I plug my client into the
switch port which has the class definition for a subnet AND I plug my dhcp
server into the switch port next to my client - same vlan - then I get a
mixture of the leases from both subnet definitions.  It would be nice to get
one or the other, and not a mixture of both.  Here's the config file:

 

option domain-name "ci.lubbock.tx.us";

option domain-name-servers 10.2.1.254, 10.2.1.253, 10.2.1.7;

default-lease-time 259200;

max-lease-time 259200;

ddns-update-style none; ddns-updates off;

authoritative;

subnet 172.25.254.0 netmask 255.255.255.0 {

  option subnet-mask 255.255.255.0;

  option broadcast-address 172.25.254.255;

  option routers 172.25.254.1;

class "ms_rm116_sw2650_hp1.0.17"

{

 match if (

         option agent.remote-id = 0:1d:b3:1f:c2:80

     and

         option agent.circuit-id = 0:11

      );

}

pool {

 range 172.25.254.47 172.25.254.49;

 allow members of "ms_rm116_sw2650_hp1.0.17";

}

}

subnet 192.168.50.0 netmask 255.255.254.0 {

 pool {

   option broadcast-address 192.168.51.255;

   option routers 192.168.50.1;

   option subnet-mask 255.255.254.0;

   default-lease-time 14400;

   max-lease-time 14400;

   range 192.168.51.1 192.168.51.254;

  }

}

 

Here's what the client (ipconfig /all) got:

 

 

 Windows IP Configuration

 

        Host Name . . . . . . . . . . . . : WXPITIMAGE03c

        Primary Dns Suffix  . . . . . . . : 

        Node Type . . . . . . . . . . . . : Unknown

        IP Routing Enabled. . . . . . . . : No

        WINS Proxy Enabled. . . . . . . . : No

        DNS Suffix Search List. . . . . . : ci.lubbock.tx.us

 

Ethernet adapter Local Area Connection 2:

 

        Connection-specific DNS Suffix  . : ci.lubbock.tx.us

        Description . . . . . . . . . . . : VMware Accelerated AMD PCNet
Adapter

        Physical Address. . . . . . . . . : 00-50-56-0F-0F-12

        Dhcp Enabled. . . . . . . . . . . : Yes

        Autoconfiguration Enabled . . . . : Yes

        IP Address. . . . . . . . . . . . : 192.168.51.4

        Subnet Mask . . . . . . . . . . . : 255.255.255.0

        Default Gateway . . . . . . . . . : 172.25.254.1

        DHCP Server . . . . . . . . . . . : 192.168.50.2

        DNS Servers . . . . . . . . . . . : 10.2.1.254

                                            10.2.1.253

                                            10.2.1.7

        Lease Obtained. . . . . . . . . . : Friday, March 13, 2009 11:43:21
AM

        Lease Expires . . . . . . . . . . : Friday, March 13, 2009 3:43:21
PM

 

Note that the IP Address comes from the second subnet, which happens to be
that of the DHCP server, but the netmask and the router come from the FIRST
subnet definition.

 

Neither subnet is winning now.  Should one of them be the "winner" and
assign all its information to the client?

 

David <http://mcgoy.plumbearcat.com/>  McGaughey

Lubbock, Texas

mcgoy at plumbearcat.com

(806)438-7363

 

 


_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20090314/27c37a59/attachment.html>


More information about the dhcp-users mailing list