Hello all,

Currently, I am trying to implement an application layer multicast algorithm
using NS2. For this purpose I need to assign IP address to every node in
NS2. I checked out the NS2 nodes may have hierarchical routing addressing
which is similar to IP addressing. But, I also found the "addr" command
which apparently allows you to configure the node IP, so I can run the
following code:

set ns [new Simulator]
set n0 [$ns node]
set n1 [$ns node]
$n0 addr "192.168.1.1"
$n1 addr "192.168.1.2"

But in the trace file I keep getting sequential identifiers. For example:

+ 0 1 2 tcp 40 ------- 2 1.0 5.0 0 0

But I would like to get this one:

+ 0 192.168.1.1 192.168.1.2 tcp 40 ------- 2 1.0 5.0 0 0

What am I doing wrong?


Thanks in advance,
Marlos

Reply via email to