Option 82 suboption 6 (subscriber-id) -how

Glenn Satchell Glenn.Satchell at uniq.com.au
Sun Jun 22 16:08:10 UTC 2008


Hi Kristian

The method for encapsulation is quite simple, within the value we have:

02 0E 030C00005CF3E691000004B6000C 06 08 313030353837...

02 sub-option number
0E length of this option (14)
030C00005CF3E691000004B6000C value

06 sub-option number
08 length
3130303538373832 value

The dhcp-options page describes the syntax for new options in the
section headed "DEFINING NEW OPTIONS", and in particular the
sub-section "ENCAPSULATION".

     option space local;
     option local.demo code 1 = text;
     option local-encapsulation code 197 = encapsulate local;
     option local.demo "demo";

The section titled "RELAY AGENT INFORMATION OPTION" gives the
definitions of the existing agent values. We need to mimic thosein out
new definition.

Thus, we end up with something like this (I think):

     option space myagent;
     option myagnet.circuit-id code 1 = text;
     option myagnet.remote-id code 2 = text;
     option myagnet.agent-id code 3 = text;
     option myagnet.DOCSIS-device-class code 4 = uint32;
     option myagnet.link-selection code 5 = ip-address;
     option myagnet.subscriber-id code 6 = text;
     option myagent-encapsulation code 82 = encapsulate myagent;

Refer to the values as myagent.subscriber-id. Note I don't have a
suitable router here, so I cannot test this. So, the above may not be
perfect, but I hope that it gets you started.

The other way, is to hack on the source. The file server/stables.c
contains these lines (taken from version 3.1.0 but 3.0.4 should be
similar):

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 }
};

It might be as simple as adding a line after link-sel;ection:

        { "subscriber-id", "X",                 &agent_universe,   6, 1 },
        
regards,
-glenn

>From: Kristian Sørensen <ks at dansknet.dk>
>To: <dhcp-users at isc.org>
>Subject: Option 82 suboption 6 (subscriber-id) -how
>Date: Sun, 22 Jun 2008 15:03:39 +0200
>
>Hi list
>
>I’m using a Cisco 7201 with the capability of inserting option 82 data in
>dhcp requests.
>
>I want to use the suboption 6 (subscriber-id) which is possible in the IOS
>release we use. My problem is how to use this on my dhcp server (dhcpd
>3.0.4). I’m pretty sure that I need to define my own option (82) but I can
>find no similar examples which makes it pretty difficult. 
>
>Below is an example of the dhcp discover packet.
>
>Option: (t=82,l=26) Agent Information Option
>     Option: (82) Agent Information Option
>     Length: 26
>     Value: 020E030C00005CF3E691000004B6000C0608313030353837...
>     Agent Remote ID: 030C00005CF3E691000004B6000C
>     Subscriber ID: 3130303538373832
>
>End Option
>
>0000   02 0e 03 0c 00 00 5c f3 e6 91 00 00 04 b6 00 0c  ......\.........
>
>0010   06 08 31 30 30 35 38 37 38 32                    ..10058782
>
>I want to use the string “10058782” from the option 82 suboption 6
>(subscriber-id) which we have set on the interface on the 7201 router.
>
>Hope that anybody can point me in the right direction.
>
>Kind Regards
>
> 
>
>Kristian S
>



More information about the dhcp-users mailing list