On 8/31/21 1:28 PM, tanner.perkins@cnftech.com wrote:
I don't want to have to statically assign IP addresses to all my nodes therefore my first thought was to use DHCP. The problem arises in my scenario that any node could come and go in the mesh network as they move in and out range of the network. Therefore manually allocating a single or even a few DHCP servers isn't realistic as that DHCP server may drop out of the network at anytime. Is there a dynamic way to reassign the DHCP server based on the nodes still within the network when the previous DHCP server drops from the network?
After trying everything to cope with reliability problems that ensued when I attempted to assign MAC addresses to the mesh radios, I ultimately found myself forced to adopt a hybrid (partly-static and partly-dynamic) approach. At last I have reliable performance, but I was unable to avoid the bookkeeping involved in knowing the MAC address of each batman radio, and the IP I had statically assigned to it.
(Aside: The native MAC address of a 5 GHz radio in an Archer A7 or C7 is evidently an emergent property. If you assign a different one, the mesh will work for a while, and then die mysteriously. Perhaps this has to do with the fact that the hardware in combination with the stock QCA firmware is running an 802.11s network, and BATMAN is running on top of that 802.11s network. Maybe if you just use the hardware's native MAC, the two implementations don't clash over the question of what the MAC address is. That's a guess. Anyway, it works quite well that way, but not the other way.)
As annoying as the bookkeeping is, it's do-able, and one does have to set the credentials of each node in any event; it's just another tiny chore to configure each node. I've now scripted whole configuration issue in self-defense, because it takes too much mental energy to think each node through individually and then debug it.
The dynamic part is that each 2.4 GHz radio can administer its own LAN, providing its own independent DHCP server. Originally I had a single DHCP server for the whole mesh (actually for several meshes), but this proved impractical over the long term. More to the point, I had no choice but to make each node's LAN self-sufficient, because only then could I go near where a mysteriously offline node was, near some building to which I had no access, and then reliably get into the node and find out what happened via 2.4 GHz wifi in the normal way (which for me is an ssh tunnel).
Steve Newcomb