reixd / RF24toTUN

Application to send IP packets with a TUN/TAP interface in a RF24Network infrastructure
MIT License
8 stars 9 forks source link

Dynamic addressing based on IP address? #2

Open reixd opened 10 years ago

reixd commented 10 years ago

@TMRh20 What do you think. Could be useful to extract the IP address from the TUN/TAP device (last 16 bits) and use that as a dynamic addressing mechanism for the RF24Network?

TMRh20 commented 10 years ago

Yeah, I think here definitely needs to be a defined or defineable relationship between the IP and the RF24Network addresses, but haven't thought too much yet about how it would work best given the differences and similarities between routing in IP vs RF24Network.

TMRh20 commented 10 years ago

Come to think of it, the RF24Network addressing is directly relatable to IP addresses, and this could be an optional feature or even become the default for addressing, since more people probably understand IP routing compared to the octal system used.

RF24Network Address format IP Address Format
40-bits (5-bytes) 32-bits (4-bytes)
byte 0: Pipe number n/a
bytes1-4: Node address bytes 0-3: Node Address

So, if we used a mask of 10.10.10.10 for example, the master node could be 10.10.10.10 n = 1-5 Direct children of master would be 10.10.10.n/24 using a gateway of 10.10.10.10 Children of those nodes would be 10.10.n.n/16 (Node 10.10.5.5 uses gateway 10.10.10.5) Subsequent subnets/levels could use similar topology, and routing is all IP-based, regardless of whether you are addressing things from the RF24Network or RF24toTUN viewpoint.

I haven't thought it through all the way, but it seems to have potential. Thoughts?

reixd commented 10 years ago

I started a wiki page https://github.com/reixd/RF24toTUN/wiki/RF24Network:-Dynamic-Addressing to collect all the ideas and thoughts about dynamic addressing and routing. I have other thoughts and ideas about this topic, I will update the wiki accordingly.

reixd commented 10 years ago

Your proposal could work :) I think we could use this kind of addressing. It would be useful for applications which rely on IP networking capabilities and would work routing the frames across the network.

About dynamic addressing: what do you think about this.

Together, with dynamic addressing and BATMAN routing across the network could be possible. An it would be robust if the layout changes often.

We could implement both routing schemes: static and BATMAN.

Any ideas? Thoughts?

I know, I know, ambitious plans ^^