Creating Device configuration snippets [CREATED] r1: initial,vlan,ospf,vrf [CREATED] r2: initial,vlan,ospf,vrf [CREATED] r3: initial,vlan,ospf,vrf [CREATED] h1: initial,routing [CREATED] h2: initial,routing [CREATED] h3: initial,routing [CREATED] h4: initial,routing [CREATED] h5: initial,routing Config Deploying device configurations [INFO] Executing initial configuration for node r2 [INFO] Executing initial configuration for node h1 (namespace clab- ml-85-h1) [INFO] Executing initial configuration for node h2 (namespace clab- ml-85-h2) [INFO] Executing initial configuration for node h3 (namespace clab- ml-85-h3) [INFO] Executing initial configuration for node h4 (namespace clab- ml-85-h4) [INFO] Executing initial configuration for node h5 (namespace clab- ml-85-h5) [INFO] Executing routing configuration for node h2 (namespace clab- ml-85-h2) [INFO] Executing routing configuration for node h3 (namespace clab- ml-85-h3) [INFO] Executing routing configuration for node h1 (namespace clab- ml-85-h1) [INFO] Executing routing configuration for node h4 (namespace clab- ml-85-h4) [INFO] Executing routing configuration for node h5 (namespace clab- ml-85-h5) [INFO] Executing vlan configuration for node r2 [INFO] Executing ospf configuration for node r2 [INFO] Executing vrf configuration for node r2 [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: [r1] ok: [r3] TASK [Normalize config on bridge-like devices] ********************************* included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for r1, r3 TASK [Figure out whether to deploy the module normalize on current device] ***** ok: [r1] ok: [r3] TASK [Find configuration template for normalize] ******************************* ok: [r1] ok: [r3] TASK [fail] ******************************************************************** skipping: [r1] skipping: [r3] TASK [Find configuration deployment deploy_script for normalize] *************** ok: [r1] ok: [r3] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [r1] skipping: [r3] TASK [Deploy normalize configuration] ****************************************** skipping: [r1] skipping: [r3] TASK [Deploy initial configuration] ******************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for r1, r3 TASK [Figure out whether to deploy the module initial on current device] ******* ok: [r1] ok: [r3] TASK [Find configuration template for initial] ********************************* ok: [r1] ok: [r3] TASK [fail] ******************************************************************** skipping: [r1] skipping: [r3] TASK [Find configuration deployment deploy_script for initial] ***************** ok: [r1] ok: [r3] TASK [Print deployed configuration when running in verbose mode] *************** ok: [r1] => { "msg": "initial configuration for r1\n=========================================\nhostname r1\n!\nno ip domain lookup\nlogging buffered 256000\n\n!\nlldp run\n!\nip host h1 172.16.0.4\nip host h2 172.16.1.5\nip host h3 172.16.3.6\nip host h4 172.16.4.7\nip host h5 172.16.2.8\nip host r1-red 172.16.0.1 172.16.2.1 10.1.0.5\nip host r1-blue 172.16.3.1 10.1.0.1\nip host r2 10.0.0.2\nip host r2-blue 10.1.0.2 10.1.0.9\nip host r2-red 10.1.0.6 10.1.0.13\nip host r3 10.0.0.3\nip host r3-red 172.16.1.3 10.1.0.14\nip host r3-blue 172.16.4.3 10.1.0.10\n!\nip routing\n!\nno ipv6 unicast-routing\n!\nvrf definition red\n rd 65000:1\n route-target import 65000:1\n route-target export 65000:1\n!\n address-family ipv4\n exit-address-family\n!\nvrf definition blue\n rd 65000:2\n route-target import 65000:2\n route-target export 65000:2\n!\n address-family ipv4\n exit-address-family\n!\n\n!\n\n!\n!\ninterface Loopback0\n ip address 10.0.0.1 255.255.255.255\n!\ninterface GigabitEthernet1\n no lldp transmit\n no lldp receive\n!\ninterface GigabitEthernet2\n description r1 -> r2\n no shutdown\n!\ninterface GigabitEthernet3\n vrf forwarding red\n description r1 -> h1 [stub]\n ip address 172.16.0.1 255.255.255.0\n no shutdown\n!\ninterface GigabitEthernet4\n vrf forwarding red\n description r1 -> h5 [stub]\n ip address 172.16.2.1 255.255.255.0\n no shutdown\n!\ninterface GigabitEthernet5\n vrf forwarding blue\n description r1 -> h3 [stub]\n ip address 172.16.3.1 255.255.255.0\n no shutdown\n!\ninterface GigabitEthernet2.1\n encapsulation dot1Q 701\n vrf forwarding blue\n description r1 -> r2\n ip address 10.1.0.1 255.255.255.252\n no shutdown\n!\ninterface GigabitEthernet2.2\n encapsulation dot1Q 700\n vrf forwarding red\n description r1 -> r2\n ip address 10.1.0.5 255.255.255.252\n no shutdown\n!\n!\nline vty 0 4\n exec-timeout 0 0 \n!\nno banner exec\nno banner login\nno banner incoming\n" } ok: [r3] => { "msg": "initial configuration for r3\n=========================================\nhostname r3\n!\nno ip domain lookup\nlogging buffered 256000\n\n!\nlldp run\n!\nip host h1 172.16.0.4\nip host h2 172.16.1.5\nip host h3 172.16.3.6\nip host h4 172.16.4.7\nip host h5 172.16.2.8\nip host r1 10.0.0.1\nip host r1-red 172.16.0.1 172.16.2.1 10.1.0.5\nip host r1-blue 172.16.3.1 10.1.0.1\nip host r2 10.0.0.2\nip host r2-blue 10.1.0.2 10.1.0.9\nip host r2-red 10.1.0.6 10.1.0.13\nip host r3-red 172.16.1.3 10.1.0.14\nip host r3-blue 172.16.4.3 10.1.0.10\n!\nip routing\n!\nno ipv6 unicast-routing\n!\nvrf definition red\n rd 65000:1\n route-target import 65000:1\n route-target export 65000:1\n!\n address-family ipv4\n exit-address-family\n!\nvrf definition blue\n rd 65000:2\n route-target import 65000:2\n route-target export 65000:2\n!\n address-family ipv4\n exit-address-family\n!\n\n!\n\n!\n!\ninterface Loopback0\n ip address 10.0.0.3 255.255.255.255\n!\ninterface GigabitEthernet1\n no lldp transmit\n no lldp receive\n!\ninterface GigabitEthernet2\n description r3 -> r2\n no shutdown\n!\ninterface GigabitEthernet3\n vrf forwarding red\n description r3 -> h2 [stub]\n ip address 172.16.1.3 255.255.255.0\n no shutdown\n!\ninterface GigabitEthernet4\n vrf forwarding blue\n description r3 -> h4 [stub]\n ip address 172.16.4.3 255.255.255.0\n no shutdown\n!\ninterface GigabitEthernet2.1\n encapsulation dot1Q 701\n vrf forwarding blue\n description r3 -> r2\n ip address 10.1.0.10 255.255.255.252\n no shutdown\n!\ninterface GigabitEthernet2.2\n encapsulation dot1Q 700\n vrf forwarding red\n description r3 -> r2\n ip address 10.1.0.14 255.255.255.252\n no shutdown\n!\n!\nline vty 0 4\n exec-timeout 0 0 \n!\nno banner exec\nno banner login\nno banner incoming\n" } TASK [Deploy initial configuration] ******************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/ios.yml for r1, r3 TASK [ios_config: deploying initial from /work/netlab_cicd/other_vm/node_files/r1/initial] *** [WARNING]: To ensure idempotency and correct diff the input configuration lines should be similar to how they appear if present in the running configuration on device including the indentation changed: [r3] changed: [r1] PLAY [Deploy module-specific configurations] *********************************** TASK [Set variables that cannot be set with VARS] ****************************** ok: [r1] ok: [r3] TASK [Deploy individual configuration modules] ********************************* included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for r1, r3 => (item=vlan) included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for r1, r3 => (item=routing) included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for r1, r3 => (item=ospf) included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for r1, r3 => (item=vrf) TASK [Figure out whether to deploy the module vlan on current device] ********** ok: [r1] ok: [r3] TASK [Find configuration template for vlan] ************************************ ok: [r1] ok: [r3] TASK [fail] ******************************************************************** skipping: [r1] skipping: [r3] TASK [Find configuration deployment deploy_script for vlan] ******************** ok: [r1] ok: [r3] TASK [Print deployed configuration when running in verbose mode] *************** ok: [r1] => { "msg": "vlan configuration for r1\n=========================================\n!\nbridge-domain 700\n!\nbridge-domain 701\n!\ninterface GigabitEthernet2.1\n encapsulation dot1Q 701\n!\ninterface GigabitEthernet2.2\n encapsulation dot1Q 700\n" } ok: [r3] => { "msg": "vlan configuration for r3\n=========================================\n!\nbridge-domain 700\n!\nbridge-domain 701\n!\ninterface GigabitEthernet2.1\n encapsulation dot1Q 701\n!\ninterface GigabitEthernet2.2\n encapsulation dot1Q 700\n" } TASK [Deploy vlan configuration] *********************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/ios.yml for r1, r3 TASK [ios_config: deploying vlan from /work/netlab_cicd/other_vm/node_files/r1/vlan] *** changed: [r1] changed: [r3] TASK [Figure out whether to deploy the module routing on current device] ******* ok: [r1] ok: [r3] TASK [Find configuration template for routing] ********************************* skipping: [r1] skipping: [r3] TASK [fail] ******************************************************************** skipping: [r1] skipping: [r3] TASK [Find configuration deployment deploy_script for routing] ***************** skipping: [r1] skipping: [r3] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [r1] skipping: [r3] TASK [Deploy routing configuration] ******************************************** skipping: [r1] skipping: [r3] TASK [Figure out whether to deploy the module ospf on current device] ********** ok: [r1] ok: [r3] TASK [Find configuration template for ospf] ************************************ ok: [r1] ok: [r3] TASK [fail] ******************************************************************** skipping: [r1] skipping: [r3] TASK [Find configuration deployment deploy_script for ospf] ******************** ok: [r1] ok: [r3] TASK [Print deployed configuration when running in verbose mode] *************** ok: [r1] => { "msg": "ospf configuration for r1\n=========================================\n" } ok: [r3] => { "msg": "ospf configuration for r3\n=========================================\n" } TASK [Deploy ospf configuration] *********************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/ios.yml for r1, r3 TASK [ios_config: deploying ospf from /work/netlab_cicd/other_vm/node_files/r1/ospf] *** ok: [r1] ok: [r3] TASK [Figure out whether to deploy the module vrf on current device] *********** ok: [r1] ok: [r3] TASK [Find configuration template for vrf] ************************************* ok: [r1] ok: [r3] TASK [fail] ******************************************************************** skipping: [r1] skipping: [r3] TASK [Find configuration deployment deploy_script for vrf] ********************* ok: [r1] ok: [r3] TASK [Print deployed configuration when running in verbose mode] *************** ok: [r1] => { "msg": "vrf configuration for r1\n=========================================\n!\nrouter ospf 100 vrf red\n router-id 10.0.0.1\n passive-interface GigabitEthernet3\n passive-interface GigabitEthernet4\n\n redistribute connected\n\n!\ninterface GigabitEthernet3\n! r1 -> h1\n ip ospf 100 area 0.0.0.0\n ip ospf network point-to-point\n!\ninterface GigabitEthernet4\n! r1 -> h5\n ip ospf 100 area 0.0.0.0\n ip ospf network point-to-point\n!\ninterface GigabitEthernet2.2\n! r1 -> r2\n ip ospf 100 area 0.0.0.0\n ip ospf network point-to-point\n!\n\nrouter ospf 101 vrf blue\n router-id 10.0.0.1\n passive-interface GigabitEthernet5\n\n redistribute connected\n\n!\ninterface GigabitEthernet5\n! r1 -> h3\n ip ospf 101 area 0.0.0.0\n ip ospf network point-to-point\n!\ninterface GigabitEthernet2.1\n! r1 -> r2\n ip ospf 101 area 0.0.0.0\n ip ospf network point-to-point\n!\n\n!\n" } ok: [r3] => { "msg": "vrf configuration for r3\n=========================================\n!\nrouter ospf 100 vrf red\n router-id 10.0.0.3\n passive-interface GigabitEthernet3\n\n redistribute connected\n\n!\ninterface GigabitEthernet3\n! r3 -> h2\n ip ospf 100 area 0.0.0.0\n ip ospf network point-to-point\n!\ninterface GigabitEthernet2.2\n! r3 -> r2\n ip ospf 100 area 0.0.0.0\n ip ospf network point-to-point\n!\n\nrouter ospf 101 vrf blue\n router-id 10.0.0.3\n passive-interface GigabitEthernet4\n\n redistribute connected\n\n!\ninterface GigabitEthernet4\n! r3 -> h4\n ip ospf 101 area 0.0.0.0\n ip ospf network point-to-point\n!\ninterface GigabitEthernet2.1\n! r3 -> r2\n ip ospf 101 area 0.0.0.0\n ip ospf network point-to-point\n!\n\n!\n" } TASK [Deploy vrf configuration] ************************************************ included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/ios.yml for r1, r3 TASK [ios_config: deploying vrf from /work/netlab_cicd/other_vm/node_files/r1/vrf] *** changed: [r3] changed: [r1] PLAY [Deploy custom deployment templates] ************************************** skipping: no hosts matched PLAY RECAP ********************************************************************* r1 : ok=36 changed=3 unreachable=0 failed=0 skipped=12 rescued=0 ignored=0 r3 : ok=36 changed=3 unreachable=0 failed=0 skipped=12 rescued=0 ignored=0 Results of configuration script deployments ================================================================================ r2 Script: initial,vlan,ospf,vrf h1 Script: initial,routing h2 Script: initial,routing h3 Script: initial,routing h4 Script: initial,routing h5 Script: initial,routing VRF lite implementation with VLAN trunks * h1, h2, and h5 should be able to ping each other * h3 and h4 should be able to ping each other Please note it might take a while for the lab to work due to STP and OSPF setup phase