end to end packet delay, packet loss and system throughput

771 views
Skip to first unread message

Ateeq

unread,
Feb 28, 2015, 5:27:14 AM2/28/15
to ns-3-...@googlegroups.com
Im using lena-simple-epc example and want to calculate end to end packet loss, delay and system throughput but not able to extract this information from the output files, i also get pcap files but invain. Can any one help me on which file i have to concentrate. ??

Thanks

Konstantinos

unread,
Feb 28, 2015, 5:34:57 AM2/28/15
to ns-3-...@googlegroups.com
Hi Ateeq

The LTE trace files can be used to get statistics on the E-UTRAN plane, e.g. access delay and system throughput at MAC/PDCP layer
You can work with FlowMonitor to get end-to-end statistics at network layer. There are examples and discussions in the mailing list for it.

Ateeq

unread,
Feb 28, 2015, 7:44:50 AM2/28/15
to ns-3-...@googlegroups.com
Thanks I was already working on flow monitor now having an issue.

In my lena-simpe-epc example i have added this code and then i run example with (1 UE/eNodeB ) 1 eNodeB and with 2 eNodeB.

But not getting the throughput and packet loss when i use 2 ENodeB's.

these lines i added in the script.

  Simulator::Stop(Seconds(simTime));
//added new line for flow monitor
FlowMonitorHelper flowmon;
 Ptr<FlowMonitor> monitor;
 monitor = flowmon.Install(ueNodes);
monitor = flowmon.Install(remoteHostContainer);

  Simulator::Run();

  /*GtkConfigStore config;
  config.ConfigureAttributes();*/

//added new lines for flow monitor
 monitor->CheckForLostPackets ();
monitor->SerializeToXmlFile ("results.xml" , true, true );
Ptr<Ipv4FlowClassifier> classifier = DynamicCast<Ipv4FlowClassifier> (flowmon.GetClassifier ());
std::map<FlowId, FlowMonitor::FlowStats> stats = monitor->GetFlowStats ();

for (std::map<FlowId, FlowMonitor::FlowStats>::const_iterator iter = stats.begin (); iter != stats.end (); ++iter)
  {
  Ipv4FlowClassifier::FiveTuple t = classifier->FindFlow (iter->first);

          NS_LOG_UNCOND("Flow ID: " << iter->first << " Src Addr " << t.sourceAddress << " Dst Addr " << t.destinationAddress);
          NS_LOG_UNCOND("Tx Packets = " << iter->second.txPackets);
          NS_LOG_UNCOND("Rx Packets = " << iter->second.rxPackets);
          NS_LOG_UNCOND("Throughput: " << iter->second.rxBytes * 8.0 / (iter->second.timeLastRxPacket.GetSeconds()-iter->second.timeFirstTxPacket.GetSeconds()) / 1024  << " Kbps");
 NS_LOG_UNCOND("Packet loss= " << ((iter->second.txPackets-iter->second.rxPackets)*1.0)/iter->second.txPackets);
  }

  Simulator::Destroy();
  return 0;
1 EnodeB.txt
2 eNodeB.txt

muhammad attique Atta

unread,
Feb 28, 2015, 11:16:48 AM2/28/15
to ns-3-...@googlegroups.com
I search more things and added more things for flow monitor output.

Conclusion:

Unable to get receive packet, throughput and packet loss detail when UE is communicating with the remote host.

Flow ID: 2 Src Addr 7.0.0.2 Dst Addr 1.0.0.2
Tx Packets = 11
Tx Bytes = 11572
Sum jitter = +0.0ns
Delay Sum = +0.0ns
Lost Packet = 0
Rx Bytes = 0
Rx Packets = 0
Throughput: -0 Kbps
Packet loss %= 1


It provide receive packet information only when it is communicating with same UE-UE IP.
For example:

Flow ID: 3 Src Addr 7.0.0.2 Dst Addr 7.0.0.2
Tx Packets = 11
Tx Bytes = 11572
Sum jitter = +0.0ns
Delay Sum = +0.0ns
Lost Packet = 0
Rx Bytes = 11572
Rx Packets = 11
Throughput: 90.4062 Kbps
Packet loss %= 0



Please tell me how can i fix this. Thanks

Regards,
_______________________________________________
Muhammad Attique Atta
COMSATS Institute of Information Technology, Islamabad


--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/7vYFp-wtkmk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Konstantinos

unread,
Feb 28, 2015, 12:15:47 PM2/28/15
to ns-3-...@googlegroups.com
Please provide a test script. Most probably you have not configured the routing for remote host properly.

To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

muhammad attique Atta

unread,
Feb 28, 2015, 12:26:33 PM2/28/15
to ns-3-...@googlegroups.com
I have attached file in email please review this. Thanks


To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
Script file.txt

Konstantinos

unread,
Feb 28, 2015, 12:51:47 PM2/28/15
to ns-3-...@googlegroups.com
Hi,

I just run your code for two nodes with only one modification and this is the output which looks fine to me.

Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.2
Tx Packets = 11
Tx Bytes = 11572
Sum jitter = +0.0ns
Delay Sum = +139999990.0ns
Lost Packet = 0
Rx Bytes = 10520
Rx Packets = 10
Throughput: 81.0528 Kbps
Packet loss %= 0.0909091
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.3
Tx Packets = 11
Tx Bytes = 11572
Sum jitter = +0.0ns
Delay Sum = +139999990.0ns
Lost Packet = 0
Rx Bytes = 10520
Rx Packets = 10
Throughput: 81.0528 Kbps
Packet loss %= 0.0909091
Flow ID: 3 Src Addr 7.0.0.2 Dst Addr 1.0.0.2
Tx Packets = 11
Tx Bytes = 11572
Sum jitter = +0.0ns
Delay Sum = +219295290.0ns
Lost Packet = 0
Rx Bytes = 10520
Rx Packets = 10
Throughput: 80.4238 Kbps
Packet loss %= 0.0909091
Flow ID: 4 Src Addr 7.0.0.2 Dst Addr 7.0.0.3
Tx Packets = 11
Tx Bytes = 11572
Sum jitter = +0.0ns
Delay Sum = +149999990.0ns
Lost Packet = 0
Rx Bytes = 10520
Rx Packets = 10
Throughput: 80.9729 Kbps
Packet loss %= 0.0909091
Flow ID: 5 Src Addr 7.0.0.3 Dst Addr 7.0.0.2
Tx Packets = 11
Tx Bytes = 11572
Sum jitter = +0.0ns
Delay Sum = +149999990.0ns
Lost Packet = 0
Rx Bytes = 10520
Rx Packets = 10
Throughput: 80.9729 Kbps
Packet loss %= 0.0909091
Flow ID: 6 Src Addr 7.0.0.3 Dst Addr 1.0.0.2
Tx Packets = 11
Tx Bytes = 11572
Sum jitter = +0.0ns
Delay Sum = +219304040.0ns
Lost Packet = 0
Rx Bytes = 10520
Rx Packets = 10
Throughput: 80.4238 Kbps
Packet loss %= 0.0909091

And the change was just this:

ueNodes.Create(1);
to

ueNodes.Create(numberOfNodes);
which is the original command in the lena-simple-epc. 

muhammad attique Atta

unread,
Feb 28, 2015, 1:02:49 PM2/28/15
to ns-3-...@googlegroups.com
I
​ am getting the same issue after reverting this change.

But this is giving you fine results, what can be a issue? (ns3 version ? im currently using 3.20)​




To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

muhammad attique Atta

unread,
Feb 28, 2015, 1:08:27 PM2/28/15
to ns-3-...@googlegroups.com
Here is the output if you want to review again. Thanks

attique@ubuntu:~/workspace/ns-allinone-3.20/ns-3.20$ ./waf --run scratch/lena
Waf: Entering directory `/home/attique/workspace/ns-allinone-3.20/ns-3.20/build'
[ 824/1763] cxx: scratch/lena.cc -> build/scratch/lena.cc.6.o
[1707/1763] cxxprogram: build/scratch/lena.cc.6.o -> build/scratch/lena
Waf: Leaving directory `/home/attique/workspace/ns-allinone-3.20/ns-3.20/build'
'build' finished successfully (8.525s)

Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.2
Tx Packets = 11
Tx Bytes = 11572
Sum jitter = +0.0ns
Delay Sum = +0.0ns
Lost Packet = 0
Rx Bytes = 0
Rx Packets = 0
Throughput: -0 Kbps
Packet loss %= 1
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.3
Tx Packets = 11
Tx Bytes = 11572
Sum jitter = +0.0ns
Delay Sum = +0.0ns
Lost Packet = 0
Rx Bytes = 0
Rx Packets = 0
Throughput: -0 Kbps
Packet loss %= 1
Flow ID: 3 Src Addr 7.0.0.2 Dst Addr 1.0.0.2
Tx Packets = 11
Tx Bytes = 11572
Sum jitter = +0.0ns
Delay Sum = +0.0ns
Lost Packet = 0
Rx Bytes = 0
Rx Packets = 0
Throughput: -0 Kbps
Packet loss %= 1
Flow ID: 4 Src Addr 7.0.0.2 Dst Addr 7.0.0.3
Tx Packets = 11
Tx Bytes = 11572
Sum jitter = +0.0ns
Delay Sum = +0.0ns
Lost Packet = 0
Rx Bytes = 0
Rx Packets = 0
Throughput: -0 Kbps
Packet loss %= 1
Flow ID: 5 Src Addr 7.0.0.3 Dst Addr 7.0.0.2
Tx Packets = 11
Tx Bytes = 11572
Sum jitter = +0.0ns
Delay Sum = +0.0ns
Lost Packet = 0
Rx Bytes = 0
Rx Packets = 0
Throughput: -0 Kbps
Packet loss %= 1
Flow ID: 6 Src Addr 7.0.0.3 Dst Addr 1.0.0.2
Tx Packets = 11
Tx Bytes = 11572
Sum jitter = +0.0ns
Delay Sum = +0.0ns
Lost Packet = 0
Rx Bytes = 0
Rx Packets = 0
Throughput: -0 Kbps
Packet loss %= 1


Regards,
_______________________________________________
Muhammad Attique Atta
COMSATS Institute of Information Technology, Islamabad


Tommaso Pecorella

unread,
Feb 28, 2015, 1:25:08 PM2/28/15
to ns-3-...@googlegroups.com
Nice catch. No wonder it wasn't transmitting from one UE to another UE, there was only one !
I'll avoid to do easy jokes about Ateeq's signature. It would be like shooting on the red cross. It's unfair but it's still 100 points, like they say.

Cheers,

T.
...

muhammad attique Atta

unread,
Feb 28, 2015, 2:24:11 PM2/28/15
to ns-3-...@googlegroups.com
I'm not getting the expected results as Kostantinos pasted earlier. What can i do....?

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/7vYFp-wtkmk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

Tommaso Pecorella

unread,
Feb 28, 2015, 4:13:24 PM2/28/15
to ns-3-...@googlegroups.com
Try upgrading to ns-3.22 (or ns-3-dev, even better). I just ran the script and the output is identical to Kostantinos's one.

T.

Konstantinos

unread,
Mar 1, 2015, 6:35:17 AM3/1/15
to ns-3-...@googlegroups.com
There has been a reported bug with FlowMonitor and LTE in ns-3.20, which has been fixed since then. 
So, using the latest ns-3 release, as Tommaso suggested solves your problem.


On Saturday, February 28, 2015 at 7:24:11 PM UTC, Ateeq wrote:
I'm not getting the expected results as Kostantinos pasted earlier. What can i do....?
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

Ateeq

unread,
Mar 2, 2015, 4:03:23 PM3/2/15
to ns-3-...@googlegroups.com
Thanks I have fixed this issue but bushes are all around... 

In short... When i try to increase only number of UE's in this example then i'm getting missing results.
But if i put UE and eNodeB's number same (one UE per eNodeB) then it is fine does not matter how im setting it up. 


For example: This work for me.

double numberOfNodes = 3;

.
.
enbNodes
.Create(numberOfNodes);

ueNodes
.Create(3);

 

This also work for me:

double numberOfNodes = 3;

.
.
enbNodes
.Create(numberOfNodes);

ueNodes
.Create(numberOfnodes);





But this is not working:

double numberOfNodes = 2;

.
.
enbNodes
.Create(numberOfNodes);

ueNodes
.Create(3);



I am not getting the TX and RX exact information of all the flows when i only increase the UE number.

for example: I use default eNodeB = 2 and increase UE = 3.

double numberOfNodes = 2;

.
.
enbNodes
.Create(numberOfNodes);

ueNodes
.Create(3);



Im getting bellow output for this case.

Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.2
Tx Packets = 20
Tx Bytes = 21040
Sum jitter = +0.0ns
Delay Sum = +265999981.0ns
Lost Packet = 0
Rx Bytes = 19988
Rx Packets = 19
Throughput: 81.5863 Kbps
Packet loss %= 0.05

Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.3
Tx Packets = 20
Tx Bytes = 21040
Sum jitter = +0.0ns
Delay Sum = +265999981.0ns
Lost Packet = 0
Rx Bytes = 19988
Rx Packets = 19
Throughput: 81.5863 Kbps
Packet loss %= 0.05
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.4
Tx Packets = 20
Tx Bytes = 21040

Sum jitter = +0.0ns
Delay Sum = +0.0ns
Lost Packet = 0
Rx Bytes = 0
Rx Packets = 0
Throughput: -0 Kbps
Packet loss %= 1
Flow ID: 4 Src Addr 7.0.0.2 Dst Addr 1.0.0.2
Tx Packets = 20
Tx Bytes = 21040
Sum jitter = +0.0ns
Delay Sum = +416661051.0ns
Lost Packet = 0
Rx Bytes = 19988
Rx Packets = 19
Throughput: 81.2497 Kbps
Packet loss %= 0.05
Flow ID: 5 Src Addr 7.0.0.2 Dst Addr 7.0.0.4
Tx Packets = 20
Tx Bytes = 21040

Sum jitter = +0.0ns
Delay Sum = +0.0ns
Lost Packet = 0
Rx Bytes = 0
Rx Packets = 0
Throughput: -0 Kbps
Packet loss %= 1
Flow ID: 6 Src Addr 7.0.0.3 Dst Addr 7.0.0.2
Tx Packets = 20
Tx Bytes = 21040
Sum jitter = +0.0ns
Delay Sum = +284999981.0ns
Lost Packet = 0
Rx Bytes = 19988
Rx Packets = 19
Throughput: 81.5437 Kbps
Packet loss %= 0.05
Flow ID: 7 Src Addr 7.0.0.3 Dst Addr 1.0.0.2
Tx Packets = 20
Tx Bytes = 21040
Sum jitter = +0.0ns
Delay Sum = +416677676.0ns
Lost Packet = 0
Rx Bytes = 19988
Rx Packets = 19
Throughput: 81.2497 Kbps
Packet loss %= 0.05
Flow ID: 8 Src Addr 7.0.0.4 Dst Addr 7.0.0.3
Tx Packets = 20
Tx Bytes = 21040

Sum jitter = +0.0ns
Delay Sum = +0.0ns
Lost Packet = 0
Rx Bytes = 0
Rx Packets = 0
Throughput: -0 Kbps
Packet loss %= 1
Flow ID: 9 Src Addr 7.0.0.4 Dst Addr 1.0.0.2
Tx Packets = 20
Tx Bytes = 21040

Sum jitter = +0.0ns
Delay Sum = +0.0ns
Lost Packet = 0
Rx Bytes = 0
Rx Packets = 0
Throughput: -0 Kbps
Packet loss %= 1


I want to increase only the users by setting the eNodeB's to the specific numbers. Please help me how can i only increase the UE (I tried different things but in vain).

 

To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

Konstantinos

unread,
Mar 2, 2015, 4:31:43 PM3/2/15
to ns-3-...@googlegroups.com
Please read the code more carefully and particularly the place where a UE is attached to the eNB.

130  // Attach one UE per eNodeB
131  for (uint16_t i = 0; i < numberOfNodes; i++)
132  {
133  lteHelper->Attach (ueLteDevs.Get(i), enbLteDevs.Get(i));
134  // side effect: the default EPS bearer will be activated
135  }
...

Ateeq

unread,
Mar 3, 2015, 2:36:23 PM3/3/15
to ns-3-...@googlegroups.com
Yes, Got it... It works... Thanks again... 

enbNodes.Create(numberOfNodes);
ueNodes
.Create(2);
.
.
// Attach one UE per eNodeB

   
for (uint16_t i = 0; i < numberOfNodes; i++)

       
{
               
for (uint16_t j = 0; j < 2; j++)
{
                  lteHelper
->Attach (ueLteDevs.Get(j), enbLteDevs.Get(i));

Konstantinos

unread,
Mar 3, 2015, 2:50:41 PM3/3/15
to ns-3-...@googlegroups.com
This is not correct since you attach the same UE on multiple eNB or just all of them to the second eNB (I do not know exactly how two consecutive Attach will be interpreted) .
Please think before you write the code and study the API to find more suitable methods

senthil kumar

unread,
Mar 4, 2015, 1:45:37 AM3/4/15
to ns-3-...@googlegroups.com
Hai Ateeq ,

I have same problem i want to use 1 eNB and 10 UE.. how can i do this?
for example

enbNodes.Create(numberOfNodes);   here numberOfNodes = 1 (eNB)
ueNodes
.Create(10);

and i put your command but  it does not works..

Konstantinos

unread,
Mar 4, 2015, 4:48:25 AM3/4/15
to ns-3-...@googlegroups.com
Please read the code you have written and understand each command you are writing.
You may have references of 'numberOfNodes' in other places refering to the number of UEs, but since UEs=10 and numberofnodes=1 that is not working!

senthil kumar

unread,
Mar 5, 2015, 4:41:52 AM3/5/15
to ns-3-...@googlegroups.com
Hai Konstantinos,

Thanks for your help..i got same problem again

when i put numberOfNodes =1 and UE=10

it shows delay , throughput = 0,  like this

Flow ID: 1 Src Addr 1.0.0.2 Dst Addr 7.0.0.2
Tx Packets = 15
Tx Bytes = 15780
Sum jitter = +0.0ns
Delay Sum = +195999986.0ns
Lost Packet = 0
Rx Bytes = 14728
Rx Packets = 14
Throughput: 81.3738 Kbps
Packet loss %= 0.0666667
Flow ID: 2 Src Addr 1.0.0.2 Dst Addr 7.0.0.3
Tx Packets = 15
Tx Bytes = 15780
Sum jitter = +0.0ns
Delay Sum = +0.0ns
Lost Packet = 0
Rx Bytes = 0
Rx Packets = 0
Throughput: -0 Kbps
Packet loss %= 1
Flow ID: 3 Src Addr 1.0.0.2 Dst Addr 7.0.0.4
Tx Packets = 15
Tx Bytes = 15780
Sum jitter = +0.0ns
Delay Sum = +0.0ns
Lost Packet = 0
Rx Bytes = 0
Rx Packets = 0
Throughput: -0 Kbps
Packet loss %= 1

i want to use 1 eNB and 10 UEs
I have attached my script and flow monitor results.. can you help me?
lte-loss-delay-thrput.cc
results.x

Konstantinos

unread,
Mar 5, 2015, 5:20:51 AM3/5/15
to ns-3-...@googlegroups.com
Hi Senthil,

Do not just copy&paste blindly code, modify parts that you see others do without understanding what you are doing and then ask others to debug your code!

I see problems in the mobility and UE-eNB attachment.
The second is explained in my reply to Ateeq.

senthil kumar

unread,
Mar 6, 2015, 12:31:26 AM3/6/15
to ns-3-...@googlegroups.com
ok i got it ..thanks...
Reply all
Reply to author
Forward
0 new messages