mesh interface and IP address

182 views
Skip to first unread message

nabil torjemen

unread,
Apr 1, 2015, 10:06:44 AM4/1/15
to ns-3-...@googlegroups.com
 Hi for all,
in the mesh example, I'm trying to print the allocated IP adress using this code:
void
MeshTest::InstallInternetStack ()
{
 
InternetStackHelper internetStack;
  internetStack
.Install (nodes);
 
Ipv4AddressHelper address;
  address
.SetBase ("10.1.1.0", "255.255.255.0");
  interfaces
= address.Assign (meshDevices);
         
for (uint32_t i = 0; i < interfaces.GetN(); ++i)
     
{
           
                std
:: cout<< interfaces.GetAddress(i,0)<<" \n";
           
     
}
}

the output still not changed when increasing the interfaces number in the node ( I have the same output when I set m_nIfaces to 1 or 3).
why the IP address is not set to each interface ?
Best regards.

Konstantinos

unread,
Apr 1, 2015, 10:18:16 AM4/1/15
to ns-3-...@googlegroups.com

nabil torjemen

unread,
Apr 1, 2015, 7:39:44 PM4/1/15
to ns-3-...@googlegroups.com
Hi,
I have add the following code:
  for (uint8_t i=0; i < nodes.GetN(); i++)
 
{

   
Ptr<Ipv4L3Protocol> ipv4l3 = nodes.Get(i)->GetObject<Ipv4L3Protocol> ();
   
   
for (uint8_t index=0; index<ipv4l3->GetNInterfaces (); index++)
   
{
     
       
for (uint8_t interface=0; interface<ipv4l3->GetNAddresses (index); interface++)
     
{
      std
::cout<<ipv4l3->GetAddress (index, interface).GetLocal()<<'\n';
     
}
     
   
}
 
}

it return two address for each node 127.0.0.1 and 10.1.1.X (x is the node number).
this ouput is the same when setting m_nIfaces to 1 or 3 !!!
why I can't get 3 address for each nodes ? and the address 127.0.0.1 is it refereed to the loopback interface ?
Best regards.

Tommaso Pecorella

unread,
Apr 2, 2015, 3:20:04 AM4/2/15
to ns-3-...@googlegroups.com
Nabil,

I'm really upset with you. The main reason is that I did explain what the MeshPointDevice does and I have spoken to the wind, and in a windy day too !

The whole point of the MeshPointDevice is to HIDE the WifiNetDevices it uses and to NOT let the IP layer use them directly. As a consequence, they MUST NOT have an IP address.

About the 127.0.0.1 question, I will not reply because it wouldn't be easy to say anything without being too harsh. Check in Internet what's the 127.0.0.1 address is and you'll find it by yourself. Again, the real question is: why did you ask ?

T.

nabil torjemen

unread,
Apr 2, 2015, 4:39:34 AM4/2/15
to ns-3-...@googlegroups.com
Hi Tommaso;
I'm really sorry.

It is really that you have already tell me that the MeshPointDevice hide the WifiNetDevices . But I'm thinking it is only for layer 1 and 2 and just to make easy for user to set up a mesh network without set up each interface separetly.
In other side, I'm always comparing with the real situation, when the technical guys should set up an IP adress for each interface like in P2P or Microwave.

Regarding, the 127.0.0.1 address, I know it is the localhost address. However, I'm trying to get all MAC allocated Address for each interface and what is the IP address allocated for each one. That's why I'm asking about the loopback interface

Again, I'm sorry. please try to be patient with me even if my questions seem strange to you: I'm trying to learn and check if i'm doing thing correctly or not.

best regards.

nabil torjemen

unread,
Apr 2, 2015, 8:39:57 AM4/2/15
to ns-3-...@googlegroups.com
Hi Tommaso and Konstantinos,
the concept that the MeshPointDevice hide the WifiNetDevices and Only one IP address seem to be very important in my case.
In fact, I'm trying to write a script for S2a mobility which requires the IP preservation in the same LTE Device. So the LTE device having an LTE interface and Wifi interfaces should use the same IP address.
Is it right to create LTEwifiPoint device which hide the two interface (LTE and Wifi) of the UE ?
Best regards.

Tommaso Pecorella

unread,
Apr 2, 2015, 8:59:19 AM4/2/15
to ns-3-...@googlegroups.com
Hi,

I was about to write a complex post about how and why you can not apply the same technique used in the mesh module to a mixed LTE / Wi-Fi scenario.
However, you could indeed do it, under some extremely restrictive hypothesis, like the AP being a trusted HotSpot2 device connected directly t the EPC, plus defining some new interfaces.

However, the main problem is: it seems that you still don't have a clear idea of the things you're working with. It's not an ns-3 problem, mind. You now come out with LTE / Wi-Fi mixed scenario, handover and S2a mobility. This isn't a simulation problem, it's a scenario and protocol definition issue.
If you'd have all the protocols and interfaces clear, then you shouldn't even be here talking about mesh devices. It's more or less like talking about how to grow potatoes, and suddenly you come out saying "sure, but I need to grow a field of mead to brew the beer". It's just another thing.

As a consequence, I'd warmly suggest to stop programming, study the standards and the theory, devise a working and viable solution and THEN simulate it, eventually developing the things you need (and not adapting random things that may sound like the ones you need).

Hope this helps,

T.

nabil torjemen

unread,
Apr 2, 2015, 5:01:45 PM4/2/15
to ns-3-...@googlegroups.com
Hi Tommaso and Konstantinos,
I really appreciate you help and support and also your patience for my questions which seems sometimes strange or obious.

My current work is following:

I have write a new offload decision agent based on multi constraints algorithm and some mathematical model. It aims to optimize the data offloaded from LTE network to WMN/wifi network while keeping a good QoS.
For that reason, I'm trying to write a script in ns3 to simulate my agent in a chosen scenario. This scenario is defined by 6 mesh nodes including for each one 1 interface used as AP. The root node should be connected to the PGW using the S2a interface and all the WMN/AP are managed by the EPC.

Currently, and with your help I have setup the WMN network, define a specific root node and then add one interface for each node used as AP. I have also use the LTE example to setup the LTE network part (incldung eNodeB, Lte Ue, PGW,...).

According to 3GPP, the S2a mobility should preserve the IP address of the Ue when the handover is done from LTE to Wifi. So the idea to use the concept of the MeshPointDevice to hide both lte and wifi interfaces of the Ue.

Is it wrong to do it ?

After that, I will try to :
1- Add the S2a link between the PGW and root mesh node. I think the p2phelper can be used.
2- Add my new agent in the PGW.

Please give me your feedback about my work and what I'm trying to do.

Best regards.

Reply all
Reply to author
Forward
0 new messages