- ›
- Forums ›
- Get Help to do your B.E., and M.E., M.Tech., & M.S., Project in Ns2 ›
- problem working with manual routing
Continuing with the problem i mention on previous post, and to simplify the question, i’m trying to use command add-route to configure my tables. I have nodes in a simple square like this…
n0
n1
n2
n3
|_______________________|
and i want to send information between n0 and n1 trough n3-n2. I write this code
$ns rtproto Manual
$n0 add-route [$n1 id] $n3
$n1 add-route [$n1 id] $n2
$n3 add-route [$n1 id] $n1
and the simulation starts without any error but stops at the first step. Anybody knows what am i doing wrong??
Thanks again for any help :).
Pablo.
While I am trying the problem
I am getting split object unknown error
at the line $n1 add-route-to-adj-node -default $n2
I am using the command as follows
$ns rtproto Manual
set n1 [$ns node]
set n2 [$ns node]
$ns duplex-link $n1 $n2 10Mb 100ms DropTail
$n1 add-route-to-adj-node -default $n2
(Sorry for the delay answering…)
I managed to run the script establishing defaults routes using the “add-route-to-adj-node” like you. First time i get the same problem you have, but i solve it using the next line (instead of yours)
[$n0 get-module “Manual”] add-route-to-adj-node -default $n1
Using this you should solve your problem :).
Now my problem is to establish routes without default routes, pointing out in each node the “next hop” depending on the node of destination, like in the problem i described in previous post.
For example, if i have these four nodes….
n0
n1
n2
n3
i could configure n1 to put packets to n3 through n2
$n1 add-route [$n3 id] $n2
Unfortunately i don’t know if i can do it this way and i don’t manage to run the script :(.
Have you got any idea about it?
Thanks in advance :).
Pablo.
Discuss Through WhatsApp