[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: [x1] ok: [x2] ok: [x3] ok: [dut] TASK [Find device readiness script] ******************************************** ok: [x1] ok: [x2] ok: [x3] ok: [dut] TASK [Wait for device to become ready] ***************************************** skipping: [x1] skipping: [x2] skipping: [x3] skipping: [dut] TASK [Normalize config on bridge-like devices] ********************************* included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for x1, x2, x3, dut TASK [Figure out whether to deploy the module normalize on current device] ***** ok: [x1] ok: [x2] ok: [x3] ok: [dut] TASK [Find configuration template for normalize] ******************************* ok: [x1] ok: [x2] ok: [x3] ok: [dut] TASK [fail] ******************************************************************** skipping: [x1] skipping: [x2] skipping: [x3] skipping: [dut] TASK [Find configuration deployment deploy_script for normalize] *************** ok: [x1] ok: [x2] ok: [x3] ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [x1] skipping: [x2] skipping: [x3] skipping: [dut] TASK [Deploy normalize configuration] ****************************************** skipping: [x1] skipping: [x2] skipping: [x3] skipping: [dut] TASK [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for x1, x2, x3, dut TASK [Figure out whether to deploy the module initial on current device] ******* ok: [x1] ok: [x2] ok: [x3] ok: [dut] TASK [Find configuration template for initial] ********************************* ok: [x1] ok: [x2] ok: [x3] ok: [dut] TASK [fail] ******************************************************************** skipping: [x1] skipping: [x2] skipping: [x3] skipping: [dut] TASK [Find configuration deployment deploy_script for initial] ***************** ok: [x1] ok: [x3] ok: [x2] ok: [dut] 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 ========================================= #!/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 vrf name blue table 101 set vrf name red table 100 set interfaces dummy dum0 address 10.0.0.1/32 set interfaces dummy dum0 address 2001:db8:1:1::1/64 set interfaces ethernet eth1 description 'dut -> x1 [stub]' set interfaces ethernet eth1 mtu 1500 set interfaces ethernet eth1 address 172.16.0.1/24 set interfaces ethernet eth1 address 2001:db8:2::1/64; set interfaces ethernet eth1 vrf red set interfaces ethernet eth2 description 'dut -> x2 [stub]' set interfaces ethernet eth2 mtu 1500 set interfaces ethernet eth2 address 172.16.1.1/24 set interfaces ethernet eth2 address 2001:db8:2:1::1/64; set interfaces ethernet eth2 vrf blue set interfaces ethernet eth3 description 'dut -> x3 [stub]' set interfaces ethernet eth3 mtu 1500 set interfaces ethernet eth3 address 172.16.2.1/24 set interfaces ethernet eth3 address 2001:db8:2:2::1/64; set service lldp interface all >/dev/null 2>/dev/null set service lldp interface eth0 disable >/dev/null 2>/dev/null set service lldp interface eth0 mode disable set service router-advert interface eth1 set service router-advert interface eth2 set service router-advert interface eth3 set service ssh # Commit, save and exit from subshell commit save exit # Restart FRR to pick up the new hostname sudo service frr restart TASK [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/linux-clab.yml for x1, x2, x3 included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/vyos.yml for 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: [x1 -> localhost] changed: [x2 -> 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-oywrnw65.sh] *********************** changed: [x1 -> localhost] changed: [x2 -> localhost] changed: [x3 -> 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/netlab_gh/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: [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: [dut] => msg: |- routing 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 # Static routing set vrf name blue protocols static route 172.16.41.0/24 next-hop 172.16.0.2 interface eth1 set vrf name blue protocols static route 172.16.41.0/24 next-hop 172.16.0.2 vrf red set vrf name blue protocols static route6 3fff:cafe:0:1::/64 next-hop 2001:db8:2::2 interface eth1 set vrf name blue protocols static route6 3fff:cafe:0:1::/64 next-hop 2001:db8:2::2 vrf red set vrf name red protocols static route 172.16.42.0/24 next-hop 172.16.1.3 interface eth2 set vrf name red protocols static route 172.16.42.0/24 next-hop 172.16.1.3 vrf blue set vrf name red protocols static route6 3fff:cafe:0:2::/64 next-hop 2001:db8:2:1::3 interface eth2 set vrf name red protocols static route6 3fff:cafe:0:2::/64 next-hop 2001:db8:2:1::3 vrf blue set protocols static route 172.16.42.0/24 next-hop 172.16.1.3 interface eth2 set protocols static route 172.16.42.0/24 next-hop 172.16.1.3 vrf blue set protocols static route6 3fff:cafe:0:2::/64 next-hop 2001:db8:2:1::3 interface eth2 set protocols static route6 3fff:cafe:0:2::/64 next-hop 2001:db8:2:1::3 vrf blue set vrf name blue protocols static route 172.16.40.0/24 next-hop 172.16.2.4 interface eth3 set vrf name blue protocols static route 172.16.40.0/24 next-hop 172.16.2.4 vrf default set vrf name blue protocols static route6 3fff:cafe::/64 next-hop 2001:db8:2:2::4 interface eth3 set vrf name blue protocols static route6 3fff:cafe::/64 next-hop 2001:db8:2:2::4 vrf default commit save exit 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: [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/vyos.yml for dut included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/linux-clab.yml for x1, x2, x3 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-routing.sh to deploy routing config from /home/pipi/netlab_gh/netsim/ansible/templates/routing/vyos.j2] *** 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.j2] *** changed: [x3 -> localhost] changed: [x1 -> localhost] changed: [x2 -> localhost] TASK [Copy script into running container at /tmp/config-x1_routing.sh] ********* changed: [x1 -> localhost] changed: [x2 -> localhost] changed: [x3 -> localhost] TASK [Execute /tmp/config-x1_routing.sh to deploy routing config based on /home/pipi/netlab_gh/netsim/ansible/templates/routing/linux.j2] *** changed: [x1] changed: [x2] changed: [x3] TASK [Container configuration for routing based on /home/pipi/netlab_gh/netsim/ansible/templates/routing/linux.j2 executed in netns] *** skipping: [x1] skipping: [x2] skipping: [x3] TASK [Remove temporary file /tmp/x1_routing-tfk2ymq_.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] skipping: [x3] ok: [dut] 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 ========================================= #!/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 # Enter vrf sublevel edit vrf name blue # Back to root level top edit vrf name red # Back to root level top # Commit, save and exit from subshell commit save exit TASK [Deploy vrf configuration] ************************************************ skipping: [x1] skipping: [x2] skipping: [x3] included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/vyos.yml for dut 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-vrf.sh to deploy vrf config from /home/pipi/netlab_gh/netsim/ansible/templates/vrf/vyos.j2] *** changed: [dut] PLAY [Deploy custom deployment templates] ************************************** skipping: no hosts matched PLAY RECAP ********************************************************************* dut : ok=39 changed=6 unreachable=0 failed=0 skipped=11 rescued=0 ignored=0 x1 : ok=32 changed=9 unreachable=0 failed=0 skipped=14 rescued=0 ignored=0 x2 : ok=32 changed=9 unreachable=0 failed=0 skipped=14 rescued=0 ignored=0 x3 : ok=32 changed=9 unreachable=0 failed=0 skipped=14 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.