I have a device that is made up of separate modules running embedded linux. The modules are all the same hardware and software but perform different tasks depending upon their location in the device. All the modules talk to each other over an internal network. The ip addresses of the modules are set statically based on the location in the device. This is done by having the modules read a physically set device that returns a 0-15 number. It plugs into the modules but is physically attached to the location in the device. A device might have 6 racks, so there are 6 of these plugs set 1-6.
I want the device to determine if any module is incorrectly set as this would cause two or more modules to have the same IP address. This could be caused by either an incorrectly set or broken location dongle. The modules communicate with each other using broadcast UDP messages. One of the data members of the message is a unique 48-bit serial number, the MAC address.
My initial plan was to have all the modules compare the messages that are from themselves with their serial number and throw an error if they don't match. The problem is the modules only receive the broadcast packets that are either from themselves or another IP address. They are not seeing packets that are from the same IP address but a different module.
When I check the interface using ifconfig I can see the Rx packets increasing, but when I use netstat -su I see nothing. The UDP Rx packets never increment. Therefore, at some point they're being dropped from the stack.
Is there a way around this? I know I can rely on a third node to tell it is receiving broadcast packets from the same IP address but different MACs, but I was hoping have each module be self aware of this problem.