> ## 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 Google Cloud Services

> This help topic describes how to provision connections between MCR and Google Cloud Services.

export const Video = ({url, text, duration, description}) => {
  const errorPrefix = '\x1b[31;1;4mERROR\x1b[0m: Video -';
  if (typeof url !== 'string') {
    url = String(url);
  }
  if (typeof text !== 'string') {
    text = String(text);
  }
  if (!url || url === 'undefined') {
    console.error(`${errorPrefix} the \`url\` property is required — rendering an empty string instead`);
    return <></>;
  }
  if (!text || text === 'undefined') {
    console.error(`${errorPrefix} the \`text\` property is required — rendering an empty string instead`);
    return <></>;
  }
  const youtubeIconMask = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath d='M549.7 124.1c-6.3-23.7-24.8-42.3-48.3-48.6C458.8 64 288 64 288 64S117.2 64 74.6 75.5c-23.5 6.3-42 24.9-48.3 48.6-11.4 42.9-11.4 132.3-11.4 132.3s0 89.4 11.4 132.3c6.3 23.7 24.8 41.5 48.3 47.8C117.2 448 288 448 288 448s170.8 0 213.4-11.5c23.5-6.3 42-24.2 48.3-47.8 11.4-42.9 11.4-132.3 11.4-132.3s0-89.4-11.4-132.3zM232 336V176l142.7 80z'/%3E%3C/svg%3E\")";
  return <div className="video-callout">
      <div className="callout my-4 flex gap-3 overflow-hidden rounded-2xl border px-5 py-4">
        <div className="mt-0.5 w-4 shrink-0" data-component-part="callout-icon">
          <svg aria-hidden="true" className="size-4 shrink-0" style={{
    WebkitMaskImage: youtubeIconMask,
    maskImage: youtubeIconMask,
    WebkitMaskRepeat: 'no-repeat',
    maskRepeat: 'no-repeat',
    WebkitMaskPosition: 'center',
    maskPosition: 'center',
    backgroundColor: '#0284c7'
  }} />
        </div>
        <div className="min-w-0 w-full text-sm" data-component-part="callout-content">
          <strong>
            Video:{' '}
            <a href={url} target="_blank" rel="noopener noreferrer">
              {text}
              <span className="sr-only"> (opens in a new tab)</span>
            </a>
          </strong>
          {}
          {duration && <> ({duration})</>}
          {}
          {description && <p className="mt-1 mb-0 text-xs text-gray-500 dark:text-gray-400">
              {description}
            </p>}
        </div>
      </div>
    </div>;
};

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 between a customer's data center and Google Cloud Platform.

## Partner Interconnect

Partner Interconnect accesses the private address space ([RFC 1918](https://tools.ietf.org/html/rfc1918)).

As part of the Google Cloud Interconnect (GCI) Partner program, Megaport provides users with dedicated access to Google Cloud Platform (GCP) and enables customers to create private connections between their remote network environments and their Virtual Private Cloud (VPC) deployments.

The benefits of creating GCI Partner Connections with Megaport include:

* Enhanced security and higher network performance
* Connectivity reach beyond Google's existing network locations
* Scalable connectivity for those who do not require the full bandwidth of Google's Dedicated Interconnect
* Savings on egress traffic costs from the customer's VPC network to their on-premises network
* API integration between Megaport and Google Cloud which simplifies the provisioning of connections for a fast and seamless experience
* Layer 3 routing capabilities without having a physical router located in a data center

When connecting to Google Cloud Platform (GCP) through Partner Interconnect with Megaport, the Virtual Cross Connect (VXC) forms the Layer 2 component of the connection and Layer 3 BGP is established directly between the customer and GCP. Through Partner Interconnect, a customer can access VMs (Virtual Machines) built within a VPC.

### Creating a VXC to the Google Cloud Platform

<Video url="https://youtu.be/ulc8pPsd8Ik" text="Google Cloud Connection from MCR" duration="6:41" description="This video shows how to provision a private connection between an MCR and Google Cloud Platform, including creating a pairing key and configuring BGP peering." />

Before you begin, create a Megaport Cloud Router (MCR). If you don’t have an MCR, create one following the procedures in [Creating an MCR](/mcr/creating-mcr).

**To deploy a VXC to Google Cloud Platform**

1. Log in to your <a href="https://console.cloud.google.com/" target="_blank">Google Cloud
   Console</a> and create a pairing key.

2. From the main menu in the Console, select Hybrid Connectivity > Interconnect.
   <Image src="/images/cloud/megaport/google/gcp-project1.png" alt="Google interconnect" shadow={true} width={500} />

3. Click **Get Started**.

4. Select Partner Interconnect then click **Continue**.
   <Image src="/images/cloud/megaport/google/partner-interconnect.png" alt="Partner interconnect" shadow={true} width={500} />

5. Click **I already have a service provider**.
   <Image src="/images/cloud/megaport/google/already-have-a-sp.png" alt="Service provider interconnect" shadow={true} width={600} />

6. Configure your attachment. Provide these attachment details:

   * **Redundancy** -- Select a redundancy option. You can create redundant attachments or a single attachment. For more information about redundancy, see [Diversity in Google Connections](/cloud/megaport/google/google-diversity).

   * **Network** -- Select the VPC network you want the VPC to connect.

   * **Region** -- Select the region where your attachment will connect.

   * **Cloud Router** -- Select a Cloud Router to associate with this attachment.
     You can only select a Cloud Router in the VPC network and region that you selected with an ASN of 16550. If you don't have an existing Cloud Router, create one with an ASN of 16550. For redundancy, each VLAN attachment must be associated with a unique Cloud Router. Google automatically adds an interface and a BGP
     peer on the Cloud Router.

     <Note>
       The Google ASN will always be 16550.
     </Note>

   * **VLAN attachment name** -- Enter the VLAN attachment name using lowercase letters only.

   * **Description** (optional) -- Enter a description for the attachment.

   * **Maximum Transmission Unit (MTU)** -- Set the MTU to match the MTU of your VPC network. The default VPC network MTU is 1460 bytes.
     <Image src="/images/cloud/megaport/google/create-vlan-attachment.png" alt="Service provider interconnect" shadow={true} width={500} />

7. Click **Create**.\
   A pairing key appears.

8. Copy the pairing key then click **OK**.
   <Image src="/images/cloud/megaport/google/copy-pairing-key.png" alt="Google pairing key" shadow={true} width={600} />

9. In the <Link href="https://portal.megaport.com">Megaport Portal</Link>, create a VXC to your Google peering location:\
   Click **+Connection** on the MCR.
   <Image src="/images/cloud/mcr/add-connection.png" alt="Create a VXC to Google location" shadow={true} width={700} />

10. Click the **Cloud** tile.
    <Image src="/images/cloud/megaport/google/cloud-tile.png" alt="Cloud tile" shadow={true} width={600} />

11. Select Google as the provider.

    <Image src="/images/cloud/megaport/google/gc-vxc-config.png" alt="Cloud tile" shadow={true} width={700} />

    <Tip>
      To check the latency and price of connecting to a particular Google location, click **View all Google Partner locations**. You can proceed to the Connection Details page without a pairing key and review the pricing of the selected port. To place an order for a Google connection, you need to provide a pairing key.
    </Tip>

12. Copy and paste the pairing key from the Google Cloud console into the Google Partner Pairing Key field.\
    The relevant Google targets appear based on the region of your GCI Partner connection.

13. Select the target location for your first connection then click **Next**.

14. Specify the connection details:

    * **Connection Name** -- The name of your VXC to be shown in the <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** -- Enter the same rate you selected for your Google port speed.

    * **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 still 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>

15. Click **Next**.

16. Review the Summary then click **Next**.

17. Click **Add VXC** and configure further VXCs or proceed through the ordering process.

18. To deploy a second connection (recommended), repeat these steps and select “Add a redundant VLAN to an existing VLAN” in step 6. Adding a second connection ensures that you receive [redundancy and an SLA from Google](https://cloud.google.com/network-connectivity/docs/interconnect/concepts/partner-overview#redundancy).

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

20. 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**.

21. Click **Order Now**.

After placing the order, wait a few minutes until the VXC status changes from red to green. Green indicates Layer 2 connectivity has been established.

<Image src="/images/cloud/mcr/layer-2-established.png" alt="Layer 2 connectivity" shadow={true} width={700} />

This completes your Layer 2 VXC deployment.

After the VXC is established in the <Link href="https://portal.megaport.com">Megaport Portal</Link>, you need to accept the attachment in the Google Cloud Console and configure BGP. Google provides you with a private IP address to configure BGP.

For more information, see the Google documentation on [Google Partner Interconnects](https://cloud.google.com/interconnect/docs/how-to/partner/provisioning-overview).

**To activate and accept the connection**

1. In Google Console, return to the attachment you just created. The attachment status should be *Activation needed*. If the status shows *Pending partner*, refresh your screen or wait a couple of minutes until it changes to *Activation needed*.

2. Click **Activate**.\
   Google asks you to accept the connection.

3. Click **Accept** and wait about a minute.\
   The status updates to *BGP configuration needed*.

**To configure BGP**

1. In Google Console, click **Configure BGP**.
   <Image src="/images/cloud/mcr/google-configure-bgp.png" alt="Configure BGP" shadow={true} width={450} />

2. By default, the ASN assigned to the MCR is 133937. Leave the default peer ASN or enter a private ASN.
   <Image src="/images/cloud/mcr/google-peer-asn.png" alt="Assign an MCR peer" shadow={true} width={450} />

3. Click **Save and Continue**.

Wait a few minutes for the BGP peer to establish and then verify the BGP configuration.

**To verify the BGP configuration**

1. In the <Link href="https://portal.megaport.com">Megaport Portal</Link>, select the VXC.

2. Select the **Logs** tab.\
   The VXC status should be *BGP Established*.

3. In the Google Cloud Console, view the VLAN attachment.\
   The status should be *BGP Up*.

For more information, see the Google documentation at [Viewing Router Status and Advertised Routes](https://cloud.google.com/router/docs/how-to/viewing-router-details).

## Using a service key

You can create a service key that allows you to share your service with another Megaport account holder.
For more information, see [Setting up Service Keys](/marketplace/service-keys/).
