Skip to content

Add RouterOS7 GRE Tunnel Support#3660

Draft
snuffy22 wants to merge 3 commits into
ipspace:devfrom
snuffy22:routeros7-gre
Draft

Add RouterOS7 GRE Tunnel Support#3660
snuffy22 wants to merge 3 commits into
ipspace:devfrom
snuffy22:routeros7-gre

Conversation

@snuffy22

Copy link
Copy Markdown
Contributor

Add support for GRE to Router OS 7

Also works for the 02-gre-vrf.yml

(py3-snuff) netlab@netlab:~/snuffy-netlab/tests/integration/tunnel$ netlab validate
[g4_adj_v4]  Check OSPF adjacencies (GRE IPv4) [ node(s): r2 ]
[PASS]       r2: OSPFv2 neighbor 10.0.0.1 is in state Full/-
[PASS]       Test succeeded in 0.3 seconds

[g4_adj_v6]  Check OSPFv3 adjacencies (GRE IPv4) [ node(s): r2 ]
[PASS]       r2: OSPFv3 neighbor 10.0.0.1 is in state Full
[PASS]       Test succeeded in 0.2 seconds

[g4_pfx_v4]  Check DUT IPv4 loopback prefix propagation (GRE IPv4) [ node(s): r2 ]
[PASS]       r2: The prefix 10.0.0.1/32 is in the OSPF topology
[PASS]       Test succeeded in 0.2 seconds

[g4_pfx_v6]  Check DUT IPv6 loopback prefix propagation (GRE IPv4) [ node(s): r2 ]
[PASS]       r2: The prefix 2001:db8::1/128 is in the OSPFv3 topology
[PASS]       Test succeeded in 0.2 seconds

[g4_ping_v4] Check end-to-end IPv4 connectivity (GRE IPv4) [ node(s): r2 ]
[PASS]       r2: Ping to 10.0.0.1 from 10.0.0.2/32 succeeded
[PASS]       Test succeeded in 0.2 seconds

[g4_ping_v6] Check end-to-end IPv6 connectivity (GRE IPv4) [ node(s): r2 ]
[PASS]       r2: Ping to ipv6 2001:db8::1 from 2001:db8::2/128 succeeded
[PASS]       Test succeeded in 0.2 seconds

[g6_adj_v4]  Check OSPF adjacencies (GRE IPv6) [ node(s): r3 ]
[PASS]       r3: OSPFv2 neighbor 10.0.0.1 is in state Full/-
[PASS]       Test succeeded in 0.2 seconds

[g6_adj_v6]  Check OSPFv3 adjacencies (GRE IPv6) [ node(s): r3 ]
[PASS]       r3: OSPFv3 neighbor 10.0.0.1 is in state Full
[PASS]       Test succeeded in 0.2 seconds

[g6_pfx_v4]  Check DUT IPv4 loopback prefix propagation (GRE IPv6) [ node(s): r3 ]
[PASS]       r3: The prefix 10.0.0.1/32 is in the OSPF topology
[PASS]       Test succeeded in 0.2 seconds

[g6_pfx_v6]  Check DUT IPv6 loopback prefix propagation (GRE IPv6) [ node(s): r3 ]
[PASS]       r3: The prefix 2001:db8::1/128 is in the OSPFv3 topology
[PASS]       Test succeeded in 0.2 seconds

[g6_ping_v4] Check end-to-end IPv4 connectivity (GRE IPv6) [ node(s): r3 ]
[PASS]       r3: Ping to 10.0.0.1 from 10.0.0.3/32 succeeded
[PASS]       Test succeeded in 0.2 seconds

[g6_ping_v6] Check end-to-end IPv6 connectivity (GRE IPv6) [ node(s): r3 ]
[PASS]       r3: Ping to ipv6 2001:db8::1 from 2001:db8::3/128 succeeded
[PASS]       Test succeeded in 0.2 seconds

[SUCCESS]    Tests passed: 12
(py3-snuff) netlab@netlab:~/snuffy-netlab/tests/integration/tunnel$

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the Mikrotik RouterOS 7 platform support by enabling GRE tunnel interface generation in the RouterOS7 initial configuration template and advertising GRE tunnel capability (including transport VRF) in the device feature matrix, with accompanying documentation updates.

Changes:

  • Added RouterOS 7 GRE tunnel interface creation/config handling in the initial device template.
  • Declared RouterOS 7 support for GRE tunnels (IPv4/IPv6/VRF) in the device feature metadata.
  • Updated documentation for GRE tunnel plugin support matrix and static routing platform table.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
netsim/devices/routeros7.yml Declares RouterOS 7 tunnel/static-routing capabilities and interface naming support.
netsim/ansible/templates/initial/routeros7.j2 Adds GRE tunnel interface creation and ensures tunnel interfaces are handled when setting interface attributes.
docs/plugins/tunnel.gre.md Marks Mikrotik RouterOS 7 as supported for GRE over IPv4/IPv6 with transport VRF.
docs/module/routing-static.txt Adds RouterOS 7 to the static routing support table (and includes a platform-name typo).

Comment on lines +29 to +32
{% 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 +51 to +53
routing:
static:
discard: true
| FRR | ✅ | ✅ | ✅ | ✅ |
| Junos | ✅ | ✅ | ✅ | ❌ |
| Linux | ✅ | ❌ | ❌ | ❌ |
| Mikrotik RoutersOS 7 | ✅ | ✅ | ❌ | ❌ |
| FRR | ✅ | ✅ | ✅ | ✅ |
| Junos | ✅ | ✅ | ✅ | ❌ |
| Linux | ✅ | ❌ | ❌ | ❌ |
| Mikrotik RoutersOS 7 | ✅ | ✅ | ❌ | ❌ |

@ipspace ipspace left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing you forgot to add new files to the PR. Here's what I get when trying to start the test lab from your branch:

[ERRORS]  Errors found in 01-gre.yml
[WRONG]   configs: Cannot find routing configuration template for dut/device routeros7
[HINT]    Use the '--debug template' option if you're troubleshooting custom configuration templates
[WRONG]   configs: Cannot find tunnel.gre configuration template for dut/device routeros7

Also, PRETTY PLEASE NEVER EVER add some random new functionality into a somewhat unrelated PR. The PR is really about GRE tunnels, static routes, and discard static routes.

Submit the static route part (thank you for adding that!) as a separate PR, then when that one is merged, rebase this PR on the dev branch (so you'll get just the tunnel related changes) and reupload it (usually using git push --force).

@snuffy22

Copy link
Copy Markdown
Contributor Author

sorry about that with the static routing..

I was jumping around a bit to much in my trees and normally have bunch of uncommitted files..

Think i really need my own 'pre push' hook that verifies everything in a brand new tree =/

I will make the new PR for that now and remove the change from this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants