Cloud Router에서 경계 게이트웨이 프로토콜(BGP) 세션을 구성할 때 기본 공지 우선순위를 지정할 수 있습니다. 시작하기 전에 Cloud Router 공지된 경로 개요를 숙지하세요.
Cloud Router에서 기본 공지 우선순위를 사용하는 방법에 관한 자세한 내용은 공지된 우선순위를 참고하세요.
기본 우선순위는 0부터 65535까지의 정수입니다. 가능한 가장 높은 기본 우선순위는 0입니다. 기본 우선순위 기본값은 100입니다. 기본 우선순위를 지정하지 않으면 우선순위 기본값이 사용됩니다.
기본 우선순위를 사용하면 온프레미스 시스템이 VPC 네트워크로 패킷을 보내는 데 사용할 Cloud VPN 터널 또는 Cloud Interconnect VLAN 연결을 지정할 수 있습니다. 기본 우선순위를 사용하여 활성-활성, 활성-수동, 또는 이러한 토폴로지의 커스텀 조합을 만들고 패킷이 VPC 네트워크로 전송되는 방식에 영향을 줄 수 있습니다.
HA VPN 터널을 사용하는 예시는 Cloud VPN 문서에서 HA VPN의 활성-활성 및 활성-수동 라우팅 옵션을 참조하세요.
기본 우선순위를 선택할 때는 다음 사항에 유의하세요.
리전 간 비용은 201 이상 9999 이하입니다. 이 값은 두 리전 간의 거리, 지연 시간 및 기타 요소에 따라 다릅니다.
Google에서 리전 간 비용 값을 생성하므로 사용자는 이를 수정할 수 없습니다.
리전 내 Cloud Router 간의 기본 우선순위는 0에서 200 사이로 설정하는 것이 좋습니다. 리전 간 비용은 최소 201 이상이어야 하므로 기본 우선순위를 201 이상으로 사용하는 경우에는 Cloud VPN 터널 또는 VLAN 연결에 의도했던 것 보다 낮은 우선순위를 잘못 할당할 수 있습니다. 다른 리전의 다른 BGP 세션에서는 종합적으로 더 높은 우선순위(MED, 기본 우선순위 + 리전 간 비용)를 갖는 동일한 프리픽스를 공지할 수도 있습니다. 다른 리전에서 기본 우선순위를 신중하게 설정하지 않으면 예기치 않은 Cloud VPN 터널 또는 VLAN 연결로 인해 온프레미스 트래픽이 VPC 네트워크로 전달될 수 있습니다.
10200 이상의 기본 우선순위는 프리픽스의 전체 공지 우선순위(MED, 기본 우선순위 + 리전 간 비용)가 기본 우선순위가 200 이하인 다른 공지된 프리픽스보다 항상 낮다는 것을 보장하는 데 도움이 됩니다.
기존 BGP 세션의 기본 공지 경로 우선순위를 업데이트하려면 다음 단계를 수행합니다.
콘솔
HA VPN 터널을 비롯한 동적 라우팅을 사용하는 Cloud VPN 터널의 경우 다음 단계를 완료하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-05(UTC)"],[],[],null,["# Update the base route priority\n==============================\n\nWhen you configure a Border Gateway Protocol (BGP) session on a\nCloud Router, you can specify a base advertised priority. Before you\nbegin, ensure that you are familiar with the Cloud Router [Advertised\nroutes overview](/network-connectivity/docs/router/concepts/advertised-routes).\nFor more information about how Cloud Router uses the base advertised\npriority, see [Advertised\npriority](/network-connectivity/docs/router/concepts/advertised-routes#advertised-priority).\n\nBase priorities are whole numbers from `0` to `65535`. The highest possible base\npriority is `0`. The default base priority is `100`. If you don't specify a base\npriority, the default priority is used.\n\nBase priorities let you specify which Cloud VPN tunnels or\nCloud Interconnect VLAN attachments on-premises systems to use to send\npackets to your VPC network. You can create active-active,\nactive-passive, or a custom combination of these topologies by using the base\npriority to influence how packets are sent to your VPC network.\nFor an example using HA VPN tunnels, see [Active-active\nand active-passive routing options for\nHA VPN](/network-connectivity/docs/vpn/concepts/overview#active)\nin the Cloud VPN documentation.\n\nWhen choosing base priorities, keep the following in mind:\n\n- Region-to-region costs are between `201` and `9999`, inclusive. The value\n depends on the distance, latency, and other factors between two regions.\n Google generates the region-to-region cost values, and you can't modify\n them.\n\n- Base priorities among Cloud Routers in a region are recommended to\n be between `0` and `200`, inclusive. Because region-to-region costs are at\n least `201`, if you use base priorities of `201` or more, you might\n accidentally assign a Cloud VPN tunnel or VLAN attachment a lower\n priority than you intend. Another BGP session in a different region might\n advertise the same prefix with an overall higher priority (MED, which equals\n base priority plus region-to-region cost). Without carefully setting base\n priorities in other regions, you might cause on-premises traffic to be\n delivered to your VPC network by way of an unexpected\n Cloud VPN tunnel or VLAN attachment.\n\n- Base priorities of `10200` or more help ensure that a prefix's overall\n advertised priority (MED, base priority plus region-to-region cost) is\n always lower than any other advertised prefix with a base priority of `200`\n or less.\n\nTo update the base advertised route priority for an existing BGP session,\nfollow these steps. \n\n### Console\n\nFor Cloud VPN tunnels that use dynamic routing, including\nHA VPN tunnels, complete the following steps:\n\n1. In the Google Cloud console, go to the **Cloud VPN** tunnels page.\n\n [Go to Cloud VPN tunnels](https://console.cloud.google.com/hybrid/vpn/list?&tab=tunnels)\n2. From the list of tunnels in the **Name** column, select the\n tunnel that you want to modify.\n\n3. On the **Cloud VPN tunnel details** page, select\n **Modify BGP session**.\n\n4. Modify the **Advertised route priority** value.\n\n5. Click **Save and continue**.\n\nFor Dedicated Interconnect or Partner Interconnect,\ncomplete the following steps:\n\n1. In the Google Cloud console, go to the **VLAN attachments** tab on the\n **Cloud Interconnect** page.\n\n [Go to Cloud Interconnect](https://console.cloud.google.com/hybrid/interconnects/list?&tab=attachments)\n2. From the list of attachments in the **Name** column, select the\n attachment that you want to modify.\n\n3. On the **VLAN attachment details** page, select the name of the\n **BGP session**.\n\n4. Modify the **Advertised route priority** value.\n\n5. Click **Save and continue**.\n\n### gcloud\n\nRun the `update-bgp-peer` command using the\n`--advertised-route-priority` flag. Specify the name of the\nCloud Router and BGP session that correspond to the appropriate\nCloud VPN tunnel or VLAN attachment. \n\n```\ngcloud compute routers update-bgp-peer ROUTER_NAME \\\n --peer-name=NAME_OF_BGP_SESSION \\\n --advertised-route-priority=BASE_PRIORITY_VALUE\n```\n\n### API\n\nUse the\n[`routers.patch`](/compute/docs/reference/rest/v1/routers/patch)\nmethod to update the `bgpPeers[]` field.\n\nThe `bgpPeers[]` field accepts an array of BGP peers. When you `PATCH` this\nfield, you overwrite the existing array of BGP peers with the new array\nincluded in your request.\n\n1. Send a `GET` request to get the current array of BGP peers for the router.\n For details, see\n [View BGP session configuration](/network-connectivity/docs/router/how-to/viewing-router-details#bgp-configuration).\n\n2. Send a `PATCH` request with a new array of BGP peers.\n In the array element that contains the BGP session that you want to update,\n modify the value of `advertisedRoutePriority`.\n\n ```\n PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/routers/ROUTER_NAME\n {\n \"bgpPeers\": [\n BGP_PEERS\n ]\n }\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project that contains the Cloud Router\n - \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region where the Cloud Router is located\n - \u003cvar translate=\"no\"\u003eROUTER_NAME\u003c/var\u003e: the name of the Cloud Router\n - \u003cvar translate=\"no\"\u003eBGP_PEERS\u003c/var\u003e: the contents of the new array of BGP peers\n\n The following example includes one BGP peer with the default\n `advertisedRoutePriority` of `100` and another with an updated value\n of `99`: \n\n ```\n {\n \"name\": \"peer-1\",\n \"interfaceName\": \"if-peer-1\",\n \"ipAddress\": \"169.254.10.1\",\n \"peerIpAddress\": \"169.254.10.2\",\n \"peerAsn\": 64512,\n \"advertisedRoutePriority\": 100,\n \"advertiseMode\": \"DEFAULT\"\n },\n {\n \"name\": \"peer-2\",\n \"interfaceName\": \"if-peer-2\",\n \"ipAddress\": \"169.254.20.1\",\n \"peerIpAddress\": \"169.254.20.2\",\n \"peerAsn\": 64513,\n \"advertisedRoutePriority\": 99,\n \"advertiseMode\": \"DEFAULT\"\n }\n ```\n\nWhat's next?\n------------\n\n- To view the base advertised route priority, see\n [View Cloud Router details](/network-connectivity/docs/router/how-to/viewing-router-details).\n\n- To troubleshoot issues when using Cloud Router, see\n [Troubleshooting](/network-connectivity/docs/router/resources/troubleshooting)."]]