查看 VLAN 连接

您可以查看项目中所有 VLAN 连接的列表以及每个连接的详细信息。例如,您可以查看某连接的名称,它是专用互连还是合作伙伴互连,及其关联的 Cloud Router 路由器。

控制台

  1. 在 Google Cloud 控制台中,进入 Cloud Interconnect VLAN 连接标签页。

    进入“VLAN 连接”

  2. 选择 VLAN 连接,以查看其详细信息。

gcloud

  1. 列出项目中的所有 VLAN 连接:

    gcloud compute interconnects attachments list
    

    输出类似于以下内容:

    NAME: my-attachment
    REGION: us-east1
    TYPE: PARTNER
    INTERCONNECT: some-partner-interconnect
    ROUTER: my-router
    
    NAME: my-second-attachment
    REGION: us-west1
    TYPE: DEDICATED
    INTERCONNECT: some-dedicated-interconnect
    ROUTER: my-second-router
    ...
    
  2. 描述相应 VLAN 连接以查看关于它的详细信息。

    gcloud compute interconnects attachments describe NAME
    

    NAME 替换为您的 VLAN 连接名称。

    对于 IPv4 VLAN 连接,输出类似于以下内容:

    adminEnabled: false
    edgeAvailabilityDomain: AVAILABILITY_DOMAIN_1
    bandwidth: BPS_1G
    cloudRouterIpAddress: 169.254.67.201/29
    creationTimestamp: '2017-12-01T08:29:09.886-08:00'
    customerRouterIpAddress: 169.254.67.202/29
    id: '7976913826166357434'
    kind: compute#interconnectAttachment
    labelFingerprint: 42WmSpB8rSM=
    name: NAME
    pairingKey: 7e51371e-72a3-40b5-b844-2e3efefaee59/us-central1/2
    partnerMetadata:
      interconnectName: New York (2)
      partnerName: My Service Provider Inc
      portalUrl: https://service-provider-portal.com
    region: https://www.googleapis.com/compute/v1/projects/customer-project/regions/us-central1
    router: https://www.googleapis.com/compute/v1/projects/customer-project/regions/us-central1/routers/my-router
    selfLink: https://www.googleapis.com/compute/v1/projects/customer-project/regions/us-central1/interconnectAttachments/NAME
    stackType: IPV4_ONLY
    state: PENDING_CUSTOMER
    type: PARTNER
    vlanTag8021q: 1000
    

    对于双栈 IPv4 和 IPv6 VLAN 连接,输出类似于以下内容:

    adminEnabled: true
    edgeAvailabilityDomain: AVAILABILITY_DOMAIN_1
    bandwidth: BPS_1G
    cloudRouterIpAddress: 169.254.67.201/29
    cloudRouterIpv6Address: 2600:2d00:0:1::1/125
    creationTimestamp: '2017-12-01T08:31:11.580-08:00'
    customerRouterIpAddress: 169.254.67.202/29
    customerRouterIpv6Address: 2600:2d00:0:1::2/125
    description: Interconnect for Customer 1
    id: '7193021941765913888'
    interconnect: https://www.googleapis.com/compute/alpha/projects/partner-project/global/interconnects/lga-2
    kind: compute#interconnectAttachment
    labelFingerprint: 42WmSpB8rSM=
    name: partner-attachment
    partnerMetadata:
      interconnectName: New York (2)
      partnerName: Partner Inc
      portalUrl: https://partner-portal.com
    region: https://www.googleapis.com/compute/alpha/projects/partner-project/regions/us-central1
    selfLink: https://www.googleapis.com/compute/alpha/projects/partner-project/regions/us-central1/interconnectAttachments/customer-attachment
    stackType: IPV4_IPV6
    state: ACTIVE
    type: PARTNER
    vlanTag8021q: 1000
    

检查连接的 Dataplane 版本

创建 VLAN 连接后,您可以查看连接的 Dataplane 版本。

您只能使用 Google Cloud CLI 和 Compute Engine API 检查 VLAN 连接的 Dataplane 版本。连接的 Dataplane 版本不会出现在 Google Cloud Console 中。

在启用双向转发检测 (BFD) 等特定功能之前,您可能需要验证连接是否正在使用 Dataplane v2

gcloud

如需检查连接的 Dataplane 版本,请运行以下命令:

gcloud compute interconnects attachments describe ATTACHMENT_NAME

ATTACHMENT_NAME 替换为您所检查的连接的名称。

在输出中,查找值为 2dataplaneVersion 字段。

如果输出中未显示 dataplaneVersion 字段,则说明 VLAN 连接使用的是版本 1。

以下示例输出显示了使用 Dataplane v2 的 VLAN 连接。

    adminEnabled: false
    edgeAvailabilityDomain: AVAILABILITY_DOMAIN_1
    bandwidth: BPS_1G
    cloudRouterIpAddress: 169.254.67.201/29
    creationTimestamp: '2017-12-01T08:29:09.886-08:00'
    customerRouterIpAddress: 169.254.67.202/29
    dataplaneVersion: 2
    id: '7976913826166357434'
    kind: compute#interconnectAttachment
    labelFingerprint: 42WmSpB8rSM=
    name: my-attachment
    pairingKey: 7e51371e-72a3-40b5-b844-2e3efefaee59/us-central1/2
    partnerMetadata:
      interconnectName: New York (2)
      partnerName: My Service Provider Inc
      portalUrl: https://service-provider-portal.com
    region: https://www.googleapis.com/compute/v1/projects/customer-project/regions/us-central1
    router: https://www.googleapis.com/compute/v1/projects/customer-project/regions/us-central1/routers/my-router
    selfLink: https://www.googleapis.com/compute/v1/projects/customer-project/regions/us-central1/interconnectAttachments/ATTACHMENT_NAME
    state: PENDING_CUSTOMER
    type: PARTNER
    vlanTag8021q: 1000
    

API

使用 interconnectAttachments.get 方法获取 dataplaneVersion 字段的值。

GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/interconnectAttachments/ATTACHMENT_NAME

请替换以下内容:

  • PROJECT_ID:包含 VLAN 连接的项目
  • REGION:VLAN 连接所在区域
  • ATTACHMENT_NAME:VLAN 连接的名称

在输出中,查找值为 2 的 dataplaneVersion 字段。

如果输出中未显示 dataplaneVersion 字段,则说明 VLAN 连接使用的是版本 1。

后续步骤