Skip to content

[VyOS] GRE tunnel implementation#3566

Open
ssasso wants to merge 2 commits into
ipspace:devfrom
ssasso:vyos_gre
Open

[VyOS] GRE tunnel implementation#3566
ssasso wants to merge 2 commits into
ipspace:devfrom
ssasso:vyos_gre

Conversation

@ssasso

@ssasso ssasso commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Main configuration performed in 'initial' module, due to #3564

Requires fixing #3563 for test '01-gre.yaml' to work.

With a local fix:

Test 01:

[SUCCESS] Lab devices configured


Test the GRE tunnels. The two tested devices have a GRE tunnel and run
OSPF over it. The probe should receive an OSPF route advertised from the
remote device (DUT_R1) and be able to ping its loopback.

[adj]     Check OSPF adjacencies [ node(s): r3 ]
[WAITING] Waiting for OSPF adjacency process to complete (retrying for 30 seconds)
[PASS]    r3: OSPFv2 neighbor 10.0.0.2 is in state Full/-
[PASS]    Test succeeded in 5.0 seconds

[pfx]     Check for DUT_R1 loopback prefix being propagated to R3 [ node(s): r3 ]
[WAITING] Waiting for SPF to do its magic (retrying for 30 seconds)
[PASS]    r3: The prefix 10.0.0.1/32 is in the OSPF topology
[PASS]    Test succeeded in 9.8 seconds

[ping]    Check end-to-end connectivity [ node(s): r3 ]
[PASS]    r3: Ping to 10.0.0.1 succeeded
[PASS]    Test succeeded in 0.2 seconds

[SUCCESS] Tests passed: 3

Test 02:

[SUCCESS] Lab devices configured


Test the GRE tunnels. The two tested devices have a GRE tunnel in a
transport VRF and run (global) OSPF over it. The probe should receive
an OSPF route advertised from the remote device (DUT_R1) and be able
to ping its loopback.

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

[pfx]     Check for DUT_R1 loopback prefix being propagated to R3 [ node(s): r3 ]
[WAITING] Waiting for SPF to do its magic (retrying for 30 seconds)
[PASS]    r3: The prefix 10.0.0.1/32 is in the OSPF topology
[PASS]    Test succeeded in 14.6 seconds

[ping]    Check end-to-end connectivity [ node(s): r3 ]
[PASS]    r3: Ping to 10.0.0.1 succeeded
[PASS]    Test succeeded in 0.2 seconds

[SUCCESS] Tests passed: 3

{% if vlans is defined %}
{% include 'vyos.vlan.j2' %}
{% endif %}
{% if "tunnel.gre" in config|default([]) %}

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.

Here's another option if you want to keep all config in the 'extra/tunnel.gre' directory:

  • Move vyos.tunnel.j2 into extra/tunnel.gre/vyos-interfaces.j2
  • Replace this if block with the following loop:
-{% if "tunnel.gre" in config|default([]) %}
-{% include 'vyos.tunnel.j2' %}
-{% endif %}
+{% for x_dp in config|default([]) %}
+{%  include x_dp + '/' + 'vyos-interfaces.j2' ignore missing %}
+{% endfor %}

You could do the same for regular modules (vlans/vrfs).

Just a thought, I'm perfectly fine merging this as-is (after fixing the integration test and running them ;)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • Move vyos.tunnel.j2 into extra/tunnel.gre/vyos-interfaces.j2

or extra/tunnel.gre/vyos-initial.j2 to emphasize it extends the initial configuration

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