[ns] Xgraph for wireless
Hello everyone.. I am trying to plot xgraph for for end-to-end delay in wireless simulation. can please anyone help me regarding the same.. i had an e2e.awk for wireless but it just give me the average en-to-end delay and does not plot the graph.. Please help.. Thanks and regards..
[ns] Make files
Hello all, i want to know about make files in ns2.. what are they used for and what is their purpose? Thanks and regards..
[ns] MPLS hierarchical routing in ns2 ??
Hello all, I am trying to simulate Mobile MPLS i.e. integrating Mobile IP and MPLS. but when i executed it says its doing flat addressing.. I want to ask if MPLS can be implemented in hierarchical routing?? if yes then how is it possible..?? Please help... Thanks and regards..
[ns] Addressing to mpls nodes
Hello all, I am trying to assign addresses to MPLS nodes in a network.. but gettiing error.. Please help.. syntax error in expression 0.0.2 2147483647 0: extra tokens at end of expression while executing expr $addrstr [AddrParams NodeMask 1] [AddrParams NodeShift 1] invoked from within if [Simulator hier-addr?] { set addressObj [[[Simulator instance] get-AllocAddrBits ] get-Address] return [$addressObj str2addr $addrstr] } else { ... (procedure AddrParams line 2) (AddrParams addr2id line 2) invoked from within AddrParams addr2id $address_ (procedure _o16 line 5) (Node attach line 5) invoked from within [$self node] attach $ldp (procedure _o19 line 5) (RtModule/MPLS make-ldp line 5) invoked from within [$src get-module MPLS] make-ldp (procedure _o3 line 5) (Simulator LDP-peer line 5) invoked from within _o3 LDP-peer $LSR1 $LSR2 (eval body line 1) invoked from within eval $ns LDP-peer $$a $$b (for body line 5) invoked from within for {set i 1} {$i 7} {incr i} { for {set j [expr $i+1]} {$j 7} {incr j} { set a LSR$i set b LSR$j eval $ns LDP-peer $$a $$b } } (file try1.tcl line 49) -- My tcl file is as set ns [new Simulator] set nf [open out1.nam w] $ns namtrace-all $nf Classifier/Addr/MPLS set control_driven_ 1 Classifier/Addr/MPLS enable-on-demand Classifier/Addr/MPLS enable ordered control # Turn on all traces to stdout Agent/LDP set trace_ldp_ 1 Classifier/Addr/MPLS set trace_mpls_ 1 #$self openTrace 5.0 $ns set-address-format def set Node0 [$ns node 0.0.1] #set Node1 [$ns node] $ns node-config -MPLS ON set LSR1 [$ns node 0.0.2] set LSR2 [$ns node 0.0.3] set LSR3 [$ns node 0.0.4] set LSR4 [$ns node 0.0.5] set LSR5 [$ns node 0.0.6] set LSR6 [$ns node 0.0.7] #set LSR8 [$ns node] $ns node-config -MPLS OFF set Node7 [$ns node 0.0.8] #set Node10 [$ns node] $ns duplex-link $Node0 $LSR1 1Mb 10ms DropTail $ns duplex-link $LSR1 $LSR2 1Mb 10ms DropTail $ns duplex-link $LSR2 $LSR3 1Mb 10ms DropTail $ns duplex-link $LSR3 $LSR4 1Mb 10ms DropTail $ns duplex-link $LSR4 $LSR5 1Mb 10ms DropTail $ns duplex-link $LSR5 $LSR6 1Mb 10ms DropTail $ns duplex-link $LSR3 $LSR6 1Mb 10ms DropTail $ns duplex-link $LSR5 $Node7 1Mb 10ms DropTail # # configure ldp agents on all mpls nodes # for {set i 1} {$i 7} {incr i} { for {set j [expr $i+1]} {$j 7} {incr j} { set a LSR$i set b LSR$j eval $ns LDP-peer $$a $$b } } # # set ldp-message clolr # $ns ldp-request-color blue $ns ldp-mapping-color red $ns ldp-withdraw-color magenta $ns ldp-release-color orange $ns ldp-notification-color yellow # # make agent to send packets # set Src0 [new Application/Traffic/CBR] set udp0 [new Agent/UDP] $Src0 attach-agent $udp0 $ns attach-agent $Node0 $udp0 $Src0 set packetSize 500 $Src0 set interval 0.010 set Dst0 [new Agent/Null] $ns attach-agent $Node7 $Dst0 $ns connect $udp0 $Dst0 $ns at 0.1 $Src0 start for {set i 1} {$i 7} {incr i} { set a LSR$i set m [eval $$a get-module MPLS] eval set LSR$i $m } $ns at 0.2 $LSR5 ldp-trigger-by-withdraw 7 -1 $ns at 0.5 $LSR1 make-explicit-route 5 1_2_3_4_5 3000 -1 $ns at 0.6 $LSR1 flow-erlsp-install 7 -1 3000 $ns at 2.0 $Src0 stop $ns at 2.1 $LSR1 pft-dump $ns at 2.1 $LSR1 erb-dump $ns at 2.1 $LSR1 lib-dump $ns at 2.1 $LSR2 pft-dump $ns at 2.1 $LSR2 erb-dump $ns at 2.1 $LSR2 lib-dump $ns at 2.1 $LSR3 pft-dump $ns at 2.1 $LSR3 erb-dump $ns at 2.1 $LSR3 lib-dump $ns at 2.1 $LSR4 pft-dump $ns at 2.1 $LSR4 erb-dump $ns at 2.1 $LSR4 lib-dump $ns at 2.1 $LSR5 pft-dump $ns at 2.1 $LSR5 erb-dump $ns at 2.1 $LSR5 lib-dump #define 'finish' procedure proc finish {} { global ns nf $ns flush-trace #close the trace files close $nf exec nam out1.nam exit 0 } $ns at 14.0 finish $ns run
[ns] wired MPLS nodes in wired cum wireless scenario
Hello all, I am trying to simulate Mobile IP along with MPLS in ns2. can anyone help me that how we can configure the wired nodes as MPLS nodes.. i had implemented MPLS but not getting how to set wired nodes as MPLS node. Thanks and regards, Jyoti Kohli
[ns] hierarchical topology
Hello all, I am trying to implement hierarchical topology in ns2 but not getting the results. it shows error: * address is out of range of the address field.. I read Marc Gries tutorial, its the simple topology, what about if we need to add more wired nodes.. Please help. Thanks and regards..
[ns] Error in simulation
Hi all, i am running the following code for MIP in wired+wireless network but getting error at run time.. please help.. # == # Define options # == set opt(chan) Channel/WirelessChannel;# channel type set opt(prop) Propagation/TwoRayGround ;# radio-propagation model set opt(netif) Phy/WirelessPhy;# network interface type set opt(mac)Mac/802_11 ;# MAC type set opt(ifq)Queue/DropTail/PriQueue;# interface queue type set opt(ll) LL ;# link layer type set opt(ant)Antenna/OmniAntenna;# antenna model set opt(ifqlen) 50 ;# max packet in ifq set opt(nn) 1 ;# number of mobilenodes set opt(adhocRouting) DSDV ;# routing protocol set opt(cp) ;# cp file not used set opt(sc) ;# node movement file. set opt(x) 900;# x coordinate of topology set opt(y) 670;# y coordinate of topology set opt(seed) 0.0;# random seed set opt(stop) 250;# time to stop simulation set opt(ftp1-start) 100.0 set num_wired_nodes 4 #set num_bs_nodes 2 ; this is not really used here. # == # check for boundary parameters and random seed if { $opt(x) == 0 || $opt(y) == 0 } { puts No X-Y boundary values given for wireless topology\n } if {$opt(seed) 0} { puts Seeding Random number generator with $opt(seed)\n ns-random $opt(seed) } # create simulator instance set ns [new Simulator] # set up for hierarchical routing $ns node-config -addressType hierarchical 3 8 8 8 AddrParams set domain_num_ 3 ;# number of domains lappend cluster_num 2 2 1;# number of clusters in each domain AddrParams set cluster_num_ $cluster_num lappend eilastlevel 1 3 1 1 1;# number of nodes in each cluster AddrParams set nodes_num_ $eilastlevel ;# of each domain set tracefd [open wireless6-out.tr w] set namtrace [open wireless6-out.nam w] $ns trace-all $tracefd $ns namtrace-all-wireless $namtrace $opt(x) $opt(y) # Create topography object set topo [new Topography] # define topology $topo load_flatgrid $opt(x) $opt(y) # create God # 2 for HA and FA create-god [expr $opt(nn) + 2] #create wired nodes set temp {0.0.0 0.1.0} ;# hierarchical addresses for {set i 0} {$i $num_wired_nodes} {incr i} { set W($i) [$ns node [lindex $temp $i]] } # Configure for ForeignAgent and HomeAgent nodes $ns node-config -mobileIP ON \ -adhocRouting $opt(adhocRouting) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -channelType $opt(chan) \ -topoInstance $topo \ -wiredRouting ON \ -agentTrace ON \ -routerTrace OFF \ -macTrace OFF # Create HA and FA set HA [$ns node 1.0.0] set FA [$ns node 2.0.0] #set FA [$ns node 3.0.0] $HA random-motion 0 $FA random-motion 0 #$FA_2 random-motion 0 # Position (fixed) for base-station nodes (HA FA). $HA set X_ 1. $HA set Y_ 2. $HA set Z_ 0. $FA set X_ 450. $FA set Y_ 200. $FA set Z_ 0. #$FA_2 set X_ 850. #$FA_2 set Y_ 600. #$FA_2 set Z_ 0. # create a mobilenode that would be moving between HA and FA. # note address of MH indicates its in the same domain as HA. $ns node-config -wiredRouting OFF set MH [$ns node 1.0.1] set node(0) $MH set HAaddress [AddrParams addr2id [$HA node-addr]] [$MH set regagent_] set home_agent_ $HAaddress # movement of the MH $MH set Z_ 0. $MH set Y_ 2. $MH set X_ 2. # MH starts to move towards FA1 $ns at 100. $MH setdest 400. 180. 20. # goes back to HA $ns at 200. $MH setdest 2. 2. 20. # create links between wired and BaseStation nodes $ns duplex-link $W(0) $W(1) 5Mb 2ms DropTail $ns duplex-link $W(1) $W(2) 5Mb 2ms DropTail $ns duplex-link $W(2) $W(3) 5Mb 2ms DropTail $ns duplex-link $W(3) $HA 5Mb 2ms DropTail $ns duplex-link $W(3) $FA 5Mb 2ms DropTail $ns duplex-link-op $W(0) $W(1) orient down $ns duplex-link-op $W(1) $W(2) orient down $ns duplex-link-op $W(2) $W(3) orient down $ns duplex-link-op $W(3) $HA orient left-down $ns duplex-link-op $W(3) $FA orient down #
[ns] Multiple Foreign agents in MIP
Hello all, I am trying to simulate Mobile IP in ns2. However when i am trying to use multiple Foreign agents (FAs) say more than 1 it does not accept and give error.. i am just simulating a scenario in which a mobile node move from its HA towards one FA and then to another FA.. Can anyone tell me the correct syntax to use more than one FA.. Please help Thanks and regards, Jyoti Kohli
[ns] MPLS simulation error
Hello all, I am simulating MPLS on ns2. i used the following code but didnot get the results. please if anyone can help me.. set ns [new Simulator] set nf [open out.nam w] $ns namtrace-all $nf #set tf [open out.tr w] #$ns trace-all $tf set Node0 [$ns node] set Node1 [$ns node] $ns node-config -MPLS ON set LSR2 [$ns node] set LSR3 [$ns node] set LSR4 [$ns node] set LSR5 [$ns node] set LSR6 [$ns node] set LSR7 [$ns node] set LSR8 [$ns node] $ns node-config -MPLS OFF set Node9 [$ns node] set Node10 [$ns node] $ns duplex-link $Node0 $LSR2 1Mb 10ms DropTail $ns duplex-link $Node1 $LSR2 1Mb 10ms DropTail $ns duplex-link $LSR2 $LSR3 1Mb 10ms DropTail $ns duplex-link $LSR3 $LSR4 1Mb 10ms DropTail $ns duplex-link $LSR4 $LSR8 1Mb 10ms DropTail $ns duplex-link $LSR2 $LSR5 1Mb 10ms DropTail $ns duplex-link $LSR5 $LSR6 1Mb 10ms DropTail $ns duplex-link $LSR5 $LSR4 1Mb 10ms DropTail $ns duplex-link $LSR6 $LSR7 1Mb 10ms DropTail $ns duplex-link $LSR6 $LSR8 1Mb 10ms DropTail $ns duplex-link $LSR7 $LSR8 1Mb 10ms DropTail $ns duplex-link $LSR7 $Node9 1Mb 10ms DropTail $ns duplex-link $LSR8 $Node10 1Mb 10ms DropTail # # configure ldp agents on all mpls nodes # for {set i 2} {$i 9} {incr i} { for {set j [expr $i+1]} {$j 9} {incr j} { set a LSR$i set b LSR$j eval $ns LDP-peer $$a $$b } } [$LSR2 get-module MPLS] enable-control-driven [$LSR3 get-module MPLS] enable-control-driven [$LSR4 get-module MPLS] enable-control-driven [$LSR5 get-module MPLS] enable-control-driven [$LSR6 get-module MPLS] enable-control-driven [$LSR7 get-module MPLS] enable-control-driven [$LSR8 get-module MPLS] enable-control-driven # # set ldp-message clolr # $ns ldp-request-color blue $ns ldp-mapping-color red $ns ldp-withdraw-color magenta $ns ldp-release-color orange $ns ldp-notification-color yellow #$ns enable-data-driven #$ns enable-ordered-control # # make agent to send packets # set Src0 [new Application/Traffic/CBR] set udp0 [new Agent/UDP] $Src0 attach-agent $udp0 $ns attach-agent $Node0 $udp0 $Src0 set packetSize 500 $Src0 set interval 0.010 set Src1 [new Application/Traffic/CBR] set udp1 [new Agent/UDP] $Src1 attach-agent $udp1 $ns attach-agent $Node1 $udp1 $Src1 set packetSize 500 $Src1 set interval 0.010 set Dst0 [new Agent/Null] $ns attach-agent $Node9 $Dst0 set Dst1 [new Agent/Null] $ns attach-agent $Node10 $Dst1 $ns connect $udp0 $Dst0 $ns connect $udp1 $Dst1 $ns at 0.1 $Src0 start $ns at 0.1 $Src1 start for {set i 2} {$i 9} {incr i} { set a LSR$i set m [eval $$a get-module MPLS] eval set LSR$i $m } $ns at 0.2 $LSR7 ldp-trigger-by-withdraw 9 -1 $ns at 0.2 $LSR8 ldp-trigger-by-withdraw 10 -1 $ns at 0.3 $LSR2 flow-aggregation 9 -1 6 -1 $ns at 0.3 $LSR2 flow-aggregation 10 -1 6 -1 $ns at 0.5 $LSR6 ldp-trigger-by-withdraw 6 -1 $ns at 0.7 $Src1 stop $ns at 0.7 $LSR2 make-explicit-route 7 5_4_8_6_7 3000 -1 $ns at 0.9 $LSR2 flow-erlsp-install 9 -1 3000 $ns at 1.1 $LSR2 ldp-trigger-by-release 7 3000 $ns at 1.2 $LSR4 make-explicit-route 8 4_5_6_8 3500 -1 $ns at 1.4 $LSR2 make-explicit-route 7 2_3_4_3500_7 3600 -1 $ns at 1.6 $LSR2 flow-erlsp-install 9 -1 3600 $ns at 2.0 $Src0 stop $ns at 2.1 $LSR2 pft-dump $ns at 2.1 $LSR2 erb-dump $ns at 2.1 $LSR2 lib-dump $ns at 2.1 $LSR3 pft-dump $ns at 2.1 $LSR3 erb-dump $ns at 2.1 $LSR3 lib-dump $ns at 2.1 $LSR4 pft-dump $ns at 2.1 $LSR4 erb-dump $ns at 2.1 $LSR4 lib-dump $ns at 2.1 $LSR5 pft-dump $ns at 2.1 $LSR5 erb-dump $ns at 2.1 $LSR5 lib-dump $ns at 2.1 $LSR6 pft-dump $ns at 2.1 $LSR6 erb-dump $ns at 2.1 $LSR6 lib-dump $ns at 2.1 $LSR7 pft-dump $ns at 2.1 $LSR7 erb-dump $ns at 2.1 $LSR7 lib-dump $ns at 2.1 $LSR8 pft-dump $ns at 2.1 $LSR8 erb-dump $ns at 2.1 $LSR8 lib-dump #define 'finish' procedure proc finish {} { global ns nf $ns flush trace #close the trace files close $nf #close $tf