140 likes | 151 Views
David W. Hankins Software Engineer Internet Systems Consortium, INC. draft-dhankins-atomic-dhcp-00. So you'd like to know how DHCP software process options. Or if you don't, you should. At least, if you want your option used before new software can be written and deployed.
E N D
David W. Hankins Software Engineer Internet Systems Consortium, INC. draft-dhankins-atomic-dhcp-00
So you'd like to know how DHCP software process options Or if you don't, you should. At least, if you want your option used before new software can be written and deployed. Or if you want a better chance of getting your option out in software sooner rather than later.
Option Processing Req's Accept input from sysadmins/client-users to configure option contents. Translate this into in-memory db. Translate this into wire format. And back to in-memory on the far end Finally, to an output format. For state keeping, applications, etc. Each option has its own format def.
One approach. There are probably many approaches, this one is ISC's. The in-memory format is wire format. The output format is (nearly) identical to the input format. So you need 2 functions per each option.
Enter 'Atomic' DHCP Unless you looked at all the similar option formats, and made a generic language to describe each option's format. This makes 'DHCP Format Atoms', which can be strung together in series to create 'DHCP Molecules'.
A day in the life of Ivan ... Configure Transmit Receive
Configuring Ivan's Format option space ivanspace; option ivanspace.value code 1 = int32; option ivanspace.name code 2 = text; option ivanspace.subnets code 3 = array of { ip-address, ip-address }; option ivanspace.domain code 4 = domain-list compressed; option vivso.ivan code XXX = encapsulate ivanspace;
Configuring Ivan's Content option ivanspace.value 67; option ivanspace.name “Denisovitch”; option ivanspace.subnets 10.0.0.0 255.255.255.0, 192.168.0.0 255.255.255.0; option ivanspace.domain “example.com”, “a\040name.example.com”;
Transmitting Ivan XXX 0x3B 0x01 0x04 0x00 0x00 0x00 0x43 0x02 0x0B D e n i s o v i t c h 0x03 0x10 0x0A 0x00 0x00 0x00 0xFF 0xFF 0xFF 0x00 0xC0 0xA8 0x00 0x00 0xFF 0xFF 0xFF 0x00 0x04 0x17 0x07 e x a m p l e 0x03 c o m 0x00 0x06 a 0x20 n a m e 0xC0 0x00
Receiving Ivan If the client doesn't have the option definition, it is treated as opaque data. option vivso.unknown-XXX 01:04:00:00:00:43:02:0B:44:65:6E:69:73:6F:76:69:64:63:68:03:10:0A:00:00:00:FF:FF:FF:00:C0:A8:00:00:FF:FF:FF:00; Otherwise, it is in the format specified by the format definitions.
Receiving Ivan, Cont'd. option ivanspace.value 67; export new_ivanspace_value=”67” option ivanspace.name “Denisovitch”; export new_ivanspace_name=”Denisovitch” option ivanspace.subnets 10.0.0.0 255.255.255.0, 192.168.0.0 255.255.255.0; option new_ivanspace_subnets=”...
Domain names are Problem Children option ivanspace.domain “example.com”, “a name.example.com”; export new_ivanspace_domain=”example.com a\032name.example.com” Note that the option is represented differently, using different escapes. DNS presentation syntax uses base 10. ISC DHCP escape syntax can quote spaces and uses octal escapes.
To-Do 'Lessons Learned' section is mostly just an outline. 'Security' section is a placeholder. Could use input from other implementors. However other implementors want to participate. The code documented is not all 'running'.
Questions Is this a WG item?