[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]

TASK [Find device readiness script] ********************************************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Wait for device to become ready] *****************************************
skipping: [dut]
skipping: [x1]
skipping: [x2]

TASK [Normalize config on bridge-like devices] *********************************
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut, x1, x2

TASK [Figure out whether to deploy the module normalize on current device] *****
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Find configuration template for normalize] *******************************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [fail] ********************************************************************
skipping: [dut]
skipping: [x1]
skipping: [x2]

TASK [Find configuration deployment deploy_script for normalize] ***************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Print deployed configuration when running in verbose mode] ***************
skipping: [dut]
skipping: [x1]
skipping: [x2]

TASK [Deploy normalize configuration] ******************************************
skipping: [dut]
skipping: [x1]
skipping: [x2]

TASK [Deploy initial configuration] ********************************************
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut, x1, x2

TASK [Figure out whether to deploy the module initial on current device] *******
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Find configuration template for initial] *********************************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [fail] ********************************************************************
skipping: [dut]
skipping: [x1]
skipping: [x2]

TASK [Find configuration deployment deploy_script for initial] *****************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Print deployed configuration when running in verbose mode] ***************
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 [external]"
            ip:
              address:
                10.0.0.1/32: {}
                2001:db8:1::1/64: {}
              ipv6:
                forward: on
              neighbor-discovery:
                enable: on
                router-advertisement:
                  enable: on
                  interval: 5000
  
          swp2:
            type: swp
            link:
              state:
                up : {}
            description: "dut -> x2 [external]"
            ip:
              address:
                10.0.0.1/32: {}
                2001:db8:1:1::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: {}
              ipv6:
                enable: off
ok: [x1] => 
  msg: |-
    initial configuration for x1
    =========================================
    #!/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
    ip link set dev eth1 mtu 1500
  
    #
    # Add vtysh.conf file
    echo "service integrated-vtysh-config" >/etc/frr/vtysh.conf
  
    #
    # Rest of initial configuration done through VTYSH
    #
    cat >/tmp/config <<CONFIG
    hostname x1
    !
    vrf mgmt
     exit-vrf
    !
    ipv6 forwarding
    frr defaults datacenter
    !
    interface lo
     no shutdown
     ip address 172.42.40.1/24
     ipv6 address 2001:db8:cafe::1/64
    !
    interface eth1
     no shutdown
     description x1 -> dut [external]
     ip address 172.42.40.1/24
     ipv6 address 2001:db8:1::2/64
     ipv6 nd ra-interval 5
     no ipv6 nd suppress-ra
    !
    do write
    CONFIG
    vtysh -f /tmp/config
    exit 0
ok: [x2] => 
  msg: |-
    initial configuration for x2
    =========================================
    #!/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
    ip link set dev eth1 mtu 1500
  
    #
    # Add vtysh.conf file
    echo "service integrated-vtysh-config" >/etc/frr/vtysh.conf
  
    #
    # Rest of initial configuration done through VTYSH
    #
    cat >/tmp/config <<CONFIG
    hostname x2
    !
    vrf mgmt
     exit-vrf
    !
    ipv6 forwarding
    frr defaults datacenter
    !
    interface lo
     no shutdown
     ip address 172.42.42.1/24
     ipv6 address 2001:db8:cafe:1::1/64
    !
    interface eth1
     no shutdown
     description x2 -> dut [external]
     ip address 172.42.42.1/24
     ipv6 address 2001:db8:1:1::3/64
     ipv6 nd ra-interval 5
     no ipv6 nd suppress-ra
    !
    do write
    CONFIG
    vtysh -f /tmp/config
    exit 0

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/frr/initial-clab.yml for x1, x2

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 [Attempt to load VRF kernel module] ***************************************
changed: [x1 -> localhost]

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

TASK [include_tasks] ***********************************************************
included: /home/pipi/netlab_gh/netsim/ansible/tasks/frr/deploy-config.yml for x1, x2

TASK [template] ****************************************************************
changed: [x2]
changed: [x1]

TASK [set_fact] ****************************************************************
ok: [x1]
ok: [x2]

TASK [run /tmp/config.sh to deploy initial config from /home/pipi/netlab_gh/netsim/ansible/templates/initial/frr.j2] ***
changed: [x2]
changed: [x1]

TASK [run vtysh to import initial config from /home/pipi/netlab_gh/netsim/ansible/templates/initial/frr.j2] ***
skipping: [x1]
skipping: [x2]

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

TASK [Set variables that cannot be set with VARS] ******************************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Deploy individual configuration modules] *********************************
included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut, x1, x2 => (item=bgp)

TASK [Figure out whether to deploy the module bgp on current device] ***********
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Find configuration template for bgp] *************************************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [fail] ********************************************************************
skipping: [dut]
skipping: [x1]
skipping: [x2]

TASK [Find configuration deployment deploy_script for bgp] *********************
ok: [dut]
ok: [x1]
ok: [x2]

TASK [Print deployed configuration when running in verbose mode] ***************
ok: [x1] => 
  msg: |-
    bgp configuration for x1
    =========================================
    !
    router bgp 65100
      no bgp ebgp-requires-policy
      no bgp default ipv4-unicast
      bgp default show-hostname
      bgp default show-nexthop-hostname
  
      ! Consider AS paths of same length but with different AS as ECMP candidates
      bgp bestpath as-path multipath-relax
  
      bgp router-id 172.42.40.1
    !
      neighbor 2001:db8:1::1 remote-as 65000
      neighbor 2001:db8:1::1 description dut
      neighbor 2001:db8:1::1 capability extended-nexthop
    !
     address-family ipv4 unicast
    !
  
    !
      network 172.42.40.0/24
    !
    !
    !
      neighbor 2001:db8:1::1 activate
      no neighbor 2001:db8:1::1 send-community all
      neighbor 2001:db8:1::1 send-community standard
      neighbor 2001:db8:1::1 send-community large
    !
     address-family ipv6 unicast
    !
  
    !
      network 2001:db8:cafe::/64
    !
    !
    !
      neighbor 2001:db8:1::1 activate
      no neighbor 2001:db8:1::1 send-community all
      neighbor 2001:db8:1::1 send-community standard
      neighbor 2001:db8:1::1 send-community large
    !
    !
    !
    do write
ok: [dut] => 
  msg: |-
    bgp configuration for dut
    =========================================
    - set:
        router:
          bgp:
            enable: on
            autonomous-system: 65000
            router-id: 10.0.0.1
    - set:
        vrf:
          default:
            router:
              bgp:
                enable: on
                autonomous-system: 65000
                router-id: 10.0.0.1
                address-family:
                  ipv4-unicast:
                    enable: on
  
                    network:
                      10.0.0.1/32: {}
                  ipv6-unicast:
                    enable: on
  
                neighbor:
                  2001:db8:1::2:
                    description: "x1"
                    capabilities:
                      extended-nexthop: on
                    remote-as: 65100
                    address-family:
                      ipv4-unicast:
                        enable: on
                      ipv6-unicast:
                        enable: on
                        community-advertise:
                          regular: on
                          extended: off
                          large: off
  
                  2001:db8:1:1::3:
                    description: "x2"
                    capabilities:
                      extended-nexthop: on
                    remote-as: 65101
                    address-family:
                      ipv4-unicast:
                        enable: on
                      ipv6-unicast:
                        enable: on
                        community-advertise:
                          regular: on
                          extended: off
                          large: off
ok: [x2] => 
  msg: |-
    bgp configuration for x2
    =========================================
    !
    router bgp 65101
      no bgp ebgp-requires-policy
      no bgp default ipv4-unicast
      bgp default show-hostname
      bgp default show-nexthop-hostname
  
      ! Consider AS paths of same length but with different AS as ECMP candidates
      bgp bestpath as-path multipath-relax
  
      bgp router-id 172.42.42.1
    !
      neighbor 2001:db8:1:1::1 remote-as 65000
      neighbor 2001:db8:1:1::1 description dut
      neighbor 2001:db8:1:1::1 capability extended-nexthop
    !
     address-family ipv4 unicast
    !
  
    !
      network 172.42.42.0/24
    !
    !
    !
      neighbor 2001:db8:1:1::1 activate
      no neighbor 2001:db8:1:1::1 send-community all
      neighbor 2001:db8:1:1::1 send-community standard
      neighbor 2001:db8:1:1::1 send-community large
    !
     address-family ipv6 unicast
    !
  
    !
      network 2001:db8:cafe:1::/64
    !
    !
    !
      neighbor 2001:db8:1:1::1 activate
      no neighbor 2001:db8:1:1::1 send-community all
      neighbor 2001:db8:1:1::1 send-community standard
      neighbor 2001:db8:1:1::1 send-community large
    !
    !
    !
    do write

TASK [Deploy bgp 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/frr.yml for x1, x2

TASK [set_fact] ****************************************************************
ok: [dut]

TASK [copy the cumulus nvue YAML bgp config file to switch (generated from /home/pipi/netlab_gh/netsim/ansible/templates/bgp/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 bgp config] ********************
changed: [dut]

TASK [execute on cumulus: 'nv config apply -y' for bgp config] *****************
changed: [dut]

TASK [template] ****************************************************************
changed: [x1]
changed: [x2]

TASK [set_fact] ****************************************************************
ok: [x1]
ok: [x2]

TASK [run /tmp/config.sh to deploy bgp config from /home/pipi/netlab_gh/netsim/ansible/templates/bgp/frr.j2] ***
skipping: [x1]
skipping: [x2]

TASK [run vtysh to import bgp config from /home/pipi/netlab_gh/netsim/ansible/templates/bgp/frr.j2] ***
changed: [x2]
changed: [x1]

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

PLAY RECAP *********************************************************************
dut                        : ok=30   changed=6    unreachable=0    failed=0    skipped=7    rescued=0    ignored=0   
x1                         : ok=27   changed=5    unreachable=0    failed=0    skipped=9    rescued=0    ignored=0   
x2                         : ok=26   changed=4    unreachable=0    failed=0    skipped=9    rescued=0    ignored=0   



Use this topology to test the IPv4 AF using RFC 8950 next hops over
a regular IPv6 EBGP session. This test assumes you already tested
the unnumbered IPv4 addresses on your device.