option 82 feature of DHCP

Christian Kratzer ck-lists at cksoft.de
Thu Jul 3 16:22:11 UTC 2014


Hi,

On Fri, 4 Jul 2014, Glenn Satchell wrote:

> Following the google suggestion, the first hit gives this snippet which
> looks like exactly what you want. I think the man pages are a behind the
> times as they don't mention this. If your circuit-id is binary then you
> can use a sequence of colon separated hex digit pairs to represent it.
>
> "Starting from ISC DHCPD version 4.2, you can match on agent.circuit-id as
> well, by using this syntax:
>
> 	host client-name-1 {
> 		host-identifier option agent.circuit-id "dslam42.port22";
> 		fixed-address 192.168.0.6;
> 	}
> Unfortunately, at this time, the "host-identifier option ..." statement
> only works with agent.circuit-id."

it also works out of the box for all of the following options in server/stables.c

     struct universe agent_universe;
     static struct option agent_options[] = {
 	    { "circuit-id", "X",                    &agent_universe,   1, 1 },
 	    { "remote-id", "X",                     &agent_universe,   2, 1 },
 	    { "agent-id", "I",                      &agent_universe,   3, 1 },
 	    { "DOCSIS-device-class", "L",           &agent_universe,   4, 1 },
 	    { "link-selection", "I",                &agent_universe,   5, 1 },
 	    { NULL, NULL, NULL, 0, 0 }
     };

and I also use it for subscriber-id with following in the config:

     option agent.subscriber-id code 6 = text;

Greetings
Christian


>
> regards,
> -glenn
> On Fri, July 4, 2014 12:47 am, Han Koster wrote:
>> Hi,
>>
>> I am confused, on both the question and the answer.
>> The confusion is about the used terms, server switch etc. I think the
>> following is meant:
>>
>> 1. The dhcp client send the discover and request
>> 2. The access switch adds a portid/circuitid or whatever in option 82
>> 3. The requester wants the dhcp server to use this id to assign an ip (and
>> not use mac)
>>
>> It would be nice when this could be configured in the dhcp server. But
>> afaik that is not possible with the current/latest version, so you have to
>> modify the code yourself.
>> Be aware that you must be sure that only one client is possible on the
>> port of the access switch.
>> Or the switch must combine portid and mac address in the option 82 id to
>> create something unique.
>>
>> Regards,
>>
>> Han Koster
>>
>> ________________________________________
>> From: dhcp-users-bounces at lists.isc.org [dhcp-users-bounces at lists.isc.org]
>> on behalf of Peter Rathlev [peter at rathlev.dk]
>> Sent: 03 July 2014 07:48
>> To: Users of ISC DHCP
>> Subject: Re: option 82 feature of DHCP
>>
>> On Thu, 2014-07-03 at 04:50 +0000, Hardik.V.Shah at ril.com wrote:
>>> I am configuring DHCP server with enabling option 82 features on
>>> network switches. My goal is to assign an IP to the server based on
>>> server?s serial number which I can get it through option 82.
>>>
>>> Can someone advise if it is possible and how?
>>
>> Option 82 is typically something that the first switch injects into the
>> DHCP discover/request that the server sends out. The injection happens
>> in the switch so it can contain information that the server couldn't
>> know itself.
>>
>> The serial number of the server sounds like something the server would
>> know and the switch would not know.
>>
>> If the switch can really see the serial number then yes, it is possible.
>> The Internet is filled with examples of how to do it. Just search for
>> "isc dhcp option 82" in your favourite search engine.
>>
>> Are asking because "host" statements cannot select on a random option?
>>
>> --
>> Peter
>>
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>

-- 
Christian Kratzer                   CK Software GmbH
Email:   ck at cksoft.de               Wildberger Weg 24/2
Phone:   +49 7032 893 997 - 0       D-71126 Gaeufelden
Fax:     +49 7032 893 997 - 9       HRB 245288, Amtsgericht Stuttgart
Mobile:  +49 171 1947 843           Geschaeftsfuehrer: Christian Kratzer
Web:     http://www.cksoft.de/


More information about the dhcp-users mailing list