Changes between Version 26 and Version 27 of HowTo/ShareALan


Ignore:
Timestamp:
09/27/16 16:35:16 (8 years ago)
Author:
lnevers@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowTo/ShareALan

    v26 v27  
    11= How to Share a VLAN (and How to Unshare A VLAN) =
    22
    3 ''The contents of this page are adapted from an e-mail from Leigh Stoller.''
     3This page describes how to convert an LAN into a shared VLAN without operator intervention. This feature is supported by InstaGENI and ProtoGENI sites for non-trivial VLANs, GENI Stitched VLANs and !OpenFlow VLANs.  The example in this page is for a GENI Rack site and is adapted from an e-mail from Leigh Stoller.
    44
    5 This page describes how to convert a LAN into a Shared LAN without operator intervention.
     5Process to share a VLAN:
    66
    7 The general process to share a LAN is:
    87 1. Reserve resources which contain a LAN. 
    9  2. Run `perform operational action` with the command `geni_sharelan` and setting the two options `geni_sharelan_lanname` and `geni_sharelan_token`.  `geni_sharelan_lanname` is the `client_id` of the LAN reserved in the previous step.  `geni_sharelan_token` is the name the new shared VLAN will be known by.
    10  3. Reserve resources connected to a LAN (probably in another slice).  Configure the LAN to be a shared LAN whose name matches the value of `geni_sharelan_token` in the previous step.
     8 2. Run `performoperationalaction geni_sharelan` command to set the two options `geni_sharelan_lanname` and `geni_sharelan_token`.  Where `geni_sharelan_lanname` is the `client_id` of the LAN reserved in the previous step and   `geni_sharelan_token` is the name of the new shared VLAN.
     9 3. Reserve additional resources connected to the LAN shared in the previous step and whose name matches the value of `geni_sharelan_token`.
    1110 4. Resources should now be able to communicate with each other using the shared VLAN.
    1211
    13 The general process to unshare a LAN is:
    14  1. Run `perform operational action` with the command `geni_unsharelan` and setting the two options `geni_sharelan_lanname` and `geni_sharelan_token` set as they were when you originally shared it. 
     12Process to unshare a LAN:
     13
     14 1. Run `performoperationalaction geni_unsharelan` to disable the two options `geni_sharelan_lanname` and `geni_sharelan_token` that were originally shared. 
    1515 2. Resources should no longer be able to communicate with each other using the shared VLAN.
    1616
    1717== Caveats ==
    18  1. The LAN being shared must obviously be a real VLAN, not a trivial link
    19   (link between two VMs on the same physical host).  In other words, the minimal case requires two VMs which each have a different `component_id`.
    20    * Stitched VLANs can be shared.  Also VLANs that go through an [wiki:HowTo/ShareALanOnAHWSwitch OpenFlow hardware switch] can also be shared.
     18
     19 1. The LAN being shared must be a real VLAN, not a trivial link between two VMs on the same physical host.  In other words, the minimal case requires two VMs that have a different `component_id`.  GENI stitched VLANs can also be shared as well as VLANs that go through an [http://groups.geni.net/geni/wiki/HowTo/ShareALanOnAHWSwitch OpenFlow hardware switch].
    2120 2. There is no change to idleness or expiration behavior; these resources must be renewed like other resources using the usual mechanisms.
    22  3. When the shared LAN is unshared, or the slice terminated, all of the
    23   other slices that were using that LAN will have the ports yanked out and
    24   disabled. However, the resources will remain. 
    25  4. There is currently no way to determine which slice contains the LAN which is shared. You must keep track of this out-of-band.
    26  5. As of October 2014, this only works at InstaGENI racks and ProtoGENI Utah.
     21 3. When the shared LAN is unshared, or the slice terminated, all of the other slices that were using that LAN will have the ports yanked out and disabled. However, the resources will remain. 
     22 4. There is currently no way to determine which slice contains the LAN which is shared. You must keep track of this out-of-band.
     23 5. This only works at InstaGENI racks and ProtoGENI Utah.
    2724
    28 == Example of sharing a VLAN ==
     25== Sharing a VLAN ==
    2926
    30  1. A minimal RSpec to use for reserving resources is:
     27This example start with resources in one rack and then add a second slice with resources in the same rack to share the LAN.
     28
     29 1. Generate a request Rspec with compute resources connected by a non trivial trivial link by requesting resources from different Xen Servers (pc1 & pc2). This example uses uwashington-ig, you should replace the aggregate with one of your choice.  The `client_id` of the LAN that will be shared is `lan0`. Here is an example:
    3130{{{
    32 #!xml
    3331<rspec type="request"
    3432xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/request.xsd"
     
    3634xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    3735xmlns="http://www.geni.net/resources/rspec/3">
    38   <node client_id="VM_pc423" component_manager_id="urn:publicid:IDN+emulab.net+authority+cm" component_id="urn:publicid:IDN+emulab.net+node+pc423" component_name="pc110" exclusive="false">
     36
     37 <node client_id="VM-1" component_manager_id="urn:publicid:IDN+instageni.washington.edu+authority+cm"
     38 component_id="urn:publicid:IDN+instageni.washington.edu+node+pc1" exclusive="false" >
    3939    <sliver_type name="emulab-xen"/>
    40     <interface client_id="VM:if0">
     40    <interface client_id="VM-1:if0">
     41      <ip address="192.168.1.1" netmask="255.255.255.0" type="ipv4"/>
    4142    </interface>
    42   </node>
    43   <node client_id="VM" component_manager_id="urn:publicid:IDN+emulab.net+authority+cm" exclusive="false">
    44     <sliver_type name="emulab-openvz"/>
    45     <interface client_id="VM-0:if0">
     43 </node>
     44
     45 <node client_id="VM-2" component_manager_id="urn:publicid:IDN+instageni.washington.edu+authority+cm"
     46 component_id="urn:publicid:IDN+instageni.washington.edu+node+pc2" exclusive="false" >
     47    <sliver_type name="emulab-xen"/>
     48    <interface client_id="VM-2:if0">
     49      <ip address="192.168.1.2" netmask="255.255.255.0" type="ipv4"/>
    4650    </interface>
    47   </node>
    48   <link client_id="lan0">
    49     <component_manager name="urn:publicid:IDN+emulab.net+authority+cm"/>
    50     <interface_ref client_id="VM:if0"/>
    51     <interface_ref client_id="VM-0:if0"/>
    52     <property source_id="VM:if0" dest_id="VM-0:if0"/>
    53     <property source_id="VM-0:if0" dest_id="VM:if0"/>
     51 </node>
     52
     53 <link client_id="lan0">
     54   <component_manager name="urn:publicid:IDN+instageni.washington.edu+authority+cm"/>
     55    <interface_ref client_id="VM-1:if0"/>
     56    <interface_ref client_id="VM-2:if0"/>
     57    <property source_id="VM-1:if0" dest_id="VM-2:if0"/>
     58    <property source_id="VM-2:if0" dest_id="VM-1:if0"/>
    5459    <link_type name="lan"/>
    55   </link>
     60 </link>
    5661</rspec>
    5762}}}
    5863
    59 In the above, we have chosen a xen VM (bound to pc423) and a openVZ container to force the LAN to be non-trivial.  The `client_id` of the LAN is `lan0`.
    60 
    61  2. Use `omni` to run `performoperationalaction` (a.k.a. `poa`) on your slice.
    62 
    63 The general command is:
     64 2. Use `omni` to create a sliver with the resource you selected for your slice.  Once the sliver is ready, run `performoperationalaction` (a.k.a. `poa`) on your slice. The general command is:
     65 
    6466{{{
    65 omni.py -V 3 -a pg-utah3 poa SLICE_NAME geni_sharelan --optionsfile lan_options.json
     67omni.py -V 3 -a AGG_NAMEV3 poa SLICE_NAME geni_sharelan --optionsfile lan_options.json
    6668}}}
    6769
     
    7375}
    7476}}}
     77
    7578For example:
    7679{{{
     
    8184}}}
    8285
    83 Example output of running `performoperationalaction`:
     86 3. Create the second slice and reserve resources using using an RSpec that: a) defines the shared VLAN schema in RSpec header, b) Uses IP addresses that do not conflict with first slice and c) requests the shared VLAN name matching `STRING_IDENTIFYING_SHARED_LAN` (in our example `janesSpecialLan`). Here is an example:
    8487{{{
    85 $ omni.py -V 3 -a pg-utah3 poa sharedlan geni_sharelan --optionsfile lan_options.json
    86 13:44:25 INFO     omni: Loading agg_nick_cache file '/Users/sedwards/.gcf/agg_nick_cache'
    87 13:44:25 INFO     omni: Loading config file /Users/sedwards/.gcf/omni_config
    88 13:44:25 INFO     omni: Using control framework portal
    89 13:44:25 INFO     omni: Substituting AM nickname pg-utah3 with URL https://www.emulab.net:12369/protogeni/xmlrpc/am/3.0, URN urn:publicid:IDN+emulab.net+authority+cm
    90 13:44:26 INFO     omni: Slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan expires on 2013-11-14 18:09:29 UTC
    91 13:44:26 INFO     omni: PerformOperationalAction geni_sharelan on slivers in slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan at https://www.emulab.net:12369/protogeni/xmlrpc/am/3.0
    92 13:44:39 INFO     omni:  (PG log url - look here for details on any failures: https://www.emulab.net/spewlogfile.php3?logfile=7e38b4a9a56d13534834fdee4f64d3d0)
    93 13:44:39 INFO     omni: PerformOperationalAction result for geni_sharelan on slivers in slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan at AM URL https://www.emulab.net:12369/protogeni/xmlrpc/am/3.0
    94 13:44:39 INFO     omni: 0
    95 13:44:39 INFO     omni:  ------------------------------------------------------
    96 13:44:39 INFO     omni:  Completed poa:
    97 Args: poa sharedlan geni_sharelan
     88<rspec type="request"
     89xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/request.xsd
     90           http://www.geni.net/resources/rspec/ext/shared-vlan/1
     91           http://www.geni.net/resources/rspec/ext/shared-vlan/1/request.xsd"
     92xmlns:client="http://www.protogeni.net/resources/rspec/ext/client/1"
     93xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     94xmlns:sharedvlan="http://www.geni.net/resources/rspec/ext/shared-vlan/1"
     95xmlns="http://www.geni.net/resources/rspec/3">
    9896
    99  Result Summary: Slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan expires on 2013-11-14 18:09:29 UTC
    100 PerformOperationalAction geni_sharelan on slivers in slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan was successful.
     97 <node client_id="VM-3" component_manager_id="urn:publicid:IDN+instageni.washington.edu+authority+cm"
     98 component_id="urn:publicid:IDN+instageni.washington.edu+node+pc3" exclusive="false" >
     99    <sliver_type name="emulab-xen"/>
     100    <interface client_id="VM-3:if0">
     101      <ip address="192.168.1.3" netmask="255.255.255.0" type="ipv4"/>
     102    </interface>
     103 </node>
    101104
    102 13:44:39 INFO     omni:  ======================================================
     105 <link client_id="lan0">
     106    <interface_ref client_id="VM-3:if0"/>
     107    <sharedvlan:link_shared_vlan name="janesSpecialLan"/>
     108 </link>
     109</rspec>
    103110}}}
    104  3. In a second slice, reserve resources containing a LAN and one or more compute nodes.  Configure the LAN to be a Shared VLAN with name matching `STRING_IDENTIFYING_SHARED_LAN` (in this case `janesSpecialLan`).  Also be sure to configure the IP addresses on these nodes in a way that makes sense with the IPs used in the first slice.
    105  4. Test your setup by running `ping` between compute nodes in the different slices.  It should work.
     111 
     112 4. Once the sliver is ready, login to each node and test your setup by running `ping` between compute nodes in the different slices. This should work.
    106113
    107 == Example of unsharing a VLAN ==
    108  1.  2. Use `omni` to run `performoperationalaction` (a.k.a. `poa`) on your slice.
     114== Unsharing a VLAN ==
    109115
    110 The general command is:
    111 {{{
    112 omni.py -V 3 -a pg-utah3 poa SLICE_NAME geni_unsharelan --optionsfile lan_options.json
     116 1.  Use `omni` to run `performoperationalaction` (a.k.a. `poa`) on your slice. The general command is:
     117
     118{{{
     119omni.py -V 3 -a AGG_NAMEV3 poa SLICE_NAME geni_unsharelan --optionsfile lan_options.json
    113120}}}
    114121
    115 The contents of `lan_options.json` match what was used to share the LAN originally and should be in the form:
     122The contents of `lan_options.json` are the same for sharing and unsharing the LAN:
    116123{{{
    117124{
     
    120127}
    121128}}}
     129
    122130For example:
    123131{{{
     
    128136}}}
    129137
    130 Example output of running `performoperationalaction`:
    131 {{{
    132 $ omni.py -V 3 -a pg-utah3 poa sharedlan geni_unsharelan --optionsfile lan_options.json 
    133 14:36:29 INFO     omni: Loading agg_nick_cache file '/Users/sedwards/.gcf/agg_nick_cache'
    134 14:36:29 INFO     omni: Loading config file /Users/sedwards/.gcf/omni_config
    135 14:36:29 INFO     omni: Using control framework portal
    136 14:36:29 INFO     omni: Substituting AM nickname pg-utah3 with URL https://www.emulab.net:12369/protogeni/xmlrpc/am/3.0, URN urn:publicid:IDN+emulab.net+authority+cm
    137 14:36:30 INFO     omni: Slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan expires on 2013-11-14 18:09:29 UTC
    138 14:36:30 INFO     omni: PerformOperationalAction geni_unsharelan on slivers in slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan at https://www.emulab.net:12369/protogeni/xmlrpc/am/3.0
    139 14:36:47 INFO     omni:  (PG log url - look here for details on any failures: https://www.emulab.net/spewlogfile.php3?logfile=5d4e618722b51f582a1052255f01dc35)
    140 14:36:47 INFO     omni: PerformOperationalAction result for geni_unsharelan on slivers in slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan at AM URL https://www.emulab.net:12369/protogeni/xmlrpc/am/3.0
    141 14:36:47 INFO     omni: 0
    142 14:36:47 INFO     omni:  ------------------------------------------------------
    143 14:36:47 INFO     omni:  Completed poa:
    144 Args: poa sharedlan geni_unsharelan
    145 
    146  Result Summary: Slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan expires on 2013-11-14 18:09:29 UTC
    147 PerformOperationalAction geni_unsharelan on slivers in slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan was successful.
    148 
    149 14:36:47 INFO     omni:  ======================================================
    150 }}}
    151138 2. Test your setup by running `ping` between compute nodes in the different slices.  It should ''NOT'' work.