Skip to content
Draft
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 docs/module/routing-static.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ _netlab_ supports static routes on these platforms:
| FRR | ✅ | ✅ | ✅ | ✅ |
| Junos | ✅ | ✅ | ✅ | ❌ |
| Linux | ✅ | ❌ | ❌ | ❌ |
| Mikrotik RoutersOS 7 | ✅ | ✅ | ❌ | ❌ |
| Nokia SR Linux | ✅ | ✅ | ✅ | ❌ |
| Nokia SR OS[^SROS] | ✅ | ✅ | ✅ | ❌ |
| OpenBSD | ✅ | ✅ | ❌ | ❌ |
Expand Down
1 change: 1 addition & 0 deletions docs/plugins/tunnel.gre.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The plugin includes Jinja2 templates for the following platforms:
| FRR ||||
| Juniper vJunos-switch ||||
| Juniper vSRX ||||
| Mikrotik RouterOS 7 ||||
| VyOS ||||

[^18v]: Includes Cisco IOSv, Cisco IOSvL2, Cisco CSR 1000v, Cisco Catalyst 8000v, Cisco IOS-on-Linux (IOL), and IOL Layer-2 image.
Expand Down
14 changes: 13 additions & 1 deletion netsim/ansible/templates/initial/routeros7.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
/ipv6/address add interface=loopback address={{ loopback.ipv6 }}
{% endif %}


{% for l in interfaces if l.type == 'tunnel' %}
{% set t_type = 'gre6' if l.tunnel.af == 'ipv6' else 'gre' %}
/interface/{{ t_type }} add name={{ l.ifname }} local-address={{ l.tunnel._source[l.tunnel.af] }} remote-address={{ l.tunnel._destination[l.tunnel.af] }}
{% endfor %}
Comment on lines +29 to +32

{% if vlans is defined %}
{% include 'routeros7.vlan.j2' %}
{% endif %}
Expand All @@ -34,7 +40,13 @@
{% endif %}

{% for l in interfaces|default([]) %}
{% set intf_type = 'vlan' if l.type == 'svi' else 'ethernet' %}
{% if l.type == 'svi' %}
{% set intf_type = 'vlan' %}
{% elif l.type == 'tunnel' and l.tunnel.mode|default('') == 'gre' %}
{% set intf_type = 'gre6' if l.tunnel.af == 'ipv6' else 'gre' %}
{% else %}
{% set intf_type = 'ethernet' %}
{% endif %}

{% if l.name is defined %}
/interface/{{ intf_type }} set comment="{{ l.name }}{{ " ["+l.role+"]" if l.role is defined else "" }}" {{ l.ifname }}
Expand Down
6 changes: 6 additions & 0 deletions netsim/devices/routeros7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ support:
interface_name: ether{ifindex}
mgmt_if: ether1
loopback_interface_name: loopback{ifindex if ifindex else ""}
tunnel_interface_name: tunnel{ifindex}
ifindex_offset: 2
libvirt:
image: mikrotik/chr7
Expand Down Expand Up @@ -45,6 +46,11 @@ features:
bgp: True
vxlan:
vtep6: True
tunnel:
gre: [ ipv4, ipv6, vrf ]
routing:
static:
discard: true
Comment on lines +51 to +53
clab:
image: vrnetlab/mikrotik_routeros:7.21.4
build: https://containerlab.dev/manual/kinds/vr-ros/
Expand Down