.. _stitching: External Layer2 Connections (Stitching) ======================================= Chameleon provides support for sophisticated networking experiments by providing `GENI-style stitching `_. This capability enables users to deploy networking experiments (layer 2 and layer 3) that span Chameleon and other facilities such as `FABRIC `_. Users can create dedicated Chameleon networks directly connected to external facilities and configure custom subnets and routers for handling these external connections. This capability is essential to users interested in experimenting with wide-area networks in a controlled environment or lower-level wide-area protocols (e.g. BGP or other routing protocols) that are not typically configurable by experimenters. Stitched Chameleon networks are connected to external facilities using one VLAN allocated from of a pool VLANs that are statically provisioned between Chameleon and the external facility. Users can allocate one of these VLANs by making a reservation using Blazar. Currently, externally stitched networks are created by Blazar when the reservation is started. There is a pool of VLANs (3300-3309) between the Chameleon CHI\@UC racks to the FABRIC site at StarLight (Chicago), and VLANs (3210-3499) from CHI\@TACC to FABRIC\@TACC directly via fiber. The remainder of this document describes how to stitch Chameleon experiments to external resources using FABRIC. In addition to creating the stitched networks, you will need to know how to configure subnets and routers on dynamic VLANs as described in the :ref:`network-isolation` documentation. .. note:: Stitching to FABRIC with the Python API is shown this a `Trovi Artifact `_ .. _network-stitchable-create: Configuring a Stitchable Network ________________________________ Your first step will require creating a stitchable network. Unlike creating other networks on Chameleon, stitchable networks can only be created by first reserving a stitchable VLAN segment. Once you reserve a VLAN segment, your network will be created automatically. To reserve a segment on the appropriate external testbed make sure to include ``fabric`` as the ``stitch_provider`` in the ``resource_properties`` attribute. An example is provided below: .. code-block:: bash openstack reservation lease create --reservation \ resource_type=network,network_name=my-stitchable-network,\ resource_properties='["==","$stitch_provider","fabric"]' \ --start-date "2022-01-01 12:00" --end-date "2022-01-02 12:00" \ my-stitchable-network-lease After your stitched VLAN network is created, you will be able to query for the network to get the specific VLAN that is used by your network. Openstack refers to the VLAN as the ``segmentation_id``. The following command will display the VLAN. .. code-block:: bash openstack network show my-stitchable-network --format value -c provider:segmentation_id At this point your Chameleon network is connected to a FABRIC ``facility port`` at layer 2. You can now create a FABRIC slice and specify the Chameleon ``segmentation_id`` to use. This is a layer 2 connection and you can configure higher-level protocols, such as IP, in any way you desire. Alternately, if you know the desired vlan_id in advance, say it's already configured on the FABRIC ``facility port``, you can create your lease as follows: .. code-block:: bash # in this example, we happened to know 3490 was the vlan ID we wanted openstack reservation lease create --reservation \ resource_type=network,network_name=foo_bar,\ resource_properties='["and",["==","$stitch_provider","fabric"],["==","$segment_id","3490"]]' \ segment_lease_3490 Connecting Stitchable Isolated Networks across Chameleon Sites ______________________________________________________________ As both CHI\@UC and CHI\@TACC can be stitched to FABRIC, you're able to use FABRIC to create a Layer 2 connection between nodes at the two sites. Examples coming soon!