Reputation: 193
I've seen that the network configurator module can configure the IP addresses of the nodes, but I undestand that those addresses are static. My idea is to make every (wireless) node in a network to be able to assign its own IPv6 address and change it according to its position during the simulation autonomously.
I have to make every node to check its position periodically and use it to make the new IP address if needed, so I think I'll have to program a new module to do that and include it in a custom node, but I don't know where I should save the new IP address. I don't know if the network configurator has all the IP addresses of all the nodes or if each node has its IP address somewhere inside it.
Can anyone tell me how can I do it?
Upvotes: 0
Views: 189
Reputation: 6681
The NetworkConfigurator has its own database containing all IP addresses for all nodes. This is created during initialization phase. All nodes also have a NodeConfigurator. The node configurator reads the assigned IP address from the central database and sets up the local node's network stack accordingly.
If you want to create your own logic, take a look how the Ipv4NodeConfigurator
module works. You could similarly set IPv6 address from inside the node.
Obviusly, if you change the IP address you must also reconfigure the existing interfaces and the routimg table inside the node.
Upvotes: 1