I'm building a network using the RYU controller and Mininet simulator. When the controller receives a packet_in event, it looks up the IP address in the stored addresses. If it's not found, the packet is flooded through the network. However, this is inefficient because it could flood the network in vain if the target host isn't in the network.
One solution I've tried is having the hosts send dummy packets when the network starts to learn their IP addresses. But I'm wondering if there's a more professional or recommended approach to avoid flooding the network with unnecessary packets. Any suggestions or best practices for this scenario?
Before the packet itself is received at the controller in the packet_in event, an ARP request is received if the sender doesn't know the MAC address of the destination. The controller should respond before setting the flow of the packet itself. The scenario happens as follows:
Remember not to flood the network as long as you can.
Example code: