• Leigh B Stoller's avatar
    So this commit allows a vlan to be "shared" bewteen experiments. By · dae29101
    Leigh B Stoller authored
    shared, I mean that an experiment can request that a port be put into
    a vlan belonging to another experiment. This started out as a hack to
    support openflow enabled vlans in Geni, but then I got a request to
    make it a little more general purpose. You all know how that goes.
    Okay, say you have an experiment E1 in some project and that
    experiment has a link or lan call "lan0". You want other experiments
    to be able to stick ports in that vlan. On boss, you would do this
    after E1 is swapped in:
    boss> wap sharevlan -o testbed,E1 lan0 mysharedlan
    The -o option says to make the vlan open to anyone; without that
    option, only admins can swap in an experiment that requests a port in
    lan0.  The token "mysharedlan" is just a level of indirection for the
    NS file (or rspec).
    Next you create a new experiment E2, and in your NS file:
    	$ns make-portinvlan $n1 "mysharedlan"
    which says to create a lan with a interface on node n1, in the vlan
    named by the token mysharedlan. The token keeps specific pid/eids out
    of the NS file. 
    When E2 is swapped in, assign does its thing, and the selected port is
    added to the members list for lan0 in testbed,E1 and then we call
    snmpit with the syncvlansfromtables (-X) option to get the port added.
    When E2 is swapped out, we undo the members list and call snmpit with
    the -X option again.
    The access issue is a bit of hack of course (open or admins) but I did
    not want to invent a new permission mechanism (yet).
    And of course, this is still a work in progress.
GNUmakefile.in 3.93 KB