Resolving label-IPv6 BGP routes to segment routing policy tunnels

About this task

For a label-unicast IPv6 BGP route to be resolved by an SR policy:

Note: Contrary to section 8.8.2 of draft-filsfils-segment-routing-05, BGP only resolves a route with multiple color-extended communities to an SR policy using the color-extended community with the highest value.

For example, if under these conditions, there is a label-IPv6 route with a color- extended community (value C) and BGP next-hop address N. The order of resolution is as follows.

Procedure

  1. If there is an interface route that can resolve the BGP next hop, then use the direct route.
  2. If allow-static is configured and there is a static route that can resolve the BGP next hop, then use the static route.
  3. If there is no interface route or static route available or allowed to resolve the BGP next hop and the next hop is IPv6 then:
    1. Look for an SR policy in TTMv6 for which end-point = BGP next-hop address and color = Cn.
      If there is such an SR policy then try to use it to resolve the BGP next hop.
    2. If no SR policy is found in the previous steps and the Cn color-extended community has its CO bits set to '01' or '10' then try to find an SR policy in TTMv6 for which endpoint = null (0::0) and color = Cn.
      If there is such a policy, use it to resolve the BGP next hop.
    3. If no SR policy is found in the previous steps and the Cn color-extended community has its CO bits set to '01' or '10' then try to find an SR policy in TTMv4 for which endpoint = null (0.0.0.0) and color = Cn.
      If there is such a policy, use it to resolve the BGP next hop.
  4. If there is no interface route or static route that is available or allowed to resolve the BGP next hop and the next hop is IPv4-mapped-IPv6 then:
    1. Look for an SR policy in TTMv4 for which end-point = BGP next-hop address and color = Cn.
      If there is such an SR policy then try to use it to resolve the BGP next hop.
    2. If no SR policy is found in the previous steps and the Cn color-extended community has its CO bits set to '01' or '10' then try to find an SR policy in TTMv4 for which endpoint = null (0.0.0.0) and color = Cn.
      If there is such a policy, use it to resolve the BGP next hop.
    3. If no SR policy is found in the previous steps and the Cn color-extended community has its CO bits set to '01' or '10' then try to find an SR policy in TTMv6 for which endpoint = null (0::0) and color = Cn.
      If there is such a policy, use it to resolve the BGP next hop.
  5. If no SR policy is found in the previous steps but there is a non-SR-policy tunnel in TTMv6 (next hop is IPv6) or in TTMv4 (next hop is IPv4-mapped-IPv6) that is allowed by the resolution options and for which endpoint = BGP next-hop address (and for which the admin-tag meets the admin-tag-policy requirements applied to the BGP route, if applicable) then use this tunnel to resolve the BGP next hop if it has the highest TTM preference.