Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions netsim/ansible/templates/mpls/srlinux.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
updates:
{% if ldp is defined %}
Comment thread
ipspace marked this conversation as resolved.
{% include 'srlinux.ldp.j2' +%}
{% endif %}
39 changes: 19 additions & 20 deletions netsim/ansible/templates/mpls/srlinux.ldp.j2
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
{# Note: LDP only supported on 7250 IXR #}
{% if clab.type not in ['ixr6','ixr10','ixr6e','ixr10e'] %}
{{ type_ixr | mandatory('LDP only supported on 7250 IXR; use e.g. clab.type "ixr6e" instead of '+clab.type) }}
{% else %}
updates:
- path: /system/mpls/label-ranges/dynamic[name=ldp]
value:
start-label: 10000
end-label: 15000

- path: system/mpls/label-ranges/dynamic[name=D1]
val:
start-label: 100
end-label: 200
- path: /network-instance[name=default]/mpls
value:
icmp-tunneling: true

- path: network-instance[name=default]/protocols/ldp
val:
admin-state: enable
dynamic-label-block: D1
- path: /network-instance[name=default]/protocols/ldp
value:
admin-state: enable
dynamic-label-block: ldp

{% for l in interfaces if ('ldp' in l) and not l.ldp.passive %}
{% set ifname = l.ifname if '.' in l.ifname else l.ifname|replace('vlan','irb0.') if l.type=='svi' else (l.ifname+'.0') %}
- path: network-instance[name=default]/protocols/ldp/discovery/interfaces
val:
interface:
- name: "{{ ifname }}"
{% if loop.first %}
discovery:
interfaces:
interface:
{% endif %}
- name: "{{ l.ifname }}{{ '.0' if '.' not in l.ifname else '' }}"
ipv4:
admin-state: enable
{% endfor %}

{% endif %}
6 changes: 6 additions & 0 deletions tests/integration/mpls/topology-defaults.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# Change SR Linux node type to make MPLS work
#
devices:
srlinux:
clab.node.type: ixr6