Broadcast in a grid

50 views
Skip to first unread message

fa

unread,
Feb 11, 2015, 5:52:28 AM2/11/15
to ns-3-...@googlegroups.com
Hello

I am implementing my own protocol where some of the messages are broadcast.
In order to position the nodes I use a GridPositionAllocator.
When I distribute the nodes in only one dimension, the protocol works fine.
However, when I distribute them in two dimensions in the grid some broadcast messages are not received.    
Can this be related to the change in the distribution or should I look for the bug somewhere else?

Thanks in advance.

Konstantinos

unread,
Feb 11, 2015, 5:58:07 AM2/11/15
to ns-3-...@googlegroups.com
You should look for a bug in your implementation. How you 'forward' those broadcast messages and why they might be dropped.

fa

unread,
Feb 11, 2015, 7:16:29 AM2/11/15
to ns-3-...@googlegroups.com
Thank you for your answer.

The problem is that  when I send a broadcast message from a node some of the neighbour nodes receive it while others don't.
According to the NS_LOG, not even the RouteInput method is called on these nodes. Can the packets be dropped before? Why?

As far as I have understood, in the network below a broadcast message from n4 should be received by n1,n3,n5 and n7 and a broadcast from n2 should be received in n1 and n5.
Is that right?

         n0   n1   n2
         n3   n4   n5
         n6   n7   n8

Konstantinos

unread,
Feb 11, 2015, 7:22:37 AM2/11/15
to ns-3-...@googlegroups.com
Is the distance between nodes the same on X and Y axis?
In you previous post you said that in a line formation, e.g. n0 - n1 - n2, you have reception. 
But in the above grid, none of the nodes receive? 
Are the two scenarios configured with the same inter-node distance?

fa

unread,
Feb 11, 2015, 7:27:52 AM2/11/15
to ns-3-...@googlegroups.com
Yes, distance is the same in both axes.
And it is the same distance in the only axis in the line formation.
In the above grid, some of the nodes receive while others don't.
Message has been deleted

fa

unread,
Feb 11, 2015, 11:21:15 AM2/11/15
to ns-3-...@googlegroups.com
I will illustrate the problem with the result in a simple network.
In both the above networks node 1 should broadcast a message and the nodes that receive this message should broadcast it again (ttl = 2, received duplicates are discarded).
Packet tables exported from netanim can be found attached.

Inline nodes:
    n0 n1 n2 n3         

        Every node broadcasts as expected, expect n2 whose broadcast message does not reach n1.

Grid nodes:

    n0 n1
    n2 n3

    Broadcast from n1 is addressed to reach every node (n2 may not be reached because of distance).
    Broadcast from n0 is just addressed to n1 and n2. n2 is supposed to receive the message but according to NS_LOG, it does not receive it.
    Also according to NS_LOG, n3 broadcast the message. However, this event does not appear and netanim and no node receives the message.
grid_table.txt
inline_table.txt

Konstantinos

unread,
Feb 11, 2015, 11:33:45 AM2/11/15
to ns-3-...@googlegroups.com
You are experience what is known as collisions due to 'hidden terminal'... 

In the grid network, from your logs you say that N0 and N3 have received the packet and re-broadcast it. Since each node can not listen to the other (due to distance) they can not know if the channel is busy, so they broadcast together for N2 to receive, but packets on N2 collide!

You could see the same problem in the inline scenario, if N3 and N1 start a broadcasting at the same time, N2 would not receive any packet.

Regards,
K.
Reply all
Reply to author
Forward
0 new messages