이 페이지에서는 Cloud Router를 위한 Common Expression Language(CEL)를 사용하는 BGP 경로 정책 예시를 보여줍니다.
BGP 경로 정책은 순서가 지정된 규칙 목록으로 정의됩니다. 각 규칙은 지정한 순서로 평가되며 경로가 해당 규칙과 일치하기 위한 조건과 그 조건을 만족할 때 수행되는 작업을 둘 다 포함합니다. 특정 BGP 경로 정책은 학습된 경로의 인바운드 또는 공지된 경로의 아웃바운드와 같은 한 방향으로만 적용할 수 있으며, 두 방향으로 동시에 적용할 수 없습니다. 하지만 BGP 경로 정책은 Cloud Router의 여러 BGP 피어에 적용될 수 있습니다.
일치 속성
다음 표에서는 BGP 경로 정책에 사용할 수 있는 일치 속성을 설명합니다.
속성
설명
communities
BGP 경로에 기여한 커뮤니티 목록
destination
BGP 경로의 IP 범위
일치 작업
다음 표에서는 BGP 경로 정책에 사용할 수 있는 일치 작업을 설명합니다.
작업
설명
communities.matchesEvery('65001:1234')
커뮤니티가 '65001:1234' 목록의 상위 집합인 경우 true를 반환합니다.
community_value는 16비트 섹션 2개로 분할된 32비트 필드입니다. 일반적으로 값의 첫 16비트는 커뮤니티가 시작되는 네트워크 자율 시스템(AS) 번호를 인코딩하지만 Cloud Router는 이 규칙을 적용하지 않습니다. 값의 두 번째 16비트는 발신 AS에서 할당한 고유한 번호를 인코딩합니다.
[[["이해하기 쉬움","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,["# BGP route policy attribute reference\n====================================\n\nThis page shows example BGP route policies, using the Common Expression\nLanguage (CEL) for Cloud Router.\n\nBGP route policies are defined as an ordered list of terms. Each term is\nevaluated in the order that you specify, and include both a condition and a\ncorresponding action for when a route matches that term. A particular BGP route\npolicy can be applied only in one direction, either inbound for learned routes,\nor outbound for advertised routes, but not both simultaneously. However, BGP\nroute policies can be applied to multiple BGP peers on Cloud Router.\n\nMatch attributes\n----------------\n\nThe following table describes match attributes available for BGP route policies:\n\nMatch operations\n----------------\n\nThe following table describes match operations available for BGP route policies:\n\nDue to the rules for `||` (OR) operations, all conditions are\neffectively zero or more `destination` match operations\nconnected by OR.\n\n`(D0 || D1 || ... || Dm)`\n\nThe following table is an example of using `prefix` to build complex regular\nexpressions compared to some router vendors:\n\n### Match all routes\n\nThe following table describes examples that match all routes in a BGP route\npolicy's match expression:\n\nAction attributes\n-----------------\n\nThe following table describes action attributes available for BGP route\npolicies:\n\nAction operations\n-----------------\n\nThe following table describes action operations available for BGP route\npolicies:"]]