fix wireshark reading of tcp as rsl

apparently port 5000 is dedicated to RSL and wireshark interpreted it as such

+ simplify tcp burst syntax
main
EmaMaker 2023-12-30 14:38:50 +00:00
parent c866e09b18
commit 2a9b6b9705
1 changed files with 11 additions and 14 deletions

View File

@ -289,20 +289,20 @@ int main(int argc, char* argv[])
// Server 0 packet sink // Server 0 packet sink
// TCP burst traffic of 1821 B for each packet starting at 1.15 s // TCP burst traffic of 1821 B for each packet starting at 1.15 s
// Sender: Node 11 Receiver: Server 0 // Sender: Node 11 Receiver: Server 0
int port0 = 5000; int port0 = 10000;
int port1 = 5001; int port1 = 10001;
// Server 0 that will receive from node 11 // Server 0 that will receive from node 11
Address server0_address1(InetSocketAddress(ipptp02.GetAddress(0), port0)); Address server0_address1(InetSocketAddress(Ipv4Address::GetAny(), port0));
PacketSinkHelper sinkHelper0_1("ns3::TcpSocketFactory", server0_address1); PacketSinkHelper sinkHelper0_1("ns3::TcpSocketFactory", server0_address1);
ApplicationContainer server0_app1 = sinkHelper0_1.Install(nodes02.Get(0)); ApplicationContainer server0_app1 = sinkHelper0_1.Install(nodes02.Get(0));
server0_app1.Start(Seconds(0)); server0_app1.Start(Seconds(0));
// Server 0 that will receive from node 15 // Server 0 that will receive from node 15
Address server0_address2(InetSocketAddress(ipptp02.GetAddress(0), port1)); Address server0_address2(InetSocketAddress(Ipv4Address::GetAny(), port1));
PacketSinkHelper sinkHelper0_2("ns3::TcpSocketFactory", server0_address2); PacketSinkHelper sinkHelper0_2("ns3::TcpSocketFactory", server0_address2);
ApplicationContainer server0_app2 = sinkHelper0_2.Install(nodes02.Get(0)); ApplicationContainer server0_app2 = sinkHelper0_2.Install(nodes02.Get(0));
server0_app2.Start(Seconds(0)); server0_app2.Start(Seconds(0));
// Server 1 that will receive from node 10 // Server 1 that will receive from node 10
Address server1_address(InetSocketAddress(ipptp12.GetAddress(0), port0)); Address server1_address(InetSocketAddress(Ipv4Address::GetAny(), port0));
PacketSinkHelper sinkHelper1("ns3::TcpSocketFactory", server1_address); PacketSinkHelper sinkHelper1("ns3::TcpSocketFactory", server1_address);
ApplicationContainer server1_app = sinkHelper1.Install(nodes12.Get(0)); ApplicationContainer server1_app = sinkHelper1.Install(nodes12.Get(0));
server1_app.Start(Seconds(0)); server1_app.Start(Seconds(0));
@ -313,27 +313,24 @@ int main(int argc, char* argv[])
onOffHelper_11.SetAttribute("OffTime", StringValue("ns3::ExponentialRandomVariable[Mean=1]")); onOffHelper_11.SetAttribute("OffTime", StringValue("ns3::ExponentialRandomVariable[Mean=1]"));
onOffHelper_11.SetAttribute("PacketSize", UintegerValue(1821)); onOffHelper_11.SetAttribute("PacketSize", UintegerValue(1821));
onOffHelper_11.SetAttribute("StartTime", StringValue("1.15s")); onOffHelper_11.SetAttribute("StartTime", StringValue("1.15s"));
ApplicationContainer node11_app; ApplicationContainer node11_app = onOffHelper_11.Install(wifiStaNodes.Get(1));
node11_app.Add(onOffHelper_11.Install(wifiStaNodes.Get(1))); node11_app.Start(Seconds(0.0));
node11_app.Start(Seconds(1.15));
// Node 15 that sends to server 1 // Node 15 that sends to server 1
OnOffHelper onOffHelper_10("ns3::TcpSocketFactory", InetSocketAddress(ipptp12.GetAddress(0), port0)); OnOffHelper onOffHelper_10("ns3::TcpSocketFactory", InetSocketAddress(ipptp12.GetAddress(0), port0));
onOffHelper_10.SetAttribute("OnTime", StringValue("ns3::ExponentialRandomVariable[Mean=1]")); onOffHelper_10.SetAttribute("OnTime", StringValue("ns3::ExponentialRandomVariable[Mean=1]"));
onOffHelper_10.SetAttribute("OffTime", StringValue("ns3::ExponentialRandomVariable[Mean=1]")); onOffHelper_10.SetAttribute("OffTime", StringValue("ns3::ExponentialRandomVariable[Mean=1]"));
onOffHelper_10.SetAttribute("PacketSize", UintegerValue(1829)); onOffHelper_10.SetAttribute("PacketSize", UintegerValue(1829));
onOffHelper_10.SetAttribute("StartTime", StringValue("3.39s")); onOffHelper_10.SetAttribute("StartTime", StringValue("3.39s"));
ApplicationContainer node10_app; ApplicationContainer node10_app = onOffHelper_10.Install(wifiStaNodes.Get(0));
node10_app.Add(onOffHelper_10.Install(wifiStaNodes.Get(0))); node10_app.Start(Seconds(0.0));
node10_app.Start(Seconds(3.39));
// Node 15 that sends to server 0 // Node 15 that sends to server 0
OnOffHelper onOffHelper_15("ns3::TcpSocketFactory", InetSocketAddress(ipptp02.GetAddress(0), port1)); OnOffHelper onOffHelper_15("ns3::TcpSocketFactory", InetSocketAddress(ipptp02.GetAddress(0), port1));
onOffHelper_15.SetAttribute("OnTime", StringValue("ns3::ExponentialRandomVariable[Mean=1]")); onOffHelper_15.SetAttribute("OnTime", StringValue("ns3::ExponentialRandomVariable[Mean=1]"));
onOffHelper_15.SetAttribute("OffTime", StringValue("ns3::ExponentialRandomVariable[Mean=1]")); onOffHelper_15.SetAttribute("OffTime", StringValue("ns3::ExponentialRandomVariable[Mean=1]"));
onOffHelper_15.SetAttribute("PacketSize", UintegerValue(1099)); onOffHelper_15.SetAttribute("PacketSize", UintegerValue(1099));
onOffHelper_15.SetAttribute("StartTime", StringValue("3.71s")); onOffHelper_15.SetAttribute("StartTime", StringValue("3.71s"));
ApplicationContainer node15_app; ApplicationContainer node15_app = onOffHelper_15.Install(wifiStaNodes.Get(5));
node15_app.Add(onOffHelper_15.Install(wifiStaNodes.Get(5))); node15_app.Start(Seconds(0.0));
node15_app.Start(Seconds(3.71));
/* ----- End of TCP Burst ----- */ /* ----- End of TCP Burst ----- */
/* ----- Start of UDP Echo ----- */ /* ----- Start of UDP Echo ----- */