[WARNING]: Could not match supplied host pattern, ignoring: unprovisioned PLAY [Deploy initial device configuration] ************************************* TASK [Set variables that cannot be set with VARS] ****************************** ok: [h1] ok: [h2] ok: [dut] ok: [r2] TASK [Find device readiness script] ******************************************** ok: [h1] ok: [h2] ok: [dut] ok: [r2] TASK [Wait for device to become ready] ***************************************** skipping: [h1] skipping: [h2] skipping: [dut] included: /home/pipi/net101/tools/netsim/ansible/tasks/readiness-check/eos-clab.yml for r2 TASK [Wait for cEOS SSH daemon to start] *************************************** ok: [r2] TASK [Normalize config on bridge-like devices] ********************************* included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for r2, h1, h2, dut TASK [Figure out whether to deploy the module normalize on current device] ***** ok: [h1] ok: [h2] ok: [dut] ok: [r2] TASK [Find configuration template for normalize] ******************************* ok: [h1] ok: [h2] ok: [dut] ok: [r2] TASK [fail] ******************************************************************** skipping: [r2] skipping: [h1] skipping: [h2] skipping: [dut] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [h1] skipping: [h2] skipping: [dut] ok: [r2] => msg: |- normalize configuration for r2 ========================================= ! interface Ethernet1 no switchport mac-address 52dc.cafe.0201 ! interface Ethernet2 no switchport mac-address 52dc.cafe.0202 ! interface Ethernet3 no switchport mac-address 52dc.cafe.0203 TASK [Find configuration deployment deploy_script for normalize] *************** skipping: [h1] skipping: [h2] skipping: [dut] ok: [r2] TASK [Deploy normalize configuration] ****************************************** skipping: [h1] skipping: [h2] skipping: [dut] included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/eos.yml for r2 TASK [eos_config: deploying normalize from /home/pipi/net101/tools/netsim/ansible/templates/normalize/eos.j2] *** [WARNING]: To ensure idempotency and correct diff the input configuration lines should be similar to how they appear if present in the running configuration on device including the indentation changed: [r2] TASK [Deploy initial configuration] ******************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for r2, h1, h2, dut TASK [Figure out whether to deploy the module initial on current device] ******* ok: [h1] ok: [h2] ok: [dut] ok: [r2] TASK [Find configuration template for initial] ********************************* ok: [h1] ok: [h2] ok: [dut] ok: [r2] TASK [fail] ******************************************************************** skipping: [r2] skipping: [h1] skipping: [h2] skipping: [dut] TASK [Print deployed configuration when running in verbose mode] *************** ok: [h1] => msg: |- initial configuration for h1 ========================================= #!/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) # # 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.33.3/24 dev eth1 2>/dev/null set -e ip addr add 172.16.33.3/24 dev eth1 sysctl -w net.ipv6.conf.eth1.disable_ipv6=0 set +e ip -6 addr del 2001:db8:cafe:33::3/64 dev eth1 2>/dev/null set -e ip -6 addr add 2001:db8:cafe:33::3/64 dev eth1 ip link set dev eth1 mtu 1500 # # Add static routes (usually IPv4 routes pointing to the first usable gateway) # echo Removing existing IPv4 routes while ip route del 172.16.44.0/24 2>/dev/null; do : ; done # set +e echo Removing existing IPv6 routes while ip route del 2001:db8:cafe:44::/64 2>/dev/null; do : ; done # echo Adding direct static routes ip route add 172.16.44.0/24 via 172.16.33.42 dev eth1 protocol static ip route add 2001:db8:cafe:44::/64 via 2001:db8:cafe:33::2a dev eth1 protocol static # # Print the final routing table ip route ok: [h2] => msg: |- initial configuration for h2 ========================================= #!/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) # # 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.44.4/24 dev eth1 2>/dev/null set -e ip addr add 172.16.44.4/24 dev eth1 sysctl -w net.ipv6.conf.eth1.disable_ipv6=0 set +e ip -6 addr del 2001:db8:cafe:44::4/64 dev eth1 2>/dev/null set -e ip -6 addr add 2001:db8:cafe:44::4/64 dev eth1 ip link set dev eth1 mtu 1500 # # Add static routes (usually IPv4 routes pointing to the first usable gateway) # echo Removing existing IPv4 routes while ip route del 172.16.33.0/24 2>/dev/null; do : ; done # set +e echo Removing existing IPv6 routes while ip route del 2001:db8:cafe:33::/64 2>/dev/null; do : ; done # echo Adding direct static routes ip route add 172.16.33.0/24 via 172.16.44.1 dev eth1 protocol static ip route add 2001:db8:cafe:33::/64 via 2001:db8:cafe:44::1 dev eth1 protocol static # # Print the final routing table ip route ok: [dut] => msg: |- initial configuration for dut ========================================= #!/bin/vbash source /opt/vyatta/etc/functions/script-template if [ "$(id -g -n)" != 'vyattacfg' ] ; then exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" fi # Configuration items start here configure set system host-name 'dut' set interfaces bridge br0 description 'Global Switch Bridge' set interfaces bridge br0 enable-vlan set interfaces bridge br0 vif 1000 set interfaces dummy dum0 address 10.0.0.1/32 set interfaces ethernet eth1 description 'dut -> r2' set interfaces ethernet eth1 mtu 1500 set interfaces ethernet eth2 description 'dut -> [r2,h2]' set interfaces ethernet eth2 mtu 1500 set interfaces ethernet eth2 address 172.16.44.1/24 set interfaces ethernet eth2 address 2001:db8:cafe:44::1/64; set interfaces bridge br0 vif 1000 description 'VLAN access (1000) -> [r2,h1]' set interfaces bridge br0 vif 1000 mtu 1500 set interfaces bridge br0 vif 1000 address 172.16.33.1/24 set interfaces bridge br0 vif 1000 address 2001:db8:cafe:33::1/64; set service lldp interface all set service lldp interface eth0 disable set service router-advert interface eth2 set service router-advert interface br0.1000 set service ssh # Commit, save and exit from subshell commit save exit # Restart FRR to pick up the new hostname sudo service frr restart ok: [r2] => msg: |- initial configuration for r2 ========================================= hostname r2 ! logging monitor debugging aaa authorization exec default local ! lldp run ip routing ipv6 unicast-routing ! ! ip host dut 10.0.0.1 172.16.44.1 172.16.33.1 ip host h1 172.16.33.3 ip host h2 172.16.44.4 ipv6 host dut 2001:db8:cafe:44::1 ipv6 host h1 2001:db8:cafe:33::3 ipv6 host h2 2001:db8:cafe:44::4 ! interface Management0 no lldp transmit no lldp receive ! interface Loopback0 ip address 10.0.0.2/32 ! interface Ethernet1 no switchport description r2 -> dut ! mac-address 52dc.cafe.0201 no shutdown ! interface Ethernet2 no switchport description r2 -> [dut,h2] ip address 172.16.44.2/24 ipv6 nd ra interval 5 ipv6 address 2001:db8:cafe:44::2/64 ! mac-address 52dc.cafe.0202 no shutdown ! interface Ethernet3 no switchport description [Access VLAN access] r2 -> h1 ! mac-address 52dc.cafe.0203 no shutdown ! interface Vlan1000 description VLAN access (1000) -> [dut,h1] ip address 172.16.33.2/24 ipv6 nd ra interval 5 ipv6 address 2001:db8:cafe:33::2/64 ! TASK [Find configuration deployment deploy_script for initial] ***************** ok: [h1] ok: [h2] ok: [dut] ok: [r2] TASK [Deploy initial configuration] ******************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/eos.yml for r2 included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/linux-clab.yml for h1, h2 included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/vyos.yml for dut TASK [eos_config: deploying initial from /home/pipi/net101/tools/netsim/ansible/templates/initial/eos.j2] *** changed: [r2] TASK [Define script filename and determine whether to execute in netns] ******** ok: [h1] ok: [h2] TASK [Create a temporary file for the rendered script] ************************* changed: [h1 -> localhost] changed: [h2 -> localhost] TASK [Create container setup script from /home/pipi/net101/tools/netsim/ansible/templates/initial/linux-clab.j2] *** changed: [h1 -> localhost] changed: [h2 -> localhost] TASK [Copy script into running container at /tmp/config-h1_initial.sh] ********* skipping: [h1] skipping: [h2] TASK [Execute /tmp/config-h1_initial.sh to deploy initial config based on /home/pipi/net101/tools/netsim/ansible/templates/initial/linux-clab.j2] *** skipping: [h1] skipping: [h2] TASK [Container configuration for initial based on /home/pipi/net101/tools/netsim/ansible/templates/initial/linux-clab.j2 executed in netns] *** changed: [h2 -> localhost] changed: [h1 -> localhost] TASK [Remove temporary file /tmp/h1_initial-_clmt76m.sh] *********************** changed: [h1 -> localhost] changed: [h2 -> localhost] TASK [wait_for_connection] ***************************************************** ok: [dut] TASK [wait_for] **************************************************************** ok: [dut] TASK [set_fact] **************************************************************** ok: [dut] TASK [set_fact] **************************************************************** ok: [dut] TASK [template] **************************************************************** changed: [dut] TASK [execute config-initial.sh to deploy initial config from /home/pipi/net101/tools/netsim/ansible/templates/initial/vyos.j2] *** changed: [dut] PLAY [Deploy module-specific configurations] *********************************** TASK [Set variables that cannot be set with VARS] ****************************** ok: [dut] ok: [h1] ok: [h2] ok: [r2] TASK [Deploy individual configuration modules] ********************************* included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, h1, h2, r2 => (item=routing) included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, h1, h2, r2 => (item=vlan) included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, h1, h2, r2 => (item=gateway) TASK [Figure out whether to deploy the module routing on current device] ******* ok: [dut] ok: [h1] ok: [h2] ok: [r2] TASK [Find configuration template for routing] ********************************* skipping: [dut] skipping: [r2] ok: [h1] ok: [h2] TASK [fail] ******************************************************************** skipping: [dut] skipping: [h1] skipping: [h2] skipping: [r2] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [dut] skipping: [r2] ok: [h1] => msg: |- routing configuration for h1 ========================================= #!/bin/bash # echo "Static routes are configured as part of the initial configuration template" echo # ip route ok: [h2] => msg: |- routing configuration for h2 ========================================= #!/bin/bash # echo "Static routes are configured as part of the initial configuration template" echo # ip route TASK [Find configuration deployment deploy_script for routing] ***************** skipping: [dut] skipping: [r2] ok: [h1] ok: [h2] TASK [Deploy routing configuration] ******************************************** skipping: [dut] skipping: [r2] included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/linux-clab.yml for h1, h2 TASK [Define script filename and determine whether to execute in netns] ******** ok: [h1] ok: [h2] TASK [Create a temporary file for the rendered script] ************************* changed: [h2 -> localhost] changed: [h1 -> localhost] TASK [Create container setup script from /home/pipi/net101/tools/netsim/ansible/templates/routing/linux.j2] *** changed: [h1 -> localhost] changed: [h2 -> localhost] TASK [Copy script into running container at /tmp/config-h1_routing.sh] ********* changed: [h2 -> localhost] changed: [h1 -> localhost] TASK [Execute /tmp/config-h1_routing.sh to deploy routing config based on /home/pipi/net101/tools/netsim/ansible/templates/routing/linux.j2] *** changed: [h1] changed: [h2] TASK [Container configuration for routing based on /home/pipi/net101/tools/netsim/ansible/templates/routing/linux.j2 executed in netns] *** skipping: [h1] skipping: [h2] TASK [Remove temporary file /tmp/h1_routing-y3m2hvq8.sh] *********************** changed: [h1 -> localhost] changed: [h2 -> localhost] TASK [Figure out whether to deploy the module vlan on current device] ********** ok: [dut] ok: [h1] ok: [h2] ok: [r2] TASK [Find configuration template for vlan] ************************************ skipping: [h1] skipping: [h2] ok: [dut] ok: [r2] TASK [fail] ******************************************************************** skipping: [dut] skipping: [h1] skipping: [h2] skipping: [r2] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [h1] skipping: [h2] ok: [dut] => msg: |- vlan configuration for dut ========================================= #!/bin/vbash source /opt/vyatta/etc/functions/script-template if [ "$(id -g -n)" != 'vyattacfg' ] ; then exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" fi # Configuration items start here configure set interfaces bridge br0 member interface eth1 allowed-vlan 1000 # Commit, save and exit from subshell commit save exit ok: [r2] => msg: |- vlan configuration for r2 ========================================= vlan 1000 name access ! ! interface Ethernet1 switchport switchport mode trunk switchport trunk allowed vlan 1000 ! interface Ethernet3 switchport switchport access vlan 1000 ! interface Vlan1000 TASK [Find configuration deployment deploy_script for vlan] ******************** skipping: [h1] skipping: [h2] ok: [dut] ok: [r2] TASK [Deploy vlan configuration] *********************************************** skipping: [h1] skipping: [h2] included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/vyos.yml for dut included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/eos.yml for r2 TASK [wait_for_connection] ***************************************************** skipping: [dut] TASK [wait_for] **************************************************************** skipping: [dut] TASK [set_fact] **************************************************************** ok: [dut] TASK [set_fact] **************************************************************** ok: [dut] TASK [template] **************************************************************** changed: [dut] TASK [execute config-vlan.sh to deploy vlan config from /home/pipi/net101/tools/netsim/ansible/templates/vlan/vyos.j2] *** changed: [dut] TASK [eos_config: deploying vlan from /home/pipi/net101/tools/netsim/ansible/templates/vlan/eos.j2] *** changed: [r2] TASK [Figure out whether to deploy the module gateway on current device] ******* ok: [dut] ok: [h1] ok: [h2] ok: [r2] TASK [Find configuration template for gateway] ********************************* skipping: [h1] skipping: [h2] ok: [dut] ok: [r2] TASK [fail] ******************************************************************** skipping: [dut] skipping: [h1] skipping: [h2] skipping: [r2] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [h1] skipping: [h2] ok: [dut] => msg: |- gateway configuration for dut ========================================= #!/bin/vbash source /opt/vyatta/etc/functions/script-template if [ "$(id -g -n)" != 'vyattacfg' ] ; then exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" fi # Configuration items start here configure set high-availability vrrp group IF40000ipv4 interface br0.1000 set high-availability vrrp group IF40000ipv4 vrid 217 set high-availability vrrp group IF40000ipv4 address 172.16.33.42/24 set high-availability vrrp group IF40000ipv4 priority 30 set high-availability vrrp group IF40000ipv6 interface br0.1000 set high-availability vrrp group IF40000ipv6 vrid 217 set high-availability vrrp group IF40000ipv6 address 2001:db8:cafe:33::2a/64 set high-availability vrrp group IF40000ipv6 priority 30 # Commit, save and exit from subshell commit save exit ok: [r2] => msg: |- gateway configuration for r2 ========================================= no ip icmp redirect ! interface Vlan1000 vrrp 217 ipv4 version 3 vrrp 217 ipv4 checksum pseudo-header exclude vrrp 217 ipv4 172.16.33.42 vrrp 217 ipv6 2001:db8:cafe:33::2a vrrp 217 priority-level 20 vrrp 217 preempt TASK [Find configuration deployment deploy_script for gateway] ***************** skipping: [h1] skipping: [h2] ok: [dut] ok: [r2] TASK [Deploy gateway configuration] ******************************************** skipping: [h1] skipping: [h2] included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/vyos.yml for dut included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/eos.yml for r2 TASK [wait_for_connection] ***************************************************** skipping: [dut] TASK [wait_for] **************************************************************** skipping: [dut] TASK [set_fact] **************************************************************** ok: [dut] TASK [set_fact] **************************************************************** ok: [dut] TASK [template] **************************************************************** changed: [dut] TASK [execute config-gateway.sh to deploy gateway config from /home/pipi/net101/tools/netsim/ansible/templates/gateway/vyos.j2] *** changed: [dut] TASK [eos_config: deploying gateway from /home/pipi/net101/tools/netsim/ansible/templates/gateway/eos.j2] *** changed: [r2] PLAY [Deploy custom deployment templates] ************************************** skipping: no hosts matched PLAY RECAP ********************************************************************* dut : ok=40 changed=6 unreachable=0 failed=0 skipped=17 rescued=0 ignored=0 h1 : ok=33 changed=9 unreachable=0 failed=0 skipped=20 rescued=0 ignored=0 h2 : ok=33 changed=9 unreachable=0 failed=0 skipped=20 rescued=0 ignored=0 r2 : ok=35 changed=4 unreachable=0 failed=0 skipped=9 rescued=0 ignored=0 This lab tests IPv4/6 VRRP configuration on an access VLAN. It checks whether the device-under-test (DUT) forwards traffic sent to the VRRP IP/MAC address, whether it has correct VRRP priority, and whether the preemption mechanism works.