#5, First Floor, 4th Street , Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to use different routing protocol in ns2?
  • Usage of AODV Routing Protocol in tcl script as follows:

    # Defining Options
    set rp AODV;# routing protocol
    set ifq Queue/DropTail/PriQueue ;# interface queue type
    # Creating nodes with this Configuration
    $ns node-config -adhocRouting $rp \
    – ifqType $val(ifq)
    set totalNodes 50 ;#Total Number of nodes in the network
    for {set i 0} {$i < $totalNodes } { incr i } {
    set node_($i) [$ns node]
    }

  • Usage of DSR Routing Protocol in tcl script as follows:

    # Defining Options
    set rp DSR ;# routing protocol
    set ifq CMUPriQueue ;# interface queue type
    # Creating nodes with this Configuration
    $ns node-config -adhocRouting $rp \
    – ifqType $val(ifq)
    set totalNodes 50 ;#Total Number of nodes in the network
    for {set i 0} {$i 7lt; $totalNodes } { incr i } {
    set node_($i) [$ns node]
    }

  • Usage of DSDV Routing Protocol in tcl script as follows:

    # Defining Optionsset rp AODV ;# routing protocolset ifq Queue/DropTail/PriQueue ;# interface queue type# Creating nodes with this Configuration$ns node-config -adhocRouting $rp \- ifqType $val(ifq)set totalNodes 50 ;#Total Number of nodes in the networkfor {set i 0} {$i < $totalNodes } { incr i } {set node_($i) [$ns node]

    }