2. BGP CAR SAFI
2.1 Data Model (数据模型)
BGP CAR 数据模型包括:
- Type-1 key: IP prefix 和 color
(E, C), 用 color 区分同一 prefix 的不同 intent-aware route. - Type-2 key: IP prefix
(E), 通过为 intent 分配唯一 prefix 来区分 route. - Non-key encapsulation data: 与 NLRI 关联的 MPLS label stack, SR-MPLS label index 或 SRv6 SID list, 使用 TLV 表示.
- BGP next hop: 与 NLRI key 关联的 next hop address.
- AIGP metric: 在多个 BGP hop 间累积 color/intent-specific metric.
- LCM-EC: Local Color Mapping Extended Community, 用于跨 color domain 传递本地 color mapping.
- Color-EC: BGP Color Extended Community, 用于 automated route resolution.
2.2 Extensible Encoding (可扩展编码)
BGP CAR 通过 NLRI Type field, Key Length field, TLV-based non-key field 和 AIGP TLV 提供扩展性. Type-1 (E, C) 和 Type-2 (E) 之外的 NLRI type 不在本文档范围内.
2.3 Route Origination and Validation (路由发起和验证)
BGP CAR route 可本地发起, 也可从 SR Policy, IGP Flexible Algorithm, RSVP-TE 或 BGP-LU 等其他 color-aware path 重分发得到.
BGP CAR path (E, C) via next hop N 和 encapsulation T 在存在 color-aware path (N, C) 且 data plane 支持 T 时有效. Local policy 可以放宽 color constraint, 替换 encapsulation, 或加入 performance measurement validation. Invalid path MUST NOT 参与 BGP best path selection.
2.5 Route Resolution (路由解析)
默认情况下, BGP color-aware route (E2, C1) via N 解析到 color-aware route (N, C1). 当多个 producer 可用时, 默认偏好为 IGP Flexible Algorithm, SR Policy, BGP CAR.
Local policy 可把 C1 映射到 C2, 或回退到 color-unaware mechanism. 如果 route 中存在 Color-EC, 它优先于 route intent color. Route intent color 优先取 LCM-EC, 否则取 NLRI color.
2.6 AIGP Metric (AIGP 度量)
AIGP metric 随 BGP CAR route 传播而更新, 其值应反映对应 intent 的 metric. 例如 low-latency color 可使用 latency metric. 当 route 跨越 intent path discontinuity 时, 可按 policy 增加 penalty.
2.7 Multipath (多路径)
(E, C) route 天然支持每个 BGP hop 上的 redundant path, 类似 BGP-IP 和 BGP-LU. BGP ADD-PATH SHOULD 用于通过 Transport RR 通告多个 next hop.
2.8 Different Color Domains (不同 Color Domain)
当 BGP CAR route 跨越 color-to-intent mapping 不同的 domain 时, LCM-EC 用于传递和重映射本地 color. Domain boundary 上的 routing policy 控制 route 的接受, 通告和 color remapping.
2.9 Format and Encoding (格式和编码)
BGP CAR 使用 BGP Multiprotocol Extensions, 通过 MP_REACH_NLRI 和 MP_UNREACH_NLRI 在 SAFI 83 中携带 update. NLRI 包含 NLRI Length, Key Length, NLRI Type, type-specific key field 和 optional non-key TLV field. Non-key TLV 包括 Label TLV, Label-Index TLV 和 SRv6 SID TLV.
2.10 Error Handling (错误处理)
BGP CAR NLRI error handling 遵循 treat-as-withdraw. Key Length field 使错误处理更稳健, 便于 speaker 跳过或撤回无法解析的 NLRI.