Version 6 (modified by 10 years ago) (diff) | ,
---|
How to Share a VLAN
The contents of this page are adapted from an e-mail from Leigh Stoller.
This page describes how to convert a LAN into a Shared LAN without operator intervention.
The general process to share a LAN is:
- Reserve resources which contain a LAN.
- Run
perform operational action
with the commandgeni_sharelan
and setting the two optionsgeni_sharelan_lanname
andgeni_sharelan_token
.geni_sharelan_lanname
is theclient_id
of the LAN reserved in the previous step.geni_sharelan_token
is the name the new shared VLAN will be known by. - Reserve resources connect to a LAN (probably in another slice). Configured the LAN to be a shared LAN whose name matches the value of
geni_sharelan_token
in the previous step. - Resources should now be able to communicate with each other using the shared VLAN.
The general process to unshare a LAN is:
- Run
perform operational action
with the commandgeni_unsharelan
and setting the two optionsgeni_sharelan_lanname
andgeni_sharelan_token
set as they were when you originally shared it. - Resource no longer be able to communicate with each other using the shared VLAN.
Caveats
- The LAN being shared must obviously be a real VLAN, not a trivial link
(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
. - There is no change to idleness or expiration behavior; these resources must be renewed like other resources using the usual mechanisms.
- 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.
- There is currently no way to determine which slice contains the LAN which is shared. You must keep track of this manually.
- As of November 8, this only works at ProtoGENI Utah.
Example
- A minimal RSpec to use for reserving resources is:
<rspec type="request" xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/request.xsd" xmlns:client="http://www.protogeni.net/resources/rspec/ext/client/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.geni.net/resources/rspec/3"> <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"> <sliver_type name="emulab-xen"/> <interface client_id="VM:if0"> </interface> </node> <node client_id="VM" component_manager_id="urn:publicid:IDN+emulab.net+authority+cm" exclusive="false"> <sliver_type name="emulab-openvz"/> <interface client_id="VM-0:if0"> </interface> </node> <link client_id="lan0"> <component_manager name="urn:publicid:IDN+emulab.net+authority+cm"/> <interface_ref client_id="VM:if0"/> <interface_ref client_id="VM-0:if0"/> <property source_id="VM:if0" dest_id="VM-0:if0"/> <property source_id="VM-0:if0" dest_id="VM:if0"/> <link_type name="lan"/> </link> </rspec>
In the above, we have chosen a xen VM (bound to pc423) and a openVZ container to force the LAN to be non-trivial.
- Use
omni
to runperformoperationalaction
(a.k.a.poa
) on your slice.
The general command is:
omni.py -V 3 -a pg-utah3 poa SLICE_NAME geni_sharelan --optionsfile lan_options.json
The contents of lan_options should be:
{ "geni_sharelan_lanname": "LAN_CLIENT_ID", "geni_sharelan_token": "STRING_IDENTIFYING_SHARED_LAN" }
}}} For example:
{ "geni_sharelan_lanname": "lan0", "geni_sharelan_token": "janesSpecialLan" }
Example output of running performoperationalaction
:
$ omni.py -a pg-utah3 poa sharedlan geni_sharelan --optionsfile ../../SharedLan/lan_options.json -V 3 13:44:25 INFO omni: Loading agg_nick_cache file '/Users/sedwards/.gcf/agg_nick_cache' 13:44:25 INFO omni: Loading config file /Users/sedwards/.gcf/omni_config 13:44:25 INFO omni: Using control framework portal 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 13:44:26 INFO omni: Slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan expires on 2013-11-14 18:09:29 UTC 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 13:44:39 INFO omni: (PG log url - look here for details on any failures: https://www.emulab.net/spewlogfile.php3?logfile=7e38b4a9a56d13534834fdee4f64d3d0) 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 13:44:39 INFO omni: 0 13:44:39 INFO omni: ------------------------------------------------------ 13:44:39 INFO omni: Completed poa: Args: poa sharedlan geni_sharelan Result Summary: Slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan expires on 2013-11-14 18:09:29 UTC PerformOperationalAction geni_sharelan on slivers in slice urn:publicid:IDN+ch.geni.net:tutorial+slice+sharedlan was successful. 13:44:39 INFO omni: ======================================================