Why when running an application layer program written by myself, if there is no delay before sending messages between nodes, the messages will not be received normally?

70 views
Skip to first unread message

黄轩

unread,
Jul 25, 2025, 5:26:42 AMJul 25
to ns-3-users
lgbft-node.cc
lgbft-node.h

Gabriel Ferreira

unread,
Jul 25, 2025, 6:19:30 AMJul 25
to ns-3-users
Network is not up yet? Socket connection failed/lost/stuck somewhere? Needs to be debugged to be certain.

On Friday, July 25, 2025 at 11:26:42 AM UTC+2 黄轩 wrote:

黄轩

unread,
Aug 10, 2025, 4:33:48 AMAug 10
to ns-3-users

The attachment contains two programs I wrote. I want to test the impact of the 80211 channel access protocol. However, I must delay the node before sending a message, otherwise the node will not be able to successfully receive the signal due to collision. I would like to know if the 80211 protocol can handle it by itself without me having to delay it.
lgbft-node.h
lgbft-node.cc

Tommaso Pecorella

unread,
Aug 30, 2025, 7:45:07 AMAug 30
to ns-3-users
Usually you need to add a random delay when you install applications in the nodes, as in reality you never have two or more nodes starting at the very same time.

The L2 mechanisms to resolve collisions are great, but they can do little or nothing in case of nodes synchronization - which leads to unnatural synchronized bursts.

Tom Henderson

unread,
Aug 31, 2025, 8:33:07 AMAug 31
to ns-3-...@googlegroups.com, Tommaso Pecorella

In this case, I do not think that the applications on the nodes need to have their start times randomized, because the Wi-Fi channel access mechanism (DCF) will randomize the access.

If there are at least two nodes trying to access the channel at the same time because they have a backlog of packets queued, there will eventually be a collision in the channel access when nodes happen to pick the same random backoff value, but Wi-Fi will detect this via a missing acknowledgment and resend the packets with different random backoffs, and they will (usually) be successfully retransmitted at some point in the future.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ns-3-users/9ae19e00-3534-4548-abc5-5cd025308acan%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages