HWMP

76 views
Skip to first unread message

Nikitin Alexey

unread,
Dec 4, 2019, 12:56:44 PM12/4/19
to ns-3-users
Hello NS3 community! I'm new to this community, there is a lot of information here to understand everything at once. I have been interested in the question of how to install HWMP protocol  in mesh.cc ? 
I will be very grateful for your help!
Regards, Alex.
NS3 Version  3.27

Tom Henderson

unread,
Dec 4, 2019, 1:18:26 PM12/4/19
to ns-3-...@googlegroups.com, Nikitin Alexey
Hi Alex,

This code in mesh.cc installs HWMP.

/*
* Create mesh helper and set stack installer to it
* Stack installer creates all needed protocols and install them to
* mesh point device
*/
mesh = MeshHelper::Default ();
if (!Mac48Address (m_root.c_str ()).IsBroadcast ())
{
mesh.SetStackInstaller (m_stack, "Root", Mac48AddressValue
(Mac48Address (m_root.c_str ())));
}
else
{
//If root is not set, we do not use "Root" attribute, because it
//is specified only for 11s
mesh.SetStackInstaller (m_stack);
}


To learn more about how these helpers configure HWMP, you should review
the code in src/mesh/helper.

- Tom

Alex

unread,
Dec 5, 2019, 12:31:27 PM12/5/19
to ns-3-users

Thx for your answer!
How can i check that HWMP protocol is work?
In my .PCAP files i dont see any HWMP or UDP frames.

i use UdpApplication:

void
MeshTest::InstallApplication ()
{
  UdpEchoServerHelper echoServer (9); 
  ApplicationContainer serverApps = echoServer.Install (nodes.Get (1)); 
  serverApps.Start (Seconds (0.0));
  serverApps.Stop (Seconds (m_totalTime));
  UdpEchoClientHelper echoClient (interfaces.GetAddress (1), 9); 
  echoClient.SetAttribute ("MaxPackets", UintegerValue ((uint32_t)(m_totalTime*(1/m_packetInterval))));
  echoClient.SetAttribute ("Interval", TimeValue (Seconds (m_packetInterval)));
  echoClient.SetAttribute ("PacketSize", UintegerValue (m_packetSize));
  ApplicationContainer clientApps = echoClient.Install (nodes.Get (8));
  clientApps.Stop (Seconds (m_totalTime));

}



Nataraju A B (Gmail)

unread,
Dec 6, 2019, 1:35:43 AM12/6/19
to ns-3-...@googlegroups.com
MeshTest::MeshTest () :
m_xSize (5),
m_ySize (5),
m_step (170),
m_randomStart (0.1),
m_totalTime (175),
m_packetSize (1500),
m_nIfaces (3),
m_chan (true),
m_pcap (true),
m_stack ("ns3::Dot11sStack"),
m_txrate ("150kbps")
{
}

You may have to configure HWMP and PMP protocols

// Configure the parameters of the Peer Management Protocol
Config::SetDefault ("ns3::dot11s::PeerManagementProtocol::EnableBeaconCollisionAvoidance", BooleanValue (false));

// Configure the parameters of the HWMP
Config::SetDefault ("ns3::dot11s::HwmpProtocol::Dot11MeshHWMPactivePathTimeout", TimeValue (Seconds (100)));
Config::SetDefault ("ns3::dot11s::HwmpProtocol::Dot11MeshHWMPactiveRootTimeout", TimeValue (Seconds (100)));
Config::SetDefault ("ns3::dot11s::HwmpProtocol::Dot11MeshHWMPmaxPREQretries", UintegerValue (5));
Config::SetDefault ("ns3::dot11s::HwmpProtocol::UnicastPreqThreshold", UintegerValue (10));
Config::SetDefault ("ns3::dot11s::HwmpProtocol::UnicastDataThreshold", UintegerValue (5));
Config::SetDefault ("ns3::dot11s::HwmpProtocol::DoFlag", BooleanValue (true));
Config::SetDefault ("ns3::dot11s::HwmpProtocol::RfFlag", BooleanValue (false));
HTH...

Thanks,
Nataraju A.B.


--
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 on the web visit https://groups.google.com/d/msgid/ns-3-users/ffece820-6560-4e21-b326-977bfee1ba5c%40googlegroups.com.

Tom Henderson

unread,
Dec 6, 2019, 10:35:00 AM12/6/19
to ns-3-...@googlegroups.com, Alex
On 12/5/19 9:31 AM, Alex wrote:
>
> Thx for your answer!
> How can i check that HWMP protocol is work?
> In my .PCAP files i dont see any HWMP or UDP frames.


ns-3 logging is a good way to try to initially diagnose what is
happening.  There are three log components defined for HWMP, and they
can be enabled like this (if you have build ns-3 in debug mode, which is
the default):

NS_LOG="HwmpProtocol:HwmpProtocolMac:HwmpRtable" ./waf --run mesh

- Tom

Alex

unread,
Dec 7, 2019, 11:04:35 AM12/7/19
to ns-3-users
Thanks for your answers, I really appreciate it!
Reply all
Reply to author
Forward
0 new messages