-   Linux - Software (
-   -   Simulating LTE using NS2 with LE patch (

sandeep10 11-26-2013 04:02 AM

Simulating LTE using NS2 with LE patch
Hello member
Am trying to simulate the LTE network using ns-2.33..I followed the discussion that is already carried here in this link

and it is working perfectly fine and am getting the output on #sh test

The testing results(throughput, delay, jitter) are:

0 1 2 3 total(Mbyte)
0,04 0,03 0,00 1,20 1,27
0,01 0,00 0,00 0,05 0,05
0,00 0,00 0,00 0,00 0,00

0 1 2 3 total
0 0 0 0 0

awk: jitter.awk:42: ( FNR=22988) fatal: attempted to divide by zero

check the out.txt out.nam for detailed information.
But when I try to run #ns lte.tcl present in lte-model-read-only
It will simulate something...and show an error called "invalid classid 30"

my question is, is this a warning? or is this working correctly??
and I want to plot the graph of these values. means how thought vaired in terms of load etc etc..Is there any documenetation realated to lte-model-read-only code??

There is a another code realted to this which is almost similar...called LTE-HVQ(hierarchical vector queue) that also showing same warning "invalid classid 30" and it produces some result which is again difficult to check for its correctness....

So will be very thankful if I get to know abt this error of "invalid class 30"

knudfl 11-26-2013 04:40 PM

Welcome to LQ.

"invalid class 30" at running $ ns(-lte) lte.tcl :
The "23000 lines" is created (OK ?), so you can either
use that result / ignore the message, or try out one of the later files.tcl →
→ → lte-examples-0213.tar.gz →
... e.g. eyana.tcl ( By @eyana ).



sandeep10 11-27-2013 08:49 AM

Thank you sir, I got 22988 lines of

I managed to get the values of average jitter, average throughput and average dealy using the avgStats.awk, following the discussion on LQ, very thankful to you all

Is there any method or awk script to plot(or extract) the individual parameter like delay, jitter separately in graph using xgraph...I think it is possible..but what to extract from I mean which columns represent what parameter...

Can anyone suggest something related to plotting the results from as a graph

knudfl 11-27-2013 12:35 PM

# 3 .

.. which columns represent what parameter
ns2 trace format :

And by the way, you can also use a tcl file, that creates a nice "nam plot".
Example : `eyana.tcl'.


sandeep10 11-27-2013 11:30 PM

Thank you knudfl, its my misconception about the .tr file, now clearly understood about what each of the columns represent in .tr file..thanks for that link..

I used some of the awk filter like avgStats.awk and getThroughtput.awk, and managed to get the average throughput, delay and jitter...but these are average work is to get the individual values of throughput or through w.r.t time or delay w.r.t time and plot them...

is there any such awk filter which can get the individual values and store it in some file??
Please let me know if there are any such methods...

sandeep10 11-28-2013 12:33 PM

Thank you knudfl, finally I managed to get the awk filter which I was looking for and generated the graph...
Your suggestion related to LTE and ns2 are very helpful on LQ...very thankful to you...

sandeep10 11-29-2013 02:27 PM

Sorry knudfl, I again messed with a problem..actually I found an awk filter which was fetching the throughput w.r.t time...I applied it on awk simple ns example..that is available here

and it is working fine, fetching values in 2 columns, using which I plotted graph using Xgraph..Here is the awk script I used


action = $1;
time = $2;
from = $3;
to = $4;
type = $5;
pktsize = $6;
flow_id = $8;
src = $9;
dst = $10;
seq_no = $11;
packet_id = $12;
if(action=="r" && from==2 && to==3 && flow_id==2) {
pkt_byte_sum[i+1]=pkt_byte_sum[i]+ pktsize;
if(init==0) {
start_time = time;
init = 1;
end_time[i] = time;
i = i+1;
printf("%.2f\t%.2f\n", end_time[0], 0);
for(j=1 ; j<i ; j++){
th = pkt_byte_sum[j] / (end_time[j] - start_time)*8/1000;
printf("%.2f\t%.2f\n", end_time[j], th);
printf("%.2f\t%.2f\n", end_time[i-1], 0);
But when I used the same script on the lte-model-read-only's displays 0.0 0.0 is all the columns...can you suggest any changes in the above code....I tried it on all lte.tcl file such as lte_HVQ, enaya.tcl, ltez.tcl etc etc...All showing same help me with this one....thank you

All times are GMT -5. The time now is 01:45 AM.