# This file is hw1-1.tmpl.txt # # Create the core event scheduler set ns [new Simulator] # Set up nam trace file set f [open p1.nam w] $ns namtrace-all $f # Create 5 nodes for {set i 0} {$i < 5} {incr i} { ... FILL IN HERE ... } # Create links # All links have 10Mbps bandwidth and 5ms delay ... FILL IN HERE ... # Set up Distance Vector routing ... FILL IN HERE ... # Create a UDP agent and attach it to node node 0 ... FILL IN HERE ... # Create a CBR traffic source associate it with the UDP agent ... FILL IN HERE ... # Create a NULL agent and attach it to node 4 ... FILL IN HERE ... # Connect the source and the destination agents ... FILL IN HERE ... # Mark UDP packets with blue color ... FILL IN HERE ... # Start CBR traffic at 0.1s and stop it at 1.0s ... FILL IN HERE ... # Bring down the link between node 3 and node 4 at 0.4s ... FILL IN HERE ... $ns at 1.0 "finish" proc finish {} { global ns f $ns flush-trace close $f exec ~csci551/nam p1.nam & exit 0 } $ns run