So, I was wanting to run some tests with the 5G MAC layer algorithms (specifically TDMARR and TDMAMR) using some UEs with mobility and two flows within them. In my tests, I initially started with just one UE and everything went well. However, when I needed to add more than one UE, I got giant delay spikes during the simulations.
So, I wanted to know if the error was in the way I was initializing the UEs, since everything was fine before I added another UE? Or if it might be something in the 5G module?
void
BuildApps(Ipv4InterfaceContainer& ueIpIface)
{
/*
* Traffic part. Install two kind of traffic: low-latency and voice, each
* identified by a particular source port.
*/
uint16_t dlPortLowLat = 1234;
uint16_t dlPortClassic = 1235;
/*
* Voice traffic
* remote host is the server, and the UE is the client
* hemote host (6) ----------- ue:1235 (1)
* using TCP CUBIC
*/
// configure the TCP CUBIC socket
Config::Set("NodeList/" + std::to_string(remoteHostLowLat->GetId()) +
"/$ns3::TcpL4Protocol/SocketType",
TypeIdValue(TcpPrague::GetTypeId()));
Config::Set("NodeList/" + std::to_string(remoteHostClassic->GetId()) +
"/$ns3::TcpL4Protocol/SocketType",
TypeIdValue(TcpCubic::GetTypeId()));
for (uint32_t i = 0; i < uesContainer.GetN(); ++i)
{
Config::Set("NodeList/" + std::to_string(uesContainer.Get(i)->GetId()) +
"/$ns3::TcpL4Protocol/SocketType",
TypeIdValue(TcpCubic::GetTypeId()));
PacketSinkHelper dlSinkVoice("ns3::TcpSocketFactory",
InetSocketAddress(Ipv4Address::GetAny(), dlPortClassic+i));
serverApps.Add(dlSinkVoice.Install(uesContainer.Get(i)));
BulkSendHelper dlClientVoice("ns3::TcpSocketFactory", Address());
dlClientVoice.SetAttribute("SendSize", UintegerValue(1024));
AddressValue remoteAddressVoice(InetSocketAddress(ueIpIface.GetAddress(i), dlPortClassic+ i));
dlClientVoice.SetAttribute("Remote", AddressValue(remoteAddressVoice));
clientApps.Add(dlClientVoice.Install(remoteHostClassic));
Config::Set("NodeList/" + std::to_string(uesContainer.Get(i)->GetId()) +
"/$ns3::TcpL4Protocol/SocketType",
TypeIdValue(TcpPrague::GetTypeId()));
PacketSinkHelper dlSinkLowLat("ns3::TcpSocketFactory",
InetSocketAddress(Ipv4Address::GetAny(), dlPortLowLat + i));
serverApps.Add(dlSinkLowLat.Install(uesContainer.Get(i)));
BulkSendHelper dlClientLowLat("ns3::TcpSocketFactory", Address());
dlClientLowLat.SetAttribute("SendSize", UintegerValue(1024));
AddressValue remoteAddressLowLat(InetSocketAddress(ueIpIface.GetAddress(i), dlPortLowLat+ i));
dlClientLowLat.SetAttribute("Remote", AddressValue(remoteAddressLowLat));
clientApps.Add(dlClientLowLat.Install(remoteHostLowLat));
}
// start TCP server and client apps
serverApps.Start(TcpAppStart);
clientApps.Start(TcpAppStart);
serverApps.Stop(simTime);
clientApps.Stop(simTime);
}