[WARNING]: Could not match supplied host pattern, ignoring: unprovisioned [WARNING]: Found variable using reserved name: hosts PLAY [Deploy initial device configuration] ************************************* TASK [Set variables that cannot be set with VARS] ****************************** ok: [dut] ok: [x1] ok: [x2] ok: [x3] TASK [Find device readiness script] ******************************************** ok: [dut] ok: [x1] ok: [x2] ok: [x3] TASK [Wait for device to become ready] ***************************************** skipping: [dut] skipping: [x1] skipping: [x2] skipping: [x3] TASK [Normalize config on bridge-like devices] ********************************* included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut, x1, x2, x3 TASK [Figure out whether to deploy the module normalize on current device] ***** ok: [dut] ok: [x1] ok: [x2] ok: [x3] TASK [Find configuration template for normalize] ******************************* ok: [dut] ok: [x1] ok: [x2] ok: [x3] TASK [fail] ******************************************************************** skipping: [dut] skipping: [x1] skipping: [x2] skipping: [x3] TASK [Find configuration deployment deploy_script for normalize] *************** ok: [dut] ok: [x1] ok: [x2] ok: [x3] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [dut] skipping: [x1] skipping: [x2] skipping: [x3] TASK [Deploy normalize configuration] ****************************************** skipping: [dut] skipping: [x1] skipping: [x2] skipping: [x3] TASK [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut, x1, x2, x3 TASK [Figure out whether to deploy the module initial on current device] ******* ok: [dut] ok: [x1] ok: [x2] ok: [x3] TASK [Find configuration template for initial] ********************************* ok: [dut] ok: [x1] ok: [x2] ok: [x3] TASK [fail] ******************************************************************** skipping: [dut] skipping: [x1] skipping: [x2] skipping: [x3] TASK [Find configuration deployment deploy_script for initial] ***************** ok: [dut] ok: [x1] ok: [x2] ok: [x3] TASK [Print deployed configuration when running in verbose mode] *************** ok: [x1] => msg: |- initial configuration for x1 ========================================= #!/bin/bash # # This script contains the 'ip' commands needed to set up container # interfaces and route table. It's executed within the container # network namespace on the container host. # # /etc/hosts file is generated as a clab bind. # set -e ### One-Shot configuration (non-Ubuntu VM or container) # # Send ARP requests from a sane source IP address sysctl -w net.ipv4.conf.all.arp_announce=2 # # Disable IPv4 and IPv6 forwarding # sysctl -w net.ipv4.ip_forward=0 sysctl -w net.ipv6.conf.all.forwarding=0 # # Interface addressing, create any bond devices # ip link set dev eth1 up set +e ip addr del 172.16.0.2/24 dev eth1 2>/dev/null set -e ip addr add 172.16.0.2/24 dev eth1 sysctl -w net.ipv6.conf.eth1.disable_ipv6=0 set +e ip -6 addr del 2001:db8:2::2/64 dev eth1 2>/dev/null set -e ip -6 addr add 2001:db8:2::2/64 dev eth1 ip link set dev eth1 mtu 1500 ip link set dev eth2 up set +e ip addr del 172.16.41.2/24 dev eth2 2>/dev/null set -e ip addr add 172.16.41.2/24 dev eth2 sysctl -w net.ipv6.conf.eth2.disable_ipv6=0 set +e ip -6 addr del 3fff:cafe:0:1::2/64 dev eth2 2>/dev/null set -e ip -6 addr add 3fff:cafe:0:1::2/64 dev eth2 ip link set dev eth2 mtu 1500 ok: [x2] => msg: |- initial configuration for x2 ========================================= #!/bin/bash # # This script contains the 'ip' commands needed to set up container # interfaces and route table. It's executed within the container # network namespace on the container host. # # /etc/hosts file is generated as a clab bind. # set -e ### One-Shot configuration (non-Ubuntu VM or container) # # Send ARP requests from a sane source IP address sysctl -w net.ipv4.conf.all.arp_announce=2 # # Disable IPv4 and IPv6 forwarding # sysctl -w net.ipv4.ip_forward=0 sysctl -w net.ipv6.conf.all.forwarding=0 # # Interface addressing, create any bond devices # ip link set dev eth1 up set +e ip addr del 172.16.1.3/24 dev eth1 2>/dev/null set -e ip addr add 172.16.1.3/24 dev eth1 sysctl -w net.ipv6.conf.eth1.disable_ipv6=0 set +e ip -6 addr del 2001:db8:2:1::3/64 dev eth1 2>/dev/null set -e ip -6 addr add 2001:db8:2:1::3/64 dev eth1 ip link set dev eth1 mtu 1500 ip link set dev eth2 up set +e ip addr del 172.16.42.3/24 dev eth2 2>/dev/null set -e ip addr add 172.16.42.3/24 dev eth2 sysctl -w net.ipv6.conf.eth2.disable_ipv6=0 set +e ip -6 addr del 3fff:cafe:0:2::3/64 dev eth2 2>/dev/null set -e ip -6 addr add 3fff:cafe:0:2::3/64 dev eth2 ip link set dev eth2 mtu 1500 ok: [x3] => msg: |- initial configuration for x3 ========================================= #!/bin/bash # # This script contains the 'ip' commands needed to set up container # interfaces and route table. It's executed within the container # network namespace on the container host. # # /etc/hosts file is generated as a clab bind. # set -e ### One-Shot configuration (non-Ubuntu VM or container) # # Send ARP requests from a sane source IP address sysctl -w net.ipv4.conf.all.arp_announce=2 # # Disable IPv4 and IPv6 forwarding # sysctl -w net.ipv4.ip_forward=0 sysctl -w net.ipv6.conf.all.forwarding=0 # # Interface addressing, create any bond devices # ip link set dev eth1 up set +e ip addr del 172.16.2.4/24 dev eth1 2>/dev/null set -e ip addr add 172.16.2.4/24 dev eth1 sysctl -w net.ipv6.conf.eth1.disable_ipv6=0 set +e ip -6 addr del 2001:db8:2:2::4/64 dev eth1 2>/dev/null set -e ip -6 addr add 2001:db8:2:2::4/64 dev eth1 ip link set dev eth1 mtu 1500 ip link set dev eth2 up set +e ip addr del 172.16.40.4/24 dev eth2 2>/dev/null set -e ip addr add 172.16.40.4/24 dev eth2 sysctl -w net.ipv6.conf.eth2.disable_ipv6=0 set +e ip -6 addr del 3fff:cafe::4/64 dev eth2 2>/dev/null set -e ip -6 addr add 3fff:cafe::4/64 dev eth2 ip link set dev eth2 mtu 1500 ok: [dut] => msg: |- initial configuration for dut ========================================= - set: system: hostname: dut config: snippet: system-mtu: file: /etc/network/ifupdown2/policy.d/mtu.json content: | { "address": { "defaults": { "mtu": "1500" } } } interface: eth0: ip: vrf: mgmt address: dhcp: {} type: eth swp1: type: swp link: state: up : {} description: "dut -> x1 [stub]" ip: address: 172.16.0.1/24: {} 2001:db8:2::1/64: {} ipv6: forward: on neighbor-discovery: enable: on router-advertisement: enable: on interval: 5000 swp2: type: swp link: state: up : {} description: "dut -> x2 [stub]" ip: address: 172.16.1.1/24: {} 2001:db8:2:1::1/64: {} ipv6: forward: on neighbor-discovery: enable: on router-advertisement: enable: on interval: 5000 swp3: type: swp link: state: up : {} description: "dut -> x3 [stub]" ip: address: 172.16.2.1/24: {} 2001:db8:2:2::1/64: {} ipv6: forward: on neighbor-discovery: enable: on router-advertisement: enable: on interval: 5000 - set: interface: lo: type: loopback ip: address: 10.0.0.1/32: {} 2001:db8:1:1::1/64: {} TASK [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/cumulus_nvue.yml for dut included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/linux-clab.yml for x1, x2, x3 TASK [set_fact] **************************************************************** ok: [dut] TASK [copy the cumulus nvue YAML initial config file to switch (generated from /home/pipi/netlab_gh/netsim/ansible/templates/initial/cumulus_nvue.j2)] *** changed: [dut] TASK [Wait for nvued to start] ************************************************* ok: [dut] TASK [set_fact] **************************************************************** ok: [dut] TASK [execute on cumulus: 'nv config patch' for initial config] **************** changed: [dut] TASK [execute on cumulus: 'nv config apply -y' for initial config] ************* changed: [dut] TASK [Define script filename and determine whether to execute in netns] ******** ok: [x1] ok: [x2] ok: [x3] TASK [Create a temporary file for the rendered script] ************************* changed: [x2 -> localhost] changed: [x1 -> localhost] changed: [x3 -> localhost] TASK [Create container setup script from /home/pipi/netlab_gh/netsim/ansible/templates/initial/linux-clab.j2] *** changed: [x2 -> localhost] changed: [x1 -> localhost] changed: [x3 -> localhost] TASK [Copy script into running container at /tmp/config-x1_initial.sh] ********* skipping: [x1] skipping: [x2] skipping: [x3] TASK [Execute /tmp/config-x1_initial.sh to deploy initial config based on /home/pipi/netlab_gh/netsim/ansible/templates/initial/linux-clab.j2] *** skipping: [x1] skipping: [x2] skipping: [x3] TASK [Container configuration for initial based on /home/pipi/netlab_gh/netsim/ansible/templates/initial/linux-clab.j2 executed in netns] *** changed: [x1 -> localhost] changed: [x2 -> localhost] changed: [x3 -> localhost] TASK [Remove temporary file /tmp/x1_initial-b00frezx.sh] *********************** changed: [x2 -> localhost] changed: [x3 -> localhost] changed: [x1 -> localhost] PLAY [Deploy module-specific configurations] *********************************** TASK [Set variables that cannot be set with VARS] ****************************** ok: [dut] ok: [x1] ok: [x2] ok: [x3] TASK [Deploy individual configuration modules] ********************************* included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut, x1, x2, x3 => (item=routing) included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut, x1, x2, x3 => (item=vrf) TASK [Figure out whether to deploy the module routing on current device] ******* ok: [dut] ok: [x1] ok: [x2] ok: [x3] TASK [Find configuration template for routing] ********************************* ok: [dut] ok: [x1] ok: [x2] ok: [x3] TASK [fail] ******************************************************************** skipping: [dut] skipping: [x1] skipping: [x2] skipping: [x3] TASK [Find configuration deployment deploy_script for routing] ***************** ok: [dut] ok: [x1] ok: [x2] ok: [x3] TASK [Print deployed configuration when running in verbose mode] *************** ok: [x1] => msg: |- routing configuration for x1 ========================================= #!/bin/bash # # Add static routes (usually IPv4 routes pointing to the first usable gateway) # # echo Removing existing IPv4 routes while ip route del 172.16.0.0/16 2>/dev/null; do : ; done while ip route del 10.0.0.0/24 2>/dev/null; do : ; done while ip route del 10.1.0.0/16 2>/dev/null; do : ; done while ip route del 10.2.0.0/24 2>/dev/null; do : ; done # # # echo Adding direct static routes ip route add 172.16.0.0/16 via 172.16.0.1 dev eth1 protocol static ip route add 10.0.0.0/24 via 172.16.0.1 dev eth1 protocol static ip route add 10.1.0.0/16 via 172.16.0.1 dev eth1 protocol static ip route add 10.2.0.0/24 via 172.16.0.1 dev eth1 protocol static # # Print the final routing table ip route ok: [x2] => msg: |- routing configuration for x2 ========================================= #!/bin/bash # # Add static routes (usually IPv4 routes pointing to the first usable gateway) # # echo Removing existing IPv4 routes while ip route del 172.16.0.0/16 2>/dev/null; do : ; done while ip route del 10.0.0.0/24 2>/dev/null; do : ; done while ip route del 10.1.0.0/16 2>/dev/null; do : ; done while ip route del 10.2.0.0/24 2>/dev/null; do : ; done # # # echo Adding direct static routes ip route add 172.16.0.0/16 via 172.16.1.1 dev eth1 protocol static ip route add 10.0.0.0/24 via 172.16.1.1 dev eth1 protocol static ip route add 10.1.0.0/16 via 172.16.1.1 dev eth1 protocol static ip route add 10.2.0.0/24 via 172.16.1.1 dev eth1 protocol static # # Print the final routing table ip route ok: [dut] => msg: |- routing configuration for dut ========================================= --- - set: vrf: blue: router: static: 172.16.41.0/24: address-family: ipv4-unicast via: 172.16.0.2: type: ipv4-address vrf: red - set: vrf: blue: router: static: 3fff:cafe:0:1::/64: address-family: ipv6-unicast via: 2001:db8:2::2: type: ipv6-address vrf: red - set: vrf: red: router: static: 172.16.42.0/24: address-family: ipv4-unicast via: 172.16.1.3: type: ipv4-address vrf: blue - set: vrf: red: router: static: 3fff:cafe:0:2::/64: address-family: ipv6-unicast via: 2001:db8:2:1::3: type: ipv6-address vrf: blue - set: vrf: default: router: static: 172.16.42.0/24: address-family: ipv4-unicast via: 172.16.1.3: type: ipv4-address vrf: blue - set: vrf: default: router: static: 3fff:cafe:0:2::/64: address-family: ipv6-unicast via: 2001:db8:2:1::3: type: ipv6-address vrf: blue - set: vrf: blue: router: static: 172.16.40.0/24: address-family: ipv4-unicast via: 172.16.2.4: type: ipv4-address vrf: default - set: vrf: blue: router: static: 3fff:cafe::/64: address-family: ipv6-unicast via: 2001:db8:2:2::4: type: ipv6-address vrf: default ok: [x3] => msg: |- routing configuration for x3 ========================================= #!/bin/bash # # Add static routes (usually IPv4 routes pointing to the first usable gateway) # # echo Removing existing IPv4 routes while ip route del 172.16.0.0/16 2>/dev/null; do : ; done while ip route del 10.0.0.0/24 2>/dev/null; do : ; done while ip route del 10.1.0.0/16 2>/dev/null; do : ; done while ip route del 10.2.0.0/24 2>/dev/null; do : ; done # # # echo Adding direct static routes ip route add 172.16.0.0/16 via 172.16.2.1 dev eth1 protocol static ip route add 10.0.0.0/24 via 172.16.2.1 dev eth1 protocol static ip route add 10.1.0.0/16 via 172.16.2.1 dev eth1 protocol static ip route add 10.2.0.0/24 via 172.16.2.1 dev eth1 protocol static # # Print the final routing table ip route TASK [Deploy routing configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/cumulus_nvue.yml for dut included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/linux-clab.yml for x1, x2, x3 TASK [set_fact] **************************************************************** ok: [dut] TASK [copy the cumulus nvue YAML routing config file to switch (generated from /home/pipi/netlab_gh/netsim/ansible/templates/routing/cumulus_nvue.j2)] *** changed: [dut] TASK [Wait for nvued to start] ************************************************* skipping: [dut] TASK [set_fact] **************************************************************** ok: [dut] TASK [execute on cumulus: 'nv config patch' for routing config] **************** changed: [dut] TASK [execute on cumulus: 'nv config apply -y' for routing config] ************* changed: [dut] TASK [Define script filename and determine whether to execute in netns] ******** ok: [x1] ok: [x2] ok: [x3] TASK [Create a temporary file for the rendered script] ************************* changed: [x1 -> localhost] changed: [x2 -> localhost] changed: [x3 -> localhost] TASK [Create container setup script from /home/pipi/netlab_gh/netsim/ansible/templates/routing/linux-clab.j2] *** changed: [x1 -> localhost] changed: [x2 -> localhost] changed: [x3 -> localhost] TASK [Copy script into running container at /tmp/config-x1_routing.sh] ********* skipping: [x1] skipping: [x2] skipping: [x3] TASK [Execute /tmp/config-x1_routing.sh to deploy routing config based on /home/pipi/netlab_gh/netsim/ansible/templates/routing/linux-clab.j2] *** skipping: [x1] skipping: [x2] skipping: [x3] TASK [Container configuration for routing based on /home/pipi/netlab_gh/netsim/ansible/templates/routing/linux-clab.j2 executed in netns] *** changed: [x2 -> localhost] changed: [x3 -> localhost] changed: [x1 -> localhost] TASK [Remove temporary file /tmp/x1_routing-p2mi1qht.sh] *********************** changed: [x1 -> localhost] changed: [x2 -> localhost] changed: [x3 -> localhost] TASK [Figure out whether to deploy the module vrf on current device] *********** ok: [dut] ok: [x1] ok: [x2] ok: [x3] TASK [Find configuration template for vrf] ************************************* skipping: [x1] skipping: [x2] ok: [dut] skipping: [x3] TASK [fail] ******************************************************************** skipping: [dut] skipping: [x1] skipping: [x2] skipping: [x3] TASK [Find configuration deployment deploy_script for vrf] ********************* skipping: [x1] skipping: [x2] skipping: [x3] ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [x1] skipping: [x2] skipping: [x3] ok: [dut] => msg: |- vrf configuration for dut ========================================= --- - set: vrf: blue: table: auto red: table: auto - set: interface: swp1: ip: vrf: red - set: interface: swp2: ip: vrf: blue TASK [Deploy vrf configuration] ************************************************ skipping: [x1] skipping: [x2] skipping: [x3] included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/cumulus_nvue.yml for dut TASK [set_fact] **************************************************************** ok: [dut] TASK [copy the cumulus nvue YAML vrf config file to switch (generated from /home/pipi/netlab_gh/netsim/ansible/templates/vrf/cumulus_nvue.j2)] *** changed: [dut] TASK [Wait for nvued to start] ************************************************* skipping: [dut] TASK [set_fact] **************************************************************** ok: [dut] TASK [execute on cumulus: 'nv config patch' for vrf config] ******************** changed: [dut] TASK [execute on cumulus: 'nv config apply -y' for vrf config] ***************** changed: [dut] PLAY [Deploy custom deployment templates] ************************************** skipping: no hosts matched PLAY RECAP ********************************************************************* dut : ok=41 changed=9 unreachable=0 failed=0 skipped=9 rescued=0 ignored=0 x1 : ok=31 changed=8 unreachable=0 failed=0 skipped=15 rescued=0 ignored=0 x2 : ok=31 changed=8 unreachable=0 failed=0 skipped=15 rescued=0 ignored=0 x3 : ok=31 changed=8 unreachable=0 failed=0 skipped=15 rescued=0 ignored=0 Use this topology to test inter- VRF IPv4 and IPv6 static routes. DUT has to have static routes for loopback addresses of X1 and X2.