S2a mobility in LTE

285 views
Skip to first unread message

nabil torjemen

unread,
Feb 17, 2015, 10:36:23 AM2/17/15
to ns-3-...@googlegroups.com
Hi for all;
I'm trying to develop a script for offload from LTE to wifi based on S2a Mobility.
I'm new in ns3 and I need your help to do it.
Best regards.

nabil torjemen

unread,
Feb 18, 2015, 6:28:04 AM2/18/15
to ns-3-...@googlegroups.com
Hi for all;
There is no reply !!!
It seems that I must follow theses steps:
1- add a script that  allows UE to support two interfaces (1 for LTE and 1 for wi-fi).
2- add a script that develop the link S2a between PGW and Mesh Acces Point Portal.
Please help me.
Best regards.

Tommaso Pecorella

unread,
Feb 18, 2015, 8:35:38 AM2/18/15
to ns-3-...@googlegroups.com
Hi,

On Wednesday, February 18, 2015 at 12:28:04 PM UTC+1, nabil torjemen wrote:
Hi for all;
There is no reply !!!

What's the surprise? Nobody is paid for the customer service, we try to help for what it is possible. If the question is outside of our expertise... well, the best thing is to wait for an expert to show up.
The LTE ones aren't here everyday, but when they pop they try to catch up.
 
It seems that I must follow theses steps:
1- add a script that  allows UE to support two interfaces (1 for LTE and 1 for wi-fi).
2- add a script that develop the link S2a between PGW and Mesh Acces Point Portal.

It seems that you gave yourself the answer. I can confirm that point 1 is quite easy, while point 2 may be a "bit" harder.
Plus, don't forget the routing / Mobile IP.
 
Please help me.

¿ I don't understand... ?
Ask a specific question, otherwise the best "help" is a generic "keep up the good work and good luck".

Cheers,

T.

nabil torjemen

unread,
Feb 19, 2015, 11:43:38 AM2/19/15
to ns-3-...@googlegroups.com
Hi,
As I'm new in ns3, I need some help to be sure where I should add me new code.
Regarding the first point related to ue supporting two interfaces (One LTE and One Wifi): Is the modification should be done in lte-ue-net-device file or let-net-device ?
Best regards.

Tommaso Pecorella

unread,
Feb 19, 2015, 12:03:05 PM2/19/15
to ns-3-...@googlegroups.com
The "UE" is the Node. The NetDevice is what's below the MAC. As a consequence, you don't need to modify the LTE NetDevice, you need to modify how the two NetDevices (the LTE and the Wi-Fi) are used by the upper layer (IP).

T.

nabil torjemen

unread,
Feb 19, 2015, 1:43:39 PM2/19/15
to ns-3-...@googlegroups.com
Hi again,
so which file should be changed ?
Best regards.

Tommaso Pecorella

unread,
Feb 19, 2015, 2:50:30 PM2/19/15
to ns-3-...@googlegroups.com
Hi,

I'm sorry but it doesn't work like this. If you're asking "which file should be changed", the next question will be "how", and the following one will be "write my code please".
You have to study the actual code design, find the missing interfaces, do a plan, implement. What you're trying to do can not be done by simply adding a few lines in a single source file.

T.

nabil torjemen

unread,
Feb 19, 2015, 3:56:57 PM2/19/15
to ns-3-...@googlegroups.com
hi;
Thanks for your reply.
It is not easy for beginner and guys which have not a good technical skills to use ns3. Many people ,like me, are not a developper and it is very hard for them to use ns3.
For the fist time, I 'm thinking that the netdevice should be changed. However, you recommand to see the IPV4 proctcol and I found a couple of files regrading IP stuck in ns3.
When I see example of LTE, I can't found where i can add the second interface. I just only find some lines regarding the IP adress allocaction. for that reason, I'm asking when I should see.
I'm waiting your earliest reply.
Best regards.

Tommaso Pecorella

unread,
Feb 20, 2015, 2:38:16 AM2/20/15
to ns-3-...@googlegroups.com
Hi,

I understand that you're a beginner, and I wish you can complete your task in the best way. The point I was trying to let you understand is that it's not that easy.
What you're planning does involve a new class (minimum one, probably more than one) to manage the two interfaces and redirect the IP traffic to the active one. You'll need also some kind of IP mobility - maybe. You need to add the S2a interfaces, packets and procedures - they're not in ns-3 as far as I know - and they need to be in both the UE and the proper EPC elements, etc.
Adding a second interface to a node is explained in the tutorial, just look for any node with a csma and a wifi interface, but then again, having two interfaces doesn't mean that the node is going to use them both.
Summarizing, my suggestion is to PLAN your work. Coding and protocol development is done fist on the paper, then on the computer. If you miss the paperwork, you'll just throw random lines of code.

Good luck,

T.

nabil torjemen

unread,
Feb 20, 2015, 3:47:34 PM2/20/15
to ns-3-...@googlegroups.com
HI,
Let me start to write the script which allows to create UE with two interface (one for LTE and one for Mesh).
if I have correctly understand the tutorial, to add interfaces we should add netdevice to node.
So the function uint32_t ns3::Node::AddDevice should be enhanced to allows the create of 2 interfaces instead of one.
Can you tell me if i'm in the right road or not ?
In other hand, how can I check if changes are made correctly ? May be there is no code bugs but the added code is not making the target function !!!
Best regards.

Tommaso Pecorella

unread,
Feb 20, 2015, 4:40:58 PM2/20/15
to ns-3-...@googlegroups.com
On Friday, February 20, 2015 at 9:47:34 PM UTC+1, nabil torjemen wrote:
HI,
Let me start to write the script which allows to create UE with two interface (one for LTE and one for Mesh).
if I have correctly understand the tutorial, to add interfaces we should add netdevice to node.
So the function uint32_t ns3::Node::AddDevice should be enhanced to allows the create of 2 interfaces instead of one.
Can you tell me if i'm in the right road or not ?

Why do you want to modify that function ? Call it twice !
That's why I said you need a plan. What is the goal, to have a NetDevice hiding two NetDevices underneath ?
 
In other hand, how can I check if changes are made correctly ? May be there is no code bugs but the added code is not making the target function !!!

True. That's called testing. You make a test script, one as simple as possible, and you specially craft it so to know in advance what's the expected behaviour of the function you want to test. then you check. Did it behave as expected ?
Message has been deleted

nabil torjemen

unread,
Feb 21, 2015, 5:37:10 AM2/21/15
to ns-3-...@googlegroups.com

Hi,
I will start to use the example "lena-simple-epc.cc".
In this file I find the following code :
// to create the UEs

NodeContainer ueNodes;

ueNodes.Create(numberOfNodes);

// Install LTE Devices to the nodes

NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice (ueNodes);

so to install device, I shoudl see the file "ltehelper.cc" and the fucntion:

NetDeviceContainer

LteHelper::InstallUeDevice (NodeContainer c)

{

  NS_LOG_FUNCTION (this);

  NetDeviceContainer devices;

  for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)

    {

      Ptr<Node> node = *i;

      Ptr<NetDevice> device = InstallSingleUeDevice (node);

      devices.Add (device);

    }

  return devices;

}

However, mu goal is to have a ue having two interface one for LTE (which is already done by this code)

and a second interface for mesh. So I think that I must use the function

NetDeviceContainer

MeshHelper::Install (const WifiPhyHelper &phyHelper, NodeContainer c) const

So, if I have correctly understand, the code in the "lena-simple-epc.cc" shoudl be changed as below:


// to create the UEs

NodeContainer ueNodes;

ueNodes.Create(numberOfNodes);

// Install LTE Devices to the nodes

NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice (ueNodes);

NetDeviceContainer ueLteDevs = meshhelper-> mesh.SetNumberOfInterfaces (ueNodes);

So is that true ?

Thanks for your help.

Tommaso Pecorella

unread,
Feb 21, 2015, 5:56:22 AM2/21/15
to ns-3-...@googlegroups.com
Yes, but I'd use two different NetDeviceContainer(s). Otherwise you'll be in trouble later on for address assignments.

T.

nabil torjemen

unread,
Feb 21, 2015, 6:17:50 AM2/21/15
to ns-3-...@googlegroups.com
Hi,
I think that using two interfaces, there is no address presevation. So each interface will have a different IP address for the some Ue.
is it OK ?
best regards.

nabil torjemen

unread,
Feb 22, 2015, 12:50:36 PM2/22/15
to ns-3-...@googlegroups.com
Hi,
In order to have two interfaces in lte ue (one for lte and one for wifi) , I have write this code:


 NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice (ueNodes);
 
  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
  wifiPhy.SetChannel (wifiChannel.Create ());
 
  mesh = MeshHelper::Default ();
  mesh.SetMacType ("RandomStart", TimeValue (Seconds (m_randomStart)));
  // Set number of interfaces - One interface for wifi
  mesh.SetNumberOfInterfaces (1);
  // Install protocols and return container
  ueLteDevs = mesh.Install (wifiPhy, ueNodes);

is it good ?
Best regards.

Tommaso Pecorella

unread,
Feb 22, 2015, 3:47:53 PM2/22/15
to ns-3-...@googlegroups.com
As I said, it should be ok. However I'd write:
NetDeviceContainer ueMeshDevs = mesh.Install (wifiPhy, ueNodes);

T.

nabil torjemen

unread,
Feb 23, 2015, 5:52:51 AM2/23/15
to ns-3-...@googlegroups.com
Hi,
Thanks for your reply.
In order to install IP stack in both LTE and wifi devices for the same ue, I write the following code :

// Install the IP stack on the UEs for LTE devices
  Ipv4InterfaceContainer ueIpIface;
  ueIpIface = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueLteDevs));
 
// Install the IP stack on the UEs for Wifi devices
  Ipv4InterfaceContainer uewifiIpIface;
  uewifiIpIface = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueMeshDevs));

is it OK ?

In other hand, for the mesh part, how can I define the root mesh AP ?
I have create the mesh point and define their position as described in the mesh example. However, I need to choose the root node.

I'm waiting your reply.
best regards.

Konstantinos

unread,
Feb 23, 2015, 5:58:11 AM2/23/15
to ns-3-...@googlegroups.com
No, it is not correct. EPC helper is not responsible to install Ipv4Interfaces on MESH devices.
See the example for the MESH to see how the interfaces are installed. 
Selecting the root node, is your decision. 

nabil torjemen

unread,
Feb 23, 2015, 6:36:57 AM2/23/15
to ns-3-...@googlegroups.com
Hi Konstantinos;
the Ue has two interface ( one for LTE and the other for wifi) and the simulation is in offload context.
So the IP adress should be managed by the EPC as the wifi interface of the Ue is attached to mesh network which is connected through the root mesh AP to the pgw via S2a interface.
for that reason, I 'm thinking that the IP address assignement should be also done by the EPC for both (LTE and wifi) interfaces of the Ue.
Is it correct or not ?

regarding the Mesh part, the problem is how to do it, I write the following code to define the Mesh AP position and I need to define one of them as root, how to do it ?
the code is as follow:

Ptr<ListPositionAllocator> positionAlloc =
        CreateObject<ListPositionAllocator>();
    positionAlloc->Add (Vector (330.0, 380.0, 0.0));
    positionAlloc->Add (Vector (350.0, 400.0, 0.0));
    positionAlloc->Add (Vector (370.0, 420.0, 0.0));
    positionAlloc->Add (Vector (500.0, 300.0, 0.0));
    positionAlloc->Add (Vector (740.0, 350.0, 0.0));
    positionAlloc->Add (Vector (250.0, 800.0, 0.0)); // for example I need to set this mesh AP as root !!!
    positionAlloc->Add (Vector (500.0, 740.0, 0.0));
    positionAlloc->Add (Vector (720.0, 720.0, 0.0));
    mobility.SetPositionAllocator (positionAlloc);
    mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
    mobility.Install (nodes);

best regards.

Konstantinos

unread,
Feb 23, 2015, 6:45:53 AM2/23/15
to ns-3-...@googlegroups.com
I understand what you are trying to achieve, but at the moment there is no such functionality in EPC. 
When you implement that, you can extend the EPC helper to assign IP addresses on both interfaces.

From the mesh example, the root is a broadcast address, not a single node. I am not an mesh-expert, so I would suggest to study the documentation/examples for further details.
Message has been deleted

nabil torjemen

unread,
Feb 24, 2015, 3:33:10 AM2/24/15
to ns-3-...@googlegroups.com
Hi for all;


Le lundi 23 février 2015 12:45:53 UTC+1, Konstantinos a écrit :
I understand what you are trying to achieve, but at the moment there is no such functionality in EPC. 
When you implement that, you can extend the EPC helper to assign IP addresses on both interfaces.

So what do your recommend for me , change the EPC helper ?

From the mesh example, the root is a broadcast address, not a single node. I am not an mesh-expert, so I would suggest to study the documentation/examples for further details.


I find that in the hwmp-protocol file.cc, the function void HwmpProtocol::SetRoot (), is it the right function used to define the root node ?

best regards.

Arij Souai

unread,
Jun 3, 2021, 6:51:20 AM6/3/21
to ns-3-users
hello , 
i have the same project and im blocked in this state :( can you help me please ? 

Reply all
Reply to author
Forward
0 new messages