Changes between Version 26 and Version 27 of HowTo/ShareALan
- Timestamp:
- 09/27/16 16:35:16 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HowTo/ShareALan
v26 v27 1 1 = How to Share a VLAN (and How to Unshare A VLAN) = 2 2 3 ''The contents of this page are adapted from an e-mail from Leigh Stoller.'' 3 This 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. 4 4 5 This page describes how to convert a LAN into a Shared LAN without operator intervention. 5 Process to share a VLAN: 6 6 7 The general process to share a LAN is:8 7 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`. 11 10 4. Resources should now be able to communicate with each other using the shared VLAN. 12 11 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. 12 Process 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. 15 15 2. Resources should no longer be able to communicate with each other using the shared VLAN. 16 16 17 17 == 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]. 21 20 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. 27 24 28 == Example of sharing a VLAN ==25 == Sharing a VLAN == 29 26 30 1. A minimal RSpec to use for reserving resources is: 27 This 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: 31 30 {{{ 32 #!xml33 31 <rspec type="request" 34 32 xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/request.xsd" … … 36 34 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 37 35 xmlns="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" > 39 39 <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"/> 41 42 </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"/> 46 50 </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"/> 54 59 <link_type name="lan"/> 55 60 </link> 56 61 </rspec> 57 62 }}} 58 63 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 64 66 {{{ 65 omni.py -V 3 -a pg-utah3 poa SLICE_NAME geni_sharelan --optionsfile lan_options.json67 omni.py -V 3 -a AGG_NAMEV3 poa SLICE_NAME geni_sharelan --optionsfile lan_options.json 66 68 }}} 67 69 … … 73 75 } 74 76 }}} 77 75 78 For example: 76 79 {{{ … … 81 84 }}} 82 85 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: 84 87 {{{ 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" 89 xsi: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" 92 xmlns:client="http://www.protogeni.net/resources/rspec/ext/client/1" 93 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 94 xmlns:sharedvlan="http://www.geni.net/resources/rspec/ext/shared-vlan/1" 95 xmlns="http://www.geni.net/resources/rspec/3"> 98 96 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> 101 104 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> 103 110 }}} 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. Itshould 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. 106 113 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 == 109 115 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 {{{ 119 omni.py -V 3 -a AGG_NAMEV3 poa SLICE_NAME geni_unsharelan --optionsfile lan_options.json 113 120 }}} 114 121 115 The contents of `lan_options.json` match what was used to share the LAN originally and should be in the form:122 The contents of `lan_options.json` are the same for sharing and unsharing the LAN: 116 123 {{{ 117 124 { … … 120 127 } 121 128 }}} 129 122 130 For example: 123 131 {{{ … … 128 136 }}} 129 137 130 Example output of running `performoperationalaction`:131 {{{132 $ omni.py -V 3 -a pg-utah3 poa sharedlan geni_unsharelan --optionsfile lan_options.json133 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_config135 14:36:29 INFO omni: Using control framework portal136 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+cm137 14:36:30 INFO omni: Slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan expires on 2013-11-14 18:09:29 UTC138 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.0139 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.0141 14:36:47 INFO omni: 0142 14:36:47 INFO omni: ------------------------------------------------------143 14:36:47 INFO omni: Completed poa:144 Args: poa sharedlan geni_unsharelan145 146 Result Summary: Slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan expires on 2013-11-14 18:09:29 UTC147 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 }}}151 138 2. Test your setup by running `ping` between compute nodes in the different slices. It should ''NOT'' work.