Setting Up the Network for Experiements: setupnet

Setupnet was written to setup and test the network configuration before running a set of experiments.

Comments from the setupnet source (/usr/dirt/bin/setupnet):

#
# Author: Mark Parris (MAP)
# Created: Sometime before Feb. 14, 1999 
#
# Change Log:
#
# 2/17/99 - MAP - Added support for bandwidth checking 
# 2/21/99 - MAP - Fixed a syntax bug in uname.
# 2/21/99 - MAP - Added support for specification of a default jitter 
# 4/29/99 - MAP - changed the error message on a uname mismatch
# 5/19/99 - MAP - added an interface command which is used to test for the 
#                 existence and configuration of an interface

#
# This is a program to both set up and/or test network configurations.
#
# Run with -h to see information on usage.

Sample config file (/usr/dirt/config/net.config):

# -*- perl -*-
# ^-- to activate "perl mode" in emacs, not because this is perl
# Configuration file for the network
# This file is input both to the set up and configuration script
#
# Allow blank lines and # comments

# configuration parameters for a given host:
# rcv_win - set (or verify) the receive window
# snd_win - set (or verify) the sender window

# NOTE: testing delays should be the sum of delays at the sender 
#       and receiver and any problems with the host

# default - default delay 
# uname - a string to match in the output of uname -a (make sure
#         you're running the kernel you want)

# HOST - use the current settings and configure/test this host.  Using
#          this, you should be able to set parameters that cover a
#          group of machines and then just list the machines.  

# independent of the HOST sections

# route_vrfy - verify the route from the first host to the last passes
#             through the specified hosts

# route - do a "route" command for the specified host with this
#         arguments - often advisable to delete, then add

WINSIZE=16384                   # define the var WINSIZE 

rcv_win=%{WINSIZE}              # receiver window set using the WINSIZE 
                                # variable
snd_win=%{WINSIZE}              # sender window
uname=DIRT

HOST=thelmalou134               # configure thelmalou
HOST=roadrunner134              # like thelmalou, 
HOST=floyd134                   # like thelmalou, 
HOST=goober134                  # like thelmalou
HOST=goddard134                 # like thelmalou
HOST=yako134                    # like thelmalou
HOST=howard138                  # All of these machines are the same
HOST=lovey138
HOST=speedy138
HOST=petunia138
HOST=brain138
HOST=bollella138

# 
# set up a machine that has a specific route
#

HOST=yosemite134                
uname=CBT.1000
HOST=daffy139
uname=DPM                       # make sure the uname output includes the text
                                # ALTQ-DELAY
HOST=elmer139

#
# These are not host specific
#

# list all machines you are going to contact
# took lovey out - lovey138, 
machines=floyd134, goober134, thelmalou134, roadrunner134, yosemite134, daffy134, daffy139, yosemite139, topsecret139, elmer139, elmer138, brain138, howard138, speedy138, petunia138, goddard134, bollella138, yako134


# delay_grid is how we test the expected roundtrip delay between hosts
# this is necessary because delay box at a routers can introduce delays more 
# complicated than I want to derive from the information above.  This should 
# usually be a sparse matrix I imagine.
# jitter defaults to +-5 ms but you can append a different number to
# any value as shown for floyd-floyd below with +-#
# XXX - don't test this value.  Each test takes ~5 seconds.  If you test every
# pair it's going to be a long time ( 16*16*5 ) = 1250s = 20 minutes!

#
# These are one way tests and setups.  That is, the machine listed on the line
# is the dst host and the machine in the column is the src host.  
#
# Listing a delay in both column X, row Y and column Y, row X will result in 
# combining those delays for pings between host X and Y. 
#
# (Perhaps one would want to do this for some reason but if so, the ping test
# code will have to change).
#

jitter=1

#
delay_grid
# encoded machine names
#                 flo  goo  the  rr   y4   d4   d9   y9   top  e9   e8   b8   h8 s8   p8   god  bol  yak      w8  l8   
{ floyd134,       XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, 000,  60,  98, XXX,  30, XXX } # 000,  14, 
{ goober134,      XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,  15, 112,  42, XXX,  50, XXX } # 000,  28, 
{ thelmalou134,   XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,  45,  84, 154, XXX,  60, XXX } # 000,  80, 
{ roadrunner134,  XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, 126,  70,  56, XXX,  70, XXX } # 000,  30, 
{ yosemite134,    XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
{ daffy134,       XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
{ daffy139,       XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
{ yosemite139,    XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
{ topsecret139,   XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
{ elmer139,       XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
{ elmer138,       XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
{ brain138,       XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
{ howard138,      XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
{ speedy138,      XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
{ petunia138,     XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
{ goddard134,     XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,   5,  15,  49, XXX, 110, XXX } # XXX, XXX, 
{ bollella138,    XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
{ yako134,        XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
# { wilee138,     XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
# { lovey138,     XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } # XXX, XXX, 
end_delay_grid 


# do a route command with these arguments - 
route={daffy139,"delete -net 152.2.136.0 152.2.139.99"}
route={daffy139,"delete -net 152.2.135.0 152.2.139.4"}
route={daffy139,"delete -net 152.2.138.0 192.168.137.4"}
route={daffy139,"add -net 152.2.136.0 152.2.139.99"} 
route={daffy139,"add -net 152.2.135.0 152.2.139.4"}
# Now in the 2.2.8 setting (using daffy as the experimental router)
route={daffy139,"add -net 152.2.138.0 152.2.139.4"}
#route={daffy139,"add -net 152.2.138.0 192.168.137.4"}

# do a route command with these arguments
route={yosemite134,"delete -host yosemite138 daffy134"}
route={yosemite134,"add -host yosemite138 daffy134"}
route={yosemite134,"delete -host yosemite134 elmer138"}
route={yosemite134,"add -host yosemite134 elmer138"}
#
# Don't do anything about delays - it may not even have delaybox
# do a route command with these arguments - 
route={elmer139,"delete -net 152.2.136.0 152.2.139.99"}
route={elmer139,"delete -net 152.2.135.0 152.2.138.107"}
route={elmer139,"delete -net 152.2.134.0 152.2.139.5"}
route={elmer139,"add -net 152.2.136.0 152.2.139.99"}  
route={elmer139,"add -net 152.2.135.0 152.2.138.107"}
# Now in the 2.2.8 configuration (using daffy as the main router)
route={elmer139,"add -net 152.2.134.0 192.168.137.5"}
#route={elmer139,"add -net 152.2.134.0 152.2.139.5"}

# bandwidth between machine2 and machine2, lower bound, upper bound (Kbps)
bandwidth={elmer139,daffy139,5000,10000}
bandwidth={elmer139,yosemite138,50000,100000}

# test to be sure these machines have these interfaces configured with these 
# addresses
interface={daffy139,fxp0,192.168.137.5}
interface={daffy139,fxp1,152.2.134.5}
interface={daffy139,xl0,152.2.139.5}

interface={bollella139,fxp0,192.168.137.52}
interface={bollella139,fxp1,152.2.138.52}
interface={daffy139,fxp1,152.2.134.5}
interface={daffy139,xl0,152.2.139.5}

interface={bollella139,fxp0,192.168.137.52}
interface={bollella139,fxp1,152.2.138.52}
interface={bollella139,fxp2,152.2.139.52}

# This would fail in our network as it's configured now - just an example.
#route={yosemite134,"add host topsecret139 -interface vx0"} # route to 
# topsecret by sending out this interface - 

# This is now in the 2.2.8 configuration (using daffy as the experimental 
# router)
route_vrfy="yosemite138 152.2.138.4 192.168.137.5 yosemite134"
route_vrfy="yosemite134 152.2.134.5 152.2.139.4 yosemite138"
route_vrfy="thelmalou134 152.2.134.5 152.2.139.4 howard138"
route_vrfy="howard138 152.2.138.4 192.168.137.5 thelmalou134"
#route_vrfy="yosemite138 152.2.138.4 152.2.139.5 yosemite134"
#route_vrfy="yosemite134 152.2.134.5 192.168.137.4 yosemite138"
#route_vrfy="thelmalou134 152.2.134.5 192.168.137.4 howard138"
#route_vrfy="howard138 152.2.138.4 152.2.139.5 thelmalou134"


Other DiRT documents
Author: Michele Clark