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/labs/clab.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
5 changes: 5 additions & 0 deletions netsim/ansible/tasks/deploy-config/voss.yml
Original file line number Diff line number Diff line change
@@ -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 ]
15 changes: 15 additions & 0 deletions netsim/ansible/tasks/readiness-check/voss.yml
Original file line number Diff line number Diff line change
@@ -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
94 changes: 94 additions & 0 deletions netsim/ansible/templates/initial/voss.j2
Original file line number Diff line number Diff line change
@@ -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 %} #}
5 changes: 5 additions & 0 deletions netsim/ansible/templates/initial/voss.vlan.j2
Original file line number Diff line number Diff line change
@@ -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 +%}
2 changes: 1 addition & 1 deletion netsim/defaults/multilab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
2 changes: 1 addition & 1 deletion netsim/devices/exos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
52 changes: 52 additions & 0 deletions netsim/devices/voss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
description: Extreme VOSS
support:
level: minimal
interface_name: "GigabitEthernet 1/{ifindex}"
loopback_interface_name: "loopback {ifindex}"
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: 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
interface:
name: "eth{ifindex}"
group_vars:
ansible_user: vrnetlab
ansible_ssh_pass: VR-netlab9
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: ansible.netcommon.network_cli
ansible_become: true
ansible_become_method: enable
netlab_console_connection: ssh
netlab_ready: [ ansible ]
external:
image: none
graphite.icon: switch