Create a VLAN attachment

This page provides instructions on how to create or update a VLAN attachment in Google Distributed Cloud (GDC) air-gapped.

A VLAN attachment represents an attachment of a Virtual Local Area Network (VLAN) and its associated BGP session configuration to an interconnect link. The VLAN specifies which part of your network has access through this connection.

Before you begin

To create or update a VLAN attachment, you must have the following:

  • A submitted ticket in the GDC portal requesting an interconnect with your chosen specifications, such as 10 G of redundant connectivity.
  • The necessary resource information and IDs for the interconnect resources that the Infrastructure Operator (IO) configures. For more information, see Interconnect creation process.
  • The necessary identity and access roles. For more information, see Prepare predefined roles and permissions.

Create or update a VLAN attachment

To create or update a VLAN attachment, follow these steps:

  1. Create a YAML file named interconnectattachment.yaml.
  2. Add the following content to the file:

    apiVersion: system.private.gdc.goog/v1alpha1
    kind: InterconnectAttachment
    metadata:
      name: UNIQUE_INTERCONNECT_NAME
      namespace: gpc-system
    spec:
      interconnectLinkRef:
        name: INTERCONNECT_LINK_NAME
        namespace: gpc-system
      parentInterconnectRef:
        name: INTERCONNECT_GROUP_NAME
        namespace: gpc-system
      parentInterconnectType: DirectConnect
      bgpSessionConfig:
        localIP: LOCAL_IP_SUBNET
        peerASN: PEER_ASN
        peerIP: PEER_IP
      peerExternalSubnets:
        - PEER_EXTERNAL_SUBNET
      routePolicyRef:
        name: ROUTE_POLICY_NAME
        namespace: gpc-system
      attachmentGroup:
        name: ATTACHMENT_GROUP_NAME
        namespace: gpc-system
      vlanID: VLAN_ID
    status: {}
    
    
  3. Replace the following:

    • UNIQUE_INTERCONNECT_NAME: unique name for this InterconnectAttachment resource.
    • INTERCONNECT_LINK_NAME: the universal object reference to the interconnect link in the gpc-system namespace.
    • INTERCONNECT_GROUP_NAME: the universal object reference to the interconnect group in the gpc-system namespace containing INTERCONNECT_LINK_NAME.
    • LOCAL_IP_SUBNET: the local IP address of the /31 peer on the GDC side.
    • PEER_ASN: the peer autonomous system number (ASN) of the Border Gateway Protocol (BGP).
    • PEER_IP: the peer IP address of the /31 peer on the side of the peer.
    • PEER_EXTERNAL_SUBNET: the peer external subnet that this interconnect allows. If there is more than one subnet, list all of them in the peerExternalSubnets field.
    • ROUTE_POLICY_NAME: the universal object reference to the route policy in the gpc-system namespace.
    • ATTACHMENT_GROUP_NAME: the universal object reference to the route policy in the gpc-system namespace that this attachment is a part of.
    • VLAN_ID: the VLAN ID to use on this interconnect.
  4. Create the VLAN attachment:

    kubectl apply -f interconnectattachment.yaml -n gpc-system
    --kubeconfig=MANAGEMENT_API_SERVER
    

    Replace MANAGEMENT_API_SERVER with the path to the kubeconfig file for the Management API server.

  5. Check that the creation of the VLAN attachment is successful:

    kubectl get interconnectattachment -n gpc-system
    --kubeconfig=MANAGEMENT_API_SERVER
    
  6. The output returns the VLAN attachment and shows True in the Ready column:

    NAME                                                   AGE    TYPE            MTU   VLAN-ID   INTERCONNECT GROUP                   INTERCONNECT LINK                           READY
    interconnect-attachment-zv-aa-blsw01-directconnect-1   3d2h   DirectConnect         3966      interconnect-group-directconnect-1   interconnect-zv-aa-blsw01-directconnect-1   True