LENA VoIP traffic between UE

3,397 views
Skip to first unread message

Leticia

unread,
May 25, 2012, 4:19:11 PM5/25/12
to ns-3-users
Hello, I'm new at NS3-LENA.
I want to implement different kind of traffic in a LTE network with
only one eNB, for example: video streaming, web browsing, FTP and
VoIP.
I found that the ON OFF applications can model the VoIP Traffic but
I dont know how to configure the ONOFF applications to achieve that
the traffic flows from one UE to another UE and how can I see the
packets of the applications, can I see it from Pdcp traces for
example?

Can anybody help me?

Thank you

Leticia

Dizhi Zhou

unread,
May 26, 2012, 10:04:44 AM5/26/12
to ns-3-...@googlegroups.com
Hi Leticla,

What is your topology? eNB -- UE OR UE -- UE

Best,
Dizhi

Leticia

unread,
May 26, 2012, 3:35:51 PM5/26/12
to ns-3-users
Hi Dizhi,

Thank you for your answer!

I am modifying the lena-simple-epc example of LENA, I have only one
eNB and my idea is generate traffic from one UE to another UE and then
studying the QoS and QoE.

Best,

Leticia

Leticia

unread,
May 28, 2012, 3:17:46 PM5/28/12
to ns-3-users
Dizhi,

Could you please help me?

Best regards

Leticia

Dizhi Zhou

unread,
May 29, 2012, 8:55:52 PM5/29/12
to ns-3-...@googlegroups.com
Hi Leticla,

Then I think your work is in application layer. For how to transmit data from UE1 to UE2 (suppose UE1 and UE2 are under same eNB), you need to set the IP layer of UE1 and UE2 respectively.
Please check the lena-simple-epc.cc file in /src/lte/example.cc to find more info on this.

Best,
Dizhi

2012/5/26 Leticia <letici...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.


Leticia

unread,
Jun 1, 2012, 9:41:17 PM6/1/12
to ns-3-users
THank you Dizhi!

Best

Leticia

On 29 mayo, 21:55, Dizhi Zhou <dizhi.z...@gmail.com> wrote:
> Hi Leticla,
>
> Then I think your work is in application layer. For how to transmit data
> from UE1 to UE2 (suppose UE1 and UE2 are under same eNB), you need to set
> the IP layer of UE1 and UE2 respectively.
> Please check the lena-simple-epc.cc file in /src/lte/example.cc to find
> more info on this.
>
> Best,
> Dizhi
>
> 2012/5/26 Leticia <leticia.si...@gmail.com>

Giovanna Garcia

unread,
Mar 5, 2013, 9:29:21 AM3/5/13
to ns-3-...@googlegroups.com
How did you configure the VoIP on LTE?

idrees.a...@gmail.com

unread,
Apr 5, 2013, 2:22:04 PM4/5/13
to ns-3-...@googlegroups.com

Dear all i am also implementing VoIP on WiMax, after surfing various links only found that OnOff applications are capable to implement VoIP and Video but as far as i know OnOff applications only take mainly two helpful attributes i.e. packet size and data rate, how can other attributes be provided. please help

Nicola Baldo

unread,
Apr 6, 2013, 4:00:51 PM4/6/13
to ns-3-...@googlegroups.com
other attributes like what?

Sara Lakani

unread,
Aug 13, 2013, 8:16:39 PM8/13/13
to ns-3-...@googlegroups.com
Hi All!

I found an interesting discussion here about VoIP.
I have implemented also VoIP for my scenario and the attributes like ontime,oftime,data rate and packet size are covering the properties of VoIP traffic.
But I have another concern which about VoIP. To analyse the behaviour of VoIP it  should be two-way traffic. So I tried to have two streams opposed each other with dedicated timing and socket configuration. But it does not work.
I need to know why we cannot have two flows of onoff application?

Thanks in advance for your contribution.
Sara

Einar César

unread,
Aug 14, 2013, 10:26:59 AM8/14/13
to ns-3-...@googlegroups.com
Anyone here are developing a VoIP or HTTP traffic generator for ns-3? Please share!


2013/8/13 Sara Lakani <sara....@gmail.com>

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, 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/groups/opt_out.
 
 



--
________________________________
Einar César Santos
MSc. Engenharia Elétrica
B.el Análise de Sistemas

Goran Shekerov

unread,
Aug 23, 2013, 4:13:56 PM8/23/13
to ns-3-...@googlegroups.com

Sara Lakani

unread,
Aug 28, 2013, 4:05:45 PM8/28/13
to ns-3-...@googlegroups.com
And this book can help for modeling 5 popular types of traffics: (chapter 19)
 LTE for 4G Mobile Broadband: Air Interface Technologies and Performance, by Farooq Khan

Nicola Baldo

unread,
Sep 6, 2013, 5:51:59 AM9/6/13
to ns-3-...@googlegroups.com
Hi Sara,

On Wednesday, August 14, 2013 2:16:39 AM UTC+2, Sara Lakani wrote:
Hi All!

I found an interesting discussion here about VoIP.
I have implemented also VoIP for my scenario and the attributes like ontime,oftime,data rate and packet size are covering the properties of VoIP traffic.
But I have another concern which about VoIP. To analyse the behaviour of VoIP it  should be two-way traffic. So I tried to have two streams opposed each other with dedicated timing and socket configuration. But it does not work.
I need to know why we cannot have two flows of onoff application?

indeed you can have multiple flows with LTE. See for instance the case numBearersPerUe > 1 in lena-dual-stripe.cc
I suggest to double-check the IP address and UDP port configurations in your scenario.

Saulo da Mata

unread,
Sep 25, 2013, 9:23:06 AM9/25/13
to ns-3-...@googlegroups.com
Hi everyone,

I`m also trying to setup a VoIP traffic generator.

I did a search and there are a lot of topics about it in this mail list. According to Google, this is the more relevant.

Well, despite of the number of open topics about this issue, I could not find some information to setup my VoIP traffic generator.

According to posts, the majority of users are using OnOffApplication to model a VoIP traffic. However, I could not find how these users are setting their VoIP traffic: data rate, packet size, on time, off time, etc.

I'd like to know, what values are you guys using to set the VoIP attributes? From where did you get the information?


Looking for answers out there in the Internet I found some piece of information:

About On and Off time: According to [1],[2] and [3], the On and Off time can be model by a Generalized Pareto Distribution. Only [1] indicates values to set this random variable. However, I performed some tests and I got some weird results that are not in consonance with the information presented in the paper. So, despite I know the distribution, I`m stuck on the attributes settings.

About data rate and packet size: According to [4], a VoIP sender generates bytes at a rate of 8000 bytes/second. Every 20 milliseconds the sender gathers these bytes into a chunk. The number of bytes in a chunk is (20 msecs)· (8,000 bytes/sec) = 160 bytes, and a UDP segment is sent every 20 msecs. So, I set DataRate=8kb/s and PacketSize=160B.


Thanks!



References

[1] Dang, T. D., Sonkoly, B., & Molnar, S. (2004). Fractal Analysis and Modeling of VoIP Traffic. In Telecommunications Network Strategy and Planning Symposium. NETWORKS 2004, 11th International (pp. 123–130). doi:10.1109/NETWKS.2004.1341826

[2] O. Sheluhin, S. Smolskiy, and A. Osin, Self-Similar Processes in Telecommunications. Wiley, Mar 2007.

[3] D. T. Wong, P.-Y. Kong, Y.-C. Liang, and K. C. Chua, Wireless Broadband Networks. Wiley, Mar 2009.

[4] J. F. Kurose and K. W. Ross, Computer Networking: A Top-Down Approach 6th Edition. Pearson, Mar 2012.


Konstantinos

unread,
Sep 25, 2013, 9:29:17 AM9/25/13
to ns-3-...@googlegroups.com
Hi,

Please look at this description about different VoIP codecs and their characteristics
K.

Saulo da Mata

unread,
Sep 25, 2013, 10:50:29 AM9/25/13
to ns-3-...@googlegroups.com
Hi Konstantinos,

Thanks for the almost instantaneous reply!

I read the reference that you indicated. It`s a very interesting source to set the DataRate and PacketSize attributes. 

However, since I`d like to model a VoIP traffic with Voice Activity Detection (VAD), I could not find in this link how to set the On and Off times.

Anyway, thanks for your help.






--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, 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/groups/opt_out.



--
Saulo da Mata
Federal University of Uberlândia - Brazil

Madan Pande

unread,
Sep 26, 2013, 5:14:16 AM9/26/13
to ns-3-...@googlegroups.com
Hi,

      I had also the same doubts and have been using Udp traffic and settings to get
16Kb/s traffic, (along with dedicated EpsBearer and tft on the ports...). In IMS too,
SIP is over Udp...and it logically follows to VoIP impls...

2. So, I believe that following [4] is perhaps correct... Let me know if you find that
 approach okey...

With Regards,
madan


From: damata...@gmail.com
Date: Wed, 25 Sep 2013 10:23:06 -0300
Subject: Re: LENA VoIP traffic between UE
To: ns-3-...@googlegroups.com

Madan Pande

unread,
Sep 26, 2013, 5:21:54 AM9/26/13
to ns-3-...@googlegroups.com
Hi,

       There is an open-source software for Voice Recognition called Sphinx...
http://cmusphinx.sourceforge.net/

you will find most of the answers w.r.t to VAD including algos in their source code ...

With Regards,
madan


From: damata...@gmail.com
Date: Wed, 25 Sep 2013 11:50:29 -0300

Subject: Re: LENA VoIP traffic between UE
To: ns-3-...@googlegroups.com

Saulo da Mata

unread,
Sep 26, 2013, 7:50:35 AM9/26/13
to ns-3-...@googlegroups.com
Hi Mandan,

So, in your approach using UDP you set a CBR of 16kb/s, I mean, it is constant flow with equally spaced packets of constant size without interruption (Off time), right?

So far, I thought that a model that considers VAD would be more reliable. In a real application, I thought that this feature was the default since it can use the network resources in a more efficient way. However, I`m facing problems to model the On and Off time. I think that it is necessary an empirical experiment to gather this information. I hoped to find this in a paper, but, so far, I could not find a reliable source. Moreover, reading the link that Konstantinos sent, I found that "In Cisco CallManager, VAD can be enabled (it is disabled by default)".

In this sense, if I could not find a reliable source to model On Off times and considering that Cisco do not use VAD by default in their devices, I`ll follow an approach like yours: an CBR UDP application with data rate and packet size following the features of a given codec as described in Konstantinos`s link.

Anyway, I`ll take a look in the project that you sent and look for answers...


Thanks!

Regards,

Madan Pande

unread,
Sep 26, 2013, 12:05:34 PM9/26/13
to ns-3-...@googlegroups.com
Hi,

         While working with HP, I had spent a fair amount of time implementing Speech Recognition
and Speech to Text conversion using CMU Sphinx and TTS on HP-UX...In the course of that work,
I had tried out VAD and different Codecs (mostly OpenSource), that is why I suggested that if VAD is what
you want to consider, do glance through Sphinx Code...Even the drivers for Mike on Laptops use VAD and
silence suppression...For testing such impls, one needs a good graphical multimedia editor (fortunately for me
HP-UX had one).

2. There are some more things missing in NS-3, which make the work to implement a Good VoIP
generator App, an involved task... For instance, there is no RTP/RTCP implementation in NS-3 and Voice after conversion by a suitable codec (8, 16 or even 48Kbps(aka MS)), would normally go as RTPpackets over UDP/IP...
Ofcourse, it may not be be much of a bother to port OpenRTP (ORTP) to NS-3, though it is a C Code, but nice and reliable...it has a secure version too...If you go on to the requirements of VoIP as per 3GPP specs, you would also need SIP, which too is missing in NS-3 (HP did contribute a SIP lib to NS2...)

3. Yes, I also set the tft and EpcBearer for QoS, since QoS is the most important param in a VoIP over
WiFi/WiMac/Lte...since by controlling it one can have a measure of QoE (quality of experience), which is what matters in commercial impls)...Ofcourse, there are separate set of tools for QoE..., I have only used professional ones...

With Regards,
madan


From: damata...@gmail.com
Date: Thu, 26 Sep 2013 08:50:35 -0300

Saulo da Mata

unread,
Sep 26, 2013, 1:00:27 PM9/26/13
to ns-3-...@googlegroups.com
Hi Madan,

1. thanks for sharing your experience.

2. Yeah, I also noted the lack of RTP and SIP support in NS-3.

3. In summary, as I don't have time to implement a complete VoIP generator in the present, I`m going to adopt an approach with the tools already existent in NS-3 with small modifications. Could you send me your script simulation (or at least how you set tft  and EpcBearer), so I can use it as a starting point?

Thanks!

Regards,


Saulo da Mata

unread,
Oct 10, 2013, 10:39:50 AM10/10/13
to ns-3-...@googlegroups.com
Hi everyone,

Well, after some reading and studying, I implemented a simple VoIP application. At a first glance, this application has only one main difference against the NS-3 default ones that I have seen in this list (PacketSync, UdpClient).

My application has client and server sides. First the client sends a request to server asking for VoIP traffic. On the other hand, the server waits for clients requests and sends the packets when it detects a request. In the NS-3 default applications the server starts sending packets without the request of the client.

The VoIP traffic is modeled in a simple manner, I mean, the server sends packets of fixed size in fixed intervals. There is not any kind of VAD or silence suppression. There are two variables to be set by the user: packetSize and packetInterval.

I'm going to set these parameters basing on the Cisco reference indicated by Konstantinos [1]. I have chosen the codec G.729. This codec allows the packet size to be equal to 10, 20, 30, 40, 50 or 60 bytes. For each one of these size packets we have an appropriate packet interval.

So far, so good. However, now we have to take a look in the headers. The VoIP application has a packet with size:

packetSize + RTP(SeqTsHeader) + UDP + IP + P2P
   20      +         12       +  8  + 20 +  2  = 62 bytes


For 20 bytes of payload we have 42 bytes of headers! This can be improved if we use packets with 60 bytes of payload. However, in both cases this is a lot of overhead.

From [1], one can see that the bandwidth is calculated in this way:

The required bandwidth for a G.729 call (8 Kbps codec bit rate) with cRTP, MP and the default 20 bytes of voice payload is:
Total packet size (bytes) = (MP header of 6 bytes) + ( compressed IP/UDP/RTP header of 2 bytes) + (voice payload of 20 bytes) = 28 bytes
Total packet size (bits) = (28 bytes) * 8 bits per byte = 224 bits
PPS = (8 Kbps codec bit rate) / (160 bits) = 50 pps
Note: 160 bits = 20 bytes (default voice payload) * 8 bits per byte
Bandwidth per call = voice packet size (224 bits) * 50 pps = 11.2 Kbps


So, using compressed IP/UDP/RTP, 40 bytes become 2 bytes. In this sense, the 42 bytes of headers become 4 bytes (P2P + cRTP) and the total packet size 24 bytes. I don't know if NS-3 has support to header compression. Then, to make this true in the NS-3 VoIP application, I'm going to discount the overhead in the payload size, as I saw in UdpClient. 

There are 38 bytes to be removed in the payload. In this context, the packetSize options are reduced to 40, 50 and 60 bytes. For now, I'm going to use a payload of 60 bytes. In the code:

  // Using compressed IP/UDP/RTP header. 40 bytes become 2 bytes. Then, 38 bytes must be removed from payload.
  Ptr<Packet> p = Create<Packet> (m_packetSize - (38)); 


Calculating the bandwidth:

Total packet size: 60 - 38 + 12 + 8 + 20 + 2 = 64 bytes = 512 bits.
PPS = (8kbps)/(480bits) = 16.67 pps ~= 1 packet each 60 ms.
Bandwidth = 512 bits * 16.67 pps ~= 8.5 kbps


Finally, I can set my VoiP Application:
  • packetSize = 60 bytes
  • packetInterval = 60 ms
  • bandwidth ~= 8.5 kbps

With this information, I can also set the GBR QoS Information EPS bearer for this applications:
                  
GbrQosInformation qos;
qos.gbrDl = (voipPacketSize + 4) * 8 / voipPacketInterval.GetSeconds();
qos.gbrUl = 0;
qos.mbrDl = qos.gbrDl;
qos.mbrUl = 0;



How do you guys evaluate this approach? Do you think that it is reasonable?

Any comments are welcome.

Thanks!



Konstantinos

unread,
Oct 10, 2013, 11:38:15 AM10/10/13
to ns-3-...@googlegroups.com
This looks very good, see comments below and inline.

One addition that I would recommend is the use of requested time from the client.

That is, the client asks for a VoIP session of 'x' seconds and with some sort of flag will not ask for a new session until the first is finished.
That way you can implement a more realistic scenario, that you have calls generated with different time periods.

Otherwise, the application would not be much different from current CBR applications (on/off configured with the packet sizes you suggest) where the server starts sending data to clients after random time.

Regards, 
K.

On Thursday, October 10, 2013 3:39:50 PM UTC+1, Saulo da Mata wrote:
Hi everyone,

Well, after some reading and studying, I implemented a simple VoIP application. At a first glance, this application has only one main difference against the NS-3 default ones that I have seen in this list (PacketSync, UdpClient).

My application has client and server sides. First the client sends a request to server asking for VoIP traffic. On the other hand, the server waits for clients requests and sends the packets when it detects a request. In the NS-3 default applications the server starts sending packets without the request of the client.

The VoIP traffic is modeled in a simple manner, I mean, the server sends packets of fixed size in fixed intervals. There is not any kind of VAD or silence suppression. There are two variables to be set by the user: packetSize and packetInterval.

I'm going to set these parameters basing on the Cisco reference indicated by Konstantinos [1]. I have chosen the codec G.729. This codec allows the packet size to be equal to 10, 20, 30, 40, 50 or 60 bytes. For each one of these size packets we have an appropriate packet interval.

So far, so good. However, now we have to take a look in the headers. The VoIP application has a packet with size:

packetSize + RTP(SeqTsHeader) + UDP + IP + P2P
   20      +         12       +  8  + 20 +  2  = 62 bytes


For 20 bytes of payload we have 42 bytes of headers! This can be improved if we use packets with 60 bytes of payload. However, in both cases this is a lot of overhead.

From [1], one can see that the bandwidth is calculated in this way:

The required bandwidth for a G.729 call (8 Kbps codec bit rate) with cRTP, MP and the default 20 bytes of voice payload is:
Total packet size (bytes) = (MP header of 6 bytes) + ( compressed IP/UDP/RTP header of 2 bytes) + (voice payload of 20 bytes) = 28 bytes
Total packet size (bits) = (28 bytes) * 8 bits per byte = 224 bits
PPS = (8 Kbps codec bit rate) / (160 bits) = 50 pps
Note: 160 bits = 20 bytes (default voice payload) * 8 bits per byte
Bandwidth per call = voice packet size (224 bits) * 50 pps = 11.2 Kbps


So, using compressed IP/UDP/RTP, 40 bytes become 2 bytes. In this sense, the 42 bytes of headers become 4 bytes (P2P + cRTP) and the total packet size 24 bytes. I don't know if NS-3 has support to header compression. Then, to make this true in the NS-3 VoIP application, I'm going to discount the overhead in the payload size, as I saw in UdpClient. 


As far as I know, there is no header compression implemented in NS-3, so your approach to reduce the data looks reasonable w.r.t. network performance
 
There are 38 bytes to be removed in the payload. In this context, the packetSize options are reduced to 40, 50 and 60 bytes. For now, I'm going to use a payload of 60 bytes. In the code:


Have to make sure that the user will not be able to use "m_packetSize < 38"  otherwise this would cause errors

Saulo da Mata

unread,
Oct 10, 2013, 4:31:18 PM10/10/13
to ns-3-...@googlegroups.com
Hi Konstantinos,

thanks for your comments. See my comments inline.


On Thu, Oct 10, 2013 at 12:38 PM, Konstantinos <dinos.k...@gmail.com> wrote:
This looks very good, see comments below and inline.

One addition that I would recommend is the use of requested time from the client.

That is, the client asks for a VoIP session of 'x' seconds and with some sort of flag will not ask for a new session until the first is finished.
That way you can implement a more realistic scenario, that you have calls generated with different time periods.

Otherwise, the application would not be much different from current CBR applications (on/off configured with the packet sizes you suggest) where the server starts sending data to clients after random time.

Yeah, I'm aware of this problem
. However, from the beginning this was a problem that I was facing. My intention was to implement silence suppression and call time duration, but I could not find a reliable source with a proper model to describe these ON/OFF and call duration time. In this sense, I could not find how to model this "x" seconds.


On the other hand, it is true that I could let this task to the user, as it occurs with the default ON/OFF application in NS-3. However, I think that this can be confusing for new users. So, this is the reason that I chose that simplistic approach. I hope to find an appropriate model for these parameters and implement a more real application.

I agree with you. In practice, users don`t need the "VoiP application" that I wrote. They can get a similar result with the current CBR applications and the values that I suggested. Actually, my intention was to find good values for those parameters, since I could not find this information in this mailing list.   
  

There are 38 bytes to be removed in the payload. In this context, the packetSize options are reduced to 40, 50 and 60 bytes. For now, I'm going to use a payload of 60 bytes. In the code:


Have to make sure that the user will not be able to use "m_packetSize < 38"  otherwise this would cause errors

Yeah you right. A priori, I'm using the attribute system to warn the user. I'm forcing the use of G.729 codec parameters. For new users I think this is acceptable. I believe that advanced users can change the code as they wish.

    .AddAttribute ("PacketSize", "The size of packets (in bytes). Choose between 40, 50 and 60 bytes.",
                   UintegerValue (60),
                   MakeUintegerAccessor (&VoipServer::m_packetSize),
                   MakeUintegerChecker<uint32_t> (40, 60))

I can see a ton of possible improvements before I have a good code to be submitted to NS-3. This can take some time. However, the present code can be used to discuss this issue and get answers.

Thanks again!

Regards,

Madan Pande

unread,
Oct 10, 2013, 11:27:51 PM10/10/13
to ns-3-...@googlegroups.com
Saulo,

        Just want to know, have you added a RTP module to NS-3, as it currently does not
exist???

For the rest of UDP and VoIP concerns , it looks reasonable, I use a very similar code and it is giving the right rate...

With Thanks and Regards,
madan


From: damata...@gmail.com
Date: Thu, 10 Oct 2013 11:39:50 -0300

Subject: Re: LENA VoIP traffic between UE
To: ns-3-...@googlegroups.com

Saulo da Mata

unread,
Oct 11, 2013, 7:45:16 AM10/11/13
to ns-3-...@googlegroups.com
Hi Madan,

nope, I did not...I used the SeqTsHeader which also has 12 bytes as the RTP Header (minimum size). Of course they have not the same features, but they have the same size, and so far I did not use an specific RTP feature.

regards,

Adi Syukri

unread,
Feb 11, 2014, 8:52:03 AM2/11/14
to ns-3-...@googlegroups.com
Hi saulo,

I am also trying to implement different kind of traffic for LTE such as BE, VOIP and Video Streaming. So far i can only come up with VOIP traffic using onoffhelper. However i cant figure out whether the scenario i am working on is correct or not. I modify the code form lena-simple-epc. I am very new to NS-3 and i am using ns-3.18. Could you do me a favour and review my code for voip. I am doing this for my master research and LTE is also very new to me. I attach my code below and some Rlc trace file.

thank you in advance~
Rr-GBR-CONV-VOICE.cc
Pf-5-GBR-CONV-VOICE-DlRlcStats.txt
Pf-5-GBR-CONV-VOICE-UlRlcStats.txt

Saulo da Mata

unread,
Feb 13, 2014, 7:13:34 AM2/13/14
to ns-3-...@googlegroups.com
Hi Adi,

Sorry, but this week I'm very busy...I think in the next week I can take a look in your code, and see if I can help you...

Regards,


--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, 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/groups/opt_out.

Bektaş Şahin

unread,
Mar 13, 2014, 12:02:41 PM3/13/14
to ns-3-...@googlegroups.com
Hello Saulo,

I have a question related with VoIP application if you had the time. What I am trying to develop is comparing one elastic and one non-elastic stream with regards to throughput delay etc. So far I developed one non-elastic scenario with udp and OnOff application (assuming this to be VoIP part), however to achieve elastic stream like web browsing etc I tried to achieve it via giving random on values with ExponentialRandomVariable(Mean=3.14 | Bound=10) the results didnt change at all and the traffic is not elastic as well. Can I achieve such application with OnOff or is there another way to achieve it?

Cheers
Bektaş

Saulo da Mata

unread,
Mar 13, 2014, 2:38:55 PM3/13/14
to ns-3-...@googlegroups.com
Hi Bektas,

well, I don't know for sure if it is possible using the On/Off Application. However, some time ago I also needed a WEB/HTTP application...I found out that there is one under review to be included in NS-3, developed by Yufei Cheng, but the process was kind of slow. You can see it here.

I could used it, but in the end I tried to develop my own HTTP traffic generator, since the one developed by Yufei use an old database to model the traffic.

I finished it and my plans was to submit it to NS-3 review process. However, I submitted only the HTTP header, and so far I did not have the time to address the recommendation of reviewers and submit the rest of the code.

However, if you are interested, I can send you all the code...maybe it can help you in your simulation...

Cheers,




For more options, visit https://groups.google.com/d/optout.

Bektaş Şahin

unread,
Mar 14, 2014, 6:53:16 AM3/14/14
to ns-3-...@googlegroups.com
Hey Saulo

Thanks for the response, if you can send me the code that would be awesome. I am pretty new with ns3 so I might get some insight from it as well. So I was thinking like making a random PacketSize or on off duration I can create some elastic traffic but so far I only get static one. Anyway thanks again.

Bektaş

Saulo da Mata

unread,
Mar 14, 2014, 9:11:20 AM3/14/14
to ns-3-...@googlegroups.com
Hi Bektas,

You can find the code in the link below:



Just to be fair: in my last email I said that Yufei used an old database to model the traffic. It is worth to say that despite of this, his code is more complete than the one that I have implemented. My goal was just to create a HTTP traffic generator to study different schedulers using LTE module.

In this sense, my code is quite simple to study the HTTP protocol itself. For example: I did not implemented pipelining feature. Yufei`s code has some features that I have not implemented. 

Take a look in the two approaches and see which one suits your needs better.

Bektaş Şahin

unread,
Mar 14, 2014, 11:36:04 AM3/14/14
to ns-3-...@googlegroups.com
Hi again Saolo

Thanks for the code, I am currently trying to implement it in my code but I get errors that is probably because the header file is not included. However I included applications.h isnt that enough? One more thing, I was using OnOff application with packetsink and udp, which parts should I change in order to implement http inside? I am adding the code for the application part (which is basically the one from epc-simple. If you have the time I would appreciate your input. Thanks. Also if you are wondering I added the headers into wscript files for bot internet and application scripts.

*  OnOffHelper onoff=OnOffHelper("ns3::UdpSocketFactory",InetSocketAddress (ueIpIface.GetAddress (u), dlPort));
      onoff.SetAttribute ("OnTime", StringValue("ns3::ConstantRandomVariable[Constant=2]"));
      onoff.SetAttribute ("OffTime", StringValue("ns3::ConstantRandomVariable[Constant=0]"));
      onoff.SetAttribute("PacketSize", UintegerValue(dlDataSize));
      onoff.SetAttribute("DataRate",DataRateValue(dlDataRate));
      ApplicationContainer app = onoff.Install (enbNodes);
      app.Start (Seconds(1.0));
      app.Stop(Seconds(simTime));

      PacketSinkHelper dlPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), dlPort));
      PacketSinkHelper ulPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), ulPort));
      PacketSinkHelper packetSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), otherPort));
      serverApps.Add (dlPacketSinkHelper.Install (ueNodes.Get(u)));
      serverApps.Add (ulPacketSinkHelper.Install (remoteHost));
      serverApps.Add (packetSinkHelper.Install (ueNodes.Get(u)));

      UdpClientHelper dlClient (ueIpIface.GetAddress (u), dlPort);
      dlClient.SetAttribute ("Interval", TimeValue (MilliSeconds(interPacketInterval)));
      dlClient.SetAttribute ("MaxPackets", UintegerValue(1000000));

      UdpClientHelper ulClient (remoteHostAddr, ulPort);
      ulClient.SetAttribute ("Interval", TimeValue (MilliSeconds(interPacketInterval)));
      ulClient.SetAttribute ("MaxPackets", UintegerValue(1000000));

      UdpClientHelper client (ueIpIface.GetAddress (u), otherPort);
      client.SetAttribute ("Interval", TimeValue (MilliSeconds(interPacketInterval)));
      client.SetAttribute ("MaxPackets", UintegerValue(1000000));

      clientApps.Add (dlClient.Install (remoteHost));
      clientApps.Add (ulClient.Install (ueNodes.Get(u)));
      if (u+1 < ueNodes.GetN ())
        {
          clientApps.Add (client.Install (ueNodes.Get(u+1)));
        }
      else
        {
          clientApps.Add (client.Install (ueNodes.Get(0)));
  */      }
    }



Saulo da Mata

unread,
Mar 18, 2014, 9:10:38 AM3/18/14
to ns-3-...@googlegroups.com
Hi Bektas,

Sorry for the late replay...

I could not get all things that you wrote. For example, I could not get what you meant when you said "I included applications.h". Were you referring to http-client.h and http-server.h files?

In the link that I indicated in my last post there are some instructions to add the HTTP traffic generator, but they consider that one has a basic knowledge of NS-3. Well, let's try a step-by-step approach.

1º step: 

Which version of NS-3 are you using? This code works with ns-3-dev and should work with ns-3.19/ns-3.18.


2º step:

Download the HTTP Header. You will find two files: http-header.h and http-header.cc. Put these files in the directory src/internet/model/. Now you have to add entries ('model/http-header.cc' and 'model/http-header.h') for these two files in the src/internet/wscript file.

Try to build NS-3. Everything should be ok.


3º step:

Download the HTTP traffic generator. You will find six files: http-client-server-helper.hhttp-client-server-helper.cc, http-client.hhttp-client.cc, http-server.h and http-server.cc.

Put these files in the following directories:
  • http-client-server-helper.hhttp-client-server-helper.cc in the directory src/applications/helper/.
  • http-client.hhttp-client.cchttp-server.h and http-server.cc in the directory src/applications/model/.
Now you must add entries for all these six files in the src/applications/wscript file.

Try to build NS-3. Everything should be ok.


4º step:

To use this application in your simulation script you can follow the example presented in the links that I have indicated:

HttpServerHelper httpServer (httpServerPort);
httpServerApps.Add (httpServer.Install (serverNode));

HttpClientHelper httpClient (serverNodeAddress, httpServerPort);
httpClientApps.Add (httpClient.Install (clientNode));



Follow these steps and lets see if you get it working...




--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, 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.

Bektaş Şahin

unread,
Mar 19, 2014, 7:57:44 AM3/19/14
to ns-3-...@googlegroups.com
Hey Saulo

Thanks for the detailed response, really appreciate it. I did exactly as you said, well the first 3 steps at least. there is no error if I build it. Now, when I use it in my script I get an error like this;

../scratch/lteOnOff.cc:170:5: hata: 'httpServerApps' bu etki alanında bildirilmemiş
../scratch/lteOnOff.cc:175:6: hata: 'httpClientApps' bu etki alanında bildirilmemiş
../scratch/lteOnOff.cc:178:5: hata: 'httpClientApps' bu etki alanında bildirilmemiş

It means something like not defined in this scope so I assumed it was because some header files are not included in my script. Waf builds fine by the way. And I am using ns3.18. I included applications, http-client http-server, http-client-server-helper headers but still the same. I double checked wscript files but they seem right tp me. Cant see the problem to be honest. I use it in my script like this;

for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
    {
      ++ulPort;
      //++otherPort;

    HttpServerHelper httpServer (ulPort);
    httpServerApps.Add (httpServer.Install (remoteHost));

    HttpClientHelper httpClient (remoteHostAddr, dlPort);

    if (u+1 < ueNodes.GetN())
{    httpClientApps.Add (httpClient.Install (ueNodes.Get(u+1)));
}
       else
    httpClientApps.Add (httpClient.Install (ueNodes.Get(0)));


Can you see the issue here?

Cheers
Bektaş

Konstantinos

unread,
Mar 19, 2014, 8:13:40 AM3/19/14
to ns-3-...@googlegroups.com
After you update the wscript file (adding the .cc/.h files for http apps) you should re-configure ns-3 by calling "./waf configure" with any other configuration options that you would normally use. Then you can build ns-3 and the new files should be compiled and visible.

Bektaş Şahin

unread,
Mar 20, 2014, 6:22:35 PM3/20/14
to ns-3-...@googlegroups.com
Thanks Konstantinos but unfortunately I still get the same error. I rebuilt, reconfigured ./waf several times. If I get my script out of the ns3 directory it builds fine. But when using mine I still get the error regarding none of the httpClient or Server apps are defined. I tried including the header files regarding Http but still no result, maybe I should try creating a random traffic with some other way? Or is it even possible? What I want to achieve is i.e a FTP transfer between nodes with truncated log normal distribution of file size with 5mb maximum and 2mb mean or something similar just to simulate an elastic traffic. Any help is appreciated.

Bektaş

Saulo da Mata

unread,
Mar 21, 2014, 7:49:53 AM3/21/14
to ns-3-...@googlegroups.com
Hi Bektas,

Can I take a look in your simulation script?




--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, 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.

Bektaş Şahin

unread,
Mar 21, 2014, 8:04:19 AM3/21/14
to ns-3-...@googlegroups.com
Hey Saulo, sure. I am attaching to this message. Bear in mind I was using an OnOff application and just tried to change from OnOff to Http.

Bektaş
lteOnOff.cc

Saulo da Mata

unread,
Mar 21, 2014, 8:22:07 AM3/21/14
to ns-3-...@googlegroups.com
Hi Bektas,


I have taken a look in your simulation script and my suspicions were true...I think your problem is not related to NS-3, but C++.

You added this line:

httpServerApps.Add (httpServer.Install (remoteHost));


but you have not created the httpServerApps variable. You are trying to use the method Add from a variable that does not exist. The same thing is true for the httpClientApps variable.

So, you have to create these variables before using it.

  ApplicationContainer httpClientApps;
  ApplicationContainer httpServerApps;



Try this and let me know if it worked.



Bektaş Şahin

unread,
Mar 21, 2014, 9:04:52 AM3/21/14
to ns-3-...@googlegroups.com
Thank you Saulo, that solved the problem. I am quite new to these things sorry if the problem was silly. Can I change any variable of the application? Like packet size, interval etc.

Bektaş

Saulo da Mata

unread,
Mar 21, 2014, 12:29:31 PM3/21/14
to ns-3-...@googlegroups.com
Hi Bektas,


Yeah, I know. New things are complicated. However, at the bright side, NS-3 has a great documentation and this helps a lot. The same is true for C++. My advice is: try to study all this documentation before asking for help in mail list. This is a harder path, but the right one in my opinion.


Well, lets get back to your question. My HTTP traffic generator is based on a model presented in the paper "An HTTP Web Traffic Model Based on the Top One Million Visited Web Pages" by Rastin Pries et. al. This means that the application defines the parameters (size of main object, size of inline objects, packet size, interval, reading time) based on this model. 

Of course you can change these values. I think your next question would be: How? Well, you will have to study the code and understand it to perform the modifications. Besides, I searched a lot to find a good model to use in this traffic generator. I don't know what are your goals, but you have to be sure about which values to use for these parameters.


Bektaş Şahin

unread,
Mar 22, 2014, 9:37:42 AM3/22/14
to ns-3-...@googlegroups.com
Hey Saulo, thanks for the response. Yes I will get right back to studying the code now, cheers for all the help.

Bektaş

wangzhe

unread,
Nov 1, 2015, 1:36:44 AM11/1/15
to ns-3-users
Hi,Leticia
   I would like to transmit real audio/voice from one ue to the other ue in the lte network.I've no idea how to do that.Could you please show me some codes for reference and study?Thx

在 2012年5月29日星期二 UTC+8上午3:17:46,Leticia写道:
Dizhi,

Could you please help me?

Best regards

Leticia



On 26 mayo, 16:35, Leticia <leticia.si...@gmail.com> wrote:
> Hi Dizhi,
>
> Thank you for your answer!
>
> I am modifying the lena-simple-epc example of LENA, I have only one
> eNB and my idea is generate traffic from one UE to another UE and then
> studying the QoS and QoE.
>
> Best,
>
> Leticia
>
> On 26 mayo, 11:04, Dizhi Zhou <dizhi.z...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi Leticla,
>
> > What is your topology? eNB -- UE OR UE -- UE
>
> > Best,
> > Dizhi
>
> > On Friday, May 25, 2012 5:19:11 PM UTC-3, Leticia wrote:
>
> > > Hello, I'm new at NS3-LENA.
> > > I want to implement different kind of traffic in a LTE network with
> > > only one eNB, for example: video streaming, web browsing, FTP and
> > > VoIP.
> > > I found  that the ON OFF applications can model the VoIP Traffic  but
> > > I dont know how to configure the ONOFF applications  to achieve that
> > > the traffic flows from one UE to another UE and how can I see the
> > > packets of the applications, can I see it from Pdcp traces for
> > > example?
>
> > > Can anybody help me?
>
> > > Thank you
>
> > > Leticia
Reply all
Reply to author
Forward
0 new messages