0
0
GCPcloud~5 mins

Cloud Interconnect for dedicated connections in GCP - Commands & Configuration

Choose your learning style9 modes available
Introduction
Sometimes your business needs a fast and private connection between your own data center and Google Cloud. Cloud Interconnect for dedicated connections lets you create a direct link that is more reliable and secure than the internet.
When you want to connect your office network directly to Google Cloud without using the public internet.
When you need a stable and fast connection for transferring large amounts of data to your cloud servers.
When your applications require low delay and high security between your data center and cloud resources.
When you want to avoid internet traffic costs by using a private connection.
When you need to connect multiple cloud regions with your own network securely.
Config File - interconnect-config.yaml
interconnect-config.yaml
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeInterconnect
metadata:
  name: example-dedicated-interconnect
spec:
  location: "equinix-ashburn"
  linkType: DEDICATED
  requestedLinkCount: 1
  adminEnabled: true
  description: "Dedicated Interconnect connection to Ashburn"
  mtu: 1500
  customerName: "example-customer"
  interconnectType: DEDICATED
  nocContactEmail: "noc@example.com"
  partnerMetadata:
    partnerName: "equinix"
    partnerInterconnectName: "example-partner-interconnect"

This YAML file defines a dedicated Cloud Interconnect connection in Google Cloud.

  • location: The physical location of the interconnect, here Equinix Ashburn.
  • linkType: Set to DEDICATED for a direct physical connection.
  • requestedLinkCount: Number of physical links requested.
  • adminEnabled: Enables the interconnect.
  • mtu: Maximum transmission unit size for packets.
  • customerName: Your company name for identification.
  • nocContactEmail: Email for network operations contact.
  • partnerMetadata: Information about the partner providing the connection.
Commands
This command creates a dedicated Cloud Interconnect connection in the Ashburn location with one physical link. It sets your company name and contact email for network operations and enables the interconnect.
Terminal
gcloud compute interconnects create example-dedicated-interconnect --description="Dedicated Interconnect connection to Ashburn" --location=equinix-ashburn --link-type=DEDICATED --requested-link-count=1 --customer-name=example-customer --noc-contact-email=noc@example.com --mtu=1500 --admin-enabled
Expected OutputExpected
Created [https://www.googleapis.com/compute/v1/projects/my-project/global/interconnects/example-dedicated-interconnect].
--location - Specifies the physical location of the interconnect.
--link-type - Defines the type of connection, here DEDICATED for direct physical link.
--requested-link-count - Number of physical links requested for redundancy or bandwidth.
This command shows details about the dedicated interconnect you created, including status and configuration.
Terminal
gcloud compute interconnects describe example-dedicated-interconnect
Expected OutputExpected
name: example-dedicated-interconnect location: equinix-ashburn linkType: DEDICATED requestedLinkCount: 1 adminEnabled: true mtu: 1500 customerName: example-customer nocContactEmail: noc@example.com state: ACTIVE
This command lists all your Cloud Interconnect connections so you can check their status and details.
Terminal
gcloud compute interconnects list
Expected OutputExpected
NAME LOCATION LINK_TYPE STATE REQUESTED_LINK_COUNT example-dedicated-interconnect equinix-ashburn DEDICATED ACTIVE 1
Key Concept

If you remember nothing else from this pattern, remember: Dedicated Cloud Interconnect creates a private, fast, and reliable link between your data center and Google Cloud.

Common Mistakes
Using the wrong location name for the interconnect.
The interconnect will fail to create because the location must match a supported physical site.
Check the list of supported locations with 'gcloud compute interconnects locations list' and use an exact match.
Not specifying the requested link count or setting it to zero.
The interconnect requires at least one physical link to function.
Always set --requested-link-count to 1 or more depending on your bandwidth needs.
Forgetting to enable the interconnect after creation.
If adminEnabled is false, the interconnect will not be active and traffic won't flow.
Use --admin-enabled flag or update the interconnect to enable it.
Summary
Use 'gcloud compute interconnects create' to set up a dedicated physical connection to Google Cloud.
Verify the connection status with 'gcloud compute interconnects describe' and 'gcloud compute interconnects list'.
Ensure you use correct location and link count values to avoid creation errors.