[WARNING]: Could not match supplied host pattern, ignoring: unprovisioned

PLAY [Deploy initial device configuration] *************************************

TASK [Set variables that cannot be set with VARS] ******************************
ok: [r2]
ok: [h1]
ok: [h2]
ok: [dut]

TASK [Find device readiness script] ********************************************
ok: [r2]
ok: [h1]
ok: [h2]
ok: [dut]

TASK [Wait for device to become ready] *****************************************
skipping: [r2]
skipping: [h1]
skipping: [h2]
included: /home/pipi/net101/tools/netsim/ansible/tasks/readiness-check/ioll2-clab.yml for dut

TASK [Check if 'sshpass' is installed] *****************************************
ok: [dut -> localhost]

TASK [Check for 'timeout' command] *********************************************
ok: [dut -> localhost]

TASK [Execute local ssh command to check ioll2 readiness] **********************
FAILED - RETRYING: [dut -> localhost]: Execute local ssh command to check ioll2 readiness (20 retries left).
ok: [dut -> localhost]

TASK [Confirm dut SSH server works] ********************************************
ok: [dut] => 
  msg: Node dut is ready.

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: [r2]
ok: [h1]
ok: [h2]
ok: [dut]

TASK [Find configuration template for normalize] *******************************
ok: [r2]
ok: [h1]
ok: [h2]
ok: [dut]

TASK [fail] ********************************************************************
skipping: [r2]
skipping: [h1]
skipping: [h2]
skipping: [dut]

TASK [Print deployed configuration when running in verbose mode] ***************
skipping: [r2]
skipping: [h1]
skipping: [h2]
ok: [dut] => 
  msg: |-
    normalize configuration for dut
    =========================================
    !
    interface Ethernet0/1
     no switchport
     mac-address 52dc.cafe.0101
    !
    interface Ethernet0/2
     no switchport
     mac-address 52dc.cafe.0102

TASK [Find configuration deployment deploy_script for normalize] ***************
skipping: [r2]
skipping: [h1]
skipping: [h2]
ok: [dut]

TASK [Deploy normalize configuration] ******************************************
skipping: [r2]
skipping: [h1]
skipping: [h2]
included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/ios.yml for dut

TASK [ios_config: deploying normalize from /home/pipi/net101/tools/netsim/ansible/templates/normalize/ioll2.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: [dut]

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: [r2]
ok: [h1]
ok: [h2]
ok: [dut]

TASK [Find configuration template for initial] *********************************
ok: [r2]
ok: [h1]
ok: [h2]
ok: [dut]

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: [r2] => 
  msg: |-
    initial configuration for r2
    =========================================
    #!/bin/bash
    #
    set -e
    set -x
    #
    # Create bash profile script
    #
    cat <<SCRIPT >/root/.bash_profile
    #!/bin/bash
    #
    export PS1="\h(bash)# "
    echo
    echo "Use vtysh to connect to FRR daemon"
    echo
    SCRIPT
    #
    # Get the current next hop for the default route
    #
    def_nh=$(ip route list default|awk '{ print $3 }')
    #
    # Create the management VRF and add eth0 to it
    #
    if [ ! -e /sys/devices/virtual/net/mgmt ]; then
      ip link add mgmt type vrf table 42
    fi
    ip link set mgmt up
    sysctl -qw net.ipv6.conf.eth0.keep_addr_on_down=1
    ip link set eth0 master mgmt
    #
    # Reinstall the default route if we had it before
    #
    if [[ -n "$def_nh" ]]; then
      ip route add 0.0.0.0/0 vrf mgmt via $def_nh
    fi
    #
    # Enable FRR modules (if not using containerlab bind-mounted /etc/frr/daemons)
    #
  
    #
    # Create loopbacks, stub and lag/bond devices
    #
    if [ ! -e /sys/class/net/lo ]; then
      if [ ! -e /sys/devices/virtual/net/lo ]; then
        ip link add lo type dummy
        ip link set dev lo up
      fi
    fi
  
    # Disable IPv6 (for IPv4-only interfaces) or SLAAC (if the device is a router)
    #
    sysctl -qw net.ipv6.conf.eth1.autoconf=0
    sysctl -qw net.ipv6.conf.eth1.accept_ra=0
    ip link set eth1 down
    ip link set eth1 up
    sysctl -qw net.ipv6.conf.eth2.autoconf=0
    sysctl -qw net.ipv6.conf.eth2.accept_ra=0
    ip link set eth2 down
    ip link set eth2 up
  
    #
    # Add vtysh.conf file
    echo "service integrated-vtysh-config" >/etc/frr/vtysh.conf
    #
    # Set Ethernet interface MTU
    ip link set dev eth1 mtu 1500
    ip link set dev eth2 mtu 1500
  
    #
    # Rest of initial configuration done through VTYSH
    #
    cat >/tmp/config <<CONFIG
    hostname r2
    !
    vrf mgmt
     exit-vrf
    !
    ipv6 forwarding
    frr defaults datacenter
    !
    interface lo
     no shutdown
     ip address 10.0.0.2/32
    !
    interface eth1
     no shutdown
     description r2 -> [h1,dut]
     ip address 172.16.33.2/24
     ipv6 address 2001:db8:cafe:33::2/64
     ipv6 nd ra-interval 5
     no ipv6 nd suppress-ra
    !
    interface eth2
     no shutdown
     description r2 -> [dut,h2]
     ip address 172.16.44.2/24
     ipv6 address 2001:db8:cafe:44::2/64
     ipv6 nd ra-interval 5
     no ipv6 nd suppress-ra
    !
    do write
    CONFIG
    vtysh -f /tmp/config
    exit 0
ok: [dut] => 
  msg: |-
    initial configuration for dut
    =========================================
    hostname dut
    !
    no ip domain lookup
    !
    lldp run
    !
    ip host h1 172.16.33.3
    ip host h2 172.16.44.4
    ip host r2 10.0.0.2 172.16.33.2 172.16.44.2
    !
    ip routing
    !
    ipv6 unicast-routing
    !
    !
    interface Loopback0
     ip address 10.0.0.1 255.255.255.255
    !
    interface Ethernet0/0
     no lldp transmit
     no lldp receive
    !
    interface Ethernet0/1
     no switchport
     description dut -> [h1,r2]
     mtu 1500
     ip address 172.16.33.1 255.255.255.0
     ipv6 address 2001:DB8:CAFE:33::1/64
     no shutdown
    !
    interface Ethernet0/2
     no switchport
     description dut -> [r2,h2]
     mtu 1500
     ip address 172.16.44.1 255.255.255.0
     ipv6 address 2001:DB8:CAFE:44::1/64
     no shutdown
    !
    !
    line vty 0 4
     exec-timeout 0 0
    !
    no banner exec
    no banner login
    no banner incoming

TASK [Find configuration deployment deploy_script for initial] *****************
ok: [r2]
ok: [h1]
ok: [h2]
ok: [dut]

TASK [Deploy initial configuration] ********************************************
included: /home/pipi/net101/tools/netsim/ansible/tasks/frr/initial-clab.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/ios.yml for dut

TASK [Attempt to load VRF kernel module] ***************************************
changed: [r2 -> localhost]

TASK [Disable FRR management VRF when modprobe fails] **************************
skipping: [r2]

TASK [include_tasks] ***********************************************************
included: /home/pipi/net101/tools/netsim/ansible/tasks/frr/deploy-config.yml for r2

TASK [template] ****************************************************************
changed: [r2]

TASK [set_fact] ****************************************************************
ok: [r2]

TASK [run /tmp/config.sh to deploy initial config from /home/pipi/net101/tools/netsim/ansible/templates/initial/frr.j2] ***
changed: [r2]

TASK [run vtysh to import initial config from /home/pipi/net101/tools/netsim/ansible/templates/initial/frr.j2] ***
skipping: [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-i2t_9f01.sh] ***********************
changed: [h1 -> localhost]
changed: [h2 -> localhost]

TASK [ios_config: deploying initial from /home/pipi/net101/tools/netsim/ansible/templates/initial/ios.j2] ***
changed: [dut]

PLAY [Deploy module-specific configurations] ***********************************

TASK [Set variables that cannot be set with VARS] ******************************
ok: [h1]
ok: [h2]
ok: [r2]
ok: [dut]

TASK [Deploy individual configuration modules] *********************************
included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, h1, h2, r2 => (item=gateway)
included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, h1, h2, r2 => (item=routing)

TASK [Figure out whether to deploy the module gateway on current device] *******
ok: [h1]
ok: [h2]
ok: [r2]
ok: [dut]

TASK [Find configuration template for gateway] *********************************
skipping: [h1]
skipping: [h2]
ok: [r2]
ok: [dut]

TASK [fail] ********************************************************************
skipping: [dut]
skipping: [h1]
skipping: [h2]
skipping: [r2]

TASK [Print deployed configuration when running in verbose mode] ***************
skipping: [h1]
skipping: [h2]
ok: [r2] => 
  msg: |-
    gateway configuration for r2
    =========================================
    #!/bin/bash
    #
    set -e # Exit immediately when any command fails
    #
    if [ ! -e /sys/class/net/vrrp-1-217 ]; then
      ip link add vrrp-1-217 link eth1 type macvlan mode bridge
      ip link set dev vrrp-1-217 address 00:00:5e:00:01:d9 addrgenmode none
      ip addr add 172.16.33.42/24 dev vrrp-1-217
      sysctl -w net.ipv4.conf.eth1.arp_announce=1
      sysctl -w net.ipv4.conf.eth1.arp_ignore=2
      ip link set dev vrrp-1-217 up
    fi
    if [ ! -e /sys/class/net/vrrp6-1-217 ]; then
      ip link add vrrp6-1-217 link eth1 type macvlan mode bridge
      ip link set dev vrrp6-1-217 address 00:00:5e:00:02:d9 addrgenmode random
      ip addr add 2001:db8:cafe:33::2a/64 dev vrrp6-1-217
      ip link set dev vrrp6-1-217 up
    fi
    #!/bin/bash
    cat >/tmp/vrrp_config <<CONFIG
    interface eth1
      vrrp 217 shutdown
      no vrrp 217 checksum-with-ipv4-pseudoheader
      vrrp 217 priority 20
      vrrp 217 preempt
      vrrp 217 ipv6 fe80::200:5eff:fe00:2d9
      vrrp 217 ip 172.16.33.42
      vrrp 217 ipv6 2001:db8:cafe:33::2a
      no vrrp 217 shutdown
    do write
    CONFIG
    vtysh -f /tmp/vrrp_config
ok: [dut] => 
  msg: |-
    gateway configuration for dut
    =========================================
    fhrp version vrrp v3
    !
    interface Ethernet0/1
      vrrp 217 address-family ipv4
        address 172.16.33.42
        priority 30
        preempt
      vrrp 217 address-family ipv6
        address fe80::200:5eff:fe00:02d9 primary
        address 2001:db8:cafe:33::2a/64
        priority 30
        preempt

TASK [Find configuration deployment deploy_script for gateway] *****************
skipping: [h1]
skipping: [h2]
ok: [r2]
ok: [dut]

TASK [Deploy gateway configuration] ********************************************
skipping: [h1]
skipping: [h2]
included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/ios.yml for dut
included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/frr.yml for r2

TASK [ios_config: deploying gateway from /home/pipi/net101/tools/netsim/ansible/templates/gateway/ios.j2] ***
changed: [dut]

TASK [template] ****************************************************************
changed: [r2]

TASK [set_fact] ****************************************************************
ok: [r2]

TASK [run /tmp/config.sh to deploy gateway config from /home/pipi/net101/tools/netsim/ansible/templates/gateway/frr.j2] ***
changed: [r2]

TASK [run vtysh to import gateway config from /home/pipi/net101/tools/netsim/ansible/templates/gateway/frr.j2] ***
skipping: [r2]

TASK [Figure out whether to deploy the module routing on current device] *******
ok: [h1]
ok: [h2]
ok: [r2]
ok: [dut]

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: [h1 -> localhost]
changed: [h2 -> 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: [h1 -> localhost]
changed: [h2 -> 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-o2z6lyyn.sh] ***********************
changed: [h1 -> localhost]
changed: [h2 -> localhost]

PLAY [Deploy custom deployment templates] **************************************
skipping: no hosts matched

PLAY RECAP *********************************************************************
dut                        : ok=31   changed=3    unreachable=0    failed=0    skipped=8    rescued=0    ignored=0   
h1                         : ok=31   changed=9    unreachable=0    failed=0    skipped=15   rescued=0    ignored=0   
h2                         : ok=31   changed=9    unreachable=0    failed=0    skipped=15   rescued=0    ignored=0   
r2                         : ok=28   changed=5    unreachable=0    failed=0    skipped=15   rescued=0    ignored=0   



This lab tests IPv4/6 VRRP configuration. 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.