Creating Device configuration snippets [CREATED] h1: initial,routing [CREATED] h2: initial,routing [CREATED] dut_s1: initial,vlan [CREATED] dut_s2: initial,vlan [CREATED] r1: initial Config Deploying device configurations [INFO] Executing initial configuration for node h1 (namespace clab- ml-17-h1) [INFO] Executing initial configuration for node h2 (namespace clab- ml-17-h2) [INFO] Executing initial configuration for node r1 [INFO] Executing routing configuration for node h1 (namespace clab- ml-17-h1) [INFO] Executing routing configuration for node h2 (namespace clab- ml-17-h2) [INFO] Starting Ansible playbook to deploy the rest of the configurations [WARNING]: Found variable using reserved name: hosts PLAY [Deploy initial device configuration] ************************************* TASK [Set variables that cannot be set with VARS] ****************************** ok: [dut_s1] ok: [dut_s2] TASK [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut_s1, dut_s2 TASK [Figure out whether to deploy the module initial on current device] ******* ok: [dut_s1] ok: [dut_s2] TASK [Find configuration template for initial] ********************************* ok: [dut_s1] ok: [dut_s2] TASK [fail] ******************************************************************** skipping: [dut_s1] skipping: [dut_s2] TASK [Find configuration deployment deploy_script for initial] ***************** ok: [dut_s1] ok: [dut_s2] TASK [Print deployed configuration when running in verbose mode] *************** ok: [dut_s1] => { "msg": "initial configuration for dut_s1\n=========================================\n#!/bin/sh\n#\nset -e\nset -x\n\nhostname dut-s1\n#\n# Build hosts file\n#\n#\ncat <<'SCRIPT' >/tmp/hosts\n#\n# Created by netlab initial\n#\n10.0.0.3 dut-s1 dut_s1\n10.0.0.4 dut-s2 dut_s2\n172.16.0.1 h1 eth1.h1\n172.16.1.2 h2 eth1.h2\n10.0.0.5 r1\n172.16.0.5 eth1.r1\n172.16.1.5 eth2.r1\nSCRIPT\ngrep \"Created by netlab\" /etc/hosts || uniq /tmp/hosts >>/etc/hosts\n\n#\n# Enable forwarding\n#\nsysctl net.inet.ip.forwarding=1\nsysctl net.inet6.ip6.forwarding=1\necho -n > /etc/rad.conf\n\n#\n# Interface configuration\n#\nifconfig lo0 inet 10.0.0.3/32 alias\nifconfig lo0 up\n\nifconfig vio1 -inet\nifconfig vio1 -inet6\nifconfig vio1 mtu 1500\nifconfig vio1 description \"dut_s1 -> dut_s2\"\nifconfig vio1 up\n\n\n#\n# (re-)start RA daemon\n#\npkill -q rad || true\nrad\n" } ok: [dut_s2] => { "msg": "initial configuration for dut_s2\n=========================================\n#!/bin/sh\n#\nset -e\nset -x\n\nhostname dut-s2\n#\n# Build hosts file\n#\n#\ncat <<'SCRIPT' >/tmp/hosts\n#\n# Created by netlab initial\n#\n10.0.0.3 dut-s1 dut_s1\n10.0.0.4 dut-s2 dut_s2\n172.16.0.1 h1 eth1.h1\n172.16.1.2 h2 eth1.h2\n10.0.0.5 r1\n172.16.0.5 eth1.r1\n172.16.1.5 eth2.r1\nSCRIPT\ngrep \"Created by netlab\" /etc/hosts || uniq /tmp/hosts >>/etc/hosts\n\n#\n# Enable forwarding\n#\nsysctl net.inet.ip.forwarding=1\nsysctl net.inet6.ip6.forwarding=1\necho -n > /etc/rad.conf\n\n#\n# Interface configuration\n#\nifconfig lo0 inet 10.0.0.4/32 alias\nifconfig lo0 up\n\nifconfig vio1 -inet\nifconfig vio1 -inet6\nifconfig vio1 mtu 1500\nifconfig vio1 description \"dut_s2 -> dut_s1\"\nifconfig vio1 up\n\n\n#\n# (re-)start RA daemon\n#\npkill -q rad || true\nrad\n" } TASK [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/openbsd.yml for dut_s1, dut_s2 TASK [template] **************************************************************** changed: [dut_s2] changed: [dut_s1] TASK [Execute /tmp/config.sh to deploy initial config from /work/netlab_cicd/node_files/dut_s1/initial] *** changed: [dut_s2] changed: [dut_s1] PLAY [Deploy module-specific configurations] *********************************** TASK [Set variables that cannot be set with VARS] ****************************** ok: [dut_s1] ok: [dut_s2] TASK [Deploy individual configuration modules] ********************************* included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut_s1, dut_s2 => (item=vlan) included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut_s1, dut_s2 => (item=routing) TASK [Figure out whether to deploy the module vlan on current device] ********** ok: [dut_s1] ok: [dut_s2] TASK [Find configuration template for vlan] ************************************ ok: [dut_s1] ok: [dut_s2] TASK [fail] ******************************************************************** skipping: [dut_s1] skipping: [dut_s2] TASK [Find configuration deployment deploy_script for vlan] ******************** ok: [dut_s1] ok: [dut_s2] TASK [Print deployed configuration when running in verbose mode] *************** ok: [dut_s1] => { "msg": "vlan configuration for dut_s1\n=========================================\n#!/bin/sh\n#\nset -e # Exit immediately when any command fails\nset -x # Track commands for troubleshooting\n#\n\nifconfig vio2 -inet\nifconfig vio2 -inet6\nifconfig vio2 mtu 1500\nifconfig vio2 description \"[Access VLAN red] dut_s1 -> h1\"\nifconfig vio2 up\n\nifconfig bridge700 add vio2 up\nifconfig vio3 -inet\nifconfig vio3 -inet6\nifconfig vio3 mtu 1500\nifconfig vio3 description \"[Access VLAN blue] dut_s1 -> h2\"\nifconfig vio3 up\n\nifconfig bridge701 add vio3 up\nifconfig vlan7011 parent vio1 vnetid 701\nifconfig vlan7011 -inet\nifconfig vlan7011 -inet6\nifconfig vlan7011 description \"[SubIf VLAN blue] dut_s1 -> dut_s2\"\nifconfig vlan7011 up\n\nifconfig bridge701 add vlan7011 up\nifconfig vlan7001 parent vio1 vnetid 700\nifconfig vlan7001 -inet\nifconfig vlan7001 -inet6\nifconfig vlan7001 description \"[SubIf VLAN red] dut_s1 -> dut_s2\"\nifconfig vlan7001 up\n\nifconfig bridge700 add vlan7001 up\nifconfig vether700 -inet\nifconfig vether700 -inet6\nifconfig vether700 description \"VLAN red (700) -> [h1,r1,dut_s2]\"\nifconfig vether700 up\n\nifconfig bridge700 add vether700 up\nifconfig vether701 -inet\nifconfig vether701 -inet6\nifconfig vether701 description \"VLAN blue (701) -> [h2,r1,dut_s2]\"\nifconfig vether701 up\n\nifconfig bridge701 add vether701 up\n\n#\n# (re-)start RA daemon\n#\npkill -q rad || true\nrad\n" } ok: [dut_s2] => { "msg": "vlan configuration for dut_s2\n=========================================\n#!/bin/sh\n#\nset -e # Exit immediately when any command fails\nset -x # Track commands for troubleshooting\n#\n\nifconfig vio2 -inet\nifconfig vio2 -inet6\nifconfig vio2 mtu 1500\nifconfig vio2 description \"[Access VLAN red] dut_s2 -> r1\"\nifconfig vio2 up\n\nifconfig bridge700 add vio2 up\nifconfig vio3 -inet\nifconfig vio3 -inet6\nifconfig vio3 mtu 1500\nifconfig vio3 description \"[Access VLAN blue] dut_s2 -> r1\"\nifconfig vio3 up\n\nifconfig bridge701 add vio3 up\nifconfig vlan7011 parent vio1 vnetid 701\nifconfig vlan7011 -inet\nifconfig vlan7011 -inet6\nifconfig vlan7011 description \"[SubIf VLAN blue] dut_s2 -> dut_s1\"\nifconfig vlan7011 up\n\nifconfig bridge701 add vlan7011 up\nifconfig vlan7001 parent vio1 vnetid 700\nifconfig vlan7001 -inet\nifconfig vlan7001 -inet6\nifconfig vlan7001 description \"[SubIf VLAN red] dut_s2 -> dut_s1\"\nifconfig vlan7001 up\n\nifconfig bridge700 add vlan7001 up\nifconfig vether700 -inet\nifconfig vether700 -inet6\nifconfig vether700 description \"VLAN red (700) -> [h1,dut_s1,r1]\"\nifconfig vether700 up\n\nifconfig bridge700 add vether700 up\nifconfig vether701 -inet\nifconfig vether701 -inet6\nifconfig vether701 description \"VLAN blue (701) -> [h2,dut_s1,r1]\"\nifconfig vether701 up\n\nifconfig bridge701 add vether701 up\n\n#\n# (re-)start RA daemon\n#\npkill -q rad || true\nrad\n" } TASK [Deploy vlan configuration] *********************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/openbsd.yml for dut_s1, dut_s2 TASK [template] **************************************************************** changed: [dut_s2] changed: [dut_s1] TASK [Execute /tmp/config.sh to deploy vlan config from /work/netlab_cicd/node_files/dut_s1/vlan] *** changed: [dut_s2] changed: [dut_s1] TASK [Figure out whether to deploy the module routing on current device] ******* ok: [dut_s1] ok: [dut_s2] TASK [Find configuration template for routing] ********************************* skipping: [dut_s1] skipping: [dut_s2] TASK [fail] ******************************************************************** skipping: [dut_s1] skipping: [dut_s2] TASK [Find configuration deployment deploy_script for routing] ***************** skipping: [dut_s1] skipping: [dut_s2] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [dut_s1] skipping: [dut_s2] TASK [Deploy routing configuration] ******************************************** skipping: [dut_s1] skipping: [dut_s2] PLAY [Deploy custom deployment templates] ************************************** skipping: no hosts matched PLAY RECAP ********************************************************************* dut_s1 : ok=20 changed=4 unreachable=0 failed=0 skipped=7 rescued=0 ignored=0 dut_s2 : ok=20 changed=4 unreachable=0 failed=0 skipped=7 rescued=0 ignored=0 Results of configuration script deployments ================================================================================ h1 Script: initial,routing h2 Script: initial,routing r1 Script: initial The devices under test are simple bridges with a VLAN trunk between them. An external router with two interfaces (one per VLAN) is attached to one of them. * h1 and h2 should be able to ping each other Please note it might take a while for the lab to work due to STP learning phase