ns2 code is not running giving some error can't figure out the error -
This is my code for SFQ.tcl. This code was going on completely when I worked on a college computer , When I'm trying to run it on my computer, I am giving some error. Please tell me if someone can tell me where the error is in the installation of NS2 as when I type NS, then I'll call I am getting this kind of error This line is set to set valve 60.0; # Set the Simulator Set Ns [New Simulator] with New Line, , Set Val 60.0; Set Ns [New simulator] % , but when I try to give errors to the program
# simulation time set Val 60.0 (stop); # Prepare new simulator ns [new simulator] set set tracefile [open out.tr w] $ ns detect all $ tracefile namfile set [open out.Nnam w] $ ns namtrace- all $ namfile #create 6 nodes Set N0 [$ n2 [$ ns node ns node] n1 [set ns node set] set] set n3 [ns node] set n4 [ns node] set n5 [ns node] #create link between nodes specific bandwidth With, type the delay, queue & amp; Line size $ ns duplex-link $ n0 $ n2 10.0Mb 10ms SFQ $ ns queue limit $ n0 $ n2 50 $ ns duplex-link $ n1 $ n2 10.0Mb 10ms sfq $ ns queue limit $ n1 $ n2 50 $ NS Duplex Link $ n3 $ n4 10.0Mb 10ms SFQ $ NS Queue-Limit $ n3 $ n4 $ 50 NS Duplex Link $ n3 $ n5 10.0Mb 10ms SFQ $ NS Queue-Limit $ n3 $ n5 $ 50 NS Duplex Link $ n2 $ N3 5.0Mb 10ms SFQ $ NS queue $ n2 $ n3 50 #Give node position $ ns duplex-link co-up $ n0 $ n2 orient right $ ns duplex-link co-up $ n1 $ n2 orient right $ NS Duple S-link-op $ n3 $ n4 orient right-up $ ns duplex-link-op $ n 3 $ n5 orient right-down $ ns duplex-link-op $ n 2 $ n3 orient right #tpt agent Set TCP [New Agent / TCP] $ TCP Set Class_ 2 Attributes #Attaching TCP Agent N0 $ Ns- Agent $ N0 $ TCP #creating TCP Sync Sync [New Agent / TCPSink] #Attaching TCP Sync Set N4 $ ns Giving - Agent $ N 4 $ Sync # Simulator TCP Connecting $ Nc CAN $ TCP $ Sync $ TCP Set FID_ 1 # Setting Packet Size TCP $ TCP Set Packet SISAP 1500 # Certifying FTP FTP Set FTP [New App / FTP] #TTP to TCP $ Feet P Attachment Agent $ TCP $ FTP Set Type FTP # Creative UDP Agent Set udp1 [New Agent / UDP] # Upt Agent for N1 $ NS Attachment Agent $ N 1 UDP 1 # UDP Agent Set Null Dude [New agent / null] #Attaching null n5 $ ns give-agent $ n5 $ null connect $ nud $ $ null $ udp1 fid_ 2 #set queue monitor monitor drop packet and drop bytes and various other things qmon1 set [$ ns Monitor monitor set -Q $ n0 $ n2 [open n0n1.out w] 0.1]; [$ Ns link $ n0 $ n2] Queue-Sample-Timeout; Set qmon2 [$ ns monitor-queue $ n1 $ n2 [open n1n2.out w] 0.1]; [$ Ns link $ n1 $ n2] Queue-Sample-Timeout; Set qmon3 [$ ns monitor-queue $ n2 $ n3 [open n2n3.out w] 0.1]; [$ Ns link $ n2 $ n3] Queue-Sample-Timeout; Set qmon4 [$ ns monitor-queue $ n3 $ n4 [open n3n4.out w] 0.1]; [$ Ns link $ n3 $ n4] Queue-Sample-Timeout; Set qmon5 [$ ns monitor-queue $ n3 $ n5 [open n3n5.out w] 0.1]; [$ Ns link $ n3 $ n5] Queue-Sample-Timeout; #Creating CBR Application Set CBR 1 [New Application / Traffic / CBR] # Adding CBR to UDP Agent $ cbr1 Attached Agent $ udp1 $ cbr1 Set Type CBBR # Setting CBR Packet Size $ cbr1 Set Packet Size_1500 # Setting CBR Rate $ cbr1 $ 0.05 MB $ cbr1 set random_ false # stop and stop $ 1 cbr1 start at $ 1 $ ns 1.0 "$ ftp start" $ ns 59.0 "$ ftp stop" $ ns at 59.5 "$ cbr1 stop" # End Process Proof {{{{Global NS Tracefile} Mfil $ ns flush-trace around $ Tresfail nearly $ name File Admin NAM. NAM & amp; $ Valve $ stop $ 1 $ $ ($) $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $; $ Ns halt "$ ns run
can not read "ns": such a variable when "$ Ns node" "n0 [$ ns node] "(File" SFQ.tcl "line 9) has been implemented from within
# is used to comment in TCL
Comments
Post a Comment