How to Establish a Private Connection Between Vultr and GCP Using Direct Connect via Megaport
.webp)
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 with sufficient permissions to create a port and a Virtual Cross Connect (VXC).
- Have access to the Google Cloud Platform with permissions to create and manage Interconnect and Cloud Router.
- Have access to the Vultr Customer Portal to create and manage Direct Connect and supporting resources.
- Have BGP enabled 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.
Log in to the Vultr Customer Portal.
Select Support from the left navigation menu.
Click Open Ticket to create a new support request.
From the available options, toggle the last option to display all fields.
Under Category, select General Support.
Use the below template to open a support ticket to request the Vultr Direct Connect setup.
textSubject: 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]
Vultr Support Team generally responds within 24 business hours.NoteVultr 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.
Log in to your Megaport Portal.
Navigate to Services and click Create Port.
Search for the Vultr datacenter location provided by Vultr Support.
Select the required port speed (1G, 10G, or 100G) based on your bandwidth needs.
Enter a Port Name and select a Minimum Term.
(Optional) Configure Port Diversity to achieve high availability and redundancy.
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).NoteClick Add Tags to assign a tag to the resource, then click Next.
Click Add Port, review the order under Configured Services in the left navigation pane, click Review Order, and then submit the order.
Port provisioning typically takes 12 to 48 hours to complete.NoteAfter 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.
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.Note
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.
Log in to the Google Cloud Platform (GCP).
In the search bar, type Interconnect and select Interconnect under Network Connectivity.
Click Create VLAN attachments.
Under Interconnect type, select Partner Interconnect connection.
Under Encrypt interconnect, choose your preferred encryption option, then click Continue.
On the partner selection page, select I already have a service provider.
Under Redundancy, choose a redundancy option that meets your requirements, or select Create a single VLAN if you do not require redundancy.
Select the target VPC network and Region.
Under VLAN, click Create new router to create a new Cloud Router.
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 from20to60. - 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.
Enter a VLAN A attachment name and a description.
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.
Set the VLAN A Maximum transmission unit (MTU) to
1440.Under Allocate BGP address, select Automatically allocate link-local range so Google Cloud assigns the BGP IP addresses.
After Google Cloud provisions the VLAN attachment, copy the generated Pairing key, then click OK to complete the set up.
Share the Pairing key only with the selected service provider. Anyone with this key can establish a connection to your Google Cloud Interconnect.Note
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.
In the Megaport Portal, navigate to Services and select the port you created in the previous section.
Click + Connection and choose Cloud as the connection type.
From the list of providers, select Google Cloud.
Paste the Pairing key in the Google Partner Pairing Key field.
From the available Google Ports, select the correct datacenter location, then click Next.
Enter a descriptive Connection Name to identify the VXC.
Select the required Rate Limit (bandwidth) based on your traffic requirements.
Configure the VLAN ID to segment the connection traffic.
Select a Minimum Term. Longer commitment terms typically reduce costs.
Click Next, review the configuration and pricing, and then click Add VXC to create the Virtual Cross Connect.
Review the order under the Configured Services section in the left navigation pane and submit the order.
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.Note
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.
After you confirm that the connection is active on both ends, configure the routing settings on GCP and Vultr.
In the Google Cloud Console, open the newly created VLAN attachment.
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.
If you did not define a BGP identifier while creating the Cloud Router, GCP automatically assigns BGP peer IPs from theNote169.254.x.x/30range. You can use these IPs directly on your Vultr instance.On Vultr, deploy an Ubuntu-based instance inside the VPC attached to Direct Connect.
After the instance reaches the running state, connect to it using SSH.
console$ ssh USERNAME@SERVER-IP
Replace
USERNAMEwith the username andSERVER-IPwith the public IP address of the server.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.
Assign the Peer BGP IPv4 address to the identified VPC interface.
console$ sudo ip addr add 169.254.x.x/30 dev enp8s0
Replace:
enp8s0with your actual interface name.169.254.x.x/30with the Peer BGP IPv4 provided by GCP.
Repeat this step for IPv6 if you configured an IPv6 BGP peer.
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.NoteVerify 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.
Test connectivity to the GCP Cloud Router.
console$ ping GCP_PEER_IP
Replace
GCP_PEER_IPwith 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 msSuccessful replies confirm that the Vultr instance can exchange traffic with GCP over the private connection.
This IP assignment is temporary and resets after a reboot. To make it persistent, update the corresponding Netplan file inNote/etc/netplanand add the IP under the interfaceaddresseslist. Refer to this guide 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.