An Edge Gateway is a virtual router for organization VDC networks. You can configure it to provide network services such as DHCP, firewall, NAT, static routing, VPN, and load balancing.
Starting with vCloud Director 9.7, the compute workload and the networking workload are isolated by using different vSphere resource pools and storage policies. Edge Gateways reside on edge clusters that you must previously create. See Working with NSX Data Center for vSphere Edge Clusters.
You can migrate legacy edge gateways to the corresponding edge clusters by redeploying these edge gateways. See .
Starting with version 9.7, VMware Cloud Director supports only advanced edge gateways. You must convert any legacy non-advanced edge gateway to an advanced gateway. See https://kb.vmware.com/kb/66767.
Prerequisites
-
This operation is restricted to system administrators.
- An Edge Gateway requires an organization VDC backed by a Provider VDC that contains at least one external network.
- If you want to deploy the Edge Gateway on a dedicated edge cluster, create and assign an edge cluster to the organization virtual data center. See Working with NSX Data Center for vSphere Edge Clusters.
Procedure
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 Edge Gateway.
Example: Create an Edge Gateway
This example adds an Edge Gateway to the organization VDC created in Add a VDC to an Organization. The uplink interface specifies one of the networks shown in Step b.
POST https://vcloud.example.com/api/admin/vdc/44/edgeGateways Content-Type: application/vnd.vmware.admin.edgeGateway+xml ... <?xml version="1.0" encoding="UTF-8"?> <EdgeGateway name="theEdge" xmlns="http://www.vmware.com/vcloud/v1.5"> <Description>Example Edge Gateway</Description> <Configuration> <GatewayBackingConfig>compact</GatewayBackingConfig> <GatewayInterfaces> <GatewayInterface> <Name>uplink1</Name> <DisplayName>uplink1</DisplayName> <Network href="https://vcloud.example.com/api/admin/network/297" /> <InterfaceType>uplink</InterfaceType> <SubnetParticipation> <Gateway>10.147.115.190</Gateway> <Netmask>255.255.255.0</Netmask> </SubnetParticipation> </GatewayInterface> </GatewayInterfaces> <HaEnabled>false</HaEnabled> <UseDefaultRouteForDnsRelay>false</UseDefaultRouteForDnsRelay> </Configuration> </EdgeGateway>
The response is an EdgeGateway element with an embedded Task element that tracks the creation of the Edge Gateway object.
The response includes a number of Link elements that you can use to manage the new Edge Gateway. It also includes an EdgeGatewayServiceConfiguration element that contains a simple FirewallService, which drops all incoming and outgoing packets, effectively blocking all traffic through the Edge Gateway. This service is created by default if you do not specify an EdgeGatewayServiceConfiguration when you create the EdgeGateway. To remove or modify it, see Configure Edge Gateway Services.
<?xml version="1.0" encoding="UTF-8"?> <EdgeGateway xmlns="http://www.vmware.com/vcloud/v1.5" name="theEdge" id="urn:vcloud:gateway:2000" href="https://vcloud.example.com/api/admin/edgeGateway/2000" ... > <Link rel="edit" href="https://vcloud.example.com/api/admin/edgeGateway/2000" type="application/vnd.vmware.admin.edgeGateway+xml" /> <Link rel="remove" href="https://vcloud.example.com/api/admin/edgeGateway/2000" /> <Link rel="up" href="https://vcloud.example.com/api/admin/vdc/44" type="application/vnd.vmware.admin.vdc+xml" /> <Link rel="edgeGateway:redeploy" href="https://vcloud.example.com/api/admin/edgeGateway/2000/action/redeploy" /> <Link rel="edgeGateway:configureServices" href="https://vcloud.example.com/api/admin/edgeGateway/2000/action/configureServices" type="application/vnd.vmware.admin.edgeGatewayServiceConfiguration+xml" /> <Link rel="edgeGateway:configureSyslogServerSettings" href="https://vcloud.example.com/api/admin/edgeGateway/2000/action/configureSyslogServerSettings" type="application/vnd.vmware.vcloud.SyslogSettings+xml" /> <Link rel="edgeGateway:reapplyServices" href="https://vcloud.example.com/api/admin/edgeGateway/2000/action/reapplyServices" /> <Link rel="edgeGateway:syncSyslogSettings" href="https://vcloud.example.com/api/admin/edgeGateway/2000/action/syncSyslogServerSettings" /> <Link rel="edgeGateway:upgrade" href="https://vcloud.example.com/api/admin/edgeGateway/2000/action/upgradeConfig" /> <Link rel="edgeGateway:modifyFormFactor" href="https://vcloud.example.com/api/admin/edgeGateway/2000/action/modifyFormFactor" type="application/vnd.vmware.vcloud.edgeGatewayFormFactor+xml" /> <Description>Example Edge Gateway</Description> <Tasks> <Task ... operation="Creating EdgeGateway theEdge(2000)" operationName="networkEdgeGatewayCreate" serviceNamespace="com.vmware.vcloud" ... > . . . </Task> </Tasks> <Configuration> <GatewayBackingConfig>compact</GatewayBackingConfig> <GatewayInterfaces> <GatewayInterface> <Network href="https://vcloud.example.com/api/admin/network/297" name="" type="application/vnd.vmware.admin.network+xml" /> <InterfaceType>uplink</InterfaceType> <SubnetParticipation> <Gateway>10.147.115.190</Gateway> <Netmask>255.255.255.0</Netmask> <UseForDefaultRoute>false</UseForDefaultRoute> </SubnetParticipation> <ApplyRateLimit>false</ApplyRateLimit> <UseForDefaultRoute>false</UseForDefaultRoute> </GatewayInterface> </GatewayInterfaces> <EdgeGatewayServiceConfiguration> <FirewallService> <IsEnabled>true</IsEnabled> <DefaultAction>drop</DefaultAction> <LogDefaultAction>false</LogDefaultAction> </FirewallService> </EdgeGatewayServiceConfiguration> <HaEnabled>false</HaEnabled> <UseDefaultRouteForDnsRelay>false</UseDefaultRouteForDnsRelay> <AdvancedNetworkingEnabled>false</AdvancedNetworkingEnabled> </Configuration> </EdgeGateway>