RTS/CTS Handshake Timing in Wifi

136 views
Skip to first unread message

Harry May

unread,
Dec 9, 2021, 5:41:59 PM12/9/21
to ns-3-users
I am trying to determine the time, probably in nanoseconds, from when the RTS command is sent to the time the CTS is received in a wifi network.

I am guessing the solution may be in the MacLow Class because that is where the RTS and CTS are defined but I haven't been able to pinpoint the timing.

My test objective is to set up a 3 node wireless network and compare timing between each node.

Any suggestions, example code, or hints will be greatly appreciated.  Thanks!

Tom Henderson

unread,
Dec 13, 2021, 12:13:01 AM12/13/21
to ns-3-...@googlegroups.com, Harry May
You might be interested in the example program found at
examples/wireless/wifi-simple-ht-hidden-stations.cc. It has examples on
how to configure the 802.11n (HT) models to use or disable RTS/CTS, in
the context of a hidden terminal (where these protection mechanisms are
useful).

In the source code for that example, you can see that three PCAP and one
ASCII trace files are generated:

phy.EnablePcap ("SimpleHtHiddenStations_Ap", apDevice.Get (0));
phy.EnablePcap ("SimpleHtHiddenStations_Sta1", staDevices.Get (0));
phy.EnablePcap ("SimpleHtHiddenStations_Sta2", staDevices.Get (1));

AsciiTraceHelper ascii;
phy.EnableAsciiAll (ascii.CreateFileStream
("SimpleHtHiddenStations.tr"));

These files should show you the timings of transmission and reception of
RTS and CTS.

There are other examples in that directory that optionally enable the
use of RTS (search for 'Rts' or 'RTS' strings in those examples).

- Tom

Harry May

unread,
Dec 13, 2021, 4:09:34 PM12/13/21
to ns-3-users
Thank you Tom for your quick reply. I will look into everything you submitted!

Thanks again!

Harry May

unread,
Jan 27, 2022, 3:04:24 PM1/27/22
to ns-3-users
Dr. Henderson,

I used your suggestions about the RTS/CTS timing in wireless networks and I have some valid data at this time.  My next question is, can I gather the RTS/CTS timing on point to point network connections?
Thank you!

Harry May

Tom Henderson

unread,
Jan 27, 2022, 3:34:39 PM1/27/22
to ns-3-...@googlegroups.com
On 1/27/22 12:04, Harry May wrote:
> Dr. Henderson,
>
> I used your suggestions about the RTS/CTS timing in wireless networks
> and I have some valid data at this time.  My next question is, can I
> gather the RTS/CTS timing on point to point network connections?
> Thank you!
>

I don't understand what you mean by RTS/CTS timing on point-to-point
network connections.

- Tom

Harry May

unread,
Jan 27, 2022, 4:40:24 PM1/27/22
to ns-3-users
Thank you for replying to my message!

In the AODV protocol, there is the RTS/CTS handshake protocol. The first question that I asked pertained to the wifi network which you answered. My objective is to simulate a wormhole in a wireless network so I added
the point to point connection to act as the wormhole.

Maybe I have 2 questions related to a point to point connection. First, will AODV work with point to point connection and if so, how do I get PCAP files that shows the RTS/CTS handshake timing?

Thanks again!

Harry May

Tom Henderson

unread,
Jan 28, 2022, 9:37:30 AM1/28/22
to ns-3-...@googlegroups.com
On 1/27/22 13:40, Harry May wrote:
> Thank you for replying to my message!
>
> In the AODV protocol, there is the RTS/CTS handshake protocol. The first
> question that I asked pertained to the wifi network which you answered.
> My objective is to simulate a wormhole in a wireless network so I added
> the point to point connection to act as the wormhole.
>
> Maybe I have 2 questions related to a point to point connection. First,
> will AODV work with point to point connection and if so, how do I get
> PCAP files that shows the RTS/CTS handshake timing?
>

Although I don't think any examples exist of ns-3 AODV running over a
point-to-point link, I don't know of a reason why it wouldn't work.

However, there is nothing called RTS/CTS in AODV; perhaps you mean route
request and route reply?

PCAP files are generated using a NetDevice helper such as CsmaHelper,
PointToPointHelper, WifiPhyHelper, etc. Look in the examples folder for
use of the EnablePcap() method for examples of how to enable this.

- Tom

Harry May

unread,
Feb 2, 2022, 5:55:34 PM2/2/22
to ns-3-users
Dr. Henderson,
Again, thank you for taking the time to respond to my questions.
I understand that the point to point connection does not have the RTS/CTS handshake like the one in the wireless connections.
Unfortunately, that leads to more questions.
I have been able to generate the PCAP files in both wireless and point to point networks. The wireless PCAP files creates the
RTS/CTS handshake desired. On the point to point, the RTS/CTS doesn't exist.
So, my questions are: do I need to extract the RTS/CTS code from WifiRemoteStationManager and insert it into the point to point
application? Would this work? Is there another method to get the round trip timing between the RTS and CTS?
Thanks again!

Harry May

Soulimane Mammar

unread,
Feb 3, 2022, 1:11:32 PM2/3/22
to ns-3-users
RTS/CTS mechanism is mainly used to protect relatively large frames from collision (otherwise, a huge time will be wasted till the sending station will notice that: CSMA/CA oblige)  and it's wifi mac (IEEE 802.11) mechanism.
Point to point is another protocol that runs over serial links and has its own state machine (RFC 1661).  PPP is collision free and hence has no need to use RTS/CTS or any other mechanism to protect the frames.
In you configuration ppp nodes will act as routers between two wireless networks and routers DO NOT FORWARD L2 FRAMES, instead they de-encapsulate and re-encapsulate the frames they recieve.
Regards

Harry May

unread,
Feb 3, 2022, 1:53:17 PM2/3/22
to ns-3-users
Souliman,

Thank you for your answer!

Harry May

Harry May

unread,
Feb 9, 2022, 4:40:07 PM2/9/22
to ns-3-users

I have several more questions that I hope you may be able to answer.

Is there a setup in NS-3 to create a wireless communication using directional antenna? If so, how?
Would the ParabolicAntennaModel be used for this?
How do you run the test-parabolic-antenna.cc program?
Are there any items I need to look for?

Thank you for any information!

Harry May

Soulimane Mammar

unread,
Feb 11, 2022, 12:57:26 AM2/11/22
to ns-3-users
Hi,
First of all test-parabolic-antenna.cc is just a test program used by developers to validate the implementation and be sure that nothing was broken in case of changes in the model or elsewhere.
That being said, you can use the ParabolicAntennaModel to simulate a directional communication, but you can't use the WifiPhy as your physical layer instead use SpectrumPhy (This model   is more complete and let you use the type of antennas you want)
Regards

Soulimane Mammar

unread,
Feb 12, 2022, 2:39:07 AM2/12/22
to ns-3-users
Hi,
Just a side note, your last question has nothing to do with your initial post.
Please create a new thread each time you have a new question
Regards

Reply all
Reply to author
Forward
0 new messages