From f16422a189632818620f4a3ae606450d41cece3e Mon Sep 17 00:00:00 2001 From: Seb dArgoeuves Date: Sat, 25 Jul 2026 20:07:51 +0000 Subject: [PATCH 1/2] VOSS clab only --- netsim/devices/voss.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 netsim/devices/voss.yml diff --git a/netsim/devices/voss.yml b/netsim/devices/voss.yml new file mode 100644 index 0000000000..a9e55161ce --- /dev/null +++ b/netsim/devices/voss.yml @@ -0,0 +1,36 @@ +--- +description: Extreme VOSS +support: + level: minimal + caveats: + - We don't test Extreme VOSS configurations. +interface_name: "GigabitEthernet 1/{ifindex}" +loopback_interface_name: "loopback {ifindex}" +mtu: 1500 +clab: + build: True + image: vrnetlab/extreme_voss + node: + kind: linux # kind not yet available in Containerlab, only vrnetlab + interface: + name: "eth{ifindex}" + group_vars: + ansible_user: vrnetlab + ansible_ssh_pass: VR-netlab9 + netlab_ready: [ ssh ] + netlab_check_retries: 40 + netlab_check_delay: 10 +group_vars: + ansible_password: rwa + ansible_network_os: voss + ansible_connection: network_cli + mgmt_if: "mgmt" #"mgmtEthernet mgmt" + netlab_console_connection: ssh +external: + image: none +features: + ospf: + password: true + priority: true + timers: true +graphite.icon: switch From 7e7aac3c70c4750c137a73c5c4e8e62585c8d4f7 Mon Sep 17 00:00:00 2001 From: Seb dArgoeuves Date: Fri, 7 Aug 2026 08:15:11 +0000 Subject: [PATCH 2/2] Basic VOSS support --- docs/labs/clab.md | 1 + netsim/ansible/tasks/deploy-config/voss.yml | 5 + netsim/ansible/tasks/readiness-check/voss.yml | 15 +++ netsim/ansible/templates/initial/voss.j2 | 94 +++++++++++++++++++ netsim/ansible/templates/initial/voss.vlan.j2 | 5 + netsim/defaults/multilab.yml | 2 +- netsim/devices/exos.yml | 2 +- netsim/devices/voss.yml | 40 +++++--- 8 files changed, 150 insertions(+), 14 deletions(-) create mode 100644 netsim/ansible/tasks/deploy-config/voss.yml create mode 100644 netsim/ansible/tasks/readiness-check/voss.yml create mode 100644 netsim/ansible/templates/initial/voss.j2 create mode 100644 netsim/ansible/templates/initial/voss.vlan.j2 diff --git a/docs/labs/clab.md b/docs/labs/clab.md index 8cf32d36a8..8973b1627e 100644 --- a/docs/labs/clab.md +++ b/docs/labs/clab.md @@ -49,6 +49,7 @@ Lab topology file created by **[netlab up](../netlab/up.md)** or **[netlab creat | Cumulus VX with NVUE | networkop/cx:5.0.1 | | Dell OS10 | vrnetlab/vr-ftosv | | dnsmasq | netlab/dnsmasq:latest | +| Extreme VOSS | vrnetlab/extreme_voss:9.4.0.0 | | Fortinet FortiOS | vrnetlab/vr-fortios:7.4.8 | | FRR | quay.io/frrouting/frr:10.1.2 | | Juniper vMX | vrnetlab/vr-vmx:18.2R1.9 | diff --git a/netsim/ansible/tasks/deploy-config/voss.yml b/netsim/ansible/tasks/deploy-config/voss.yml new file mode 100644 index 0000000000..3179d556ed --- /dev/null +++ b/netsim/ansible/tasks/deploy-config/voss.yml @@ -0,0 +1,5 @@ +## voss_config is deprecated with no obvious replacement +- name: "voss_config: deploying {{ netsim_action }} from {{ config_template }}" + community.network.voss_config: + src: "{{ config_template }}" + tags: [ print_action, always ] diff --git a/netsim/ansible/tasks/readiness-check/voss.yml b/netsim/ansible/tasks/readiness-check/voss.yml new file mode 100644 index 0000000000..752a0fff2a --- /dev/null +++ b/netsim/ansible/tasks/readiness-check/voss.yml @@ -0,0 +1,15 @@ +--- +- name: Wait for CLI to be ready on VOSS devices + ansible.netcommon.cli_command: + command: "{{ netlab_check_command | default('show sys-info | head 5') }}" + register: cli_out + until: cli_out.stdout is defined and cli_out.stdout | length > 0 + retries: "{{ netlab_check_retries | default(40) }}" + delay: "{{ netlab_check_delay | default(10) }}" + failed_when: false + changed_when: false + +- name: Confirm VOSS CLI is ready + debug: + msg: "Node {{ inventory_hostname }} is ready." + when: cli_out.stdout is defined and cli_out.stdout | length > 0 diff --git a/netsim/ansible/templates/initial/voss.j2 b/netsim/ansible/templates/initial/voss.j2 new file mode 100644 index 0000000000..427851ab79 --- /dev/null +++ b/netsim/ansible/templates/initial/voss.j2 @@ -0,0 +1,94 @@ +sys name {{ inventory_hostname.replace("_","-") }} +{# +{% for vname in vrfs|default({}) %} +create virtual-router {{ vname }} type user +{% endfor %} + +{% if vlans is defined %} +{% include 'exos.vlan.j2' %} +{% endif %} + +{% for l in netlab_interfaces %} +{% set is_loopback = l.type|default('') == 'loopback' %} +{% set is_svi = l.type|default('') == 'svi' %} +{% set is_switchport = l.vlan is defined and not is_svi %} +{% set is_routed_physical = not is_loopback and not is_svi and not is_switchport %} +{% set has_l3_vlan = is_loopback or is_svi or is_routed_physical %} +{% if is_loopback %} +{% set vlan_name = 'VLAN_LO' + l.ifindex|string %} +create vlan "{{ vlan_name }}" +enable loopback-mode vlan {{ vlan_name }} +{% elif is_svi %} +{% set vlan_name = l.vlan.name %} +{% elif is_routed_physical %} +{% set vlan_name = 'VLAN_P' + l.ifname %} +create vlan "{{ vlan_name }}" +configure vlan {{ vlan_name }} add ports {{ l.ifname }} untagged +{% endif %} +{% if not is_loopback and not is_svi %} +{% if l.name is defined %} +configure ports {{ l.ifname }} display-string {{ (l.name + ("-"+l.role if l.role is defined else "")) | replace('->','to') | replace(' ','_') }} +{% elif l.type == "stub" %} +configure ports {{ l.ifname }} display-string Stub +{% endif %} +{% if l.mtu is defined and l.mtu > 1500 %} +enable jumbo-frame ports {{ l.ifname }} +{% endif %} +{% endif %} +{% if has_l3_vlan %} +{% if l.vrf is defined %} +configure vlan {{ vlan_name }} virtual-router {{ l.vrf }} +{% endif %} +{% if not is_loopback and role == 'router' and l.ipv6 is defined %} +{% set ra_prefix = l.ipv6|ansible.utils.ipaddr(0) if l.ipv6 is string and l.ipv6|ansible.utils.ipv6 else None %} +{% if l.ra.disable|default(false) is true %} +disable router-discovery ipv6 vlan {{ vlan_name }} +{% else %} +enable router-discovery ipv6 vlan {{ vlan_name }} +configure vlan {{ vlan_name }} router-discovery ipv6 max-interval 5 +configure vlan {{ vlan_name }} router-discovery ipv6 min-interval 3 +{% if ra_prefix %} +configure vlan {{ vlan_name }} router-discovery ipv6 add prefix {{ ra_prefix }} +{% if l.ra.slaac|default(true) is false %} +configure vlan {{ vlan_name }} router-discovery ipv6 set prefix {{ ra_prefix }} autonomous-flag off +{% endif %} +{% if l.ra.onlink|default(true) is false %} +configure vlan {{ vlan_name }} router-discovery ipv6 set prefix {{ ra_prefix }} onlink-flag off +{% endif %} +{% endif %} +{% if l.ra.dhcp|default(false) == 'all' %} +configure vlan {{ vlan_name }} router-discovery ipv6 managed-config-flag on +{% endif %} +{% if l.ra.dhcp|default(false) == 'other' %} +configure vlan {{ vlan_name }} router-discovery ipv6 other-config-flag on +{% endif %} +{% endif %} +{% endif %} +{% if l.ipv4 is defined %} +{% if l.ipv4 is sameas True %} +! Unnumbered IPv4 not implemented for EXOS +{% elif l.ipv4 is string and l.ipv4|ansible.utils.ipv4 %} +configure vlan {{ vlan_name }} ipaddress {{ l.ipv4|ansible.utils.ipaddr('address') }} {{ l.ipv4|ansible.utils.ipaddr('netmask') }} +enable ipforwarding vlan {{ vlan_name }} +{% else %} +! Invalid IPv4 address {{ l.ipv4 }} +{% endif %} +{% endif %} +{% if l.ipv6 is defined %} +{% if l.ipv6 is sameas True %} +! Link-local-only IPv6 not implemented for EXOS +{% elif l.ipv6 is string and l.ipv6|ansible.utils.ipv6 %} +configure vlan {{ vlan_name }} ipaddress {{ l.ipv6|upper }} +enable ipforwarding ipv6 vlan {{ vlan_name }} +{% else %} +! Invalid IPv6 address {{ l.ipv6 }} +{% endif %} +{% endif %} +{% if not is_loopback and l.mtu is defined %} +configure ip-mtu {{ l.mtu }} vlan {{ vlan_name }} +{% endif %} +{% endif %} +{% if not is_loopback and not is_svi %} +enable ports {{ l.ifname }} +{% endif %} +{% endfor %} #} diff --git a/netsim/ansible/templates/initial/voss.vlan.j2 b/netsim/ansible/templates/initial/voss.vlan.j2 new file mode 100644 index 0000000000..263a047496 --- /dev/null +++ b/netsim/ansible/templates/initial/voss.vlan.j2 @@ -0,0 +1,5 @@ +{% for vname,vdata in vlans.items() %} +{% if vname|lower != 'default' and vdata.id != 1 %} +create vlan "{{ vname }}" tag {{ vdata.id }} +{% endif %} +{% endfor +%} \ No newline at end of file diff --git a/netsim/defaults/multilab.yml b/netsim/defaults/multilab.yml index 4ab158f9b0..008f0d6934 100644 --- a/netsim/defaults/multilab.yml +++ b/netsim/defaults/multilab.yml @@ -9,6 +9,6 @@ change: defaults.providers.libvirt.tunnel_id: '{id}' defaults.providers.libvirt.vifprefix: 'vgif_{id}' addressing.mgmt: - ipv4: '192.168.{id}.0/24' + ipv4: '10.194.{55+id}.0/24' _network: 'nl_mgmt_{id}' _bridge: 'nl_mgmt_{id}' diff --git a/netsim/devices/exos.yml b/netsim/devices/exos.yml index 6a088d3134..5b6226c4d3 100644 --- a/netsim/devices/exos.yml +++ b/netsim/devices/exos.yml @@ -30,7 +30,7 @@ libvirt: create_template: exos.xml.j2 image: netlab/exos clab: - build: True + build: https://github.com/srl-labs/vrnetlab/tree/master/extreme/exos image: vrnetlab/extreme_exos node: kind: linux # kind not yet available in Containerlab diff --git a/netsim/devices/voss.yml b/netsim/devices/voss.yml index a9e55161ce..7e00505c6f 100644 --- a/netsim/devices/voss.yml +++ b/netsim/devices/voss.yml @@ -2,13 +2,31 @@ description: Extreme VOSS support: level: minimal - caveats: - - We don't test Extreme VOSS configurations. interface_name: "GigabitEthernet 1/{ifindex}" loopback_interface_name: "loopback {ifindex}" -mtu: 1500 +ifindex_offset: 1 +mgmt_if: Mgmt +features: + initial: + min_mtu: 1500 + max_mtu: 9216 + # ra: true + # normalize: true + # collect: true + # reload: false + # isis: + # circuit_type: true + # #import: [ bgp, ospf, ripv2, connected, static, vrf ] + # unnumbered: + # ipv4: true + # ipv6: true + # network: true + # vlan: + # model: switch + # svi_interface_name: vlan{vlan} + clab: - build: True + build: https://github.com/srl-labs/vrnetlab/tree/master/extreme/voss image: vrnetlab/extreme_voss node: kind: linux # kind not yet available in Containerlab, only vrnetlab @@ -17,20 +35,18 @@ clab: group_vars: ansible_user: vrnetlab ansible_ssh_pass: VR-netlab9 - netlab_ready: [ ssh ] + netlab_ready: [ ansible ] + netlab_check_command: "show sys-info | head 5" netlab_check_retries: 40 netlab_check_delay: 10 group_vars: ansible_password: rwa ansible_network_os: voss - ansible_connection: network_cli - mgmt_if: "mgmt" #"mgmtEthernet mgmt" + ansible_connection: ansible.netcommon.network_cli + ansible_become: true + ansible_become_method: enable netlab_console_connection: ssh + netlab_ready: [ ansible ] external: image: none -features: - ospf: - password: true - priority: true - timers: true graphite.icon: switch