Configure two TE tunnels from R8 to R2. One must go through R4, and one must go through XR12. Using signalled-bandwidth, configure a 2:1 load share ratio so that R4 receives twice as much traffic.
Do the same for R2 to R8, creating two TE tunnels. One must go through R1, and one must go through R6. Without using signalled-bandwidth, configure a 2:1 load share ratio so that R1 receives twice as much traffic.
Answer
#R8
ip explicit-path name VIA_R4
next-address loose 4.4.4.4
!
ip explicit-path name VIA_XR12
next-address loose 12.12.12.12
!
int tun1
description R2_VIA_R4
tunnel dest 2.2.2.2
ip unn lo0
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng bandwidth 2000
tunnel mpls traffic-eng path-option 1 explicit name VIA_R4
tunnel mpls traffic-eng autoroute announce
!
int tun2
description R2_VIA_XR12
tunnel dest 2.2.2.2
ip unn lo0
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng bandwidth 1000
tunnel mpls traffic-eng path-option 1 explicit name VIA_XR12
tunnel mpls traffic-eng autoroute announce
#R2
ip explicit-path name VIA_R1
next-address loose 1.1.1.1
!
ip explicit-path name VIA_R6
next-address loose 6.6.6.6
!
int tun1
description R8_VIA_R1
tunnel dest 8.8.8.8
ip unn lo0
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng load-share 2
tunnel mpls traffic-eng path-option 1 explicit name VIA_R1
tunnel mpls traffic-eng autoroute announce
!
int tun2
description R8_VIA_R6
tunnel dest 8.8.8.8
ip unn lo0
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng load-share 1
tunnel mpls traffic-eng path-option 1 explicit name VIA_R6
tunnel mpls traffic-eng autoroute announce
Explanation
With TE tunnels you can easily preform UCMP. By default, UCMP will happen using signalled bandwidth. We can see this on R8. TE tun1 has twice as much signalled bandwidth as TE tun2. Both tunnels have autoroute announce configured. Tun1 receives a 2:1 load share:
If you do not want to use signalled BW on the TE tunnels, or you want to override the signalled BW, you can use the load-share option. We can see this on R2.
#R2
int tun1
tunnel mpls traffic-eng load-share 2
!
int tun2
tunnel mpls traffic-eng load-share 1
This should also work on IOS-XR, but on XRv it will give you a commit error if you try to use load-share on a TE tunnel. You can use unequal signaled-bandwidths on XRv, but it will not produce UCMP in the RIB.
Caveats
If you have multiple tunnels with signalled BW, but one tunnel has no signalled BW, all tunnels revert to ECMP. We can see this on R8 if we add one more tunnel to R2 but without any signalled BW.
#R8
int tun3
description R2_NO_BW
tunnel dest 2.2.2.2
ip unn lo0
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng path-option 1 dynamic
tunnel mpls traffic-eng autoroute announce
When the load-share option and a signalled BW option are both on the tunnel, only the load-share option is used. We can test this on R2:
If we add a third tunnel to R2 that only uses signalled BW, the signalled BW is counted as a load-share value. Below we simply use a BW of 5 kbps. This gets added to the RIB as a 5:2:1 ratio with the two existing TE tunnels (which use load-share).
int tun3
description R8_BW_ONLY
tunnel dest 8.8.8.8
ip unn lo0
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng bandwidth 5
tunnel mpls traffic-eng path-option 1 dynamic
tunnel mpls traffic-eng autoroute announce