mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 10:03:58 +02:00
Set appropriate AODV params
This commit is contained in:
parent
533ed74a20
commit
7f8ad09904
1 changed files with 16 additions and 4 deletions
|
@ -66,6 +66,16 @@ int main (int argc, char *argv[])
|
||||||
|
|
||||||
// Install internet stack on nodes
|
// Install internet stack on nodes
|
||||||
AodvHelper aodv;
|
AodvHelper aodv;
|
||||||
|
aodv.Set ("HelloInterval", TimeValue (Seconds (10)));
|
||||||
|
aodv.Set ("TtlStart", UintegerValue (100));
|
||||||
|
aodv.Set ("TtlIncrement", UintegerValue (100));
|
||||||
|
aodv.Set ("TtlThreshold", UintegerValue (1000));
|
||||||
|
aodv.Set ("RreqRetries", UintegerValue (100));
|
||||||
|
aodv.Set ("RerrRateLimit", UintegerValue (1000));
|
||||||
|
aodv.Set ("RreqRateLimit", UintegerValue (1000));
|
||||||
|
aodv.Set ("NextHopWait", TimeValue (MilliSeconds (100)));
|
||||||
|
aodv.Set ("NetDiameter", UintegerValue (1000));
|
||||||
|
aodv.Set ("PathDiscoveryTime", TimeValue (Seconds (100)));
|
||||||
InternetStackHelper stack;
|
InternetStackHelper stack;
|
||||||
stack.SetRoutingHelper (aodv);
|
stack.SetRoutingHelper (aodv);
|
||||||
stack.Install (satellites);
|
stack.Install (satellites);
|
||||||
|
@ -85,12 +95,14 @@ int main (int argc, char *argv[])
|
||||||
// install a client on one of the terminals
|
// install a client on one of the terminals
|
||||||
ApplicationContainer clientApps;
|
ApplicationContainer clientApps;
|
||||||
Address remote = stations.Get (1)->GetObject<Ipv4> ()->GetAddress (1, 0).GetLocal ();//utIp.GetAddress (1, 0);
|
Address remote = stations.Get (1)->GetObject<Ipv4> ()->GetAddress (1, 0).GetLocal ();//utIp.GetAddress (1, 0);
|
||||||
std::cerr << remote << std::endl;
|
std::cerr << "REMOTE: node=" <<stations.Get (1)->GetId ()<<"addr="<<remote << std::endl;
|
||||||
UdpEchoClientHelper echoClient (remote, 9);
|
UdpEchoClientHelper echoClient (remote, 9);
|
||||||
echoClient.SetAttribute ("MaxPackets", UintegerValue (10));
|
echoClient.SetAttribute ("MaxPackets", UintegerValue (100));
|
||||||
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
|
echoClient.SetAttribute ("Interval", TimeValue (Minutes (1.0)));
|
||||||
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
|
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
|
||||||
clientApps.Add (echoClient.Install (stations.Get (0)));
|
clientApps.Add (echoClient.Install (stations.Get (0)));
|
||||||
|
Address local = stations.Get (0)->GetObject<Ipv4> ()->GetAddress (1, 0).GetLocal ();//utIp.GetAddress (1, 0);
|
||||||
|
std::cerr << "LOCAL: node=" <<stations.Get (0)->GetId ()<<"addr="<<local << std::endl;
|
||||||
|
|
||||||
Config::Connect ("/NodeList/*/ApplicationList/*/$ns3::UdpEchoServer/Rx",
|
Config::Connect ("/NodeList/*/ApplicationList/*/$ns3::UdpEchoServer/Rx",
|
||||||
MakeCallback (&EchoServerRx));
|
MakeCallback (&EchoServerRx));
|
||||||
|
@ -102,7 +114,7 @@ int main (int argc, char *argv[])
|
||||||
serverApps.Start (Seconds (1));
|
serverApps.Start (Seconds (1));
|
||||||
clientApps.Start (Seconds (2));
|
clientApps.Start (Seconds (2));
|
||||||
|
|
||||||
Simulator::Stop (Seconds (10));
|
Simulator::Stop (Minutes (10));
|
||||||
Simulator::Run ();
|
Simulator::Run ();
|
||||||
Simulator::Destroy ();
|
Simulator::Destroy ();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue