Creating Device configuration snippets [CREATED] dut: initial [CREATED] p1: normalize,initial,routing [CREATED] t_1300: initial,routing [CREATED] t_1400: initial,routing Checking Are lab devices ready to be configured? [INFO] Checking SSH server(s) on p1 Config Deploying device configurations [INFO] Executing normalize configuration for node p1 [INFO] Executing initial configuration for node p1 [INFO] Executing routing configuration for node p1 [INFO] Starting Ansible playbook to deploy the rest of the configurations [WARNING]: Found variable using reserved name: hosts PLAY [Deploy initial device configuration] ************************************* TASK [Set variables that cannot be set with VARS] ****************************** ok: [t_1300] ok: [t_1400] ok: [dut] TASK [Normalize config on bridge-like devices] ********************************* included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for t_1300, t_1400, dut TASK [Figure out whether to deploy the module normalize on current device] ***** ok: [t_1300] ok: [t_1400] ok: [dut] TASK [Find configuration template for normalize] ******************************* ok: [t_1300] ok: [t_1400] ok: [dut] TASK [fail] ******************************************************************** skipping: [t_1300] skipping: [t_1400] skipping: [dut] TASK [Find configuration deployment deploy_script for normalize] *************** ok: [t_1300] ok: [t_1400] ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [t_1300] skipping: [t_1400] skipping: [dut] TASK [Deploy normalize configuration] ****************************************** skipping: [t_1300] skipping: [t_1400] skipping: [dut] TASK [Deploy initial configuration] ******************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for t_1300, t_1400, dut TASK [Figure out whether to deploy the module initial on current device] ******* ok: [t_1300] ok: [t_1400] ok: [dut] TASK [Find configuration template for initial] ********************************* ok: [t_1300] ok: [t_1400] ok: [dut] TASK [fail] ******************************************************************** skipping: [t_1300] skipping: [t_1400] skipping: [dut] TASK [Find configuration deployment deploy_script for initial] ***************** ok: [t_1300] ok: [t_1400] ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** ok: [t_1300] => { "msg": "initial configuration for t_1300\n=========================================\n#!/bin/bash\n#\nset -e\n#\n# Create bash profile script\n#\ncat <<'SCRIPT' >/root/.bash_profile\n#!/bin/bash\n#\nexport PS1=\"\\h(bash)$ \"\nSCRIPT\nhostname t-1300\n#\n# Build hosts file\n#\n#\ncat <<'SCRIPT' >/tmp/hosts\n#\n# Created by netlab initial\n#\n10.0.0.1 dut\n2001:db8:0:1::1 dut\n172.16.0.1 ethernet1-1-1.dut\n2001:db8:1::1 ethernet1-1-1.dut\n172.16.1.1 ethernet1-1-2.dut\n2001:db8:1:1::1 ethernet1-1-2.dut\n172.16.2.1 ethernet1-1-3.dut\n2001:db8:1:2::1 ethernet1-1-3.dut\n10.0.0.2 p1\n2001:db8:0:2::1 p1\n172.16.0.2 Ethernet1.p1\n2001:db8:1::2 Ethernet1.p1\n172.16.2.3 t-1300 eth1.t_1300\n2001:db8:1:2::3 t-1300 eth1.t_1300\n172.16.1.4 t-1400 eth1.t_1400\n2001:db8:1:1::4 t-1400 eth1.t_1400\nSCRIPT\ngrep \"Created by netlab\" /etc/hosts || uniq /tmp/hosts >>/etc/hosts\n# It seems on the Vagrant box for ubuntu 20.04, DNS Servers are hardcoded as 4.2.2.1 & Co.\n# This is annoying on a network with filtered DNS.\n# DNSMasq server used for giving out DHCP addresses on the management network is able to act as a DNS Server.\n# Let's use that.\n#\n# (Overwrite netplan config to remove DNS stuff)\necho -n 'Starting initial config ' && date\ncat <<'SCRIPT' >/etc/netplan/01-netcfg.yaml\nnetwork:\n version: 2\n renderer: networkd\n ethernets:\n eth0:\n dhcp4: true\n dhcp6: false\n optional: true\nSCRIPT\nnetplan apply\n\n# (Overwrite resolved config to remove DNS stuff)\ncat <<'SCRIPT' > /etc/systemd/resolved.conf \n[Resolve]\nDNS=\nFallbackDNS=\nDomains=\nDNSOverTLS=no\nCache=yes\nDNSStubListener=yes\nSCRIPT\n\nsystemctl restart systemd-resolved\n\n# Set persistent hostname\nhostnamectl set-hostname t_1300\n\nNEED_APT_UPDATE=YES\n\n# Loopback addressing\n\n# Interface addressing and bonds, including any static routes\ncat <<'SCRIPT' > /etc/netplan/03-eth-eth1.yaml\nnetwork:\n version: 2\n renderer: networkd\n ethernets:\n eth1:\n addresses:\n - 172.16.2.3/24\n - 2001:db8:1:2::3/64\nSCRIPT\n\n# Disable auto-negotiation on Ethernet interfaces, needed to make LACP work correctly\ncat <<'SCRIPT' > /etc/systemd/network/98-eth.link\n\n[Match]\nOriginalName=eth*\n\n[Link]\nBitsPerSecond=1G\nAutoNegotiation=no\nDuplex=full\nSCRIPT\n\nchmod 400 /etc/netplan/*\n\necho -n 'Starting netplan generate ' && date\nnetplan generate\necho -n 'Starting netplan apply ' && date\nnetplan apply\n\n#\n# Sysctl settings: IPv4/IPv6 forwarding, IPv6 LLA\n# Do this after 'netplan apply', e.g. bond devices won't exist before that\n#\ncat <<'SCRIPT' > /etc/sysctl.d/10-netsim.conf\nnet.ipv4.conf.all.arp_announce=2\nnet.ipv4.ip_forward=0\nnet.ipv6.conf.all.forwarding=0\n\nnet.ipv6.conf.eth1.disable_ipv6=0\n\nSCRIPT\nsysctl -p /etc/sysctl.d/10-netsim.conf\n" } ok: [t_1400] => { "msg": "initial configuration for t_1400\n=========================================\n#!/bin/bash\n#\nset -e\n#\n# Create bash profile script\n#\ncat <<'SCRIPT' >/root/.bash_profile\n#!/bin/bash\n#\nexport PS1=\"\\h(bash)$ \"\nSCRIPT\nhostname t-1400\n#\n# Build hosts file\n#\n#\ncat <<'SCRIPT' >/tmp/hosts\n#\n# Created by netlab initial\n#\n10.0.0.1 dut\n2001:db8:0:1::1 dut\n172.16.0.1 ethernet1-1-1.dut\n2001:db8:1::1 ethernet1-1-1.dut\n172.16.1.1 ethernet1-1-2.dut\n2001:db8:1:1::1 ethernet1-1-2.dut\n172.16.2.1 ethernet1-1-3.dut\n2001:db8:1:2::1 ethernet1-1-3.dut\n10.0.0.2 p1\n2001:db8:0:2::1 p1\n172.16.0.2 Ethernet1.p1\n2001:db8:1::2 Ethernet1.p1\n172.16.2.3 t-1300 eth1.t_1300\n2001:db8:1:2::3 t-1300 eth1.t_1300\n172.16.1.4 t-1400 eth1.t_1400\n2001:db8:1:1::4 t-1400 eth1.t_1400\nSCRIPT\ngrep \"Created by netlab\" /etc/hosts || uniq /tmp/hosts >>/etc/hosts\n# It seems on the Vagrant box for ubuntu 20.04, DNS Servers are hardcoded as 4.2.2.1 & Co.\n# This is annoying on a network with filtered DNS.\n# DNSMasq server used for giving out DHCP addresses on the management network is able to act as a DNS Server.\n# Let's use that.\n#\n# (Overwrite netplan config to remove DNS stuff)\necho -n 'Starting initial config ' && date\ncat <<'SCRIPT' >/etc/netplan/01-netcfg.yaml\nnetwork:\n version: 2\n renderer: networkd\n ethernets:\n eth0:\n dhcp4: true\n dhcp6: false\n optional: true\nSCRIPT\nnetplan apply\n\n# (Overwrite resolved config to remove DNS stuff)\ncat <<'SCRIPT' > /etc/systemd/resolved.conf \n[Resolve]\nDNS=\nFallbackDNS=\nDomains=\nDNSOverTLS=no\nCache=yes\nDNSStubListener=yes\nSCRIPT\n\nsystemctl restart systemd-resolved\n\n# Set persistent hostname\nhostnamectl set-hostname t_1400\n\nNEED_APT_UPDATE=YES\n\n# Loopback addressing\n\n# Interface addressing and bonds, including any static routes\ncat <<'SCRIPT' > /etc/netplan/03-eth-eth1.yaml\nnetwork:\n version: 2\n renderer: networkd\n ethernets:\n eth1:\n addresses:\n - 172.16.1.4/24\n - 2001:db8:1:1::4/64\nSCRIPT\n\n# Disable auto-negotiation on Ethernet interfaces, needed to make LACP work correctly\ncat <<'SCRIPT' > /etc/systemd/network/98-eth.link\n\n[Match]\nOriginalName=eth*\n\n[Link]\nBitsPerSecond=1G\nAutoNegotiation=no\nDuplex=full\nSCRIPT\n\nchmod 400 /etc/netplan/*\n\necho -n 'Starting netplan generate ' && date\nnetplan generate\necho -n 'Starting netplan apply ' && date\nnetplan apply\n\n#\n# Sysctl settings: IPv4/IPv6 forwarding, IPv6 LLA\n# Do this after 'netplan apply', e.g. bond devices won't exist before that\n#\ncat <<'SCRIPT' > /etc/sysctl.d/10-netsim.conf\nnet.ipv4.conf.all.arp_announce=2\nnet.ipv4.ip_forward=0\nnet.ipv6.conf.all.forwarding=0\n\nnet.ipv6.conf.eth1.disable_ipv6=0\n\nSCRIPT\nsysctl -p /etc/sysctl.d/10-netsim.conf\n" } ok: [dut] => { "msg": "initial configuration for dut\n=========================================\nhostname dut\n!\nlldp enable\n!\n!\nip host p1 10.0.0.2\n!\n!\ndefault mtu 1332\n!\ninterface mgmt1/1/1\n no lldp transmit\n no lldp receive\n!\ninterface loopback0\n no shutdown\n ip address 10.0.0.1/32\n ipv6 address 2001:db8:0:1::1/64\n!\ninterface ethernet1/1/1\n no shutdown\n no switchport\n mtu 1532\n description \"dut -> p1\"\n ip address 172.16.0.1/24\n ip unreachables\n ipv6 nd max-ra-interval 4\n ipv6 nd min-ra-interval 3\n ipv6 nd send-ra\n ipv6 nd mtu 1500\n ipv6 address 2001:db8:1::1/64\n ipv6 unreachables\n!\ninterface ethernet1/1/2\n no shutdown\n no switchport\n mtu 1432\n description \"dut -> t_1400 [stub]\"\n ip address 172.16.1.1/24\n ip unreachables\n ipv6 nd max-ra-interval 4\n ipv6 nd min-ra-interval 3\n ipv6 nd send-ra\n ipv6 nd mtu 1400\n ipv6 address 2001:db8:1:1::1/64\n ipv6 unreachables\n!\ninterface ethernet1/1/3\n no shutdown\n no switchport\n description \"dut -> t_1300 [stub]\"\n ip address 172.16.2.1/24\n ip unreachables\n ipv6 nd max-ra-interval 4\n ipv6 nd min-ra-interval 3\n ipv6 nd send-ra\n ipv6 address 2001:db8:1:2::1/64\n ipv6 unreachables\n!\n" } TASK [Deploy initial configuration] ******************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/linux.yml for t_1300, t_1400 included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/dellos10.yml for dut TASK [template] **************************************************************** changed: [t_1300] changed: [t_1400] TASK [Execute /tmp/config.sh to deploy initial config from /work/netlab_cicd/other_vm/node_files/t_1300/initial] *** changed: [t_1300] changed: [t_1400] TASK [wait_for_connection] ***************************************************** skipping: [dut] TASK [dellos10_config: deploying initial from /work/netlab_cicd/other_vm/node_files/dut/initial, save to startup=yes] *** changed: [dut] PLAY [Deploy module-specific configurations] *********************************** TASK [Set variables that cannot be set with VARS] ****************************** ok: [t_1300] ok: [t_1400] TASK [Deploy individual configuration modules] ********************************* included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for t_1300, t_1400 => (item=routing) TASK [Figure out whether to deploy the module routing on current device] ******* ok: [t_1300] ok: [t_1400] TASK [Find configuration template for routing] ********************************* ok: [t_1300] ok: [t_1400] TASK [fail] ******************************************************************** skipping: [t_1300] skipping: [t_1400] TASK [Find configuration deployment deploy_script for routing] ***************** ok: [t_1300] ok: [t_1400] TASK [Print deployed configuration when running in verbose mode] *************** ok: [t_1300] => { "msg": "routing configuration for t_1300\n=========================================\n#!/bin/bash\n# netplan static route configuration\n#\ncat <<'SCRIPT' > /etc/netplan/11-routes-eth1.yaml\nnetwork:\n version: 2\n renderer: networkd\n ethernets:\n eth1:\n routes:\n - to: 172.16.0.0/16\n via: 172.16.2.1\n - to: 10.0.0.0/24\n via: 172.16.2.1\n - to: 10.1.0.0/16\n via: 172.16.2.1\n - to: 10.2.0.0/24\n via: 172.16.2.1\nSCRIPT\nchmod 600 /etc/netplan/*\n\necho -n 'Starting netplan generate ' && date\nnetplan generate\necho -n 'Starting netplan apply ' && date\nnohup netplan apply &\n" } ok: [t_1400] => { "msg": "routing configuration for t_1400\n=========================================\n#!/bin/bash\n# netplan static route configuration\n#\ncat <<'SCRIPT' > /etc/netplan/11-routes-eth1.yaml\nnetwork:\n version: 2\n renderer: networkd\n ethernets:\n eth1:\n routes:\n - to: 172.16.0.0/16\n via: 172.16.1.1\n - to: 10.0.0.0/24\n via: 172.16.1.1\n - to: 10.1.0.0/16\n via: 172.16.1.1\n - to: 10.2.0.0/24\n via: 172.16.1.1\nSCRIPT\nchmod 600 /etc/netplan/*\n\necho -n 'Starting netplan generate ' && date\nnetplan generate\necho -n 'Starting netplan apply ' && date\nnohup netplan apply &\n" } TASK [Deploy routing configuration] ******************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/linux.yml for t_1300, t_1400 TASK [template] **************************************************************** changed: [t_1300] changed: [t_1400] TASK [Execute /tmp/config.sh to deploy routing config from /work/netlab_cicd/other_vm/node_files/t_1300/routing] *** changed: [t_1300] changed: [t_1400] PLAY [Deploy custom deployment templates] ************************************** skipping: no hosts matched PLAY RECAP ********************************************************************* dut : ok=12 changed=1 unreachable=0 failed=0 skipped=5 rescued=0 ignored=0 t_1300 : ok=22 changed=4 unreachable=0 failed=0 skipped=5 rescued=0 ignored=0 t_1400 : ok=22 changed=4 unreachable=0 failed=0 skipped=5 rescued=0 ignored=0 Results of configuration script deployments ================================================================================ p1 Script: normalize,initial,routing This scenario tests MTU configuration and path MTU discovery (generation of ICMP unreachables)