Let's say I have a mesh of sensors forming a wireless ad-hoc network.
If one sensor wants to send data to the sink, it will transmit a packet via WiFi for example.
My assumption is that there's no direction to the sending, and so all other sensors within range of the sending nodes signal will receive the packet and attempt to forward it.
How can sensor networks like this ever operate efficiently? Surely this results in explosive duplication of packets across the network?
Based on some reading, I've found that the MAC addresses used in the layer 2 frames are used by receiving nodes to determine if the frame is for that node.
I.e. Node A, B, and C are all within each others radio diameter. If we assume they already know each other's MAC addresses.
- A creates IP packets with src AIpAddress and dest BDestAddress
- Packet is encapsulated by layer 2 frame. The MAC address of A is set as the source, and the MAC address of B is set as the destination.
- Node A sends radio signal containing this data
- Layer 2 decodes frame, sees that the dest mac address isn't for it, and discards the packet.
Layer 2 decodes frame, sees that the dest MAC address is it's own MAC address, and passes the frame payload up to layer 3.
Layer 3 interprets the frame payload as an IP packet.
If this is correct, then would this be viable in an ad-hoc network in order to route IP packets via a specific node, rather than all neighbouring nodes attempting to forward the message?