Re: ns3 helping

303 views
Skip to first unread message

Konstantinos Katsaros

unread,
Mar 10, 2014, 6:46:51 AM3/10/14
to ramzi ramzi, ns-3-...@googlegroups.com
Hi,

As far as I know, there is no hierarchical routing nor the notion of parent/child implemented in the main NS3 release. 

Please send your questions to the ns-3-users mailing list.

-- 
Konstantinos Katsaros

On Monday, 10 March 2014 at 10:34, ramzi ramzi wrote:

Hello, I'm looking to generate a network consisting of wireless nodes, which are arranged in a tree-like topology. I've gone through the in-built examples in ns3. I could always set the position of the nodes manually to generate a tree, but how would I assign parents and children to each node?
thanks for helping

Konstantinos Katsaros

unread,
Mar 10, 2014, 7:47:47 AM3/10/14
to ramzi ramzi, ns-3-...@googlegroups.com
Dear Ramzi,

As I mentioned in my previous reply, please send your questions in the ns-3-users mailing list.

You could use it but you should port it into the newest ns-3 release (ns-3.19) in order to get support from the ns-3-users forum and that might require some effort since that project was for ns-3.12.

-- 
Konstantinos

On Monday, 10 March 2014 at 11:39, ramzi ramzi wrote:

Thanks konstantinos, i can use this example? 

http://code.nsnam.org/jabraham3/topo_tree

ram...@gmail.com

unread,
Mar 11, 2014, 7:06:04 AM3/11/14
to ns-3-...@googlegroups.com, ramzi ramzi

ram...@gmail.com

unread,
Mar 11, 2014, 7:10:42 AM3/11/14
to ns-3-...@googlegroups.com, ramzi ramzi
If there is no possibility for that, is there any way to to populate routing table of each node manually.Thank you again and waiting for your help

Konstantinos

unread,
Mar 11, 2014, 7:24:18 AM3/11/14
to ns-3-...@googlegroups.com, ramzi ramzi
I didn't say that there is no possibility of using that, but in order to use it and get help from the list, you have to port it in ns-3.19 because if you start asking for questions/bugs for ns-3.12 the answer will be move to ns-3.19!

For manual routing table population, check the example using static routing in /examples/routing/simple-routing-slash32.cc 

ram...@gmail.com

unread,
Mar 12, 2014, 9:03:51 AM3/12/14
to ns-3-...@googlegroups.com, ramzi ramzi
Hi,
   How can I create two lists (parents and childrens) stored in the memory of each node. These lists contains the identity of the nodes.
  thanks!

Tommaso Pecorella

unread,
Mar 13, 2014, 3:10:58 AM3/13/14
to ns-3-...@googlegroups.com, ramzi ramzi
Hi,

that's a good question. Unfortunately, the answer is not that obvious.

I could say... use std::list<Ipv4Address> m_childs;
But it all depends on how you fill that list, what you want to do with it and so on. Basically, it depends on your protocol.
As a consequence, we can't help.

T.

ram...@gmail.com

unread,
Mar 13, 2014, 8:15:20 AM3/13/14
to ns-3-...@googlegroups.com, ramzi ramzi
Thanks Tommaso, 
I want to use lists for routing in a static way. So I filled the routing tables. How can I store these lists in the memory of each node?

Konstantinos

unread,
Mar 13, 2014, 8:33:46 AM3/13/14
to ns-3-...@googlegroups.com, ramzi ramzi
You can use static routing and add the routes you want for each node. I do not think you need to create a list.

Ramzi

unread,
Mar 20, 2014, 9:23:59 AM3/20/14
to ns-3-...@googlegroups.com, ramzi ramzi

Hi,
   The wsn contains several nodes (100 nodes). How a node knows the address of its parent?Will I use the AODV protocol?
   Thanks

Tommaso Pecorella

unread,
Mar 20, 2014, 4:57:37 PM3/20/14
to ns-3-...@googlegroups.com, ramzi ramzi
Hi,

it depends on what you call "parent". In the current terminology, a parent is the next hop toward the root.
About "how to know the address of your best parent"... well, that's the routing goal. If you have a system to find it, then you have a routing system.

Cheers,

T.

csetea...@gmail.com

unread,
Mar 26, 2014, 2:41:29 AM3/26/14
to ns-3-...@googlegroups.com, ramzi ramzi
hello

I would like to create a table to keep track of the handovers that take place. the table contains the starting node ,the end node . is it possible to create a table ? and if so how can it be done
any help would be appreciated . thanks in advance

Tommaso Pecorella

unread,
Mar 26, 2014, 2:58:35 AM3/26/14
to ns-3-...@googlegroups.com, ramzi ramzi
Hi,

your post is not related to the previous discussion.


T

Ramzi

unread,
Mar 26, 2014, 12:26:12 PM3/26/14
to ns-3-...@googlegroups.com, ramzi ramzi
hi Tommaso,

Yes,  a parent is the next hop toward the root.
If I use a static routing so I give the next node (parent node) to each node in the network using AddHostRoute (Destination IP, Next hop IP device index). If the network is composed of thousands of nodes will be difficult specifying expected next hop IP node by node. 
How to route a packet from a child node to a parent node (multihop) to a sink node?

Tommaso Pecorella

unread,
Mar 26, 2014, 12:52:52 PM3/26/14
to ns-3-...@googlegroups.com, ramzi ramzi
AddNetworkRoute ?

Ramzi

unread,
Mar 27, 2014, 6:39:12 AM3/27/14
to ns-3-...@googlegroups.com, ramzi ramzi
Hi Tommaso,

AddHostRouteTo (Ipv4Address dest, Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
I have to call this method for each node in the network and indicate the IP address of the parent node ( Ipv4Address next Hop). However, If the network is composed of thousands of nodes will be difficult specifying expected next hop IP node by node. In my case, Ipv4Address dest = Ip Adress of sink.
Est ce que , je peux stocker l'identité d'un noeud parent dans la mémoire d'un noeud enfant? Puis je peux connaitre l'adresse ip d'un parent depuis cette identité.
Is that I can store the identity of a parent node in the memory of a child node? Then I can know the IP address of a parent since this identity. 
The goal here, follow a hierarchical routing from a source node to a root node (sink).

Ramzi

unread,
Mar 27, 2014, 6:45:34 AM3/27/14
to ns-3-...@googlegroups.com, ramzi ramzi
Hi Tommaso,

AddHostRouteTo (Ipv4Address dest, Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
I have to call this method for each node in the network and indicate the IP address of the parent node ( Ipv4Address next Hop). However, If the network is composed of thousands of nodes will be difficult specifying expected next hop IP node by node. In my case, Ipv4Address dest = Ip Adress of sink.

Konstantinos

unread,
Mar 27, 2014, 6:45:40 AM3/27/14
to ns-3-...@googlegroups.com
Hi,

If you had 1000 nodes as you say, how would you identify the parent node of each one to create the list?

You have put a for loop and do the AddHost/NetworkRoute for each one. With a little pre-thinking and proper design on the paper (check the subnets etc) it should not be difficult to achieve. 

Ramzi

unread,
Mar 27, 2014, 7:03:50 AM3/27/14
to ns-3-...@googlegroups.com
Thanks Konstantinos,



If you had 1000 nodes as you say, how would you identify the parent node of each one to create the list?

   -   eg the closest chosen its parent and stores it in the list node. Or clustering algorithm.

You have put a for loop and do the AddHost/NetworkRoute for each one. With a little pre-thinking and proper design on the paper (check the subnets etc) it should not be difficult to achieve. 

- There are examples that can help me?

Ramzi

unread,
Mar 27, 2014, 10:27:50 AM3/27/14
to ns-3-...@googlegroups.com, ramzi ramzi

Ramzi

unread,
Mar 28, 2014, 9:39:27 AM3/28/14
to ns-3-...@googlegroups.com, ramzi ramzi
any comments Konstantinos?

Konstantinos

unread,
Mar 28, 2014, 7:29:22 PM3/28/14
to ns-3-...@googlegroups.com, ramzi ramzi
I told you, you have to think about it and design it first. You say you have 1000 nodes, how are they placed? Do they move? Does the hierarchy change over time?
These are all design specifications which I do not know. Do you want help to create the loop?

On Friday, March 28, 2014 1:39:27 PM UTC, Ramzi wrote:
any comments Konstantinos?

Ramzi

unread,
Mar 31, 2014, 7:22:20 AM3/31/14
to ns-3-...@googlegroups.com, ramzi ramzi
hi Konstantinos,
The location is grid. I do it. The network is static (not of mobility). I do too. I take a period of time to measure the delay or the hierarchy does not change. I need only the routing as indicate above. I want you to help me make the loop. How can I measure the energy consumed by a node for operation symmetric encryption or hash function calculation? 
thank you

Konstantinos

unread,
Mar 31, 2014, 7:32:15 AM3/31/14
to ns-3-...@googlegroups.com
Dear Ramzi,

You are asking unrelated questions in the same topic. If your question is unrelated to a topic or message please DO NOT reply to that message and change the subject line, because the archiver will attach your message to that unrelated thread. Create a new message instead.

First you started asking about parents/childs. We told you how you can do it.

Then you asked for routing and how you can do a loop: Did you do what I suggested? Have you designed the complete network (with IPs etc) on a piece of paper; not all 1000 nodes, just a couple are enough.

Now you ask for energy consumption: Not possible at the moment. The energy model only calculates consumption of Tx/Rx/Idle times, not 'CPU' time needed to do encryption/hashing. 

Ramzi

unread,
Mar 31, 2014, 7:46:07 AM3/31/14
to ns-3-...@googlegroups.com, ramzi ramzi
Ok Konstantinos,
 I stay in the preceding context (routing using the IP address of a parent). I will create a new message for the energy consumption.
Reply all
Reply to author
Forward
0 new messages