SR-TE Autoroute Include
Load isis.sr.vpnv4.and.te.enabled.cfg
Configure an SR-TE policy on R2 with a R5 as the destination using a basic dynamic path. Use autoroute to install routes to only 5.5.5.1/32 and 9.9.9.1/32 via this policy. Ensure that MPLS-to-MPLS LFIB entries use this policy too.
Answer
Explanation
SR-TE allows for the familiar “autoroute” feature we have in RSVP-TE. The router will automatically include the SR-TE policy as a link in the IGP graph. The SR-TE policy appears to inherit the underlying cost to the destination as the IGP metric. To use this feature, we simply use autoroute include under the policy.
We are given more granularity than RSVP-TE by specifying which destination prefixes can be included for autoroute. We can use include all or we can include individual prefixes. If we were to use include all, we would see several destinations as being reachable via the SR-TE policy.
Instead we can specify only specific prefixes:
By default, the router will not install Label-to-Label mappings in the FIB using the SR-TE policy, even though it is used for IP-to-Label mappings. For example, notice that the prefix SID for R5 is still steered along the basic IGP path.
The reason for this is that the SR-TE policy is using non-strict SPF prefix SIDs (algo 0). Because SR-TE policy are not circuit based like RSVP-TE, there might be risk of looping if we steer an MPLS-to-MPLS path into an SR-TE policy which itself allows other routers downstream to steer the traffic into their own SR-TE policy.
There are two ways to fix this. One is that we can use algo 1 for the SR-TE policy. The router will now know that all routers downstream must forward using the strict IGP path, and cannot deviate into an SR-TE policy of their own.
R2 automatically prefers the strict SPF prefix SID that R5 is now advertising:
Because no algo 0 SIDs are used in the SR-TE policy, the policy should now be used for MPLS-to-MPLS label entries, however this is not the case. Perhaps this is a bug with XRv.
We will revert the last change, removing the algo 1 prefix SID from R5.
R2 now uses the algo 0 prefix SID for the SR-TE policy again:
The other option to install MPLS-to-MPLS forwarding entries is to simply tell the router you want to force this behavior.
The label swap entry is now programmed into the LFIB:
However, this is actually causing the SR-TE policy to flap. Similar to the classic GRE route recursion problem, the prefix SID 16005, which is used by the SR-TE policy, points out the SR-TE policy itself.
Also note that AS overrides an autoroute entry. So BGP colored routes will use AS if a matching policy is found, not the SR-TE policy used with autoroute include. This makes sense, as AS uses an SR-TE policy’s BSID for recursion, not the RIB.
Also, you can instead use a static route with the SR-TE policy as a nexthop. You must specify the full name of the policy:
In summary, using autoroute include or static routes is highly discouraged. The intent is for you to color BGP service routes and use AS/ODN. Using autoroute include means that all BGP routes that don’t contain a color will recurse to the SR-TE policy based on the route to the nexthop in the RIB. You aren’t forwarding traffic based on service SLAs in this case.
Last updated