[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: [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: [x1] ok: [x2] ok: [x3] ok: [dut] TASK [Find configuration template for normalize] ******************************* ok: [x1] ok: [x2] ok: [x3] ok: [dut] TASK [fail] ******************************************************************** skipping: [dut] skipping: [x1] skipping: [x2] skipping: [x3] 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: [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: [x1] ok: [x2] ok: [x3] ok: [dut] TASK [Find configuration template for initial] ********************************* ok: [x1] ok: [x2] ok: [x3] ok: [dut] TASK [fail] ******************************************************************** skipping: [dut] skipping: [x1] skipping: [x2] skipping: [x3] TASK [Find configuration deployment deploy_script for initial] ***************** ok: [x1] ok: [x2] ok: [x3] 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) # # 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 # # 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: |- 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) # # 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 # # 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: |- 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) # # 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 # # 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 ok: [dut] => msg: |- initial configuration for dut ========================================= hostname dut ! lldp enable ! ip vrf blue ! ! ip route-import|export xxx ip route-import 65000:2 ip route-export 65000:2 ! ! ipv6 route-import|export xxx ipv6 route-import 65000:2 ipv6 route-export 65000:2 ! exit ip vrf red ! ! ip route-import|export xxx ip route-import 65000:1 ip route-export 65000:1 ! ! ipv6 route-import|export xxx ipv6 route-import 65000:1 ipv6 route-export 65000:1 ! exit ! ! ! default mtu 1532 ! interface loopback0 ip address 10.0.0.1/32 ipv6 address 2001:db8:1:1::1/64 ! interface mgmt1/1/1 no lldp transmit no lldp receive ! interface ethernet1/1/1 no shutdown no switchport ip vrf forwarding red description "dut -> x1 [stub]" ip address 172.16.0.1/24 ip unreachables ipv6 nd max-ra-interval 4 ipv6 nd min-ra-interval 3 ipv6 nd send-ra ipv6 address 2001:db8:2::1/64 ipv6 unreachables ! interface ethernet1/1/2 no shutdown no switchport ip vrf forwarding blue description "dut -> x2 [stub]" ip address 172.16.1.1/24 ip unreachables ipv6 nd max-ra-interval 4 ipv6 nd min-ra-interval 3 ipv6 nd send-ra ipv6 address 2001:db8:2:1::1/64 ipv6 unreachables ! interface ethernet1/1/3 no shutdown no switchport description "dut -> x3 [stub]" ip address 172.16.2.1/24 ip unreachables ipv6 nd max-ra-interval 4 ipv6 nd min-ra-interval 3 ipv6 nd send-ra ipv6 address 2001:db8:2:2::1/64 ipv6 unreachables ! TASK [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/dellos10.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 [dellos10_config: deploying initial from /home/pipi/netlab_gh/netsim/ansible/templates/initial/dellos10.j2, save to startup=yes] *** 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: [x3 -> localhost] changed: [x2 -> localhost] changed: [x1 -> 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: [x3 -> localhost] changed: [x2 -> localhost] changed: [x1 -> localhost] TASK [Remove temporary file /tmp/x1_initial-kg_vayjj.sh] *********************** changed: [x3 -> localhost] changed: [x2 -> localhost] changed: [x1 -> localhost] PLAY [Deploy module-specific configurations] *********************************** TASK [Set variables that cannot be set with VARS] ****************************** ok: [dut] TASK [Deploy individual configuration modules] ********************************* included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut => (item=routing) included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut => (item=vrf) TASK [Figure out whether to deploy the module routing on current device] ******* ok: [dut] TASK [Find configuration template for routing] ********************************* ok: [dut] TASK [fail] ******************************************************************** skipping: [dut] TASK [Find configuration deployment deploy_script for routing] ***************** ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** ok: [dut] => msg: |- routing configuration for dut ========================================= ! ! ! AS-path access lists ! ! ! Static routes (dual routes for each entry, in entry VRF and next hop VRF) ! ip route vrf blue 172.16.41.0/24 interface ethernet1/1/1 172.16.0.2 ip route vrf red 172.16.41.0/24 interface ethernet1/1/1 172.16.0.2 ipv6 route vrf blue 3fff:cafe:0:1::/64 interface ethernet1/1/1 2001:db8:2::2 ipv6 route vrf red 3fff:cafe:0:1::/64 interface ethernet1/1/1 2001:db8:2::2 ip route vrf red 172.16.42.0/24 interface ethernet1/1/2 172.16.1.3 ip route vrf blue 172.16.42.0/24 interface ethernet1/1/2 172.16.1.3 ipv6 route vrf red 3fff:cafe:0:2::/64 interface ethernet1/1/2 2001:db8:2:1::3 ipv6 route vrf blue 3fff:cafe:0:2::/64 interface ethernet1/1/2 2001:db8:2:1::3 ip route 172.16.42.0/24 interface ethernet1/1/2 172.16.1.3 ip route vrf blue 172.16.42.0/24 interface ethernet1/1/2 172.16.1.3 ipv6 route 3fff:cafe:0:2::/64 interface ethernet1/1/2 2001:db8:2:1::3 ipv6 route vrf blue 3fff:cafe:0:2::/64 interface ethernet1/1/2 2001:db8:2:1::3 ip route vrf blue 172.16.40.0/24 interface ethernet1/1/3 172.16.2.4 ip route 172.16.40.0/24 interface ethernet1/1/3 172.16.2.4 ipv6 route vrf blue 3fff:cafe::/64 interface ethernet1/1/3 2001:db8:2:2::4 ipv6 route 3fff:cafe::/64 interface ethernet1/1/3 2001:db8:2:2::4 TASK [Deploy routing configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/dellos10.yml for dut TASK [wait_for_connection] ***************************************************** skipping: [dut] TASK [dellos10_config: deploying routing from /home/pipi/netlab_gh/netsim/ansible/templates/routing/dellos10.j2, save to startup=yes] *** changed: [dut] TASK [Figure out whether to deploy the module vrf on current device] *********** ok: [dut] TASK [Find configuration template for vrf] ************************************* ok: [dut] TASK [fail] ******************************************************************** skipping: [dut] TASK [Find configuration deployment deploy_script for vrf] ********************* ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** ok: [dut] => msg: |- vrf configuration for dut ========================================= TASK [Deploy vrf configuration] ************************************************ included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/dellos10.yml for dut TASK [wait_for_connection] ***************************************************** skipping: [dut] TASK [dellos10_config: deploying vrf from /home/pipi/netlab_gh/netsim/ansible/templates/vrf/dellos10.j2, save to startup=yes] *** changed: [dut] PLAY [Deploy custom deployment templates] ************************************** skipping: no hosts matched PLAY RECAP ********************************************************************* dut : ok=28 changed=3 unreachable=0 failed=0 skipped=10 rescued=0 ignored=0 x1 : ok=17 changed=4 unreachable=0 failed=0 skipped=7 rescued=0 ignored=0 x2 : ok=17 changed=4 unreachable=0 failed=0 skipped=7 rescued=0 ignored=0 x3 : ok=17 changed=4 unreachable=0 failed=0 skipped=7 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.