mpls ip
!
router isis Gandalf
  segment-routing mpls
    no shutdown
!
interface Loopback0
{% if 'ipv4' in loopback %}
  node-segment ipv4 index {{ id }}
{% endif %}
{% if 'ipv6' in loopback %}
  node-segment ipv6 index {{ 100+id }}
{% endif %}
