Créer une DirectLink interface hébergée

Vous pouvez créer une DirectLink interface hébergée dans un autre compte OUTSCALE. Cela permet à cet autre compte, le bénéficiaire, d’utiliser votre connexion DirectLink pour accéder à un de ses Nets.

Le bénéficiaire doit accepter votre demande de création d’une DirectLink interface avant de pouvoir l’utiliser. Il devient alors propriétaire de la DirectLink interface. Tant qu’elle n’est pas acceptée, la DirectLink interface ne peut pas envoyer de trafic réseau. Pour en savoir plus, voir Accepter une DirectLink interface hébergée.

Pour en savoir plus sur les DirectLink interfaces, voir À propos de DirectLink > Connexions DirectLink et DirectLink interfaces.

Créer une DirectLink interface hébergée avec OSC CLI

À ce jour, cette section est disponible en anglais uniquement.

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"
  }
}

Créer une DirectLink interface hébergée avec oapi-cli

À ce jour, cette section est disponible en anglais uniquement.

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"
  }
}

Créer une virtual interface privée hébergée avec AWS CLI

Avant de commencer : Installez et configurez AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI.

Pour créer une virtual interface privée hébergée, utilisez la commande allocate-private-virtual-interface en suivant cette syntaxe :

Exemple de requête
$ 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

Cette commande contient les attributs suivants que vous devez spécifier :

  • (optionnel) profile : Le profil nommé que vous voulez utiliser, créé pendant la configuration d’AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI.

  • connection-id : L’ID de la connexion que vous voulez utiliser.

    La connexion doit être à l’état available. Pour en savoir plus, voir À propos de DirectLink > Informations générales sur les connexions DirectLink.

  • owner-account : L’ID de compte du propriétaire de la virtual interface privée à créer.

  • new-private-virtual-interface-allocation : Informations sur la virtual interface privée à créer. Cet attribut contient les éléments suivants que vous devez spécifier :

    • virtualInterfaceName : Le nom de la virtual interface privée.

    • vlan : L’ID VLAN unique pour la virtual interface privée (un entier entre 1 et 4096).

    • asn : L’autonomous system number (ASN) pour la configuration Border Gateway Protocol (BGP).

    • (optionnel) authKey : La clé d’authentification pour la configuration BGP.

    • (optionnel) amazonAddress : L’IP côté OUTSCALE de la virtual interface privée, en notation CIDR /30 (par exemple 172.16.0.1/30).

    • (optionnel) customerAddress : L’IP côté client de la virtual interface privée, en notation CIDR /30 (par exemple 172.16.0.2/30).

      Vous devez fournir une customerAddress si vous fournissez une amazonAddress. Cette IP doit être dans le même sous-réseau que celui spécifié pour le routeur DirectLink.

  • endpoint : Le endpoint correspondant à la Région à laquelle vous voulez envoyer la requête. Pour en savoir plus, voir Installer et configurer AWS CLI.

La commande allocate-private-virtual-interface renvoie les éléments suivants :

  • virtualInterfaceState : L’état de virtual interface privée.

  • asn : Le BGP ASN côté client de la virtual interface.

  • vlan : L’ID VLAN unique pour la virtual interface privée.

  • customerAddress : L’IP côté client de la virtual interface privée.

  • ownerAccount : L’ID de compte du propriétaire de la virtual interface privée.

  • connectionId : L’ID de la connexion.

  • virtualInterfaceId : L’ID de la virtual interface privée.

  • authKey : La clé d’authentification BGP.

  • location : Le data center où se trouve la connexion.

  • amazonAddress : L’IP côté OUTSCALE de la virtual interface privée.

  • virtualInterfaceType : Le type de virtual interface (toujours private).

  • virtualInterfaceName : Le nom de la virtual interface.

Exemple de résultat
 {
    "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"
}

La virtual interface privée est créée.

La virtual interface privée reste à l’état confirming et ne peut pas envoyer de trafic réseau tant que son propriétaire ne l’a pas confirmée. Pour en savoir plus, voir Accepter une DirectLink interface hébergée.

Pages connexes

Méthodes API correspondantes

AWS™ et Amazon Web Services™ sont des marques de commerce d’Amazon Technologies, Inc. ou de ses affiliées aux États-Unis et/ou dans les autres pays.