---
title: How to Establish a Private Connection Between Vultr and GCP Using Direct Connect via Megaport
url: https://docs.vultr.com/how-to-establish-a-private-connection-between-vultr-and-gcp-using-direct-connect-via-megaport
description: "Establish a secure, low-latency Vultr–GCP private connection using Direct Connect and Megaport.\n"
publish_date: 2025-12-22T11:59:17.326000Z
last_updated: 2026-04-15T00:00:00.077250Z
author: Aashish Chaurasiya
header_image: https://i.postimg.cc/W3G0S5j3/GCP-(1).png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

Vultr Direct Connect allows you to establish a dedicated, private network connection between your Vultr infrastructure and your on-premises environment or other cloud providers. This connection bypasses the public internet to deliver a more reliable, secure, and low-latency network experience. It provides predictable performance, committed network bandwidth, enhanced security, and reduced data transfer costs, making it ideal for hybrid cloud architectures, high-volume workloads, and latency-sensitive applications.

In this guide, you will create a private, low-latency connection between Vultr and GCP using Direct Connect hosted through Megaport. You will provision a dedicated port, order a Virtual Cross Connect (VXC) using Megaport, configure the connection on both Vultr and GCP, and verify the setup by testing BGP route advertisements and end-to-end connectivity between your Vultr and GCP resources.

## Prerequisites

Before you begin, ensure you:

* Have access to the [Megaport Portal](https://portal.megaport.com/) with sufficient permissions to create a port and a Virtual Cross Connect (VXC).
* Have access to the [Google Cloud Platform](https://cloud.google.com) with permissions to create and manage Interconnect and Cloud Router.
* Have access to the [Vultr Console](https://console.vultr.com/) to create and manage Direct Connect and supporting resources.
* Have [BGP enabled](https://docs.vultr.com/products/network/bgp/request-access) on your Vultr account.
* Understand VLAN IDs and basic BGP configuration concepts.

## Gather Information About the Vultr Datacenter

Vultr operates multiple datacenters worldwide that you can use to establish a private connection to GCP. In this section, you gather the required information about the Vultr datacenter you want to connect to GCP.

> [!NOTE]
> Megaport does not support all Vultr datacenter locations. Before you proceed, contact Vultr Support to confirm Megaport availability for your preferred region.

1. Log in to the [Vultr Console](https://console.vultr.com/).
1. Select **Support** from the left navigation menu.
1. Click **Open Ticket** to create a new support request.
1. From the available options, toggle the last option to display all fields.
1. Under **Category**, select **General Support**.
1. Use the below template to open a support ticket to request the Vultr Direct Connect setup.

    ```text
    Subject: Request to Setup Vultr Direct Connect Hosted via Megaport Partner ([REGION] Region)

    Hello Vultr Team,

    I would like to set up a Hosted via Partner Direct Connect connection using Megaport. I will be connecting the X-REGION Vultr datacenter to the Y-REGION Google Cloud region.

    Please share the necessary details required to create a port to that location in Megaport and the details you require to proceed with the connection and complete the set up.

    Thank you for your assistance.

    Best regards,
    [Your Name]
    ```

    > [!NOTE]
    > Vultr Support Team generally responds within 24 business hours.

1. Vultr Support provides you with the availability details, supported datacenter locations, and the requirements to create a Megaport port. They also request additional information such as VLAN configuration, primary contact details, required bandwidth, and other port-related parameters after you provision the port.

## Request a Dedicated Port from Megaport

After you receive the Vultr datacenter details for the region where you plan to establish the connection, you request a dedicated port from Megaport. This port serves as the physical entry point for your private connection between Vultr and GCP.

1. Log in to your **Megaport Portal**.
1. Navigate to **Services** and click **Create Port**.
1. Search for the Vultr datacenter location provided by Vultr Support.
1. Select the required **port speed** (1G, 10G, or 100G) based on your bandwidth needs.
1. Enter a **Port Name** and select a **Minimum Term**.
1. (Optional) Configure **Port Diversity** to achieve high availability and redundancy.

    > [!NOTE]
    > Configuring Port Diversity creates two ports in the datacenter, commonly referred to as **RED** and **BLUE** diversity paths which use completely different infrastructure behind the scenes. If an issue occurs in one diversity zone, the other remains unaffected, providing high availability (HA).

1. Click **Add Tags** to assign a tag to the resource, then click **Next**.
1. Click **Add Port**, review the order under **Configured Services** in the left navigation pane, click **Review Order**, and then submit the order.

    > [!NOTE]
    > Port provisioning typically takes 12 to 48 hours to complete.

1. After Megaport provisions the port and marks it active, download the **Letter of Authorization (LOA)** for the port and share it with the Vultr Support team so they can complete the physical connection between the Megaport port and the Vultr rack. Also provide the following details:

    * The **VPC UUID** or **Instance UUID** where Vultr will attach the Direct Connect (Partner Interconnect).
    * The **VLAN ID** configured on the Megaport port.

    > [!NOTE]
    > Ensure that at least one instance is running in the VPC whose UUID you share. Vultr assigns a **VXLAN ID** only when an active instance exists. Keep at least one instance running in the VPC at all times to preserve the **VXLAN ID**. If you delete all instances in the VPC, the **VXLAN ID** is released, the Direct Connect stops working, and Vultr must reconfigure the connection for new instances.

## Create an Interconnect VLAN Attachment

In this section, you create a VLAN attachment using a Partner Interconnect connection in Google Cloud and generate a pairing key. You later use this pairing key in Megaport to complete the connection.

1. Log in to the **Google Cloud Platform (GCP)**.
1. In the search bar, type **Interconnect** and select **Interconnect** under **Network Connectivity**.
1. Click **Create VLAN attachments**.
1. Under **Interconnect type**, select **Partner Interconnect connection**.
1. Under **Encrypt interconnect**, choose your preferred encryption option, then click **Continue**.
1. On the partner selection page, select **I already have a service provider**.
1. Under **Redundancy**, choose a redundancy option that meets your requirements, or select **Create a single VLAN** if you do not require redundancy.
1. Select the target **VPC network** and **Region**.
1. Under **VLAN**, click **Create new router** to create a new **Cloud Router**.
1. In the **Create a router** panel, provide the following details:

    * **Name**: Enter a name for the Cloud Router.
    * **Description**: Enter a short description for the router.
    * **BGP peer keepalive interval**: Specify the keepalive interval in seconds. The default value is `20`, and valid values range from `20` to `60`.
    * **BGP identifier**: Specify a BGP identifier IP address, or leave this field empty to allow Google Cloud to assign one automatically.
    * **Advertised routes**:
        * Select **Advertise all subnets visible to the Cloud Router** to advertise all VPC routes over BGP.

1. Enter a **VLAN A attachment name** and a description.
1. Under **IP stack type**, select one of the following.

    * **IPv4 (single-stack)** for an IPv4-only BGP session.
    * **IPv4 and IPv6 (dual-stack)** for both IPv4 and IPv6 BGP sessions.

1. Set the **VLAN A Maximum transmission unit (MTU)** to `1440`.
1. Under **Allocate BGP address**, select **Automatically allocate link-local range** so Google Cloud assigns the BGP IP addresses.
1. After Google Cloud provisions the VLAN attachment, copy the generated **Pairing key**, then click **OK** to complete the set up.

    > [!NOTE]
    > Share the **Pairing key** only with the selected service provider. Anyone with this key can establish a connection to your Google Cloud Interconnect.

## Configure and Connect the Megaport Port to GCP Interconnect

In this section, you configure the provisioned Megaport port to establish a Layer 2 connection with Google Cloud Partner Interconnect. Megaport acts as a Network-as-a-Service (NaaS) provider and delivers the private connection between your Vultr datacenter and Google Cloud.

1. In the **Megaport Portal**, navigate to **Services** and select the port you created in the previous section.
1. Click **+ Connection** and choose **Cloud** as the connection type.
1. From the list of providers, select **Google Cloud**.
1. Paste the **Pairing key** in the **Google Partner Pairing Key** field.
1. From the available **Google Ports**, select the correct **datacenter location**, then click **Next**.
1. Enter a descriptive **Connection Name** to identify the VXC.
1. Select the required **Rate Limit (bandwidth)** based on your traffic requirements.
1. Configure the **VLAN ID** to segment the connection traffic.
1. Select a **Minimum Term**. Longer commitment terms typically reduce costs.
1. Click **Next**, review the configuration and pricing, and then click **Add VXC** to create the Virtual Cross Connect.
1. Review the order under the **Configured Services** section in the left navigation pane and submit the order.

    > [!NOTE]
    > Megaport typically completes VXC provisioning within **10–30 minutes**. After provisioning completes, the connection status shows **Inactive**, which indicates that Google Cloud has accepted the pairing key and the Layer 2 connection between Megaport and GCP Interconnect is successfully established.

## Configure BGP Routing Between Vultr and GCP

In this section, you configure BGP routing on both GCP and Vultr to enable private traffic flow between the two environments.

1. After you confirm that the connection is active on both ends, configure the routing settings on GCP and Vultr.
1. In the **Google Cloud Console**, open the newly created **VLAN attachment**.
1. On the **Details tab**, under the **Connection** section, note the following values:

    * **Peer BGP IPv4**: Assign this IPv4 address to the Vultr-side router interface.
    * **Cloud Router BGP IPv4**: IPv4 address assigned to the GCP Cloud Router.
    * **Peer BGP IPv6**: Assign this IPv6 address to the Vultr-side router interface (if IPv6 is enabled).
    * **Cloud Router BGP IPv6**: IPv6 address assigned to the GCP Cloud Router.

    > [!NOTE]
    > If you did not define a **BGP identifier** while creating the Cloud Router, GCP automatically assigns BGP peer IPs from the `169.254.x.x/30` range. You can use these IPs directly on your Vultr instance.

1. On Vultr, deploy an **Ubuntu-based instance** inside the VPC attached to Direct Connect.
1. After the instance reaches the **running** state, connect to it using SSH.

    ```console
    $ ssh USERNAME@SERVER-IP
    ```

    Replace `USERNAME` with the username and `SERVER-IP` with the public IP address of the server.

1. List the network interfaces and identify the one connected to the VPC.

    ```console
    $ ip addr
    ```

    Output:

    ```
    ...
    3: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc mq state UP group default qlen 1000
        link/ether 5a:00:07:cd:32:56 brd ff:ff:ff:ff:ff:ff
        inet 10.17.112.4/20 brd 10.17.127.255 scope global enp8s0
           valid_lft forever preferred_lft forever
    ...
    ```

    From the output, identify the interface that contains an IP address from your Vultr VPC subnet.

1. Assign the **Peer BGP IPv4 address** to the identified VPC interface.

    ```console
    $ sudo ip addr add 169.254.x.x/30 dev enp8s0
    ```

    Replace:

    * `enp8s0` with your actual interface name.
    * `169.254.x.x/30` with the **Peer BGP IPv4** provided by GCP.

    Repeat this step for IPv6 if you configured an IPv6 BGP peer.

    > [!NOTE]
    > If you manually configure the **BGP identifier** and assign an IP address that falls within your Vultr VPC subnet range, you do not need to configure a separate router. All instances in the VPC can communicate directly with the GCP router without additional set up.

1. Verify that the peer IP address is assigned correctly.

    ```console
    $ ip addr show enp8s0
    ```

    Confirm that the output displays the **BGP peer IP** on the VPC interface.

1. Test connectivity to the GCP Cloud Router.

    ```console
    $ ping GCP_PEER_IP
    ```

    Replace `GCP_PEER_IP` with the **Cloud Router BGP IP**.

    Output:

    ```
    64 bytes from GCP_PEER_IP: icmp_seq=1 ttl=64 time=8.21 ms
    64 bytes from GCP_PEER_IP: icmp_seq=2 ttl=64 time=6.95 ms
    64 bytes from GCP_PEER_IP: icmp_seq=3 ttl=64 time=9.35 ms
    64 bytes from GCP_PEER_IP: icmp_seq=4 ttl=64 time=8.01 ms
    ```

    Successful replies confirm that the Vultr instance can exchange traffic with GCP over the private connection.

    > [!NOTE]
    > This IP assignment is temporary and resets after a reboot. To make it persistent, update the corresponding Netplan file in `/etc/netplan` and add the IP under the interface `addresses` list. Refer to [this guide](https://docs.vultr.com/how-to-configure-multiple-public-ipv4-addresses-on-a-vultr-compute-instance) for detailed instructions on assigning multiple IPs to a network interface.

## Conclusion

You successfully established a private network connection between Vultr and Google Cloud using Direct Connect hosted through Megaport. You provisioned a dedicated Megaport port, created and linked a Partner Interconnect VLAN attachment, configured BGP routing on both platforms, and verified private connectivity between Vultr and GCP. [Learn more to replicate the set up with AWS](https://docs.vultr.com/how-to-establish-a-private-connection-between-vultr-and-aws-using-direct-connect-via-megaport).
