1. 15 Apr, 2002 2 commits
    • Leigh B. Stoller's avatar
      Oops, left in a debugging printf. · 8e206eed
      Leigh B. Stoller authored
      8e206eed
    • Leigh B. Stoller's avatar
      Add static routing support: · d881770b
      Leigh B. Stoller authored
      	# Turn on manual routing.
      	$ns rtproto Manual
      
      	# Set manual routes
      	$nodeA add-route $nodeC $nodeB
      	$nodeC add-route $nodeA $nodeB
      
      results in this information being returned from the tmcd routing
      command:
      
      	ROUTERTYPE=manual
      	ROUTE DEST=192.168.2.3 DESTTYPE=host DESTMASK=255.255.255.0 \
      		NEXTHOP=192.168.3.2 COST=0
      
      The reason for DESTTYPE and DESTMASK is so that we can also support
      routing to links and lans, since doing it on a per host basis if not
      only hugely tedious, but plain impossible if the destination node has
      multiple links; the add-route syntax takes a node, but we need the IP
      of the relevant link in order to run the route add commands on the
      nodes. So, I've "extended" the syntax of add-route so that you can
      give it a Link or a Lan as the dest:
      
      	$nodeA add-route $link0 $nodeB
      	$nodeA add-route [$ns link $nodeB $nodeC] $nodeB
      
      In this case, the DESTTYPE=net, and the netmask is no longer ignored;
      it is used in the route add command. Currently, the mask is hardwired
      in the DB to 255.255.255.0, but by providing it in the tmcd command,
      we change it later if needed.
      
      I did not implement add-route-to-adj-node since that is not really
      useful in our context, and we definitely do not want the user to
      change the default routes on his nodes. But, its easy to add if we
      need to.
      
      The client side stuff is not done yet.
      d881770b
  2. 15 Mar, 2002 2 commits
  3. 14 Mar, 2002 1 commit
  4. 05 Mar, 2002 1 commit
    • Leigh B. Stoller's avatar
      node.tcl: Run agent-attach through the node so that we can record · deb7b404
      Leigh B. Stoller authored
      which agents are attached to which node, so that we can assign
      portnumbers to them. Also add code to updating the DB with these
      agents (virt_trafgens).
      
      sim.tcl: Get rid of $pid_$eid_events (per experiment events table),
      and replace with global eventlist table. Revisit this later, since it
      was causing problems and we do not really have a problem right now.
      Maybe later.
      
      traffic.tcl: Add virt_trafgens DB table update code. Get rid of oskit
      based traffic generators and replace with FreeBSD nodes, which will
      boot up and check if they are traffic gen source. Add get_params call,
      called by the event code im sim.tcl to get the current params for the
      START event.
      deb7b404
  5. 08 Feb, 2002 1 commit
    • Leigh B. Stoller's avatar
      Big round of image/osid changes. This is the first cut (final cut?) at · a73e627e
      Leigh B. Stoller authored
      supporting autocreating and autoloading images. The imageid form now
      sports a field to specify a nodeid to create the image from; If set,
      the backend create_image script is invoked. Thats the easy part.
      Slightly harder is autoloading images based on the osid specified in
      the NS file. To support this, I have added a new DB table called
      osidtoimageid, which holds the mapping from osid/pctype to imageid.
      When users create images, they must specify what node types that image
      is good for. Obviously, the mappings have to be unique or it would be
      impossible to figure it out! Anyway, once that image mapping is
      in place and the image created, the user can specify that ID in the NS
      file. I've changed os_setup to to look for IDs that are not loaded,
      and to try and find one in the osidtoimageid. If found, it invokes
      os_load. To keep things running in parallel as much as possible,
      os_setup issues all the loads/reboots (could be more than a single set
      of loads is multiple IDs are in the NS file) at once, and waits for
      all the children to exit. I've hacked up os_load a bit to try and be
      more robust in the face of PXE failures, which still happen and are
      rather troublsesome. Need an event system!
      
      Contained in this revision are unrelated changed to make the OS and
      Image IDs per-project unique instead of globally unique, since thats a
      pain for the users. This turns out to be very messy, since underneath
      we do not want to pass around pid/ID in all the various places its
      used. Rather, I create a globally unique name and extened the OS and
      Image tables to include pid/name/ID. The user selects pid/name, and I
      create the globally unique ID. For the most part this is invisible
      throughout the system, except where we interface with the user, say in
      the web pages; the user should see his chosen name where possible, and
      the should invoke scripts (os_load, create_image, etc) using his/her
      name not the internal ID. Also, in the front end the NS file should
      use the user name not the ID. All in all, this accounted for a number
      of annoying changes and some special cases that are unavoidable.
      a73e627e
  6. 03 Jan, 2002 1 commit
  7. 20 Dec, 2001 1 commit
  8. 13 Dec, 2001 1 commit
  9. 06 Sep, 2001 1 commit
  10. 31 Jul, 2001 1 commit
  11. 21 Jul, 2001 1 commit
    • Mac Newbold's avatar
      Many changes and updates for handling new types. The db now has types like... · 78b4e4f5
      Mac Newbold authored
      Many changes and updates for handling new types. The db now has types like 'pc600', 'pc850', and 'dnard', and each type has a class like 'pc' or 'shark'. This updates scripts that use types to use classes where appropriate, and to handle the new types where there were hardcoded things that couldn't be eliminated right now.
      78b4e4f5
  12. 02 Jul, 2001 1 commit
  13. 20 Jun, 2001 1 commit
  14. 11 Apr, 2001 1 commit
    • Christopher Alfeld's avatar
      Serious restructuring of parsing. · e9b8c412
      Christopher Alfeld authored
      This makes variable dereferencing work as expected.  So:
      
              for {set i 1} {$i <= 8} {incr i} {
                  set c($i) [$ns node]
                  tb-set-node-cmdline $c($i) "BATCH=1 DST_NAME=$c($i)"
              }
      
      will now expand $c($i) to correctly to c-$i.  Similarly:
      
      set node1 [$ns node]
      puts "First node is $node1"
      
      will output:
      
      First node is node1.
      
      Caveat: It assumes that every node and lan will be stored in a
      variable.  So doing something like:
      
      $ns duplex-link [$ns node] [$ns node] 100Mb 150ms DroPTail
      
      while in theory valid and sensible, won't work.
      
      A clean rewrite of the parsing stuff is probably something I should do
      soon.  It needs it to do all the variable munging correctly.
      e9b8c412
  15. 26 Dec, 2000 1 commit
  16. 25 Aug, 2000 1 commit
  17. 12 Jun, 2000 1 commit
  18. 25 May, 2000 1 commit
    • place's avatar
      This is the ns->ir tcl that rob wrote way back in february. · 864e4b61
      place authored
      it handles nodes, links, events(link_up, link_down)
      
      it will _not_ work for arbitrary ns input files. The problem is that
      an input file might say
      
      set something [$ns some args]
      $something do things
      
      but my code doesn't return anything exciting in the first line.
      I return Node, Link, Event, but if they are expecting an
      Agent/whatever/whatever back, they are out of luck.
      ...and so there isn't anything for the second line to make do things
      ...and it'll break.
      864e4b61