The MTU of an SR tunnel populated into TTM is determined as in the case of an IGP tunnel; for example, LDP LSP is based on the outgoing interface MTU minus the label stack size. Segment routing, however, supports remote LFA and TI-LFA which can program an LFA repair tunnel by adding one or more labels.
Based on the above, the user is provided with a CLI to configure the MTU of all SR tunnels within each IGP instance:
config>router>isis>segment-routing>tunnel-mtu bytes bytes
config>router>ospf>segment-routing>tunnel-mtu bytes bytes
There is no default value for this new command. If the user does not configure an SR tunnel MTU, the MTU is fully determined by IGP as explained below.
The MTU of the SR tunnel, in bytes, is then determined as follows:
SR_Tunnel_MTU = MIN {Cfg_SR_MTU, IGP_Tunnel_MTU- (1+ frr-overhead)*4}
Where:
Cfg_SR_MTU is the MTU configured by the user for all SR tunnels within a given IGP instance using the above CLI. If no value was configured by the user, the SR tunnel MTU is fully determined by the IGP interface calculation explained next.
IGP_Tunnel_MTU is the minimum of the IS-IS or OSPF interface MTU among all the ECMP paths or among the primary and LFA backup paths of this SR tunnel.
frr-overhead is set the following parameters:
value of ti-lifa [max-sr-frr-labels labels] if loopfree-alternates and ti-lfa are enables in this IGP instance
1 if loopfree-alternates and remote-lfa are enabled but ti-lfa is disabled in this IGP instance
Otherwise, it is set to 0
The SR tunnel MTU is dynamically updated anytime any of the above parameters used in its calculation changes. This includes when the set of the tunnel next-hops changes or the user changes the configured SR MTU or interface MTU value.