Create L2 Vpn Tunnel

Create L2 Vpn Tunnel

Creates an L2 VPN tunnel on the Edge Gateway.

Request
URI
POST
https://{api_host}/cloudapi/1.0.0/edgeGateways/{gatewayId}/l2vpn/tunnels
COPY
Path Parameters
string
gatewayId
Required

gatewayId

string
gatewayId
Required

gatewayId


Request Body
EdgeL2VpnTunnel of type(s) application/json
Optional
{
    "id": "36cc5a80-f99f-4350-b268-bb9111141a6e",
    "name": "string",
    "description": "string",
    "localEndpointIP": "string",
    "remoteEndpointIP": "string",
    "tunnelInterface": "string",
    "preSharedKey": "string",
    "connectorInitiationMode": "string",
    "enabled": false,
    "sessionMode": "string",
    "peerCode": "string",
    "attachedNetworks": [
        {
            "name": "string",
            "id": "string"
        }
    ],
    "stretchedNetworks": [
        {
            "networkRef": {
                "name": "string",
                "id": "string"
            },
            "tunnelId": 0
        }
    ],
    "logging": false,
    "version": {
        "version": 0
    }
}
string
id
Optional

The unique id of this L2 VPN tunnel. On updates, the id is required for the tunnel, while for create a new id will be generated. This id is not a VCD URN.

string
name
Required

Name for the tunnel.

string
description
Optional

Description for the tunnel.

string
localEndpointIP
Required

The IP address of the local endpoint, which corresponds to the Edge Gateway the tunnel is being configured on.

string
remoteEndpointIP
Required

The IP address of the remote endpoint, which corresponds to the device on the remote site terminating the VPN tunnel.

string
tunnelInterface
Optional

The network CIDR block over which the session interfaces. Relevant only for SERVER session modes. If provided, the underlying IPSec tunnel will use the specified tunnel interface. If not provided, Cloud Director will attempt to automatically allocate a tunnel interface.

string
preSharedKey
Optional

This is the Pre-shared key used for authentication, no specific format is required. Relevant only for SERVER session modes.

string
connectorInitiationMode
Optional

This is the mode used by the local endpoint to establish an IKE Connection with the remote site. The default is INITIATOR.

  • INITIATOR - Local endpoint initiates tunnel setup and will also respond to incoming tunnel setup requests from the peer gateway.
  • RESPOND_ONLY - Local endpoint shall only respond to incoming tunnel setup requests, it shall not initiate the tunnel setup.
  • ON_DEMAND - In this mode local endpoint will initiate tunnel creation once first packet matching the policy rule is received, and will also respond to incoming initiation requests.
boolean
enabled
Optional

Described whether the tunnel is enabled or not. The default is true.

string
sessionMode
Required

The current session mode, one of either SERVER or CLIENT.

  • SERVER - In which the edge gateway acts as the server side of the L2 VPN tunnel and generates peer codes to distribute to client sessions.
  • CLIENT - In which the edge gateway receives peer codes from the server side of the L2 VPN tunnel to establish a connection.
string
peerCode
Optional

This property is a base64 encoded string of the full configuration for the tunnel, generated by the server-side L2 VPN session. An L2 VPN client session must receive and validate this string in order to successfully establish a tunnel, but be careful sharing or storing this code since it does contain the encoded PSK. Leave this property blank if this call is being used to establish a server-side session.

attachedNetworks
Optional

The list of OrgVDC Network entity references which are currently attached to this L2VPN tunnel.

stretchedNetworks
Optional

The list of OrgVDC Network entity references which are currently attached to this L2VPN tunnel.

boolean
logging
Optional

Whether logging for the tunnel is enabled or not.

version
Optional

version

Authentication
This operation uses the following authentication methods.
Responses
202

The request have been accepted and the task to monitor the request is in the Location header.

Operation doesn't return any data structure

400

Invalid configuration.

Returns Error of type(s) */*;version=38.1
{
    "minorErrorCode": "string",
    "message": "string",
    "stackTrace": "string"
}
string
minorErrorCode
Required

minorErrorCode

string
message
Required

message

string
stackTrace
Optional

stackTrace


404

The specified resource was not found

Returns Error of type(s) */*;version=38.1
{
    "minorErrorCode": "string",
    "message": "string",
    "stackTrace": "string"
}
string
minorErrorCode
Required

minorErrorCode

string
message
Required

message

string
stackTrace
Optional

stackTrace