Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan cara membuat Cloud Router dan lampiran VLAN serta menghubungkannya ke NCC Gateway.
Membuat Cloud Router
Sebelum Anda membuat dan menghubungkan Cloud Router, perhatikan pertimbangan
berikut:
Cloud Router harus dikaitkan dengan Gateway NCC
di region yang sama.
Maksimal satu layanan dapat dilampirkan ke Gateway NCC dalam satu waktu
Hanya lampiran VLAN yang sesi BGP-nya dikelola oleh
Cloud Router yang terkait dengan Gateway NCC
yang merupakan bagian dari spoke Gateway NCC.
Untuk mengetahui informasi mendetail tentang Cloud Router, lihat
Ringkasan Cloud Router.
Izin yang diperlukan untuk langkah ini
Untuk melakukan tugas ini, Anda harus telah diberi izin berikut
atau peran IAM berikut.
Izin
compute.routers.create untuk mengonfigurasi Cloud Router
networkconnectivity.spokes.use pada resource
NCC Gateway
Ikuti langkah-langkah berikut untuk membuat Cloud Router:
gcloud
Gunakan
perintah gcloud compute routers create. Untuk menentukan
pemberitahuan rute kustom tingkat router, tetapkan flag --advertisement-mode=CUSTOM
ke CUSTOM. Untuk mengetahui informasi tentang efek mode pemberitahuan tingkat router pada pemberitahuan sesi BGP individual, lihat Pemberitahuan efektif.
PROJECT_ID: project ID untuk project yang berisi
Cloud Router
NCC_GATEWAY_URI: URI lengkap NCC Gateway
yang terkait dengan router. Format URI mengikuti pola ini:
https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/spokes/GATEWAY_SPOKE_NAME
REGION: region yang berisi Cloud Router
ASN_NUMBER: ASN pribadi (64512-65534,
4200000000-4294967294) yang belum Anda gunakan di jaringan
lokal
Cloud Router mengharuskan Anda menggunakan ASN pribadi, tetapi ASN lokal Anda dapat bersifat publik atau pribadi.
CUSTOM_ADVERTISED_RANGES: daftar rentang alamat IP kustom dalam format CIDR atau alamat IP individual yang akan disertakan dalam pengumuman tingkat router
Alamat IPv4 individual ditafsirkan sebagai CIDR dengan /32 subnet mask,
dan alamat IPv6 individual ditafsirkan sebagai CIDR dengan /128 subnet mask. Untuk mengetahui informasi tentang jumlah maksimum pemberitahuan rute kustom,
lihat Batas.
ROUTER_IDENTIFIER_RANGE: rentang alamat IPv4 opsional yang
berfungsi sebagai ID unik untuk Cloud Router
KEEPALIVE_TIMER: waktu opsional, dalam detik, yang menentukan
timer keepalive BGP.
Nilai yang valid adalah antara 20 dan 60, inklusif. Jika Anda menghilangkan tanda
--keepalive-interval, Cloud Router akan menggunakan timer aktif BGP 20 detik. Untuk mengetahui informasi selengkapnya, lihat Timer
keepalive.
API
Gunakan metode compute.router.insert
dengan NCC Gateway yang ditentukan dalam payload. Untuk menentukan
pemberitahuan rute kustom tingkat router, tetapkan flag bgp.advertiseMode
ke CUSTOM. Untuk mengetahui informasi tentang efek mode pemberitahuan tingkat router pada pemberitahuan sesi BGP individual, lihat Pemberitahuan efektif.
PROJECT_ID: project ID untuk project yang berisi
Cloud Router
REGION: region yang berisi Cloud Router
ROUTER_NAME: nama Cloud Router
NCC_GATEWAY_URI: URI lengkap NCC Gateway
yang terkait dengan router. Format URI mengikuti pola ini:
https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/spokes/GATEWAY_SPOKE_NAME
ASN_NUMBER: ASN pribadi (64512-65534,
4200000000-4294967294) yang belum Anda gunakan di jaringan
lokal
Cloud Router mengharuskan Anda menggunakan ASN pribadi, tetapi ASN lokal Anda dapat bersifat publik atau pribadi.
CUSTOM_ADVERTISED_RANGE dan
CUSTOM_ADVERTISED_RANGE_DESCRIPTION: kunci dalam kamus
yang menentukan pemberitahuan rute kustom tingkat router
Daftar bgp.advertisedIpRanges berisi setiap kamus
pemberitahuan rute kustom. Penentuan bgp.advertisedIpRanges memerlukan
bgp.advertiseMode: CUSTOM. Setiap CUSTOM_ADVERTISED_RANGE
adalah rentang alamat IP dalam format CIDR atau alamat IP individual. Alamat IPv4
individu ditafsirkan sebagai CIDR dengan subnet mask /32, dan
alamat IPv6 individu ditafsirkan sebagai CIDR dengan subnet mask /128.
Untuk mengetahui informasi tentang jumlah maksimum pemberitahuan rute kustom, lihat
Batas. Setiap
CUSTOM_ADVERTISED_RANGE_DESCRIPTION adalah string untuk mendeskripsikan
iklan.
ROUTER_IDENTIFIER_RANGE: menentukan rentang alamat IPv4 yang
berfungsi sebagai ID unik untuk Cloud Router
KEEPALIVE_TIMER: waktu opsional, dalam detik, yang menentukan
timer keepalive BGP
Nilai yang valid adalah antara 20 dan 60, inklusif. Jika Anda tidak menyertakan
bgp.keepaliveInterval, Cloud Router akan menggunakan timer keepalive BGP 20 detik. Untuk mengetahui informasi selengkapnya, lihat Timer
keepalive.
Buat lampiran VLAN
Lampiran VLAN untuk Dedicated Interconnect atau Partner Interconnect menyediakan jalur konektivitas antara Gateway NCC dan jaringan lokal.
Traffic lampiran VLAN melewati Gateway NCC sebelum
mencapai layanan partner dan hub.
Untuk mengetahui informasi mendetail tentang cara membuat lampiran VLAN dan menyiapkan
peering BGP dan antarmuka, lihat
Membuat lampiran VLAN.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-12 UTC."],[],[],null,["# Add hybrid connections to NCC Gateway\n\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis page describes how to create a Cloud Router and a VLAN attachment and\nconnect them to NCC Gateway.\n\nCreate a Cloud Router\n---------------------\n\nBefore you create and connect the Cloud Router, keep the following\nconsiderations in mind:\n\n- The Cloud Router must be associated with an NCC Gateway in the same region.\n- At the most, one service can be attached to an NCC Gateway at a time\n- Only the VLAN attachments whose BGP sessions are managed by the Cloud Router that's associated with the NCC Gateway are part of the NCC Gateway spoke.\n\nFor detailed information about Cloud Router, see\n[Cloud Router overview](/network-connectivity/docs/router/concepts/overview).\n\n#### Permissions required for this task\n\nTo perform this task, you must have been granted the following permissions\n*or* the following IAM roles.\n\n**Permissions**\n\n- `compute.routers.create` to configure the Cloud Router\n- `networkconnectivity.spokes.use` on the NCC Gateway resource\n\n\u003cbr /\u003e\n\nFollow these steps to create a Cloud Router: \n\n### gcloud\n\nUse the [`gcloud compute routers create`\ncommand](/sdk/gcloud/reference/compute/routers/create). To specify\nrouter-level custom route advertisements, set the `--advertisement-mode=CUSTOM`\nflag to `CUSTOM`. For information about the effect of the router-level\nadvertisement mode on individual BGP session advertisements, see [Effective\nadvertisements](/network-connectivity/docs/router/concepts/advertised-routes#effective-adv-prefixes). \n\n```\ngcloud compute routers create ROUTER_NAME \\\n --project=PROJECT_ID \\\n --ncc-gateway=NCC_GATEWAY_URI \\\n --region=REGION\\\n --asn=ASN_NUMBER \\\n --advertisement-mode=CUSTOM \\\n --set-advertisement-ranges=CUSTOM_ADVERTISED_RANGES \\\n [--bgp-identifier-range=ROUTER_IDENTIFIER_RANGE] \\\n [--keepalive-interval=KEEPALIVE_TIMER] \\\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eROUTER_NAME\u003c/var\u003e: the name of the Cloud Router\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID for the project that contains the\n Cloud Router\n\n- \u003cvar translate=\"no\"\u003eNCC_GATEWAY_URI\u003c/var\u003e: the full URI of the NCC Gateway\n associated with the router. The format of the URI follows this pattern:\n `https://networkconnectivity.googleapis.com/v1/projects/`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`/locations/`\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e`/spokes/`\u003cvar translate=\"no\"\u003eGATEWAY_SPOKE_NAME\u003c/var\u003e\n\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region that contains the Cloud Router\n\n- \u003cvar translate=\"no\"\u003eASN_NUMBER\u003c/var\u003e: any [private\n ASN](https://tools.ietf.org/html/rfc6996) (`64512`-`65534`,\n `4200000000`-`4294967294`) that you aren't already using in the on-premises\n network\n\n Cloud Router requires you to use a private ASN, but your on-premises\n ASN can be public or private.\n | **Note:** If you are using Cloud Router with Partner Interconnect, you must specify ASN `16550`.\n\n \u003cbr /\u003e\n\n- \u003cvar translate=\"no\"\u003eCUSTOM_ADVERTISED_RANGES\u003c/var\u003e: the list of custom IP address ranges\n in CIDR format or individual IP addresses to be included in the router-level\n advertisements\n\n Individual IPv4 addresses are interpreted as a CIDR with a `/32` subnet mask,\n and individual IPv6 addresses are interpreted as a CIDR with a `/128` subnet\n mask. For information about the maximum number of custom route advertisements,\n see [Limits](/network-connectivity/docs/network-connectivity-center/quotas#ncc-limits).\n- \u003cvar translate=\"no\"\u003eROUTER_IDENTIFIER_RANGE\u003c/var\u003e: an optional IPv4 address range that\n serves as a unique identifier for the Cloud Router\n\n For more information, see [Configure the BGP identifier range for a\n Cloud Router](/network-connectivity/docs/router/how-to/configure-bgp-identifier).\n- \u003cvar translate=\"no\"\u003eKEEPALIVE_TIMER\u003c/var\u003e: an optional time, in seconds, that defines\n the BGP keepalive timer.\n\n Valid values are between `20` and `60`, inclusive. If you omit the\n `--keepalive-interval` flag, Cloud Router uses a 20 second BGP\n keepalive timer. For more information, see [Keepalive\n timer](/network-connectivity/docs/router/how-to/managing-bgp-timers#keepalive_timer).\n\n### API\n\nUse the [`compute.router.insert` method](/compute/docs/reference/rest/v1/routers/insert)\nwith NCC Gateway specified in the payload. To specify\nrouter-level custom route advertisements, set the `bgp.advertiseMode`\nflag to `CUSTOM`. For information about the effect of the router-level\nadvertisement mode on individual BGP session advertisements, see [Effective\nadvertisements](/network-connectivity/docs/router/concepts/advertised-routes#effective-adv-prefixes). \n\n```\nPOST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/routers\n{\n\"name\": \"ROUTER_NAME\",\n\"ncc_gateway\": \"NCC_GATEWAY_URI\",\n\"bgp\": {\n \"asn\": \"ASN_NUMBER\",\n \"advertiseMode\": CUSTOM,\n \"advertisedIpRanges\": [\n {\n \"range\": CUSTOM_ADVERTISED_RANGE,\n \"description\": CUSTOM_ADVERTISED_RANGE_DESCRIPTION\n }, ...\n ],\n \"identifierRange\": ROUTER_IDENTIFIER_RANGE,\n \"keepaliveInterval\": KEEPALIVE_TIMER\n}\n}\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID for the project that contains the Cloud Router\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region that contains the Cloud Router\n- \u003cvar translate=\"no\"\u003eROUTER_NAME\u003c/var\u003e: the name of the Cloud Router\n- \u003cvar translate=\"no\"\u003eNCC_GATEWAY_URI\u003c/var\u003e: the full URI of the NCC Gateway associated with the router. The format of the URI follows this pattern: `https://networkconnectivity.googleapis.com/v1/projects/`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`/locations/`\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e`/spokes/`\u003cvar translate=\"no\"\u003eGATEWAY_SPOKE_NAME\u003c/var\u003e\n- \u003cvar translate=\"no\"\u003eASN_NUMBER\u003c/var\u003e: any [private\n ASN](https://tools.ietf.org/html/rfc6996) (`64512`-`65534`,\n `4200000000`-`4294967294`) that you aren't already using in the on-premises\n network\n\n Cloud Router requires you to use a private ASN, but your on-premises\n ASN can be public or private.\n | **Note:** If you are using Cloud Router with Partner Interconnect, you must specify ASN `16550`.\n\n \u003cbr /\u003e\n\n- \u003cvar translate=\"no\"\u003eCUSTOM_ADVERTISED_RANGE\u003c/var\u003e and\n \u003cvar translate=\"no\"\u003eCUSTOM_ADVERTISED_RANGE_DESCRIPTION\u003c/var\u003e: keys in a dictionary\n that specify a router-level custom route advertisement\n\n The `bgp.advertisedIpRanges` list contains each custom route advertisement\n dictionary. Specifying `bgp.advertisedIpRanges` requires\n `bgp.advertiseMode: CUSTOM`. Each \u003cvar translate=\"no\"\u003eCUSTOM_ADVERTISED_RANGE\u003c/var\u003e\n is an IP address range in CIDR format or an individual IP address. Individual\n IPv4 addresses are interpreted as a CIDR with a `/32` subnet mask, and\n individual IPv6 addresses are interpreted as a CIDR with a `/128` subnet mask.\n For information about the maximum number of custom route advertisements, see\n [Limits](/network-connectivity/docs/network-connectivity-center/quotas#ncc-limits). Each\n \u003cvar translate=\"no\"\u003eCUSTOM_ADVERTISED_RANGE_DESCRIPTION\u003c/var\u003e is a string to describe\n the advertisement.\n- \u003cvar translate=\"no\"\u003eROUTER_IDENTIFIER_RANGE\u003c/var\u003e: defines an IPv4 address range that\n serves as a unique identifier for the Cloud Router\n\n For more information, see [Configure the BGP identifier\n range for a Cloud Router](/network-connectivity/docs/router/how-to/configure-bgp-identifier).\n- \u003cvar translate=\"no\"\u003eKEEPALIVE_TIMER\u003c/var\u003e: an optional time, in seconds, that defines\n the BGP keepalive timer\n\n Valid values are between `20` and `60`, inclusive. If you omit\n `bgp.keepaliveInterval`, Cloud Router uses a 20 second BGP keepalive\n timer. For more information, see [Keepalive\n timer](/network-connectivity/docs/router/how-to/managing-bgp-timers#keepalive_timer).\n\nCreate VLAN attachments\n-----------------------\n\nVLAN attachments for Dedicated Interconnect or\nPartner Interconnect provide the connectivity path between the\nNCC Gateway and an on-premises network.\n\nThe VLAN attachment traffic goes through the NCC Gateway before\nit reaches the partner service and the hub.\n\nFor detailed information about how to create VLAN attachments and set up\ninterface and BGP peering, see\n[Create VLAN attachments](/network-connectivity/docs/interconnect/tutorials/dedicated-creating-9999-availability#create_vlan_attachments)."]]