An organization VDC network with a direct connection provides direct layer 2 connectivity to machines and networks outside of the organization VDC. Machines outside of this organization VDC can connect to machines within the organization VDC directly.

An organization VDC network with a direct connection is configured as a child network of one of the external networks provisioned to the cloud by the system administrator.

Prerequisites

  • This operation is restricted to system administrators.

  • Retrieve the list of external networks. For information about how to retrieve this list, see External Networks and Network Pools.

Procedure

  1. Choose the external network to which this organization VDC network will connect.
    This external network must be one of the ones listed in the AvailableNetworks element of the Provider VDC that backs the organization VDC in which you are creating the new network. Follow these steps to find a suitable external network.
    1. Retrieve the XML representation of the organization VDC in which you are creating the new network.
      Use a request like this one:
      GET https://vcloud.example.com/api/admin/vdc/44
      The ProviderVdcReference element in the response contains a reference to the Provider VDC that backs this organization VDC.
      <AdminVdc ...>
         ...
         <ProviderVdcReference
               type="application/vnd.vmware.admin.providervdc+xml"
               name="PVDC-Example"
               href="https://vcloud.example.com/api/admin/extension/providervdc/35"
      ...
      </AdminVdc>
    2. Retrieve the the XML representation of the Provider VDC.
      Use a request like this one:
      GET https://vcloud.example.com/api/admin/extension/providervdc/35
      The AvailableNetworks element in the response lists the external networks that are available to that Provider VDC, and to all the organization VDCs that it supports.
      <vcloud:AvailableNetworks>
         <vcloud:Network
            type="application/vnd.vmware.admin.network+xml"
            name="VC1-VLAN48"
            href="https://vcloud.example.com/api/admin/network/297" />
         <vcloud:Network ... />
         <vcloud:Network ... />
      </vcloud:AvailableNetworks>
  2. Create an OrgVdcNetwork element.
    1. Specify the href of the external network you chose in Step 1 in the ParentNetwork element.
      The type and name attributes are optional here.
    2. Set the FenceMode to bridged.
      This creates a direct connection to the parent network.
  3. POST the OrgVdcNetwork element you created in Step 2 to the URL for adding networks to the organization VDC.

Results

The server takes the requested action and returns an XML representation of the partially-created object. This representation includes an href attribute, properties specified in the creation request, and an embedded Task element that tracks the creation of the object. When the task completes, the object has been created, and you can use the value of the href attribute with a GET request to retrieve the XML representation of the object.

See the response portion of Create an Organization VDC Network With a Direct Connection.

Example: Create an Organization VDC Network With a Direct Connection

This example adds a directly-connected network to the organization VDC created in Add a VDC to an Organization.This example adds a directly-connected network to an organization VDC. Because the network has a Configuration whose ParentNetwork element specifies an external network to connect to and sets the FenceMode to bridged, it provides a direct connection to the parent network.

Request:
POST https://vcloud.example.com/api/admin/vdc/44/networks
Content-Type: application/vnd.vmware.vcloud.orgVdcNetwork+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<OrgVdcNetwork
   name="Internet"
   xmlns="http://www.vmware.com/vcloud/v1.5">
   <Description>Bridged to the public Internet</Description>
   <Configuration>
      <ParentNetwork
         href="https://vcloud.example.com/api/admin/network/297" />
      <FenceMode>bridged</FenceMode>
   </Configuration>
</OrgVdcNetwork>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.orgVdcNetwork+xml
...
<OrgVdcNetwork
   xmlns="http://www.vmware.com/vcloud/v1.5"
   name="Internet"
   type="application/vnd.vmware.vcloud.orgVdcNetwork+xml"
   href="https://vcloud.example.com/api/admin/network/54" ...>
   <Link
      rel="edit"
      type="application/vnd.vmware.vcloud.orgVdcNetwork+xml"
      href="https://vcloud.example.com/api/admin/network/54" />
   <Link
      rel="remove"
      href="https://vcloud.example.com/api/admin/network/54" />
   <Link
      rel="up"
      type="application/vnd.vmware.admin.vdc+xml"
      href="https://vcloud.example.com/api/admin/vdc/44" />
   <Link
      rel="down"
      type="application/vnd.vmware.vcloud.metadata+xml"
      href="https://vcloud.example.com/api/admin/network/54/metadata" />
   <Link
      rel="down"
      type="application/vnd.vmware.vcloud.allocatedNetworkAddress+xml"
      href="https://vcloud.example.com/api/admin/network/54/allocatedAddresses/" />
   <Description>Bridged to the public Internet</Description>
   <Tasks>
      <Task
         name="task"
         status="running"
         operation="Creating Network Internet(54)"
         ...
      </Task>
   </Tasks>
   <Configuration>
      ...
   </Configuration>
   <IsShares>false</IsShared>
</OrgVdcNetwork>