Subject: Re: [Anima-signaling] [Anima-bootstrap] anima-bootstrap: Bootstrap proxy discovery options

From: Brian E Carpenter <[email-masked]>
Date: Sat, 5 Dec 2015 08:48:37 +1300

On 04/12/2015 21:44, Toerless Eckert wrote:
> Thanks Brian
> 
> Let me bcc bootstrap and Cc signaling:
> 
> I can see how we would logically have two separate objectives:
> announcing bootstrap proxy and announcing to be an AN-node. The first
> one is followed by bootstrap as discussed on the bootstrap mailing list
> thread, the other one would be followed up with building the ACP.
> 
> Now, if i want to optimize packet sending, eg: for IoT, i might want to announce
> both objectives in a single GRASP packet. WOuld that be possible ?

I guess, but the two capabilities are somewhat orthogonal.

> If not, then i probably would redefine the objective from eg: boot and AN-neighbor
> to AN-services and then have the actual service-data as eg: payload data.

Which would be fine using the (synch) flooding model, but a bit strange using
discovery as such. That's OK, because what you are suggesting isn't really
discovery; it's more like a Router Advertisement in concept.

   Brian

> Cheers
>     Toerless
> 
> 
> On Fri, Dec 04, 2015 at 05:27:37PM +1300, Brian E Carpenter wrote:
>> On 04/12/2015 14:43, Toerless Eckert wrote:
>>
>> ...
>>>    IMHO, i would let the proxy periodically (30 secs) just announce that its providing
>>>    AN enrollment proxy function via link-local IPv6 multicast. 
>>
>> Here's the Python code to do that with my prototype:
>>
>> import grasp
>> import time
>>
>> OK, nonce = grasp.register_asa("Boot")
>> if not OK:
>>     #we've got a serious problem...
>>     raise RuntimeError("Can't register as ASA")
>>
>> obj = objective(0,":Boot")
>> x = grasp.register_obj(nonce, obj)
>> if not x == "OK":
>>     #we've got a different problem...
>>     raise RuntimeError(x)
>>
>> while True:
>>     grasp.discover(nonce, obj, 30000)
>>
>> What this does is register the caller as an ASA called "Boot" that handles the
>> objective called ":Boot", and then LL multicast a discovery message every
>> 30s. That will tell the others that it's there. It's running in another window
>> as I type. I didn't write the handler code for the receiving end yet though,
>> so I just get output like this twice a minute:
>>
>> CBOR->Python gives:  [1, 1248700, b'$\x06\xe0\x07S\x07\x00\x01(\xcc\xdcL\x97\x03g\x81', ':Boot', 0, 6, 0]
>>
>>> Maybe with port-number
>>>    and protocol (EST over IPv6 link-local ) as parameters so it's extensible.
>>
>> If you want parameters, we'd need to use the (synch) flooding method
>> instead. Maybe I'll write that code next week; it will be very similar to
>> the discovery case. I don't think there are any real problems here.
>>
>> Python+CBOR is fun. Thanks, Toerless, for pushing the CBOR idea.
>>
>>    Brian
>