Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22

Thread: NS2 and TORA Routing Protocol

  1. #16
    Join Date
    Feb 2012
    Posts
    5

    Re: NS2 and TORA Routing Protocol

    can anybody help me related this error . i am doing my research project in TORA optimization..

    invalid command name "Agent/rtProto/TORA"
    while executing
    "Agent/rtProto/TORA instproc init args {
    puts "DOWN HERE"
    $self next $args
    }"

    email-id : mauliktrivedi.ce@gmail.com

  2. #17
    Join Date
    Dec 2007
    Posts
    2,291

    Re: NS2 and TORA Routing Protocol

    Quote Originally Posted by mauliktrivedi.ce View Post
    can anybody help me related this error . i am doing my research project in TORA optimization..

    invalid command name "Agent/rtProto/TORA"
    while executing
    "Agent/rtProto/TORA instproc init args {
    puts "DOWN HERE"
    $self next $args
    }"

    email-id : mauliktrivedi.ce@gmail.com
    Can you try test-suite-wireless-lan-tora.tcl under tcl/test

  3. #18
    Join Date
    Feb 2012
    Posts
    5

    Re: NS2 and TORA Routing Protocol

    adhoc file properly executed . but when i have execute a tora.tcl in /tcl/mobility then it get this error...

  4. #19
    Join Date
    Jun 2006
    Posts
    623

    Re: NS2 and TORA Routing Protocol

    This is the basic tcl code, just copy paste it, will create trace file and namefile...

    ======================================================================
    # Define options
    # ======================================================================
    set val(chan) Channel/WirelessChannel ;# channel type
    set val(prop) Propagation/TwoRayGround ;# radio-propagation model
    set val(netif) Phy/WirelessPhy ;# network interface type
    set val(mac) Mac/802_11 ;# MAC type
    set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
    set val(ll) LL ;# link layer type
    set val(ant) Antenna/OmniAntenna ;# antenna model
    set val(ifqlen) 50 ;# max packet in ifq
    set val(nn) 2 ;# number of mobilenodes
    set val(rp) AODV ;# routing protocol


    # ======================================================================
    # Main Program
    # ======================================================================



    #
    # Initialize Global Variables
    #
    set ns_ [new Simulator]
    set tracefd [open simple.tr w]
    set namtrace [open animation.nam w]
    $ns_ use-newtrace
    $ns_ trace-all $tracefd
    $ns_ namtrace-all-wireless $namtrace 500 500


    # set up topography object
    set topo [new Topography]


    $topo load_flatgrid 500 500


    #
    # Create God
    #
    set god_ [create-god $val(nn)]


    #
    # Create the specified number of mobilenodes [$val(nn)] and "attach" them
    # to the channel.
    # Here two nodes are created : node(0) and node(1)


    # configure node


    $ns_ node-config -adhocRouting $val(rp) \
    -llType $val(ll) \
    -macType $val(mac) \
    -ifqType $val(ifq) \
    -ifqLen $val(ifqlen) \
    -antType $val(ant) \
    -propType $val(prop) \
    -phyType $val(netif) \
    -channelType $val(chan) \
    -topoInstance $topo \
    -agentTrace ON \
    -routerTrace ON \
    -macTrace OFF \
    -movementTrace OFF

    for {set i 0} {$i < $val(nn) } {incr i} {
    set node_($i) [$ns_ node]
    $node_($i) random-motion 0 ;# disable random motion
    }


    #
    # Provide initial (X,Y, for now Z=0) co-ordinates for mobilenodes
    #
    $node_(0) set X_ 5.0
    $node_(0) set Y_ 2.0
    $node_(0) set Z_ 0.0


    $node_(1) set X_ 390.0
    $node_(1) set Y_ 385.0
    $node_(1) set Z_ 0.0


    #
    # Now produce some simple node movements
    # Node_(1) starts to move towards node_(0)
    #
    $ns_ at 50.0 "$node_(1) setdest 25.0 20.0 15.0"
    $ns_ at 10.0 "$node_(0) setdest 20.0 18.0 1.0"


    # Node_(1) then starts to move away from node_(0)
    $ns_ at 100.0 "$node_(1) setdest 490.0 480.0 15.0"


    # Setup traffic flow between nodes
    # TCP connections between node_(0) and node_(1)


    set tcp [new Agent/TCP]
    $tcp set class_ 2
    set sink [new Agent/TCPSink]
    $ns_ attach-agent $node_(0) $tcp
    $ns_ attach-agent $node_(1) $sink
    $ns_ connect $tcp $sink
    set ftp [new Application/FTP]
    $ftp attach-agent $tcp
    $ns_ at 10.0 "$ftp start"


    # Telling nodes initial position in nam
    for {set i 0} {$i < $val(nn)} { incr i } {
    # 30 defines the node size for nam
    $ns_ initial_node_pos $node_($i) 30
    }


    #
    # Tell nodes when the simulation ends
    #
    for {set i 0} {$i < $val(nn) } {incr i} {
    $ns_ at 150.0 "$node_($i) reset";
    }
    $ns_ at 150.0 "$ns_ nam-end-wireless 150.0"
    $ns_ at 150.0 "stop"
    $ns_ at 150.01 "puts \"NS EXITING...\" ; $ns_ halt"
    proc stop {} {
    global ns_ tracefd namtrace
    $ns_ flush-trace
    close $tracefd
    close $namtrace
    }


    puts "Starting Simulation..."
    $ns_ run

  5. #20
    Join Date
    Feb 2012
    Posts
    5

    Re: NS2 and TORA Routing Protocol

    actually i want to execute tora.tcl file which relocated in " /ns2.34/tcl/mobility/tora.tcl "
    and whenever i execute this file it generate a error mention in above thread.

    tora.tcl file contain..



    set opt(imep) "ON" ;# Enable/Disable IMEP
    set opt(ragent) Agent/rtProto/TORA
    set opt(pos) NONE ;# Box or NONE

    if { $opt(pos) == "Box" } {
    puts "*** TORA using Box configuration..."
    }

    # ======================================================================
    Agent instproc init args {
    $self next $args
    }
    Agent/rtProto instproc init args {
    puts "DOWN HERE 2"
    $self next $args
    }
    Agent/rtProto/TORA instproc init args {
    puts "DOWN HERE"
    $self next $args
    }

    Agent/rtProto/TORA set sport_ 0
    Agent/rtProto/TORA set dport_ 0

    # ======================================================================

    proc create-routing-agent { node id } {
    global ns_ ragent_ tracefd opt

    #
    # Create the Routing Agent and attach it to port 255.
    #
    set ragent_($id) [new $opt(ragent) $id]
    set ragent $ragent_($id)
    $node attach $ragent [Node set rtagent_port_]

    $ragent if-queue [$node set ifq_(0)] ;# ifq between LL and MAC

    # now that the Beacon/Hello messages have been
    # moved to the IMEP layer, this is not necessary.
    # $ns_ at 0.$id "$ragent_($id) start" ;# start BEACON/HELLO Messages

    #
    # XXX: The routing protocol and the IMEP agents needs handles
    # to each other.
    #
    $ragent imep-agent [$node set imep_(0)]
    [$node set imep_(0)] rtagent $ragent

    #
    # Drop Target (always on regardless of other tracing)
    #
    set drpT [cmu-trace Drop "RTR" $node]
    $ragent drop-target $drpT

    #
    # Log Target
    #
    set T [new Trace/Generic]
    $T target [$ns_ set nullAgent_]
    $T attach $tracefd
    $T set src_ $id
    $ragent log-target $T

    #
    # XXX: let the IMEP agent use the same log target.
    #
    [$node set imep_(0)] log-target $T
    }


    proc create-mobile-node { id } {
    global ns_ chan prop topo tracefd opt node_
    global chan prop tracefd topo opt

    set node_($id) [new Node/MobileNode]

    set node $node_($id)
    $node random-motion 0 ;# disable random motion
    $node topography $topo

    #
    # This Trace Target is used to log changes in direction
    # and velocity for the mobile node.
    #
    set T [new Trace/Generic]
    $T target [$ns_ set nullAgent_]
    $T attach $tracefd
    $T set src_ $id
    $node log-target $T

    $node add-interface $chan $prop $opt(ll) $opt(mac) \
    $opt(ifq) $opt(ifqlen) $opt(netif) $opt(ant)

    #
    # Create a Routing Agent for the Node
    #
    create-routing-agent $node $id

    # ============================================================

    if { $opt(pos) == "Box" } {
    #
    # Box Configuration
    #
    set spacing 200
    set maxrow 7
    set col [expr ($id - 1) % $maxrow]
    set row [expr ($id - 1) / $maxrow]
    $node set X_ [expr $col * $spacing]
    $node set Y_ [expr $row * $spacing]
    $node set Z_ 0.0
    $node set speed_ 0.0

    $ns_ at 0.0 "$node_($id) start"
    }
    }

  6. #21
    Join Date
    Feb 2012
    Posts
    5

    Re: NS2 and TORA Routing Protocol

    still facing problem about tora protocol..
    can anybody help me...

    tia..

  7. #22
    Join Date
    Feb 2012
    Posts
    5

    Re: NS2 and TORA Routing Protocol

    i also facing same problem . there is any solution .. can you help me for that.. my email mauliktrivedi.ce@gmail.com

    Quote Originally Posted by flogeros View Post
    Dear Zachary I am sending you the error that I am getting back.
    invalid command name "Agent/rtProto/TORA"
    while executing
    "Agent/rtProto/TORA instproc init args {
    puts "DOWN HERE"
    $self next $args
    }"
    (file "tora_s.tcl" line 15)
    Can I send an email regarding the adhoc protocols? My email is korgani@hotmail.com

    Regards,

    flogeros

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Error while Simulating TORA
    By amithkhandakar in forum Networking & Security
    Replies: 1
    Last Post: 03-05-2012, 02:07 AM
  2. Cisco IOS for router for BGP routing protocol
    By Rak$sha in forum Networking & Security
    Replies: 6
    Last Post: 22-07-2011, 07:29 PM
  3. VLSM and Routing Using RIPv2 Protocol
    By Xiomar in forum Networking & Security
    Replies: 2
    Last Post: 11-01-2011, 07:03 PM
  4. What is Link state routing protocol
    By B-JOB Guru in forum Networking & Security
    Replies: 3
    Last Post: 10-01-2011, 07:39 AM
  5. Replies: 4
    Last Post: 29-12-2009, 04:39 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,054,164.64728 seconds with 17 queries