[WARNING]: Could not match supplied host pattern, ignoring: unprovisioned PLAY [Deploy initial device configuration] ************************************* TASK [Set variables that cannot be set with VARS] ****************************** ok: [dut] ok: [xf] ok: [p1] ok: [p2] TASK [Find device readiness script] ******************************************** ok: [dut] ok: [xf] ok: [p1] ok: [p2] TASK [Wait for device to become ready] ***************************************** skipping: [dut] skipping: [xf] skipping: [p1] skipping: [p2] TASK [Normalize config on bridge-like devices] ********************************* included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, xf, p1, p2 TASK [Figure out whether to deploy the module normalize on current device] ***** ok: [dut] ok: [xf] ok: [p1] ok: [p2] TASK [Find configuration template for normalize] ******************************* ok: [dut] ok: [xf] ok: [p1] ok: [p2] TASK [fail] ******************************************************************** skipping: [dut] skipping: [xf] skipping: [p1] skipping: [p2] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [dut] skipping: [xf] skipping: [p1] skipping: [p2] TASK [Find configuration deployment deploy_script for normalize] *************** skipping: [dut] skipping: [xf] skipping: [p1] skipping: [p2] TASK [Deploy normalize configuration] ****************************************** skipping: [dut] skipping: [xf] skipping: [p1] skipping: [p2] TASK [Deploy initial configuration] ******************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, xf, p1, p2 TASK [Figure out whether to deploy the module initial on current device] ******* ok: [dut] ok: [xf] ok: [p1] ok: [p2] TASK [Find configuration template for initial] ********************************* ok: [dut] ok: [xf] ok: [p1] ok: [p2] TASK [fail] ******************************************************************** skipping: [dut] skipping: [xf] skipping: [p1] skipping: [p2] TASK [Print deployed configuration when running in verbose mode] *************** 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 d1 table 100 set vrf name d2 table 101 set interfaces dummy dum0 address 10.0.0.1/32 set interfaces ethernet eth1 description 'dut -> p1' set interfaces ethernet eth1 mtu 1500 set interfaces ethernet eth1 address 10.1.0.1/30 set interfaces ethernet eth1 vrf d1 set interfaces ethernet eth2 description 'dut -> p2' set interfaces ethernet eth2 mtu 1500 set interfaces ethernet eth2 address 10.1.0.5/30 set interfaces ethernet eth2 vrf d2 set interfaces ethernet eth3 description 'dut -> xf [external]' set interfaces ethernet eth3 mtu 1500 set interfaces ethernet eth3 address 10.1.0.9/30 set interfaces ethernet eth3 vrf d2 set interfaces dummy dum1 description 'VRF Loopback d2' set interfaces dummy dum1 address 192.168.43.1/32 set interfaces dummy dum1 vrf d2 set service lldp interface all set service lldp interface eth0 disable 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: [xf] => msg: |- initial configuration for xf ========================================= #!/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.disable_ipv6=1 # # Add vtysh.conf file echo "service integrated-vtysh-config" >/etc/frr/vtysh.conf # # Set Ethernet interface MTU ip link set dev eth1 mtu 1500 # # Rest of initial configuration done through VTYSH # cat >/tmp/config <<CONFIG hostname xf ! vrf mgmt exit-vrf ! frr defaults datacenter ! interface lo no shutdown ip address 10.0.0.4/32 ! interface eth1 no shutdown description xf -> dut [external] ip address 10.1.0.10/30 ! do write CONFIG vtysh -f /tmp/config exit 0 ok: [p2] => msg: |- initial configuration for p2 ========================================= #!/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.disable_ipv6=1 # # Add vtysh.conf file echo "service integrated-vtysh-config" >/etc/frr/vtysh.conf # # Set Ethernet interface MTU ip link set dev eth1 mtu 1500 # # Rest of initial configuration done through VTYSH # cat >/tmp/config <<CONFIG hostname p2 ! vrf mgmt exit-vrf ! frr defaults datacenter ! interface lo no shutdown ip address 10.0.0.3/32 ! interface eth1 no shutdown description p2 -> dut ip address 10.1.0.6/30 ! do write CONFIG vtysh -f /tmp/config exit 0 ok: [p1] => msg: |- initial configuration for p1 ========================================= #!/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.disable_ipv6=1 # # Add vtysh.conf file echo "service integrated-vtysh-config" >/etc/frr/vtysh.conf # # Set Ethernet interface MTU ip link set dev eth1 mtu 1500 # # Rest of initial configuration done through VTYSH # cat >/tmp/config <<CONFIG hostname p1 ! vrf mgmt exit-vrf ! frr defaults datacenter ! interface lo no shutdown ip address 10.0.0.2/32 ! interface eth1 no shutdown description p1 -> dut ip address 10.1.0.2/30 ! do write CONFIG vtysh -f /tmp/config exit 0 TASK [Find configuration deployment deploy_script for initial] ***************** ok: [dut] ok: [xf] ok: [p1] ok: [p2] TASK [Deploy initial configuration] ******************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/vyos.yml for dut included: /home/pipi/net101/tools/netsim/ansible/tasks/frr/initial-clab.yml for xf, p1, p2 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] TASK [Attempt to load VRF kernel module] *************************************** changed: [xf -> localhost] TASK [Disable FRR management VRF when modprobe fails] ************************** skipping: [xf] skipping: [p1] skipping: [p2] TASK [include_tasks] *********************************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/frr/deploy-config.yml for xf, p1, p2 TASK [template] **************************************************************** changed: [p2] changed: [xf] changed: [p1] TASK [set_fact] **************************************************************** ok: [xf] ok: [p1] ok: [p2] TASK [run /tmp/config.sh to deploy initial config from /home/pipi/net101/tools/netsim/ansible/templates/initial/frr.j2] *** changed: [p1] changed: [xf] changed: [p2] TASK [run vtysh to import initial config from /home/pipi/net101/tools/netsim/ansible/templates/initial/frr.j2] *** skipping: [xf] skipping: [p1] skipping: [p2] PLAY [Deploy module-specific configurations] *********************************** TASK [Set variables that cannot be set with VARS] ****************************** ok: [dut] ok: [p1] ok: [p2] ok: [xf] TASK [Deploy individual configuration modules] ********************************* included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, p1, p2, xf => (item=bgp) included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, p1, p2, xf => (item=ospf) included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut, p1, p2, xf => (item=vrf) TASK [Figure out whether to deploy the module bgp on current device] *********** ok: [dut] ok: [p1] ok: [p2] ok: [xf] TASK [Find configuration template for bgp] ************************************* skipping: [p1] skipping: [p2] ok: [dut] ok: [xf] TASK [fail] ******************************************************************** skipping: [dut] skipping: [p1] skipping: [p2] skipping: [xf] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [p1] skipping: [p2] ok: [dut] => msg: |- bgp 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 protocols bgp system-as 65000 set protocols bgp parameters router-id 10.0.0.1 # Work on Family ipv4 set protocols bgp address-family ipv4-unicast network 10.0.0.1/32 # Commit, save and exit from subshell commit save exit ok: [xf] => msg: |- bgp configuration for xf ========================================= ! 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 10.0.0.4 ! neighbor 10.1.0.9 remote-as 65000 neighbor 10.1.0.9 description dut ! address-family ipv4 unicast ! ! network 10.0.0.4/32 ! ! ! neighbor 10.1.0.9 activate no neighbor 10.1.0.9 send-community all neighbor 10.1.0.9 send-community standard neighbor 10.1.0.9 send-community large ! ! ! do write TASK [Find configuration deployment deploy_script for bgp] ********************* skipping: [p1] skipping: [p2] ok: [dut] ok: [xf] TASK [Deploy bgp configuration] ************************************************ skipping: [p1] skipping: [p2] included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/vyos.yml for dut included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/frr.yml for xf 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-bgp.sh to deploy bgp config from /home/pipi/net101/tools/netsim/ansible/templates/bgp/vyos.j2] *** changed: [dut] TASK [template] **************************************************************** changed: [xf] TASK [set_fact] **************************************************************** ok: [xf] TASK [run /tmp/config.sh to deploy bgp config from /home/pipi/net101/tools/netsim/ansible/templates/bgp/frr.j2] *** skipping: [xf] TASK [run vtysh to import bgp config from /home/pipi/net101/tools/netsim/ansible/templates/bgp/frr.j2] *** changed: [xf] TASK [Figure out whether to deploy the module ospf on current device] ********** ok: [dut] ok: [p1] ok: [p2] ok: [xf] TASK [Find configuration template for ospf] ************************************ skipping: [xf] ok: [dut] ok: [p1] ok: [p2] TASK [fail] ******************************************************************** skipping: [dut] skipping: [p1] skipping: [p2] skipping: [xf] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [xf] ok: [dut] => msg: |- ospf 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 commit save exit ok: [p1] => msg: |- ospf configuration for p1 ========================================= ! ! OSPFv2 FRR configuration ! router ospf ospf router-id 10.0.0.2 timers throttle spf 10 50 500 timers throttle lsa all 100 timers lsa min-arrival 100 exit ! interface lo ! ip ospf area 0.0.0.0 ! interface eth1 ! p1 -> dut ip ospf area 0.0.0.0 ip ospf network point-to-point ! ! do write ok: [p2] => msg: |- ospf configuration for p2 ========================================= ! ! OSPFv2 FRR configuration ! router ospf ospf router-id 10.0.0.3 timers throttle spf 10 50 500 timers throttle lsa all 100 timers lsa min-arrival 100 exit ! interface lo ! ip ospf area 0.0.0.0 ! interface eth1 ! p2 -> dut ip ospf area 0.0.0.0 ip ospf network point-to-point ! ! do write TASK [Find configuration deployment deploy_script for ospf] ******************** skipping: [xf] ok: [dut] ok: [p1] ok: [p2] TASK [Deploy ospf configuration] *********************************************** skipping: [xf] included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/vyos.yml for dut included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/frr.yml for p1, p2 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-ospf.sh to deploy ospf config from /home/pipi/net101/tools/netsim/ansible/templates/ospf/vyos.j2] *** changed: [dut] TASK [template] **************************************************************** changed: [p2] changed: [p1] TASK [set_fact] **************************************************************** ok: [p1] ok: [p2] TASK [run /tmp/config.sh to deploy ospf config from /home/pipi/net101/tools/netsim/ansible/templates/ospf/frr.j2] *** skipping: [p1] skipping: [p2] TASK [run vtysh to import ospf config from /home/pipi/net101/tools/netsim/ansible/templates/ospf/frr.j2] *** changed: [p2] changed: [p1] TASK [Figure out whether to deploy the module vrf on current device] *********** ok: [dut] ok: [p1] ok: [p2] ok: [xf] TASK [Find configuration template for vrf] ************************************* skipping: [p1] skipping: [p2] skipping: [xf] ok: [dut] TASK [fail] ******************************************************************** skipping: [dut] skipping: [p1] skipping: [p2] skipping: [xf] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [p1] skipping: [p2] skipping: [xf] 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 set protocols bgp system-as 65000 # Enter vrf sublevel edit vrf name d1 set protocols bgp system-as 65000 set protocols bgp parameters router-id 10.0.0.1 set protocols bgp address-family ipv4-unicast rd vpn export 65000:1 set protocols bgp address-family ipv4-unicast route-target vpn import "65000:1" set protocols bgp address-family ipv4-unicast route-target vpn export "65000:1" set protocols bgp address-family ipv4-unicast import vpn set protocols bgp address-family ipv4-unicast export vpn set protocols bgp address-family ipv4-unicast label vpn export auto set protocols bgp address-family ipv4-unicast redistribute connected set protocols bgp address-family ipv4-unicast redistribute ospf # Define networks for VRF Loopback set protocols ospf parameters router-id 10.0.0.1 set protocols ospf redistribute bgp set protocols ospf redistribute connected set protocols ospf default-information originate set protocols ospf default-information originate always set protocols ospf interface eth1 area 0.0.0.0 set protocols ospf interface eth1 network point-to-point # Back to root level top edit vrf name d2 set protocols bgp system-as 65000 set protocols bgp parameters router-id 10.0.0.1 set protocols bgp address-family ipv4-unicast rd vpn export 65000:2 set protocols bgp address-family ipv4-unicast route-target vpn import "65000:2" set protocols bgp address-family ipv4-unicast route-target vpn export "65000:2" set protocols bgp address-family ipv4-unicast import vpn set protocols bgp address-family ipv4-unicast export vpn set protocols bgp address-family ipv4-unicast label vpn export auto set protocols bgp address-family ipv4-unicast redistribute connected set protocols bgp address-family ipv4-unicast redistribute ospf # Define networks for VRF Loopback set protocols bgp address-family ipv4-unicast network 192.168.43.1/32 set protocols bgp neighbor 10.1.0.10 remote-as 65100 set protocols bgp neighbor 10.1.0.10 description 'xf' set protocols bgp neighbor 10.1.0.10 address-family ipv4-unicast soft-reconfiguration inbound set protocols bgp neighbor 10.1.0.10 address-family ipv4-unicast nexthop-self set protocols bgp neighbor 10.1.0.10 address-family ipv4-unicast disable-send-community extended set protocols ospf parameters router-id 10.0.0.1 set protocols ospf redistribute bgp set protocols ospf redistribute connected set protocols ospf default-information originate set protocols ospf interface eth2 area 0.0.0.0 set protocols ospf interface eth2 network point-to-point set protocols ospf interface dum1 area 0.0.0.0 # Back to root level top # Commit, save and exit from subshell commit save exit TASK [Find configuration deployment deploy_script for vrf] ********************* skipping: [p1] skipping: [p2] skipping: [xf] ok: [dut] TASK [Deploy vrf configuration] ************************************************ skipping: [p1] skipping: [p2] skipping: [xf] included: /home/pipi/net101/tools/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/net101/tools/netsim/ansible/templates/vrf/vyos.j2] *** changed: [dut] PLAY [Deploy custom deployment templates] ************************************** skipping: no hosts matched PLAY RECAP ********************************************************************* dut : ok=48 changed=8 unreachable=0 failed=0 skipped=15 rescued=0 ignored=0 p1 : ok=29 changed=4 unreachable=0 failed=0 skipped=20 rescued=0 ignored=0 p2 : ok=29 changed=4 unreachable=0 failed=0 skipped=20 rescued=0 ignored=0 xf : ok=30 changed=5 unreachable=0 failed=0 skipped=20 rescued=0 ignored=0 This lab tests the VRF OSPF default route origination. The device under test should originate the default route in multiple VRFs, one always, the other one based on BGP default route.