跳到主要内容

4. SR Endpoint Behaviors (SR 端点行为)

4. SR Endpoint Behaviors (SR 端点行为)

以下是一组可以与 SID 关联的众所周知的行为。

BehaviorDescription
EndEndpoint (端点)

Prefix-SID [RFC8402] 的 SRv6 实例化
End.XEndpoint with L3 cross-connect (具有 L3 交叉连接的端点)

Adj-SID [RFC8402] 的 SRv6 实例化
End.TEndpoint with specific IPv6 table lookup (具有特定 IPv6 表查找的端点)
End.DX6Endpoint with decapsulation and IPv6 cross-connect (具有解封装和 IPv6 交叉连接的端点)

例如, IPv6-L3VPN (等同于 per-CE VPN 标签)
End.DX4Endpoint with decapsulation and IPv4 cross-connect (具有解封装和 IPv4 交叉连接的端点)

例如, IPv4-L3VPN (等同于 per-CE VPN 标签)
End.DT6Endpoint with decapsulation and specific IPv6 table lookup (具有解封装和特定 IPv6 表查找的端点)

例如, IPv6-L3VPN (等同于 per-VRF VPN 标签)
End.DT4Endpoint with decapsulation and specific IPv4 table lookup (具有解封装和特定 IPv4 表查找的端点)

例如, IPv4-L3VPN (等同于 per-VRF VPN 标签)
End.DT46Endpoint with decapsulation and specific IP table lookup (具有解封装和特定 IP 表查找的端点)

例如, IP-L3VPN (等同于 per-VRF VPN 标签)
End.DX2Endpoint with decapsulation and L2 cross-connect (具有解封装和 L2 交叉连接的端点)

例如, L2VPN 用例
End.DX2VEndpoint with decapsulation and VLAN L2 table lookup (具有解封装和 VLAN L2 表查找的端点)

例如, EVPN 灵活交叉连接用例
End.DT2UEndpoint with decapsulation and unicast MAC L2 table lookup (具有解封装和单播 MAC L2 表查找的端点)

例如, EVPN 桥接单播用例
End.DT2MEndpoint with decapsulation and L2 table flooding (具有解封装和 L2 表泛洪的端点)

例如, EVPN 桥接广播、未知单播和组播 (BUM) 用例, 带有以太网段标识符 (ESI) 过滤
End.B6.EncapsEndpoint bound to an SRv6 Policy with encapsulation (绑定到具有封装的 SRv6 策略的端点)

Binding SID 的 SRv6 实例化
End.B6.Encaps.RedEnd.B6.Encaps with reduced SRH (具有简化 SRH 的 End.B6.Encaps)

Binding SID 的 SRv6 实例化
End.BMEndpoint bound to an SR-MPLS Policy (绑定到 SR-MPLS 策略的端点)

SR-MPLS Binding SID 的 SRv6 实例化

表 1: 端点行为

该列表并不详尽。在实践中, 任何行为都可以附加到本地 SID; 例如, 节点 N 可以将 SID 绑定到本地虚拟机 (VM) 或容器, 这些虚拟机或容器可以对数据包应用任何复杂的处理, 前提是为该处理分配了 SRv6 Endpoint Behavior 码点。

当支持 SRv6 的节点 (N) 接收到目标地址与代表本地实例化的 SRv6 SID (S) 的 FIB 条目匹配的 IPv6 数据包时, IPv6 报头链按照 [RFC8200] 第 4 节中定义的方式进行处理。对于与本文档中定义的 Endpoint 行为关联的 SRv6 SID, SRH 和上层报头按照以下小节中定义的方式进行处理。

描述这些行为的伪代码详细说明了节点上的本地处理。只要外部可观察的线路协议如伪代码所描述的那样, 伪代码的实现就是合规的。

第 4.16 节定义了其中一些行为的变体。

本文档的第 10.2 节定义了用于维护所有这些行为以及在其他文档中定义的未来行为的 IANA 注册表。

4.1. End: Endpoint (端点)

Endpoint 行为 (简称 "End") 是最基本的行为。它是 Prefix-SID [RFC8402] 的实例化。

当 N 接收到 IPv6 DA 为 S 且 S 是本地 End SID 的数据包时, N 执行以下操作:

S01. When an SRH is processed {
S02. If (Segments Left == 0) {
S03. Stop processing the SRH, and proceed to process the next
header in the packet, whose type is identified by
the Next Header field in the routing header.
S04. }
S05. If (IPv6 Hop Limit <= 1) {
S06. Send an ICMP Time Exceeded message to the Source Address
with Code 0 (Hop limit exceeded in transit),
interrupt packet processing, and discard the packet.
S07. }
S08. max_LE = (Hdr Ext Len / 2) - 1
S09. If ((Last Entry > max_LE) or (Segments Left > Last Entry+1)) {
S10. Send an ICMP Parameter Problem to the Source Address
with Code 0 (Erroneous header field encountered)
and Pointer set to the Segments Left field,
interrupt packet processing, and discard the packet.
S11. }
S12. Decrement IPv6 Hop Limit by 1
S13. Decrement Segments Left by 1
S14. Update IPv6 DA with Segment List[Segments Left]
S15. Submit the packet to the egress IPv6 FIB lookup for
transmission to the new destination
S16. }

注意:

End 行为在与数据包关联的同一 FIB 表 (即由 VRF 或 L3 中继 ID 标识) 上运行。因此, S15 行上的 FIB 查找在与入口接口相同的 FIB 表中完成。

4.1.1. Upper-Layer Header (上层报头)

在处理与本地实例化为 End SID 的 FIB 条目匹配的数据包的上层报头时, N 执行以下操作:

S01. If (Upper-Layer header type is allowed by local configuration) {
S02. Proceed to process the Upper-Layer header
S03. } Else {
S04. Send an ICMP Parameter Problem to the Source Address
with Code 4 (SR Upper-layer Header Error)
and Pointer set to the offset of the Upper-Layer header,
interrupt packet processing, and discard the packet.
S05 }

允许处理特定上层报头类型对于操作、管理和维护 (OAM) 很有用。例如, 运营商可能允许 ping SID。为此, 他们可以启用本地配置以允许上层报头类型 58 (ICMPv6)。

建议本地配置的实现仅允许不会导致数据包被转发的类型的上层报头处理 (例如 ICMPv6)。