> ## Documentation Index
> Fetch the complete documentation index at: https://docs.megaport.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating MCR Connections to DigitalOcean Infrastructure

> This help topic describes how to create connections between MCR and DigitalOcean Infrastructure.

export const Image = ({src, alt = '', caption, width, height, shadow}) => {
  const errorPrefix = '\x1b[31;1;4mERROR\x1b[0m: Image -';
  if (typeof src !== 'string') {
    src = String(src);
  }
  if (!src || src === 'undefined') {
    console.error(`${errorPrefix} \`src\` is required — rendering an empty string instead`);
    return <></>;
  }
  const img = <img className={['mega-image-style', shadow ? 'shadow' : ''].join(' ')} src={src} alt={alt} width={width} height={height} style={{
    display: 'block'
  }} />;
  return caption ? <figure>
      {img}
      <figcaption style={{
    textAlign: 'center',
    width
  }}>{caption}</figcaption>
    </figure> : img;
};

export const Link = ({href, children}) => {
  const errorPrefix = '\x1b[31;1;4mERROR\x1b[0m: Link -';
  if (typeof href !== 'string') {
    href = String(href);
  }
  if (!href || href === 'undefined') {
    console.error(`${errorPrefix} the \`href\` property is required — rendering an empty string instead`);
    return <></>;
  }
  if (href.includes('{') || href.toUpperCase().includes('%7B')) {
    console.error(`${errorPrefix} could not resolve a variable in href "${href}" — rendering an empty string instead`);
    return <></>;
  }
  const isExternal = (/^https?:\/\//).test(href);
  return <a href={href} className="link" target={isExternal ? '_blank' : undefined} rel={isExternal ? 'noreferrer' : undefined}>
      {children ?? href}
      {isExternal && <span className="sr-only"> (opens in a new tab)</span>}
    </a>;
};

Megaport makes it easy to provision fast, secure, and private connections to DigitalOcean through our global software-defined network (SDN). As a DigitalOcean partner, Megaport provides customers with direct, private access to global DigitalOcean infrastructure via pre-provisioned on-ramps.

DigitalOcean Partner Network Connect lets you establish high-bandwidth, low-latency network connections directly between DigitalOcean Virtual Private Cloud (VPC) networks and other public cloud providers or data centers.

DigitalOcean Partner Network Connect allows you to create partner interconnect attachments, which connect one or more DigitalOcean VPC networks to Megaport.  After connecting your DigitalOcean VPC to Megaport, you can connect Megaport to other cloud providers or data center networks.

Establishing multi-hybrid cloud connectivity with DigitalOcean involves three connections. You must create a Partner Network Connect in DigitalOcean, a Megaport Cloud Router (MCR) with two Virtual Cross Connects (VXCs) – one for each end of the connection – on Megaport, and a direct connect link on AWS, GCP, or other providers or data centers.

<Image src="/images/cloud/mcr/digialocean-mcr-to-aws.png" alt="Digitalocean to AWS" shadow={true} width={600} />

## Availability

DigitalOcean Partner Network Connect is available in the locations listed below. Customers can access all DigitalOcean data centers in the regions where Partner Network Connect is enabled, such as San Francisco, New York, Amsterdam, Frankfurt, and Singapore.

* DigitalRealty New York JFK10
* Equinix San Jose SV1/10
* Interxion Frankfurt FRA15
* Interxion Amsterdam AMS9/17
* Equinix Singapore SG3

## Prerequisites

Before setting up a DigitalOcean Partner Network Connect, you need:

* **A Megaport account** -- If you have not already created one, see [Creating an Account](/setting-up/registering).

* **An MCR** -- Preferably close to where VXC connections will be made. For more information, see [Creating an MCR](/mcr/creating-mcr).

* **A service key** -- A code that is given to you by DigitalOcean to create a connection from a Megaport MCR to a DigitalOcean service. For more information, see the DigitalOcean documentation at [How to Create a Partner Attachment](https://docs.digitalocean.com/products/networking/vpc/how-to/create-partner-attachment/).

* **Network details** -- For the target resources on the other side of the network, in Classless Inter-Domain Routing (CIDR) notation.

## Creating a DigitalOcean connection

To create a connection from a Megaport MCR to a DigitalOcean service, you need a service key. DigitalOcean generates a service key on request.  To create your unique DigitalOcean Partner Network Connect service key, follow the steps provided by DigitalOcean in the DigitalOcean documentation at [How to Create a Partner Attachment](https://docs.digitalocean.com/products/networking/vpc/how-to/create-partner-attachment/).

**How to order**

1. Existing DigitalOcean customers must contact their DigitalOcean Account Manager or pre-sales architect to establish a connection. New customers can contact DigitalOcean through their website to discuss options.

2. DigitalOcean will provide a service key. This key will be unique to your business and will include DigitalOcean’s VLAN ID, speed, and cloud peering location.

3. Create a connection to DigitalOcean in the Megaport Portal using the service key. Data including VLAN ID, speed, and DigitalOcean peering location will populate automatically from the data supplied by the service key.

## Creating  a VXC to DigitalOcean

After you receive your service key from DigitalOcean, create your connection to DigitalOcean in the Megaport Portal. These instructions will help you create the connection.

**To create a connection to DigitalOcean**

1. Make sure you have your DigitalOcean service key.

   <Note>
     When you use the service key created by DigitalOcean, you are responsible for any VXC charges.
   </Note>

2. In the <Link href="https://portal.megaport.com">Megaport Portal</Link>, go to the **Services** page.

3. Select the MCR you want to use.  If you have not already created an MCR, see [Creating an MCR](/mcr/creating-mcr).

4. Add a DigitalOcean connection for the MCR. If this is the first connection for the MCR, click the **DigitalOcean** tile.\
   The tile is a shortcut to the configuration page.\
   Alternatively, click **+Connection**, click **Cloud**, then click **DigitalOcean**.

   <Image src="/images/cloud/mcr/digitalocean-connection-tile.png" alt="Digitalocean connection tile" shadow={true} width={850} />

5. Enter the service key provided by DigitalOcean in the Megaport Service Key ID field.

   <Image src="/images/cloud/mcr/digitalocean-new-connection.png" alt="Digitalocean new connection" shadow={true} width={850} />

6. Click **Next**.

7. Specify the MCR connection details.

   * **Connection Name** – The name of your VXC to be shown in the Megaport <Link href="https://portal.megaport.com">Megaport Portal</Link>.

   * **Service Level Reference** (optional) -- Specify a unique identifying number for your Megaport service to be used for billing purposes, such as a cost center number, unique customer ID, or purchase order number. The service level reference number appears for each service under the Product section of the invoice. You can also edit this field for an existing service.

   * **Rate Limit** – The speed of your connection in Mbps. The speed tiers available are dependent on the selected location, and match the speeds available in DigitalOcean. Select the MCR speed from the drop-down list to match the selected speed in the DigitalOcean portal for the VPC service.

   * **VXC State** – Select Enabled or Shut Down to define the initial state of the connection. For more information, see [Shutting Down a VXC for Failover Testing](/connections/shut-down-vxc).

     <Note>
       If you select **Shut Down**, traffic will not flow through this service and it will behave as if it was down on the Megaport network. Billing for this service will remain active and you will be charged for this connection.
     </Note>

   * **Minimum Term** -- Select No Minimum Term, 12 Months, 24 Months, 36 Months, 48 Months, or 60 Months. Longer terms result in a lower monthly rate. *12 Months* is selected by default. Take note of the information on the screen to avoid early termination fees (ETF).

     Enable the [Minimum Term Renewal](/portal-admin/auto-renew/#auto-renew) option for services with a 12, 24, 36, 48 or 60-month term to automatically renew the contract at the same discounted price and term length at the end of the contract. If you don't renew the contract, at the end of the term,  the contract will automatically roll over to month-to-month contract for the following billing period, at the same price, without term discounts.

     For more information, see [VXC Pricing and Contract Terms](/finance/vxc-pricing) and [VXC, Megaport Internet, and IX Billing](/finance/billing-details).

   * **Resource Tags** -- You can use resource tags to add your own reference metadata to a Megaport service.\
     To add a tag:
     1. Click **Add Tags**.
     2. Click  **Add New Tag**.
     3. Enter details into the fields:
        * **Key** -- string maximum length 128. Valid values are a-z 0-9 \_ : . / \ -
        * **Value** -- string maximum length 256. Valid values are a-z A-Z 0-9 \_ : . @ / + \ - (space)
     4. Click **Save**.
        If you already have resource tags for that service, you can manage them by clicking **Manage Tags**.
     <Warning>
       Never include sensitive information in a resource tag. Sensitive information includes commands that return existing tag definitions and information that will identify a person or company.
     </Warning>

   <Image src="/images/cloud/mcr/mcr-cloud-create-details.png" alt="Digitalocean connection details" shadow={true} width={600} />

8. Click **Next**.

9. Specify the MCR A-End connection details.\
   Set the following fields using information from your DigitalOcean partner attachment:

   * **Interface IP Address** -- Set the Interface IP Address to the partner attachment's Peer router IP.
   * **BGP Connection** -- Click **Add BGP Connection**.\
     For Local IP, select the Interface IP Address.\
     Retrieve the partner attachment's BGP details from DigitalOcean, and enter them into the fields.

     <Note>
       The Local router IP from DigitalOcean is the Peer IP for Megaport.
     </Note>

     Use the BGP authentication key for the BGP Password.\
     Click **Add** to save your BGP Connection.

   For more information about these fields, see [Configuring an MCR](/mcr/configuring-mcr).

   <Image src="/images/cloud/mcr/digitalocean-mcr-a-end-connection-details.png" alt="Digitalocean mcr A-End connection details" shadow={true} width={850} />

10. Click **Next**.\
    A summary page appears that includes the monthly cost.

11. Click **Back** to make changes or click **Add VXC**.

12. Click **Review Order** to proceed through the checkout process, or click **Save** to save the configured services before placing the order.

13. Review the Important Information section and confirm agreement with the Service Agreements.

    If you do not have a promotion code, skip to the **Order Now** step. If you do have a promotion code, enter it into the **Enter discount code** field then click **Apply**. Alternatively, if a code already appears in the **Discounts** field, verify it is correct and click **Apply**.

    The promotional discount appears below the Standard Term discount.  This discount is not reflected in the Monthly Rate shown here, it is applied at the time of billing.  If an invalid or expired code causes an error with your order, contact your Megaport Account Manager for a replacement code.

    <Image src="/images/snippets/add-promo-code.png" alt="Add Promo Code" shadow={true} width={750} />

    If you entered an incorrect promotion code, you can remove it by clicking **Remove**.

    <Note>
      In addition to entering a promotion code manually, there are two other ways to apply promotion codes.

      * **Auto-apply** -- Megaport automatically applies the promotion code to your order. It appears automatically on the Checkout page.
      * **Manual list** -- Eligible promotion codes appear at checkout for any applicable services in your cart. You can then select and apply them.
    </Note>

14. Click **Order Now**.

Once you have finished this configuration, you can configure additional VXCs.

## Helpful references

* [DigitalOcean Create a Partner Attachment](https://docs.digitalocean.com/products/networking/vpc/how-to/create-partner-attachment/)
* [Configuring an MCR](/mcr/configuring-mcr)
* [MCR Pricing and Contract Terms](/finance/mcr-pricing)
* [VXC Pricing and Contract Terms](/finance/vxc-pricing)
