agent.circuit-id in lease file

Christian Kratzer ck-lists at cksoft.de
Wed Dec 14 08:20:15 UTC 2011


Hi,

On Wed, 14 Dec 2011, Glenn Satchell wrote:

> The function that displays strings generally will display as text if the
> string contains ascii printable data, or as colon separated if there is
> non-ascii data in there. In this case one string contains the five
> characters "T", "E", "S", "T", "1". the other contains (octal or binary)
> \001, \005. "T", "E","S", "T", "1".
>
> Looks to me like the switch is encoding that option differently somehow.
> Now it may be that the \001 is a sub-option number 1, and the \005 is a
> length of 5 characters following?

ok. Thanks for making me look at my packet captures again.  It seems I had not been looking strong enough.

The Catalyst 2970G in our lab is indeed doing some double encoding of type and length.

     Option: (t=82,l=16) Agent Information Option
         Option: (82) Agent Information Option
         Length: 16
         Value: 01070105544553543102050103737731
         Agent Circuit ID: 01055445535431
         Agent Remote ID: 0103737731

The Catalyst 4500 in production seems to be working ok.

> You could use one of the sub-string functions described in dhcp-eval(5) to
> chop off those first 2 bytes perhaps.

Yeas I can live with the bug in the lab now that I have confirmed that
it is the switch that is doing it.

The 2970 in the Lab are eol so in case theres no newer ios i'll just
have to live with it.

Greetings
Christian


>
> regards,
> -glenn
>
>> Hi,
>>
>> we have been testing ip assignment and logging based on relay agent option
>> 82
>> and suboption circuit-id which our cisco access switches can specify as
>> string.
>>
>> On one Server which runs OpenSuSE 11.4 and their
>> dhcp-server-4.2.1-0.9.1.i586 we
>> see following in the dhcp lease file
>>
>>    option agent.circuit-id "TEST1";
>>
>> when we configure following on the cisco switch with the port.
>>
>>   ip dhcp snooping vlan 1 information option format-type circuit-id
>> override string TEST1
>>
>> In a second setup running FreeBSD 8 and the latest
>> isc-dhcp42-server-4.2.3_1 port the lease file contains
>>
>>    option agent.circuit-id 1:5:54:45:53:54:31;
>>
>> which is basically the same in hex. Suboption 1 for circuit-id, length 5
>> and "TEST1" in ascii.
>>
>> Seeing the circuit-id in hex makes sense when I lookup the source in
>> server/stables.c and see
>> see the type specified as "X"
>>
>>      static struct option agent_options[] = {
>>          { "circuit-id", "X",                    &agent_universe,   1, 1
>> },
>>          { "remote-id", "X",                     &agent_universe,   2, 1
>> },
>>
>> What puzzles me ist what SuSE have done to their RPM to get the logging
>> in ascii and seemingly also allow matching the circuit-id in ascii.
>>
>> We would like to assign fixed ips as follows:
>>
>>     host test1 {
>>    	host-identifier option agent.circuit-id "TEST1";
>>  	fixed-address 192.0.2.100;
>>    }
>>
>> but have to specify the raw hex format to get this match on the FreeBSD
>> system:
>>
>>     host test1 {
>>    	host-identifier option agent.circuit-id 1:5:54:45:53:54:31;
>>  	fixed-address 192.0.2.100;
>>    }
>>
>> Is there a standard way to allow specifying a string for agent.circuit-id
>> or do we have to patch our server in server/stables.c as we assume SuSE
>> has propably done although I am unable to find the exact source rpm ?
>>
>> Greetings
>> Christian Kratzer
>> CK Software GmbH
>>
>> --
>> 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
>> Web:     http://www.cksoft.de/         Geschaeftsfuehrer: Christian
>> Kratzer
>> _______________________________________________
>> dhcp-users mailing list
>> dhcp-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>
>
>
> _______________________________________________
> 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
Web:     http://www.cksoft.de/         Geschaeftsfuehrer: Christian Kratzer



More information about the dhcp-users mailing list