Creating a Hosted DirectLink Interface

You can create a DirectLink interface hosted in another OUTSCALE account. This enables this other account, the recipient, to use your DirectLink connection to access one of their Nets.

The recipient needs to accept your request of creation of a DirectLink interface before they can use it. They then become the owner of the DirectLink interface. Until it is accepted, the DirectLink interface cannot forward traffic. For more information, see Accepting a Hosted DirectLink Interface.

For more information about DirectLink interfaces, see About DirectLink > DirectLink Connections and Private Virtual Interfaces.

Creating a Hosted DirectLink Interface Using OSC CLI

The CreateDirectLinkInterface command creates a DirectLink interface.
DirectLink interfaces enable you to reach one of your Nets through a virtual gateway.

For more information, see About DirectLink.

Request sample
$ osc-cli api CreateDirectLinkInterface --profile "default" \
    --DirectLinkId "dxcon-12345678" \
    --DirectLinkInterface '{
        "DirectLinkInterfaceName": "MyDirectLinkInterface",
        "Vlan": 101,
        "BgpAsn": 65000,
        "BgpKey": "tgyn26example",
        "OutscalePrivateIp": "172.16.0.4/30",
        "ClientPrivateIp": "172.16.0.5/30",
        "VirtualGatewayId": "vgw-12345678"
      }'

This command contains the following attributes that you need to specify:

  • DirectLinkId: The ID of the existing DirectLink for which you want to create the DirectLink interface.

  • DirectLinkInterface: Information about the DirectLink interface.

    • BgpAsn: The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer’s side of the DirectLink interface. This number must be between 64512 and 65534.

    • BgpKey: (optional) The BGP authentication key.

    • ClientPrivateIp: (optional) The IP on the customer’s side of the DirectLink interface.

    • DirectLinkInterfaceName: The name of the DirectLink interface.

    • OutscalePrivateIp: (optional) The IP on the OUTSCALE side of the DirectLink interface.

    • VirtualGatewayId: The ID of the target virtual gateway.

    • Vlan: The VLAN number associated with the DirectLink interface. This number must be unique and be between 2 and 4094.

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

The CreateDirectLinkInterface command returns the following elements:

  • DirectLinkInterface: Information about the DirectLink interfaces.

    • AccountId: The account ID of the owner of the DirectLink interface.

    • BgpAsn: The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer’s side of the DirectLink interface.

    • BgpKey: The BGP authentication key.

    • ClientPrivateIp: The IP on the customer’s side of the DirectLink interface.

    • DirectLinkId: The ID of the DirectLink.

    • DirectLinkInterfaceId: The ID of the DirectLink interface.

    • DirectLinkInterfaceName: The name of the DirectLink interface.

    • InterfaceType: The type of the DirectLink interface (always private).

    • Location: The datacenter where the DirectLink interface is located.

    • Mtu: The maximum transmission unit (MTU) of the DirectLink interface, in bytes (always 1500).

    • OutscalePrivateIp: The IP on the OUTSCALE side of the DirectLink interface.

    • State: The state of the DirectLink interface (pending | available | deleting | deleted | confirming | rejected | expired).

    • VirtualGatewayId: The ID of the target virtual gateway.

    • Vlan: The VLAN number associated with the DirectLink interface.

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "DirectLinkInterface": {
    "Vlan": 101,
    "OutscalePrivateIp": "172.16.0.4/30",
    "DirectLinkInterfaceId": "dxvif-12345678",
    "BgpAsn": 65000,
    "AccountId": "123456789012",
    "ClientPrivateIp": "172.16.0.5/30",
    "VirtualGatewayId": "vgw-12345678",
    "DirectLinkInterfaceName": "MyDirectLinkInterface",
    "DirectLinkId": "dxcon-12345678",
    "Mtu": 1500,
    "State": "pending",
    "InterfaceType": "private",
    "Location": "PAR1"
  }
}

Creating a Hosted DirectLink Interface Using oapi-cli

The CreateDirectLinkInterface command creates a DirectLink interface.
DirectLink interfaces enable you to reach one of your Nets through a virtual gateway.

For more information, see About DirectLink.

Request sample
$ oapi-cli --profile "default" CreateDirectLinkInterface \
    --DirectLinkId "dxcon-12345678" \
    --DirectLinkInterface '{
        "DirectLinkInterfaceName": "MyDirectLinkInterface",
        "Vlan": 101,
        "BgpAsn": 65000,
        "BgpKey": "tgyn26example",
        "OutscalePrivateIp": "172.16.0.4/30",
        "ClientPrivateIp": "172.16.0.5/30",
        "VirtualGatewayId": "vgw-12345678"
      }'

This command contains the following attributes that you need to specify:

  • DirectLinkId: The ID of the existing DirectLink for which you want to create the DirectLink interface.

  • DirectLinkInterface: Information about the DirectLink interface.

    • BgpAsn: The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer’s side of the DirectLink interface. This number must be between 64512 and 65534.

    • BgpKey: (optional) The BGP authentication key.

    • ClientPrivateIp: (optional) The IP on the customer’s side of the DirectLink interface.

    • DirectLinkInterfaceName: The name of the DirectLink interface.

    • OutscalePrivateIp: (optional) The IP on the OUTSCALE side of the DirectLink interface.

    • VirtualGatewayId: The ID of the target virtual gateway.

    • Vlan: The VLAN number associated with the DirectLink interface. This number must be unique and be between 2 and 4094.

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

The CreateDirectLinkInterface command returns the following elements:

  • DirectLinkInterface: Information about the DirectLink interfaces.

    • AccountId: The account ID of the owner of the DirectLink interface.

    • BgpAsn: The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer’s side of the DirectLink interface.

    • BgpKey: The BGP authentication key.

    • ClientPrivateIp: The IP on the customer’s side of the DirectLink interface.

    • DirectLinkId: The ID of the DirectLink.

    • DirectLinkInterfaceId: The ID of the DirectLink interface.

    • DirectLinkInterfaceName: The name of the DirectLink interface.

    • InterfaceType: The type of the DirectLink interface (always private).

    • Location: The datacenter where the DirectLink interface is located.

    • Mtu: The maximum transmission unit (MTU) of the DirectLink interface, in bytes (always 1500).

    • OutscalePrivateIp: The IP on the OUTSCALE side of the DirectLink interface.

    • State: The state of the DirectLink interface (pending | available | deleting | deleted | confirming | rejected | expired).

    • VirtualGatewayId: The ID of the target virtual gateway.

    • Vlan: The VLAN number associated with the DirectLink interface.

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "DirectLinkInterface": {
    "Vlan": 101,
    "OutscalePrivateIp": "172.16.0.4/30",
    "DirectLinkInterfaceId": "dxvif-12345678",
    "BgpAsn": 65000,
    "AccountId": "123456789012",
    "ClientPrivateIp": "172.16.0.5/30",
    "VirtualGatewayId": "vgw-12345678",
    "DirectLinkInterfaceName": "MyDirectLinkInterface",
    "DirectLinkId": "dxcon-12345678",
    "Mtu": 1500,
    "State": "pending",
    "InterfaceType": "private",
    "Location": "PAR1"
  }
}

Creating a Hosted Private Virtual Interface Using AWS CLI

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI.

To create a hosted private virtual interface, use the allocate-private-virtual-interface command following this syntax:

Request sample
$ aws directconnect allocate-private-virtual-interface \
    --profile YOUR_PROFILE \
    --connection-id dxcon-12345678 \
    --owner-account 123456789000 \
    --new-private-virtual-interface-allocation virtualInterfaceName=MyPrivateVirtualInterface,vlan=101,asn=65000,authKey=tgyn26example,amazonAddress=172.16.0.1/30,customerAddress=172.16.0.2/30) \
    --endpoint https://directlink.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • connection-id: The ID of the connection you want to use.

    The connection must be in the available state. For more information, see About DirectLink > General Information About DirectLink Connections.

  • owner-account: The account ID of the owner of the private virtual interface to create.

  • new-private-virtual-interface-allocation: Information about the private virtual interface to create. This attribute contains the following elements that you need to specify:

    • virtualInterfaceName: The name of the private virtual interface.

    • vlan: The unique VLAN ID for the private virtual interface (an integer between 1 and 4096).

    • asn: The autonomous system number (ASN) for the Border Gateway Protocol (BGP) configuration.

    • (optional) authKey: The authentication key for the BGP configuration.

    • (optional) amazonAddress: The IP on the OUTSCALE side of the private virtual interface, in /30 CIDR notation (for example, 172.16.0.1/30).

    • (optional) customerAddress: The IP on the customer side of the private virtual interface, in /30 CIDR notation (for example, 172.16.0.2/30).

      You must provide a customerAddress if you provide an amazonAddress. This IP must be in the same network subnet as the one specified for the DirectLink router.

  • endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.

The allocate-private-virtual-interface command returns the following elements:

  • virtualInterfaceState: The state of the private virtual interface.

  • asn: The BGP ASN on the customer side of the virtual interface.

  • vlan: The unique VLAN ID for the private virtual interface.

  • customerAddress: The IP on the customer side of the virtual interface.

  • ownerAccount: The account ID of the owner of the private virtual interface.

  • connectionId: The ID of the connection.

  • virtualInterfaceId: The ID of the private virtual interface.

  • authKey: The BGP authentication key.

  • location: The datacenter where the connection is located.

  • amazonAddress: The IP on the OUTSCALE side of the virtual interface.

  • virtualInterfaceType: The type of virtual interface (always private).

  • virtualInterfaceName: The name of the virtual interface.

Result sample
{
    "virtualInterfaceState": "confirming",
    "asn": 65000,
    "vlan": 101,
    "customerAddress": "172.16.0.2/30",
    "ownerAccount": "123456789000",
    "connectionId": "dxcon-12345678",
    "virtualInterfaceId": "dxvif-56781234",
    "authKey": "tgyn26example",
    "location": "PAR1",
    "amazonAddress": "172.16.0.1/30",
    "virtualInterfaceType": "private",
    "virtualInterfaceName": "MyPrivateVirtualInterface"
}

The private virtual interface is created.

The private virtual interface remains in the confirming state and cannot forward traffic until its owner confirms it. For more information, see Accepting a Hosted DirectLink Interface.

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.