Static Routing (NS2)
set ns [new Simulator] #Define different colors for data flows (for NAM) $ns color 1 Blue $ns color 2 Red #Open the Trace file set file1 [open out.tr w] $ns trace-all $file1 #Open the NAM trace file set file2 [open out.nam w] $ns namtrace-all $file2 #Define a ‘finish’ procedure proc finish {} { global ns file1 file2 $ns flush-trace close $file1 close $file2 exec nam … Continue reading Static Routing (NS2)