WiFi - LTE Node

1,100 views
Skip to first unread message

Claudio Ragona

unread,
Sep 1, 2014, 8:31:35 AM9/1/14
to ns-3-...@googlegroups.com
Hi, 
I'm Claudio and I'm new in ns-3.20.
I created the following topology:

// G                S                  BS           PGW             CL     
//  *               *                  *             *               *
//  |      WiFi     |        LTE       |      p2p    |        p2p    |
// n0_ _ _ _ _ _ _ n1  - - - - - - - - n2 ========== n3 =============n4

After that I would like to send packet from G to CL and resend the same packet from CL to G in order to measure the RTT. 
I don't have problem between G and S and between S and CL, but the sending between G and CL is not working.
The node S is an hybrid node, it has a side WiFi that is connected to G and a LTE one that is connected to BS.
I think the problem is between the two interfaces Wifi and LTE.
I have tried to do a static route like this:
 
  Ipv4StaticRoutingHelper ipv4RoutingUenodeS;
  Ptr<Ipv4StaticRouting> remoteHostStaticRoutingUS = ipv4RoutingUenodeS.GetStaticRouting (s->GetObject<Ipv4> ());
  remoteHostStaticRoutingUS->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);

It is not working, so maybe is not the right way to connect the two interfaces of the same node.
Could someone give me help, please?

Thank you,
Claudio 

Konstantinos

unread,
Sep 1, 2014, 8:40:48 AM9/1/14
to ns-3-...@googlegroups.com
Hi Claudio,

The way to do it is through a static routing, but your route is not correct.
What is the IP of CL? Is it in the 7.x.x.x. subnet? Because that's what you have given it. 

Claudio Ragona

unread,
Sep 1, 2014, 9:00:46 AM9/1/14
to ns-3-...@googlegroups.com
Hi Konstantinos,

I'm sorry I gave the wrong address, but it still not working.

It is set as:

  PointToPointHelper p2ph;
  p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
  p2ph.SetDeviceAttribute ("Mtu", UintegerValue (1500));
  p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.010)));
  NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);
  Ipv4AddressHelper ipv4h;
  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices); 

And the Static Routing is:

 Ipv4StaticRoutingHelper ipv4RoutingUenodeS;
  Ptr<Ipv4StaticRouting> remoteHostStaticRoutingUS = ipv4RoutingUenodeS.GetStaticRouting (s->GetObject<Ipv4> ());
  remoteHostStaticRoutingUS->AddNetworkRouteTo (Ipv4Address ("1.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);

Thank you,
Claudio

Konstantinos

unread,
Sep 1, 2014, 9:10:18 AM9/1/14
to ns-3-...@googlegroups.com
You are missing a variable in the method you are calling

void AddNetworkRouteTo (Ipv4Address network, Ipv4Mask networkMask, Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
 Add a network route to the static routing table. More...

and you have
remoteHostStaticRoutingUS->AddNetworkRouteTo (Ipv4Address ("1.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);

Where is the 'nexthop'? I know that there is also a "AddNetworkRouteTo" that does not require a next hop, but in this case it is needed.

Nicola Baldo

unread,
Sep 1, 2014, 10:29:20 AM9/1/14
to ns-3-...@googlegroups.com

Konstantinos

unread,
Sep 1, 2014, 10:34:24 AM9/1/14
to ns-3-...@googlegroups.com
Hi Nicola,

The 'uplink' path however, should be working without NAT, right?

Nicola Baldo

unread,
Sep 2, 2014, 4:30:27 AM9/2/14
to ns-3-...@googlegroups.com

Hi Konstantinos,


On Monday, September 1, 2014 4:34:24 PM UTC+2, Konstantinos wrote:
The 'uplink' path however, should be working without NAT, right?

yes I think you are right, uplink should work.

Claudio Ragona

unread,
Sep 10, 2014, 10:26:23 AM9/10/14
to ns-3-...@googlegroups.com
Hi,
first thank you for the help.
I would like to ask, in order to have clear the situation, if is the NAT the only way to interface LTE to other technologies?

Thank you,
Claudio

Nicola Baldo

unread,
Sep 16, 2014, 4:20:49 AM9/16/14
to ns-3-...@googlegroups.com
I am not aware of any other method to make your topology work; anyway, 3GPP specs are quite complex so there could exist some other way of doing it that I am not aware of.

Anyway, if you think about it, you would have basically the same problem if you were to implement the same topology with your home ADSL router instead of with an LTE UE, and again the typical solution in the real world would be NAT.

hongyu deng

unread,
Dec 12, 2015, 11:04:14 PM12/12/15
to ns-3-users
Hi Claudio,

Did you solve your problem,I have the same topology with your simulation scenario.
How did you solve?could you give me a guide?
Thanks,

Regards,
HongYu

在 2014年9月1日星期一 UTC+8下午8:31:35,Claudio Ragona写道:

Claudio Ragona

unread,
Dec 16, 2015, 1:36:48 PM12/16/15
to ns-3-users
Hello HongYu,

I didn't solve the problem. I just conisder the topology splitted in two different parts, but for what concern the simulations I wasn't able to connect Wifi and LTE. It was just working in one direction and for my scope was useless.

Ciao,
Claudio

hongyu deng

unread,
Dec 17, 2015, 3:35:01 AM12/17/15
to ns-3-...@googlegroups.com
Hello Claudio,

Thanks your reply,that problem seems to have not solved up to now.
In this scene,the sta can send data to remoteHost,but sta can not recieve the data from remoteHost.Like the picutre. the enb has not return arrow,either the sta.
I used the EchoApplication.
What's your idea about this problem?

Have fun,
HongYu

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
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/Z7Jbw0fFujQ/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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

22.png

Konstantinos

unread,
Dec 17, 2015, 4:52:24 AM12/17/15
to ns-3-users
Hi Hongyu,

One solution to the problem has been explained two posts above by Nicola and it is the implementation of NAT on the nodes.
There has been at least one implementation of NAT during the 2012 GSOC (https://www.nsnam.org/wiki/GSOC2012NetworkAddressTranslation)
However, that code has not been imported to the main NS-3 tree.

Other solution again pointed out by Nicola in his first reply is to make the Epc aware of your topology
K.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

hongyu deng

unread,
Dec 17, 2015, 6:21:02 AM12/17/15
to ns-3-...@googlegroups.com
Hi Konstantinos,
Thanks,I will have a try.
Is that any example code in ns3 or other reference about this question?
How to let the EPC

K.
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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
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/Z7Jbw0fFujQ/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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--

Have fun,
HongYu,

hongyu deng

unread,
Dec 17, 2015, 6:27:16 AM12/17/15
to ns-3-...@googlegroups.com
Hi Konstantinos,

Thanks,I will have a try.
Is that any example code in ns3 or other reference that add a NAT in UE to let it works regularly?
And how to let the EPC knows our topology? any example?

Have fun,
Hongyu

2015-12-17 17:52 GMT+08:00 Konstantinos <dinos.k...@gmail.com>:
K.
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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
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/Z7Jbw0fFujQ/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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--

Have fun,
HongYu,

Konstantinos

unread,
Dec 17, 2015, 6:44:04 AM12/17/15
to ns-3-users
Hi,

No there is no such example because NAT has not been ported to the main NS-3. 
Any examples regarding NAT can be found in the link I have already provided. 
The examples are there to help/teach you how to use the module. 
Then you should be able to take it and use it in other scenarios.

Regarding the EPC, again there is no such example as such cases were not the primary focus of the LTE module developers.
However they have pointed out the direction towards solving the problem.
Quoting Nicola from that discussion: "it doesn't work because EpcSgwPgwApplication::RecvFromTunDevice() 
discards such packets. You have to additionally make EpcSgwPgwApplication aware of your topology to make it work."
Check the code/documentation. Trace the flow of a packet from the RemoteHost until it is dropped and you should be able to find where and why it is dropped. 
Then you can fix that point and move forwards.

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

To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
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/Z7Jbw0fFujQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--

Have fun,
HongYu,

hongyu deng

unread,
Dec 17, 2015, 6:58:22 AM12/17/15
to ns-3-...@googlegroups.com
Hi Konstantinos,

Thanks your patience.
Now i am reading the Epc-Sgw-Pgw-Application.cc,but as a fleshman,i don't know how to flow the packets from the RemoteHost,
I always judge from the visualizer.
Could you give some advice at how to trace the packet from RemoteHost or what document/code i should read.
Thanks very much.

Regards,
HongYu.

K.
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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
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/Z7Jbw0fFujQ/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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--

Have fun,
HongYu,

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
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/Z7Jbw0fFujQ/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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--

Have fun,
HongYu,

Konstantinos

unread,
Dec 17, 2015, 7:24:02 AM12/17/15
to ns-3-users
First of all you need to read the tutorial. 
That explains how you can use the tracing framework of NS-3.
You can use NS_LOG at different components/nodes to print useful information to track that. 
For example you can see which methods are called, at what order, etc.
K.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
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/Z7Jbw0fFujQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--

Have fun,
HongYu,

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
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/Z7Jbw0fFujQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--

Have fun,
HongYu,

hongyu deng

unread,
Dec 17, 2015, 7:35:45 AM12/17/15
to ns-3-...@googlegroups.com
Hi Konstatinos,

Thanks you very much.
I will have a try.

Have fun,
Hongyu.

K.
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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
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/Z7Jbw0fFujQ/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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--

Have fun,
HongYu,

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
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/Z7Jbw0fFujQ/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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--

Have fun,
HongYu,

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
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/Z7Jbw0fFujQ/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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--

Have fun,
HongYu,
Message has been deleted

ERGOU CHEN

unread,
Oct 6, 2020, 5:10:36 AM10/6/20
to ns-3-users
hi, HongYu, 
     have you solved the problem about Wifi-LTE eventually? Could you please give me some guidance about this problem? Thanks alot!!
Have fun!

Reply all
Reply to author
Forward
0 new messages