This commit is contained in:
SunnyQjm committed 2022-12-06 23:02:56 +08:00
1 parent 813636cf29
commit ec68a55321
15 files changed
+596 -321

No files matched your search

+69 -1
View File
@@ -3,6 +3,74 @@
"*.txt": "cpp",
"fstream": "cpp",
"limits": "cpp",
"ostream": "cpp"
"ostream": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"hash_map": "cpp",
"strstream": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"chrono": "cpp",
"codecvt": "cpp",
"complex": "cpp",
"condition_variable": "cpp",
"cstdint": "cpp",
"deque": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"regex": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"mutex": "cpp",
"new": "cpp",
"shared_mutex": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cfenv": "cpp",
"cinttypes": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"valarray": "cpp",
"variant": "cpp"
}
}
-1
View File
@@ -273,7 +273,6 @@ ConsumerMIRCC::SendPacket(uint64_t pathId,uint64_t classId)
recordSeq(seq,tmpRandId);
}
WillSendOutInterest(seq);
m_transmittedInterests(interest, this, m_face);
+5 -2
View File
@@ -36,6 +36,7 @@
#include <boost/lexical_cast.hpp>
#include <boost/ref.hpp>
#include <iostream>
NS_LOG_COMPONENT_DEFINE("ndn.Consumer");
@@ -115,10 +116,12 @@ Consumer::CheckRetxTimeout()
Time rto = m_rtt->RetransmitTimeout();
// NS_LOG_DEBUG ("Current RTO: " << rto.ToDouble (Time::S) << "s");
Time span = rto < m_interestLifeTime ? rto : m_interestLifeTime;
while (!m_seqTimeouts.empty()) {
SeqTimeoutsContainer::index<i_timestamp>::type::iterator entry =
m_seqTimeouts.get<i_timestamp>().begin();
if (entry->time + rto <= now) // timeout expired?
if (entry->time + span <= now) // timeout expired?
{
uint32_t seqNo = entry->seq;
m_seqTimeouts.get<i_timestamp>().erase(entry);
@@ -127,7 +130,7 @@ Consumer::CheckRetxTimeout()
else
break; // nothing else to do. All later packets need not be retransmitted
}
m_retxEvent = Simulator::Schedule(m_retxTimer, &Consumer::CheckRetxTimeout, this);
}
+1 -1
View File
@@ -502,7 +502,7 @@ namespace nfd {
{
hashVal = 0;
}
hashVal = (hashVal * 10 + (ingress.face.getId() - 257));
hashVal = (hashVal * MAX_FACE + (ingress.face.getId() - 257));
//给data设置新的hash值
data.setTag(make_shared<lp::PathidTag>(hashVal));
+1 -1
View File
@@ -114,7 +114,7 @@ namespace nfd {
const double m_B = 0.1;//公式B系数
const double m_a = 0.8;//速率更新系数
const double m_miu = 0.99;//链路利用率
const double m_miu = 0.95;//链路利用率
const double m_rtt_a = 0.7;//RTT更新系数
+131
View File
@@ -0,0 +1,131 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/ndnSIM-module.h"
#include "../extensions/mircc-strategy.hpp"
namespace ns3
{
int
main(int argc, char *argv[])
{
CommandLine cmd;
cmd.Parse(argc, argv);
AnnotatedTopologyReader topologyReader("", 25);
topologyReader.SetFileName("topologies/dsccp3-1-test.txt");
topologyReader.Read();
// Install NDN stack on all nodes
ndn::StackHelper ndnHelper;
ndnHelper.setPolicy("nfd::cs::lru");
// ndnHelper.setCsSize(10000);
ndnHelper.setCsSize(0);
ndnHelper.InstallAll();
// Choosing forwarding strategy
ndn::StrategyChoiceHelper::InstallAll<nfd::fw::MIRCCStrategy>("/");
// Installing global routing interface on all nodes
ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;
ndnGlobalRoutingHelper.InstallAll();
// Getting containers for the consumer/producer
Ptr<Node> C1 = Names::Find<Node>("C1");
Ptr<Node> C2 = Names::Find<Node>("C2");
Ptr<Node> C3 = Names::Find<Node>("C3");
Ptr<Node> P1 = Names::Find<Node>("P1");
Ptr<Node> P2 = Names::Find<Node>("P2");
Ptr<Node> P3 = Names::Find<Node>("P3");
Ptr<Node> P4 = Names::Find<Node>("P4");
ndn::AppHelper consumerHelper("ns3::ndn::ConsumerMIRCC");
consumerHelper.SetAttribute("logtms",StringValue("0"));
consumerHelper.SetAttribute("start_ms",StringValue("0"));
consumerHelper.SetAttribute("end_ms",StringValue("320000"));
// C1
consumerHelper.SetPrefix("/A");
consumerHelper.Install("C1");
// C2
consumerHelper.SetPrefix("/B");
consumerHelper.SetAttribute("start_ms",StringValue("80000"));
consumerHelper.SetAttribute("end_ms",StringValue("320000"));
consumerHelper.Install("C2");
// C3
consumerHelper.SetPrefix("/C");
consumerHelper.SetAttribute("start_ms",StringValue("160000"));
consumerHelper.SetAttribute("end_ms",StringValue("320000"));
consumerHelper.SetAttribute("greedy_ms",StringValue("240000"));
consumerHelper.SetAttribute("greedy_rate",StringValue("10000000"));
consumerHelper.Install("C3");
ndn::AppHelper producerHelper("ns3::ndn::Producer");
producerHelper.SetAttribute("PayloadSize", StringValue("1024"));
// Register /dst1 prefix with global routing controller and
// install producer that will satisfy Interests in /dst1 namespace
// P1
ndnGlobalRoutingHelper.AddOrigins("/A", P1);
ndnGlobalRoutingHelper.AddOrigins("/B", P2);
ndnGlobalRoutingHelper.AddOrigins("/C", P3);
ndnGlobalRoutingHelper.AddOrigins("/A", P4);
ndnGlobalRoutingHelper.AddOrigins("/B", P4);
ndnGlobalRoutingHelper.AddOrigins("/C", P4);
producerHelper.SetPrefix("/A");
producerHelper.Install(P1);
producerHelper.Install(P4);
producerHelper.SetPrefix("/B");
producerHelper.Install(P2);
producerHelper.Install(P4);
producerHelper.SetPrefix("/C");
producerHelper.Install(P3);
producerHelper.Install(P4);
// Calculate all possible routes and install FIBs
ndn::GlobalRoutingHelper::CalculateRoutes();
ndn::FibHelper::AddRoute("R2", "/A", "R3", 0);
ndn::FibHelper::AddRoute("R2", "/B", "R3", 0);
ndn::FibHelper::AddRoute("R2", "/C", "R3", 0);
ndn::FibHelper::AddRoute("R2", "/A", "R4", 0);
ndn::FibHelper::AddRoute("R2", "/B", "R4", 0);
ndn::FibHelper::AddRoute("R2", "/C", "R4", 0);
ndn::FibHelper::AddRoute("R2", "/A", "R5", 0);
ndn::FibHelper::AddRoute("R2", "/B", "R5", 0);
ndn::FibHelper::AddRoute("R2", "/C", "R5", 0);
ndn::FibHelper::AddRoute("R4", "/A", "R3", 0);
ndn::FibHelper::AddRoute("R4", "/B", "R3", 0);
ndn::FibHelper::AddRoute("R4", "/C", "R3", 0);
ndn::FibHelper::AddRoute("R4", "/A", "R5", 0);
ndn::FibHelper::AddRoute("R4", "/B", "R5", 0);
ndn::FibHelper::AddRoute("R4", "/C", "R5", 0);
Simulator::Stop(Seconds(320.0));
ndn::L3RateTracer::InstallAll("dsccp3-1-throughput-320-test.txt", Seconds(0.5));
ndn::AppDelayTracer::InstallAll("dsccp3-1-delay-320-test.txt");
L2RateTracer::InstallAll("dsccp3-1-drop-320-test.txt", Seconds(0.5));
Simulator::Run();
Simulator::Destroy();
return 0;
}
} // namespace ns3
int main(int argc, char *argv[])
{
return ns3::main(argc, argv);
}
+12 -12
View File
@@ -13,7 +13,7 @@ namespace ns3
cmd.Parse(argc, argv);
AnnotatedTopologyReader topologyReader("", 25);
topologyReader.SetFileName("topologies/dsccp3-1.txt");
topologyReader.SetFileName("topologies/dsccp3-1-ton.txt");
topologyReader.Read();
// Install NDN stack on all nodes
@@ -43,7 +43,7 @@ namespace ns3
ndn::AppHelper consumerHelper("ns3::ndn::ConsumerMIRCC");
consumerHelper.SetAttribute("logtms",StringValue("0"));
consumerHelper.SetAttribute("start_ms",StringValue("0"));
consumerHelper.SetAttribute("end_ms",StringValue("8000"));
consumerHelper.SetAttribute("end_ms",StringValue("320000"));
// C1
consumerHelper.SetPrefix("/A");
@@ -51,16 +51,16 @@ namespace ns3
// C2
consumerHelper.SetPrefix("/B");
consumerHelper.SetAttribute("start_ms",StringValue("2000"));
consumerHelper.SetAttribute("end_ms",StringValue("8000"));
consumerHelper.SetAttribute("start_ms",StringValue("80000"));
consumerHelper.SetAttribute("end_ms",StringValue("320000"));
consumerHelper.Install("C2");
// C3
consumerHelper.SetPrefix("/C");
consumerHelper.SetAttribute("start_ms",StringValue("4000"));
consumerHelper.SetAttribute("end_ms",StringValue("8000"));
consumerHelper.SetAttribute("greedy_ms",StringValue("6000"));
consumerHelper.SetAttribute("greedy_rate",StringValue("6000000"));
consumerHelper.SetAttribute("start_ms",StringValue("160000"));
consumerHelper.SetAttribute("end_ms",StringValue("320000"));
consumerHelper.SetAttribute("greedy_ms",StringValue("240000"));
consumerHelper.SetAttribute("greedy_rate",StringValue("10000000"));
consumerHelper.Install("C3");
@@ -112,11 +112,11 @@ namespace ns3
ndn::FibHelper::AddRoute("R4", "/B", "R5", 0);
ndn::FibHelper::AddRoute("R4", "/C", "R5", 0);
Simulator::Stop(Seconds(8.0));
Simulator::Stop(Seconds(320.0));
ndn::L3RateTracer::InstallAll("dsccp3-1_throughput.txt", Seconds(0.1));
ndn::AppDelayTracer::InstallAll("dsccp3-1_delay.txt");
L2RateTracer::InstallAll("dsccp3-1_drop.txt", Seconds(0.1));
ndn::L3RateTracer::InstallAll("dsccp3-1-throughput-320-ton.txt", Seconds(0.5));
ndn::AppDelayTracer::InstallAll("dsccp3-1-delay-320-ton.txt");
L2RateTracer::InstallAll("dsccp3-1-drop-320-ton.txt", Seconds(0.5));
Simulator::Run();
Simulator::Destroy();
+11 -11
View File
@@ -43,7 +43,7 @@ namespace ns3
ndn::AppHelper consumerHelper("ns3::ndn::ConsumerMIRCC");
consumerHelper.SetAttribute("logtms",StringValue("0"));
consumerHelper.SetAttribute("start_ms",StringValue("0"));
consumerHelper.SetAttribute("end_ms",StringValue("200000"));
consumerHelper.SetAttribute("end_ms",StringValue("320000"));
// C1
consumerHelper.SetPrefix("/A");
@@ -51,16 +51,16 @@ namespace ns3
// C2
consumerHelper.SetPrefix("/B");
consumerHelper.SetAttribute("start_ms",StringValue("30000"));
consumerHelper.SetAttribute("end_ms",StringValue("200000"));
consumerHelper.SetAttribute("start_ms",StringValue("80000"));
consumerHelper.SetAttribute("end_ms",StringValue("320000"));
consumerHelper.Install("C2");
// C3
consumerHelper.SetPrefix("/C");
consumerHelper.SetAttribute("start_ms",StringValue("60000"));
consumerHelper.SetAttribute("end_ms",StringValue("200000"));
consumerHelper.SetAttribute("greedy_ms",StringValue("150000"));
consumerHelper.SetAttribute("greedy_rate",StringValue("6000000"));
consumerHelper.SetAttribute("start_ms",StringValue("160000"));
consumerHelper.SetAttribute("end_ms",StringValue("320000"));
consumerHelper.SetAttribute("greedy_ms",StringValue("240000"));
consumerHelper.SetAttribute("greedy_rate",StringValue("10000000"));
consumerHelper.Install("C3");
@@ -112,11 +112,11 @@ namespace ns3
ndn::FibHelper::AddRoute("R4", "/B", "R5", 0);
ndn::FibHelper::AddRoute("R4", "/C", "R5", 0);
Simulator::Stop(Seconds(200.0));
Simulator::Stop(Seconds(320.0));
ndn::L3RateTracer::InstallAll("dsccp3-2_throughput.txt", Seconds(0.1));
ndn::AppDelayTracer::InstallAll("dsccp3-2_delay.txt");
L2RateTracer::InstallAll("dsccp3-2_drop.txt", Seconds(0.1));
ndn::L3RateTracer::InstallAll("dsccp3-2-throughput-320.txt", Seconds(0.5));
ndn::AppDelayTracer::InstallAll("dsccp3-2-delay-320.txt");
L2RateTracer::InstallAll("dsccp3-2-drop-320.txt", Seconds(0.5));
Simulator::Run();
Simulator::Destroy();
+60 -60
View File
@@ -50,93 +50,93 @@ namespace ns3
consumerHelper.SetAttribute("start_ms",StringValue("0"));
consumerHelper.SetAttribute("end_ms",StringValue("60000"));
// // /Amazon
// consumerHelper.SetPrefix("/Amazon");
// consumerHelper.Install(C1);
// consumerHelper.Install(C2);
// consumerHelper.Install(C3);
// consumerHelper.Install(C4);
// consumerHelper.Install(C5);
// consumerHelper.Install(C6);
// consumerHelper.Install(C7);
// consumerHelper.Install(C8);
// // /Google
// consumerHelper.SetPrefix("/Google");
// consumerHelper.Install(C1);
// consumerHelper.Install(C2);
// consumerHelper.Install(C3);
// consumerHelper.Install(C4);
// consumerHelper.Install(C5);
// consumerHelper.Install(C6);
// consumerHelper.Install(C7);
// consumerHelper.Install(C8);
// // /Warner
// consumerHelper.SetPrefix("/Warner");
// consumerHelper.Install(C1);
// consumerHelper.Install(C2);
// consumerHelper.Install(C3);
// consumerHelper.Install(C4);
// consumerHelper.Install(C5);
// consumerHelper.Install(C6);
// consumerHelper.Install(C7);
// consumerHelper.Install(C8);
// /Amazon
consumerHelper.SetPrefix("/Amazon/1");
consumerHelper.SetPrefix("/Amazon");
consumerHelper.Install(C1);
consumerHelper.SetPrefix("/Amazon/2");
consumerHelper.Install(C2);
consumerHelper.SetPrefix("/Amazon/3");
consumerHelper.Install(C3);
consumerHelper.SetPrefix("/Amazon/4");
consumerHelper.Install(C4);
consumerHelper.SetPrefix("/Amazon/5");
consumerHelper.Install(C5);
consumerHelper.SetPrefix("/Amazon/6");
consumerHelper.Install(C6);
consumerHelper.SetPrefix("/Amazon/7");
consumerHelper.Install(C7);
consumerHelper.SetPrefix("/Amazon/8");
consumerHelper.Install(C8);
// /Google
consumerHelper.SetPrefix("/Google/1");
consumerHelper.SetPrefix("/Google");
consumerHelper.Install(C1);
consumerHelper.SetPrefix("/Google/2");
consumerHelper.Install(C2);
consumerHelper.SetPrefix("/Google/3");
consumerHelper.Install(C3);
consumerHelper.SetPrefix("/Google/4");
consumerHelper.Install(C4);
consumerHelper.SetPrefix("/Google/5");
consumerHelper.Install(C5);
consumerHelper.SetPrefix("/Google/6");
consumerHelper.Install(C6);
consumerHelper.SetPrefix("/Google/7");
consumerHelper.Install(C7);
consumerHelper.SetPrefix("/Google/8");
consumerHelper.Install(C8);
// /Warner
consumerHelper.SetPrefix("/Warner/1");
consumerHelper.SetPrefix("/Warner");
consumerHelper.Install(C1);
consumerHelper.SetPrefix("/Warner/2");
consumerHelper.Install(C2);
consumerHelper.SetPrefix("/Warner/3");
consumerHelper.Install(C3);
consumerHelper.SetPrefix("/Warner/4");
consumerHelper.Install(C4);
consumerHelper.SetPrefix("/Warner/5");
consumerHelper.Install(C5);
consumerHelper.SetPrefix("/Warner/6");
consumerHelper.Install(C6);
consumerHelper.SetPrefix("/Warner/7");
consumerHelper.Install(C7);
consumerHelper.SetPrefix("/Warner/8");
consumerHelper.Install(C8);
//// /Amazon
//consumerHelper.SetPrefix("/Amazon/1");
//consumerHelper.Install(C1);
//consumerHelper.SetPrefix("/Amazon/2");
//consumerHelper.Install(C2);
//consumerHelper.SetPrefix("/Amazon/3");
//consumerHelper.Install(C3);
//consumerHelper.SetPrefix("/Amazon/4");
//consumerHelper.Install(C4);
//consumerHelper.SetPrefix("/Amazon/5");
//consumerHelper.Install(C5);
//consumerHelper.SetPrefix("/Amazon/6");
//consumerHelper.Install(C6);
//consumerHelper.SetPrefix("/Amazon/7");
//consumerHelper.Install(C7);
//consumerHelper.SetPrefix("/Amazon/8");
//consumerHelper.Install(C8);
//// /Google
//consumerHelper.SetPrefix("/Google/1");
//consumerHelper.Install(C1);
//consumerHelper.SetPrefix("/Google/2");
//consumerHelper.Install(C2);
//consumerHelper.SetPrefix("/Google/3");
//consumerHelper.Install(C3);
//consumerHelper.SetPrefix("/Google/4");
//consumerHelper.Install(C4);
//consumerHelper.SetPrefix("/Google/5");
//consumerHelper.Install(C5);
//consumerHelper.SetPrefix("/Google/6");
//consumerHelper.Install(C6);
//consumerHelper.SetPrefix("/Google/7");
//consumerHelper.Install(C7);
//consumerHelper.SetPrefix("/Google/8");
//consumerHelper.Install(C8);
//// /Warner
//consumerHelper.SetPrefix("/Warner/1");
//consumerHelper.Install(C1);
//consumerHelper.SetPrefix("/Warner/2");
//consumerHelper.Install(C2);
//consumerHelper.SetPrefix("/Warner/3");
//consumerHelper.Install(C3);
//consumerHelper.SetPrefix("/Warner/4");
//consumerHelper.Install(C4);
//consumerHelper.SetPrefix("/Warner/5");
//consumerHelper.Install(C5);
//consumerHelper.SetPrefix("/Warner/6");
//consumerHelper.Install(C6);
//consumerHelper.SetPrefix("/Warner/7");
//consumerHelper.Install(C7);
//consumerHelper.SetPrefix("/Warner/8");
//consumerHelper.Install(C8);
ndn::AppHelper producerHelper("ns3::ndn::Producer");
producerHelper.SetAttribute("PayloadSize", StringValue("1024"));
@@ -260,9 +260,9 @@ namespace ns3
Simulator::Stop(Seconds(60.0));
ndn::L3RateTracer::InstallAll("dsccp4-1-mircc-no-pit-merge-throughput.txt", Seconds(0.1));
ndn::AppDelayTracer::InstallAll("dsccp4-1-mircc-no-pit-merge-delay.txt");
L2RateTracer::InstallAll("dsccp4-1-mircc-no-pit-merge-drop.txt", Seconds(0.1));
ndn::L3RateTracer::InstallAll("mircc-single-throughput.txt", Seconds(0.1));
ndn::AppDelayTracer::InstallAll("mircc-single-delay.txt");
L2RateTracer::InstallAll("mircc-single-drop.txt", Seconds(0.1));
Simulator::Run();
Simulator::Destroy();
+61 -61
View File
@@ -50,93 +50,93 @@ namespace ns3
consumerHelper.SetAttribute("start_ms",StringValue("0"));
consumerHelper.SetAttribute("end_ms",StringValue("60000"));
// // /Amazon
// consumerHelper.SetPrefix("/Amazon");
// consumerHelper.Install(C1);
// consumerHelper.Install(C2);
// consumerHelper.Install(C3);
// consumerHelper.Install(C4);
// consumerHelper.Install(C5);
// consumerHelper.Install(C6);
// consumerHelper.Install(C7);
// consumerHelper.Install(C8);
// // /Google
// consumerHelper.SetPrefix("/Google");
// consumerHelper.Install(C1);
// consumerHelper.Install(C2);
// consumerHelper.Install(C3);
// consumerHelper.Install(C4);
// consumerHelper.Install(C5);
// consumerHelper.Install(C6);
// consumerHelper.Install(C7);
// consumerHelper.Install(C8);
// // /Warner
// consumerHelper.SetPrefix("/Warner");
// consumerHelper.Install(C1);
// consumerHelper.Install(C2);
// consumerHelper.Install(C3);
// consumerHelper.Install(C4);
// consumerHelper.Install(C5);
// consumerHelper.Install(C6);
// consumerHelper.Install(C7);
// consumerHelper.Install(C8);
// /Amazon
consumerHelper.SetPrefix("/Amazon/1");
consumerHelper.SetPrefix("/Amazon");
consumerHelper.Install(C1);
consumerHelper.SetPrefix("/Amazon/2");
consumerHelper.Install(C2);
consumerHelper.SetPrefix("/Amazon/3");
consumerHelper.Install(C3);
consumerHelper.SetPrefix("/Amazon/4");
consumerHelper.Install(C4);
consumerHelper.SetPrefix("/Amazon/5");
consumerHelper.Install(C5);
consumerHelper.SetPrefix("/Amazon/6");
consumerHelper.Install(C6);
consumerHelper.SetPrefix("/Amazon/7");
consumerHelper.Install(C7);
consumerHelper.SetPrefix("/Amazon/8");
consumerHelper.Install(C8);
// /Google
consumerHelper.SetPrefix("/Google/1");
consumerHelper.SetPrefix("/Google");
consumerHelper.Install(C1);
consumerHelper.SetPrefix("/Google/2");
consumerHelper.Install(C2);
consumerHelper.SetPrefix("/Google/3");
consumerHelper.Install(C3);
consumerHelper.SetPrefix("/Google/4");
consumerHelper.Install(C4);
consumerHelper.SetPrefix("/Google/5");
consumerHelper.Install(C5);
consumerHelper.SetPrefix("/Google/6");
consumerHelper.Install(C6);
consumerHelper.SetPrefix("/Google/7");
consumerHelper.Install(C7);
consumerHelper.SetPrefix("/Google/8");
consumerHelper.Install(C8);
// /Warner
consumerHelper.SetPrefix("/Warner/1");
consumerHelper.SetPrefix("/Warner");
consumerHelper.Install(C1);
consumerHelper.SetPrefix("/Warner/2");
consumerHelper.Install(C2);
consumerHelper.SetPrefix("/Warner/3");
consumerHelper.Install(C3);
consumerHelper.SetPrefix("/Warner/4");
consumerHelper.Install(C4);
consumerHelper.SetPrefix("/Warner/5");
consumerHelper.Install(C5);
consumerHelper.SetPrefix("/Warner/6");
consumerHelper.Install(C6);
consumerHelper.SetPrefix("/Warner/7");
consumerHelper.Install(C7);
consumerHelper.SetPrefix("/Warner/8");
consumerHelper.Install(C8);
//// /Amazon
//consumerHelper.SetPrefix("/Amazon/1");
//consumerHelper.Install(C1);
//consumerHelper.SetPrefix("/Amazon/2");
//consumerHelper.Install(C2);
//consumerHelper.SetPrefix("/Amazon/3");
//consumerHelper.Install(C3);
//consumerHelper.SetPrefix("/Amazon/4");
//consumerHelper.Install(C4);
//consumerHelper.SetPrefix("/Amazon/5");
//consumerHelper.Install(C5);
//consumerHelper.SetPrefix("/Amazon/6");
//consumerHelper.Install(C6);
//consumerHelper.SetPrefix("/Amazon/7");
//consumerHelper.Install(C7);
//consumerHelper.SetPrefix("/Amazon/8");
//consumerHelper.Install(C8);
//// /Google
//consumerHelper.SetPrefix("/Google/1");
//consumerHelper.Install(C1);
//consumerHelper.SetPrefix("/Google/2");
//consumerHelper.Install(C2);
//consumerHelper.SetPrefix("/Google/3");
//consumerHelper.Install(C3);
//consumerHelper.SetPrefix("/Google/4");
//consumerHelper.Install(C4);
//consumerHelper.SetPrefix("/Google/5");
//consumerHelper.Install(C5);
//consumerHelper.SetPrefix("/Google/6");
//consumerHelper.Install(C6);
//consumerHelper.SetPrefix("/Google/7");
//consumerHelper.Install(C7);
//consumerHelper.SetPrefix("/Google/8");
//consumerHelper.Install(C8);
//// /Warner
//consumerHelper.SetPrefix("/Warner/1");
//consumerHelper.Install(C1);
//consumerHelper.SetPrefix("/Warner/2");
//consumerHelper.Install(C2);
//consumerHelper.SetPrefix("/Warner/3");
//consumerHelper.Install(C3);
//consumerHelper.SetPrefix("/Warner/4");
//consumerHelper.Install(C4);
//consumerHelper.SetPrefix("/Warner/5");
//consumerHelper.Install(C5);
//consumerHelper.SetPrefix("/Warner/6");
//consumerHelper.Install(C6);
//consumerHelper.SetPrefix("/Warner/7");
//consumerHelper.Install(C7);
//consumerHelper.SetPrefix("/Warner/8");
//consumerHelper.Install(C8);
ndn::AppHelper producerHelper("ns3::ndn::Producer");
producerHelper.SetAttribute("PayloadSize", StringValue("1024"));
@@ -260,9 +260,9 @@ namespace ns3
Simulator::Stop(Seconds(60.0));
ndn::L3RateTracer::InstallAll("dsccp4-2-mircc-no-pit-merge-throughput.txt", Seconds(0.1));
ndn::AppDelayTracer::InstallAll("dsccp4-2-mircc-no-pit-merge-delay.txt");
L2RateTracer::InstallAll("dsccp4-2-mircc-no-pit-merge-drop.txt", Seconds(0.1));
ndn::L3RateTracer::InstallAll("mircc-multi-throughput.txt", Seconds(0.1));
ndn::AppDelayTracer::InstallAll("mircc-multi-delay.txt");
L2RateTracer::InstallAll("mircc-multi-drop.txt", Seconds(0.1));
Simulator::Run();
Simulator::Destroy();
@@ -274,4 +274,4 @@ namespace ns3
int main(int argc, char *argv[])
{
return ns3::main(argc, argv);
}
}
+155 -155
View File
@@ -39,238 +39,238 @@ namespace ns3
// consumerHelper.SetAttribute("NumberOfContents", UintegerValue(100000));
// // /C1
// consumerHelper.SetPrefix("/C1");
// consumerHelper.Install("n18");
// consumerHelper.Install("n4");
// consumerHelper.Install("n3");
// consumerHelper.Install("n25");
// consumerHelper.Install("n40");
// consumerHelper.Install("n45");
// consumerHelper.Install("n41");
// consumerHelper.Install("n37");
// // /C2
// consumerHelper.SetPrefix("/C2");
// consumerHelper.Install("n18");
// consumerHelper.Install("n4");
// consumerHelper.Install("n3");
// consumerHelper.Install("n25");
// consumerHelper.Install("n40");
// consumerHelper.Install("n45");
// consumerHelper.Install("n41");
// consumerHelper.Install("n37");
// // /C3
// consumerHelper.SetPrefix("/C3");
// consumerHelper.Install("n18");
// consumerHelper.Install("n4");
// consumerHelper.Install("n3");
// consumerHelper.Install("n25");
// consumerHelper.Install("n40");
// consumerHelper.Install("n45");
// consumerHelper.Install("n41");
// consumerHelper.Install("n37");
// // /C4
// consumerHelper.SetPrefix("/C4");
// consumerHelper.Install("n18");
// consumerHelper.Install("n4");
// consumerHelper.Install("n3");
// consumerHelper.Install("n25");
// consumerHelper.Install("n40");
// consumerHelper.Install("n45");
// consumerHelper.Install("n41");
// consumerHelper.Install("n37");
// // /C5
// consumerHelper.SetPrefix("/C5");
// consumerHelper.Install("n18");
// consumerHelper.Install("n4");
// consumerHelper.Install("n3");
// consumerHelper.Install("n25");
// consumerHelper.Install("n40");
// consumerHelper.Install("n45");
// consumerHelper.Install("n41");
// consumerHelper.Install("n37");
// // /C6
// consumerHelper.SetPrefix("/C6");
// consumerHelper.Install("n18");
// consumerHelper.Install("n4");
// consumerHelper.Install("n3");
// consumerHelper.Install("n25");
// consumerHelper.Install("n40");
// consumerHelper.Install("n45");
// consumerHelper.Install("n41");
// consumerHelper.Install("n37");
// // /C7
// consumerHelper.SetPrefix("/C7");
// consumerHelper.Install("n18");
// consumerHelper.Install("n4");
// consumerHelper.Install("n3");
// consumerHelper.Install("n25");
// consumerHelper.Install("n40");
// consumerHelper.Install("n45");
// consumerHelper.Install("n41");
// consumerHelper.Install("n37");
// // /C8
// consumerHelper.SetPrefix("/C8");
// consumerHelper.Install("n18");
// consumerHelper.Install("n4");
// consumerHelper.Install("n3");
// consumerHelper.Install("n25");
// consumerHelper.Install("n40");
// consumerHelper.Install("n45");
// consumerHelper.Install("n41");
// consumerHelper.Install("n37");
// /C1
consumerHelper.SetPrefix("/C1/1");
consumerHelper.SetPrefix("/C1");
consumerHelper.Install("n18");
consumerHelper.SetPrefix("/C1/2");
consumerHelper.Install("n4");
consumerHelper.SetPrefix("/C1/3");
consumerHelper.Install("n3");
consumerHelper.SetPrefix("/C1/4");
consumerHelper.Install("n25");
consumerHelper.SetPrefix("/C1/5");
consumerHelper.Install("n40");
consumerHelper.SetPrefix("/C1/6");
consumerHelper.Install("n45");
consumerHelper.SetPrefix("/C1/7");
consumerHelper.Install("n41");
consumerHelper.SetPrefix("/C1/8");
consumerHelper.Install("n37");
// /C2
consumerHelper.SetPrefix("/C2/1");
consumerHelper.SetPrefix("/C2");
consumerHelper.Install("n18");
consumerHelper.SetPrefix("/C2/2");
consumerHelper.Install("n4");
consumerHelper.SetPrefix("/C2/3");
consumerHelper.Install("n3");
consumerHelper.SetPrefix("/C2/4");
consumerHelper.Install("n25");
consumerHelper.SetPrefix("/C2/5");
consumerHelper.Install("n40");
consumerHelper.SetPrefix("/C2/6");
consumerHelper.Install("n45");
consumerHelper.SetPrefix("/C2/7");
consumerHelper.Install("n41");
consumerHelper.SetPrefix("/C2/8");
consumerHelper.Install("n37");
// /C3
consumerHelper.SetPrefix("/C3/1");
consumerHelper.SetPrefix("/C3");
consumerHelper.Install("n18");
consumerHelper.SetPrefix("/C3/2");
consumerHelper.Install("n4");
consumerHelper.SetPrefix("/C3/3");
consumerHelper.Install("n3");
consumerHelper.SetPrefix("/C3/4");
consumerHelper.Install("n25");
consumerHelper.SetPrefix("/C3/5");
consumerHelper.Install("n40");
consumerHelper.SetPrefix("/C3/6");
consumerHelper.Install("n45");
consumerHelper.SetPrefix("/C3/7");
consumerHelper.Install("n41");
consumerHelper.SetPrefix("/C3/8");
consumerHelper.Install("n37");
// /C4
consumerHelper.SetPrefix("/C4/1");
consumerHelper.SetPrefix("/C4");
consumerHelper.Install("n18");
consumerHelper.SetPrefix("/C4/2");
consumerHelper.Install("n4");
consumerHelper.SetPrefix("/C4/3");
consumerHelper.Install("n3");
consumerHelper.SetPrefix("/C4/4");
consumerHelper.Install("n25");
consumerHelper.SetPrefix("/C4/5");
consumerHelper.Install("n40");
consumerHelper.SetPrefix("/C4/6");
consumerHelper.Install("n45");
consumerHelper.SetPrefix("/C4/7");
consumerHelper.Install("n41");
consumerHelper.SetPrefix("/C4/8");
consumerHelper.Install("n37");
// /C5
consumerHelper.SetPrefix("/C5/1");
consumerHelper.SetPrefix("/C5");
consumerHelper.Install("n18");
consumerHelper.SetPrefix("/C5/2");
consumerHelper.Install("n4");
consumerHelper.SetPrefix("/C5/3");
consumerHelper.Install("n3");
consumerHelper.SetPrefix("/C5/4");
consumerHelper.Install("n25");
consumerHelper.SetPrefix("/C5/5");
consumerHelper.Install("n40");
consumerHelper.SetPrefix("/C5/6");
consumerHelper.Install("n45");
consumerHelper.SetPrefix("/C5/7");
consumerHelper.Install("n41");
consumerHelper.SetPrefix("/C5/8");
consumerHelper.Install("n37");
// /C6
consumerHelper.SetPrefix("/C6/1");
consumerHelper.SetPrefix("/C6");
consumerHelper.Install("n18");
consumerHelper.SetPrefix("/C6/2");
consumerHelper.Install("n4");
consumerHelper.SetPrefix("/C6/3");
consumerHelper.Install("n3");
consumerHelper.SetPrefix("/C6/4");
consumerHelper.Install("n25");
consumerHelper.SetPrefix("/C6/5");
consumerHelper.Install("n40");
consumerHelper.SetPrefix("/C6/6");
consumerHelper.Install("n45");
consumerHelper.SetPrefix("/C6/7");
consumerHelper.Install("n41");
consumerHelper.SetPrefix("/C6/8");
consumerHelper.Install("n37");
// /C7
consumerHelper.SetPrefix("/C7/1");
consumerHelper.SetPrefix("/C7");
consumerHelper.Install("n18");
consumerHelper.SetPrefix("/C7/2");
consumerHelper.Install("n4");
consumerHelper.SetPrefix("/C7/3");
consumerHelper.Install("n3");
consumerHelper.SetPrefix("/C7/4");
consumerHelper.Install("n25");
consumerHelper.SetPrefix("/C7/5");
consumerHelper.Install("n40");
consumerHelper.SetPrefix("/C7/6");
consumerHelper.Install("n45");
consumerHelper.SetPrefix("/C7/7");
consumerHelper.Install("n41");
consumerHelper.SetPrefix("/C7/8");
consumerHelper.Install("n37");
// /C8
consumerHelper.SetPrefix("/C8/1");
consumerHelper.SetPrefix("/C8");
consumerHelper.Install("n18");
consumerHelper.SetPrefix("/C8/2");
consumerHelper.Install("n4");
consumerHelper.SetPrefix("/C8/3");
consumerHelper.Install("n3");
consumerHelper.SetPrefix("/C8/4");
consumerHelper.Install("n25");
consumerHelper.SetPrefix("/C8/5");
consumerHelper.Install("n40");
consumerHelper.SetPrefix("/C8/6");
consumerHelper.Install("n45");
consumerHelper.SetPrefix("/C8/7");
consumerHelper.Install("n41");
consumerHelper.SetPrefix("/C8/8");
consumerHelper.Install("n37");
//// /C1
//consumerHelper.SetPrefix("/C1/1");
//consumerHelper.Install("n18");
//consumerHelper.SetPrefix("/C1/2");
//consumerHelper.Install("n4");
//consumerHelper.SetPrefix("/C1/3");
//consumerHelper.Install("n3");
//consumerHelper.SetPrefix("/C1/4");
//consumerHelper.Install("n25");
//consumerHelper.SetPrefix("/C1/5");
//consumerHelper.Install("n40");
//consumerHelper.SetPrefix("/C1/6");
//consumerHelper.Install("n45");
//consumerHelper.SetPrefix("/C1/7");
//consumerHelper.Install("n41");
//consumerHelper.SetPrefix("/C1/8");
//consumerHelper.Install("n37");
//// /C2
//consumerHelper.SetPrefix("/C2/1");
//consumerHelper.Install("n18");
//consumerHelper.SetPrefix("/C2/2");
//consumerHelper.Install("n4");
//consumerHelper.SetPrefix("/C2/3");
//consumerHelper.Install("n3");
//consumerHelper.SetPrefix("/C2/4");
//consumerHelper.Install("n25");
//consumerHelper.SetPrefix("/C2/5");
//consumerHelper.Install("n40");
//consumerHelper.SetPrefix("/C2/6");
//consumerHelper.Install("n45");
//consumerHelper.SetPrefix("/C2/7");
//consumerHelper.Install("n41");
//consumerHelper.SetPrefix("/C2/8");
//consumerHelper.Install("n37");
//// /C3
//consumerHelper.SetPrefix("/C3/1");
//consumerHelper.Install("n18");
//consumerHelper.SetPrefix("/C3/2");
//consumerHelper.Install("n4");
//consumerHelper.SetPrefix("/C3/3");
//consumerHelper.Install("n3");
//consumerHelper.SetPrefix("/C3/4");
//consumerHelper.Install("n25");
//consumerHelper.SetPrefix("/C3/5");
//consumerHelper.Install("n40");
//consumerHelper.SetPrefix("/C3/6");
//consumerHelper.Install("n45");
//consumerHelper.SetPrefix("/C3/7");
//consumerHelper.Install("n41");
//consumerHelper.SetPrefix("/C3/8");
//consumerHelper.Install("n37");
//// /C4
//consumerHelper.SetPrefix("/C4/1");
//consumerHelper.Install("n18");
//consumerHelper.SetPrefix("/C4/2");
//consumerHelper.Install("n4");
//consumerHelper.SetPrefix("/C4/3");
//consumerHelper.Install("n3");
//consumerHelper.SetPrefix("/C4/4");
//consumerHelper.Install("n25");
//consumerHelper.SetPrefix("/C4/5");
//consumerHelper.Install("n40");
//consumerHelper.SetPrefix("/C4/6");
//consumerHelper.Install("n45");
//consumerHelper.SetPrefix("/C4/7");
//consumerHelper.Install("n41");
//consumerHelper.SetPrefix("/C4/8");
//consumerHelper.Install("n37");
//// /C5
//consumerHelper.SetPrefix("/C5/1");
//consumerHelper.Install("n18");
//consumerHelper.SetPrefix("/C5/2");
//consumerHelper.Install("n4");
//consumerHelper.SetPrefix("/C5/3");
//consumerHelper.Install("n3");
//consumerHelper.SetPrefix("/C5/4");
//consumerHelper.Install("n25");
//consumerHelper.SetPrefix("/C5/5");
//consumerHelper.Install("n40");
//consumerHelper.SetPrefix("/C5/6");
//consumerHelper.Install("n45");
//consumerHelper.SetPrefix("/C5/7");
//consumerHelper.Install("n41");
//consumerHelper.SetPrefix("/C5/8");
//consumerHelper.Install("n37");
//// /C6
//consumerHelper.SetPrefix("/C6/1");
//consumerHelper.Install("n18");
//consumerHelper.SetPrefix("/C6/2");
//consumerHelper.Install("n4");
//consumerHelper.SetPrefix("/C6/3");
//consumerHelper.Install("n3");
//consumerHelper.SetPrefix("/C6/4");
//consumerHelper.Install("n25");
//consumerHelper.SetPrefix("/C6/5");
//consumerHelper.Install("n40");
//consumerHelper.SetPrefix("/C6/6");
//consumerHelper.Install("n45");
//consumerHelper.SetPrefix("/C6/7");
//consumerHelper.Install("n41");
//consumerHelper.SetPrefix("/C6/8");
//consumerHelper.Install("n37");
//// /C7
//consumerHelper.SetPrefix("/C7/1");
//consumerHelper.Install("n18");
//consumerHelper.SetPrefix("/C7/2");
//consumerHelper.Install("n4");
//consumerHelper.SetPrefix("/C7/3");
//consumerHelper.Install("n3");
//consumerHelper.SetPrefix("/C7/4");
//consumerHelper.Install("n25");
//consumerHelper.SetPrefix("/C7/5");
//consumerHelper.Install("n40");
//consumerHelper.SetPrefix("/C7/6");
//consumerHelper.Install("n45");
//consumerHelper.SetPrefix("/C7/7");
//consumerHelper.Install("n41");
//consumerHelper.SetPrefix("/C7/8");
//consumerHelper.Install("n37");
//// /C8
//consumerHelper.SetPrefix("/C8/1");
//consumerHelper.Install("n18");
//consumerHelper.SetPrefix("/C8/2");
//consumerHelper.Install("n4");
//consumerHelper.SetPrefix("/C8/3");
//consumerHelper.Install("n3");
//consumerHelper.SetPrefix("/C8/4");
//consumerHelper.Install("n25");
//consumerHelper.SetPrefix("/C8/5");
//consumerHelper.Install("n40");
//consumerHelper.SetPrefix("/C8/6");
//consumerHelper.Install("n45");
//consumerHelper.SetPrefix("/C8/7");
//consumerHelper.Install("n41");
//consumerHelper.SetPrefix("/C8/8");
//consumerHelper.Install("n37");
ndn::AppHelper producerHelper("ns3::ndn::Producer");
producerHelper.SetAttribute("PayloadSize", StringValue("1024"));
@@ -965,9 +965,9 @@ namespace ns3
Simulator::Stop(Seconds(120.0));
ndn::L3RateTracer::InstallAll("dsccp5_throughput-0.1.txt", Seconds(0.1));
ndn::AppDelayTracer::InstallAll("dsccp5_delay-0.1.txt");
L2RateTracer::InstallAll("dsccp5_drop-0.1.txt", Seconds(0.1));
ndn::L3RateTracer::InstallAll("mircc-throughput.txt", Seconds(0.1));
ndn::AppDelayTracer::InstallAll("mircc-delay.txt");
L2RateTracer::InstallAll("mircc-drop.txt", Seconds(0.1));
Simulator::Run();
Simulator::Destroy();
+36
View File
@@ -0,0 +1,36 @@
router
# node comment yPos xPos
R1 NA 5 3
R2 NA 5 5
R4 NA 5 7
R6 NA 5 9
C1 NA 7 1
C2 NA 5 1
C3 NA 3 1
P1 NA 8 11
P2 NA 6 11
P3 NA 4 11
P4 NA 2 11
R3 NA 7 8
R5 NA 3 8
link
# srcNode dstNode bandwidth metric delay queue
C1 R1 100Mbps 1 10ms 20
C2 R1 100Mbps 1 10ms 20
C3 R1 100Mbps 1 10ms 20
R6 P1 100Mbps 1 10ms 20
R6 P2 100Mbps 1 10ms 20
R6 P3 100Mbps 1 10ms 20
R6 P4 100Mbps 1 10ms 20
R1 R2 20Mbps 1 10ms 20
R2 R3 1Mbps 1 10ms 20
R5 R6 7Mbps 1 10ms 20
R4 R3 6Mbps 1 5ms 20
R4 R5 2Mbps 1 5ms 20
R2 R5 5Mbps 1 10ms 20
R2 R4 8Mbps 1 5ms 20
R3 R6 7Mbps 1 10ms 20
+36
View File
@@ -0,0 +1,36 @@
router
# node comment yPos xPos
R1 NA 5 3
R2 NA 5 5
R4 NA 5 7
R6 NA 5 9
C1 NA 7 1
C2 NA 5 1
C3 NA 3 1
P1 NA 8 11
P2 NA 6 11
P3 NA 4 11
P4 NA 2 11
R3 NA 7 8
R5 NA 3 8
link
# srcNode dstNode bandwidth metric delay queue
C1 R1 100Mbps 1 10ms 20
C2 R1 100Mbps 1 10ms 20
C3 R1 100Mbps 1 10ms 20
R6 P1 100Mbps 1 10ms 20
R6 P2 100Mbps 1 10ms 20
R6 P3 100Mbps 1 10ms 20
R6 P4 100Mbps 1 10ms 20
R2 R4 7Mbps 1 5ms 20
R1 R2 40Mbps 1 10ms 20
R2 R3 4Mbps 1 10ms 20
R4 R3 10Mbps 1 5ms 20
R4 R5 2Mbps 1 5ms 20
R2 R5 16Mbps 1 10ms 20
R3 R6 14Mbps 1 10ms 20
R5 R6 18Mbps 1 10ms 20
+9 -8
View File
@@ -25,11 +25,12 @@ R6 P1 100Mbps 1 10ms 20
R6 P2 100Mbps 1 10ms 20
R6 P3 100Mbps 1 10ms 20
R6 P4 100Mbps 1 10ms 20
R1 R2 8Mbps 1 10ms 20
R2 R3 1Mbps 1 10ms 20
R4 R3 2Mbps 1 5ms 20
R3 R6 3Mbps 1 10ms 20
R4 R5 3Mbps 1 5ms 20
R2 R4 5Mbps 1 5ms 20
R2 R5 4Mbps 1 10ms 20
R5 R6 7Mbps 1 10ms 20
R1 R2 20Mbps 1 10ms 20
R2 R3 2Mbps 1 10ms 20
R4 R3 3Mbps 1 5ms 20
R3 R6 5Mbps 1 10ms 20
R4 R5 4Mbps 1 5ms 20
R2 R4 7Mbps 1 5ms 20
R2 R5 5Mbps 1 10ms 20
R5 R6 9Mbps 1 10ms 20
+9 -8
View File
@@ -25,11 +25,12 @@ R6 P1 100Mbps 1 10ms 20
R6 P2 100Mbps 1 10ms 20
R6 P3 100Mbps 1 10ms 20
R6 P4 100Mbps 1 10ms 20
R1 R2 8Mbps 1 10ms 20
R5 R6 5Mbps 1 10ms 20
R2 R3 2.5Mbps 1 10ms 20
R2 R4 5Mbps 1 10ms 20
R3 R6 5Mbps 1 5ms 20
R4 R3 2.5Mbps 1 5ms 20
R4 R5 2.5Mbps 1 5ms 20
R2 R5 2.5Mbps 1 20ms 20
R1 R2 20Mbps 1 10ms 20
R2 R3 3.5Mbps 1 10ms 20
R2 R4 7Mbps 1 10ms 20
R2 R5 3.5Mbps 1 20ms 20
R4 R3 3.5Mbps 1 5ms 20
R4 R5 3.5Mbps 1 5ms 20
R3 R6 7Mbps 1 5ms 20
R5 R6 7Mbps 1 10ms 20