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 Checking Are lab devices ready to be configured? [INFO] Checking SSH server(s) on r1,r3 [SSH] SSH server on node r3 (device vjunos-switch) is ready after 90.9 seconds [SSH] SSH server on node r1 (device vjunos-switch) is ready after 91.0 seconds [INFO] Checking lab devices with an Ansible playbook [WARNING]: Found variable using reserved name: hosts PLAY [Wait for SSH servers] **************************************************** PLAY [Wait for device-specific conditions] ************************************* TASK [Set variables that cannot be set with VARS] ****************************** ok: [r1] ok: [r3] TASK [Find device readiness script] ******************************************** ok: [r1] ok: [r3] TASK [Wait for device to become ready] ***************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/readiness-check/junos.yml for r1, r3 TASK [set_fact] **************************************************************** ok: [r1] ok: [r3] TASK [Wait for first interface (ge-0/0/0)] ************************************* ok: [r1] ok: [r3] PLAY RECAP ********************************************************************* r1 : ok=5 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 r3 : ok=5 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Config Deploying device configurations [INFO] Executing initial configuration for node r2 [INFO] Executing initial configuration for node h1 (namespace clab- ml-31-h1) [INFO] Executing initial configuration for node h2 (namespace clab- ml-31-h2) [INFO] Executing initial configuration for node h4 (namespace clab- ml-31-h4) [INFO] Executing initial configuration for node h3 (namespace clab- ml-31-h3) [INFO] Executing initial configuration for node h5 (namespace clab- ml-31-h5) [INFO] Executing routing configuration for node h1 (namespace clab- ml-31-h1) [INFO] Executing routing configuration for node h2 (namespace clab- ml-31-h2) [INFO] Executing routing configuration for node h3 (namespace clab- ml-31-h3) [INFO] Executing routing configuration for node h4 (namespace clab- ml-31-h4) [INFO] Executing routing configuration for node h5 (namespace clab- ml-31-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 [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/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=========================================\nsystem {\n host-name r1;\n static-host-mapping {\n r2 inet 10.0.0.2;\n r3 inet 10.0.0.3;\n h1 inet 172.16.0.4;\n h2 inet 172.16.1.5;\n h3 inet 172.16.3.6;\n h4 inet 172.16.4.7;\n h5 inet 172.16.2.8;\n }\n}\n\n\n\npolicy-options {\n community tg_65000_1 members target:65000:1;\n community tg_65000_2 members target:65000:2;\n}\n\n\n\npolicy-options {\n policy-statement vrf-red-rt-export {\n term 1 {\n then {\n community add tg_65000_1;\n accept;\n }\n }\n }\n\n\n policy-statement vrf-red-rt-import {\n term 1 {\n from community [ tg_65000_1 ];\n then accept;\n }\n term default {\n then reject;\n }\n }\n policy-statement vrf-blue-rt-export {\n term 1 {\n then {\n community add tg_65000_2;\n accept;\n }\n }\n }\n\n\n policy-statement vrf-blue-rt-import {\n term 1 {\n from community [ tg_65000_2 ];\n then accept;\n }\n term default {\n then reject;\n }\n }\n}\n\nrouting-instances {\n\n red {\n instance-type vrf;\n route-distinguisher 65000:1;\n\n vrf-import vrf-red-rt-import;\n vrf-export vrf-red-rt-export;\n\n routing-options {\n auto-export;\n }\n\n interface ge-0/0/1.0;\n interface ge-0/0/2.0;\n interface ge-0/0/0.700;\n\n }\n\n\n blue {\n instance-type vrf;\n route-distinguisher 65000:2;\n\n vrf-import vrf-blue-rt-import;\n vrf-export vrf-blue-rt-export;\n\n routing-options {\n auto-export;\n }\n\n interface ge-0/0/3.0;\n interface ge-0/0/0.701;\n\n }\n\n}\ninterfaces {\n\n\n\n\n ge-0/0/0.0 {\n vlan-id 4093;\n }\n\n\n\n\n\n\n\n ge-0/0/1 {\n flexible-vlan-tagging;\n native-vlan-id 1;\n }\n\n ge-0/0/1.0 {\n vlan-id 1;\n }\n\n\n\n\n\n\n\n\n ge-0/0/2 {\n flexible-vlan-tagging;\n native-vlan-id 1;\n }\n\n ge-0/0/2.0 {\n vlan-id 1;\n }\n\n\n\n\n\n\n\n\n ge-0/0/3 {\n flexible-vlan-tagging;\n native-vlan-id 1;\n }\n\n ge-0/0/3.0 {\n vlan-id 1;\n }\n\n\n\n\n\n\n ge-0/0/0 {\n flexible-vlan-tagging;\n }\n\n ge-0/0/0.701 {\n vlan-id 701;\n }\n\n\n\n\n\n\n ge-0/0/0 {\n flexible-vlan-tagging;\n }\n\n ge-0/0/0.700 {\n vlan-id 700;\n }\n\n\n\n\n\n}\ninterfaces {\n ge-0/0/0 {\n mtu 1522;\n }\n ge-0/0/1 {\n mtu 1522;\n }\n ge-0/0/2 {\n mtu 1522;\n }\n ge-0/0/3 {\n mtu 1522;\n }\n\n lo0.0 {\n\n family inet {\n address 10.0.0.1/32;\n }\n }\n ge-0/0/0.0 {\n description \"r1 -> r2\";\n\n }\n ge-0/0/1.0 {\n description \"r1 -> h1 [stub]\";\n\n family inet {\n address 172.16.0.1/24;\n }\n }\n ge-0/0/2.0 {\n description \"r1 -> h5 [stub]\";\n\n family inet {\n address 172.16.2.1/24;\n }\n }\n ge-0/0/3.0 {\n description \"r1 -> h3 [stub]\";\n\n family inet {\n address 172.16.3.1/24;\n }\n }\n ge-0/0/0.701 {\n description \"r1 -> r2\";\n\n family inet {\n address 10.1.0.1/30;\n }\n }\n ge-0/0/0.700 {\n description \"r1 -> r2\";\n\n family inet {\n address 10.1.0.5/30;\n }\n }\n}\nprotocols {\n lldp {\n interface fxp0 {\n disable;\n }\n interface all;\n }\n}\n" } ok: [r3] => { "msg": "initial configuration for r3\n=========================================\nsystem {\n host-name r3;\n static-host-mapping {\n r1 inet 10.0.0.1;\n r2 inet 10.0.0.2;\n h1 inet 172.16.0.4;\n h2 inet 172.16.1.5;\n h3 inet 172.16.3.6;\n h4 inet 172.16.4.7;\n h5 inet 172.16.2.8;\n }\n}\n\n\n\npolicy-options {\n community tg_65000_1 members target:65000:1;\n community tg_65000_2 members target:65000:2;\n}\n\n\n\npolicy-options {\n policy-statement vrf-red-rt-export {\n term 1 {\n then {\n community add tg_65000_1;\n accept;\n }\n }\n }\n\n\n policy-statement vrf-red-rt-import {\n term 1 {\n from community [ tg_65000_1 ];\n then accept;\n }\n term default {\n then reject;\n }\n }\n policy-statement vrf-blue-rt-export {\n term 1 {\n then {\n community add tg_65000_2;\n accept;\n }\n }\n }\n\n\n policy-statement vrf-blue-rt-import {\n term 1 {\n from community [ tg_65000_2 ];\n then accept;\n }\n term default {\n then reject;\n }\n }\n}\n\nrouting-instances {\n\n red {\n instance-type vrf;\n route-distinguisher 65000:1;\n\n vrf-import vrf-red-rt-import;\n vrf-export vrf-red-rt-export;\n\n routing-options {\n auto-export;\n }\n\n interface ge-0/0/1.0;\n interface ge-0/0/0.700;\n\n }\n\n\n blue {\n instance-type vrf;\n route-distinguisher 65000:2;\n\n vrf-import vrf-blue-rt-import;\n vrf-export vrf-blue-rt-export;\n\n routing-options {\n auto-export;\n }\n\n interface ge-0/0/2.0;\n interface ge-0/0/0.701;\n\n }\n\n}\ninterfaces {\n\n\n\n\n ge-0/0/0.0 {\n vlan-id 4093;\n }\n\n\n\n\n\n\n\n ge-0/0/1 {\n flexible-vlan-tagging;\n native-vlan-id 1;\n }\n\n ge-0/0/1.0 {\n vlan-id 1;\n }\n\n\n\n\n\n\n\n\n ge-0/0/2 {\n flexible-vlan-tagging;\n native-vlan-id 1;\n }\n\n ge-0/0/2.0 {\n vlan-id 1;\n }\n\n\n\n\n\n\n ge-0/0/0 {\n flexible-vlan-tagging;\n }\n\n ge-0/0/0.701 {\n vlan-id 701;\n }\n\n\n\n\n\n\n ge-0/0/0 {\n flexible-vlan-tagging;\n }\n\n ge-0/0/0.700 {\n vlan-id 700;\n }\n\n\n\n\n\n}\ninterfaces {\n ge-0/0/0 {\n mtu 1522;\n }\n ge-0/0/1 {\n mtu 1522;\n }\n ge-0/0/2 {\n mtu 1522;\n }\n\n lo0.0 {\n\n family inet {\n address 10.0.0.3/32;\n }\n }\n ge-0/0/0.0 {\n description \"r3 -> r2\";\n\n }\n ge-0/0/1.0 {\n description \"r3 -> h2 [stub]\";\n\n family inet {\n address 172.16.1.3/24;\n }\n }\n ge-0/0/2.0 {\n description \"r3 -> h4 [stub]\";\n\n family inet {\n address 172.16.4.3/24;\n }\n }\n ge-0/0/0.701 {\n description \"r3 -> r2\";\n\n family inet {\n address 10.1.0.10/30;\n }\n }\n ge-0/0/0.700 {\n description \"r3 -> r2\";\n\n family inet {\n address 10.1.0.14/30;\n }\n }\n}\nprotocols {\n lldp {\n interface fxp0 {\n disable;\n }\n interface all;\n }\n}\n" } TASK [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/junos.yml for r1, r3 TASK [junos_config: deploying initial from /work/netlab_cicd/junos/node_files/r1/initial] *** 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/netlab_gh/netsim/ansible/tasks/deploy-module.yml for r1, r3 => (item=vlan) included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for r1, r3 => (item=routing) included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for r1, r3 => (item=ospf) included: /home/pipi/netlab_gh/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: [r3] ok: [r1] TASK [fail] ******************************************************************** skipping: [r1] skipping: [r3] TASK [Find configuration deployment deploy_script for vlan] ******************** ok: [r3] ok: [r1] TASK [Print deployed configuration when running in verbose mode] *************** ok: [r1] => { "msg": "vlan configuration for r1\n=========================================\n\nvlans {\n}\n\ninterfaces {\n\n}\n" } ok: [r3] => { "msg": "vlan configuration for r3\n=========================================\n\nvlans {\n}\n\ninterfaces {\n\n}\n" } TASK [Deploy vlan configuration] *********************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/junos.yml for r1, r3 TASK [junos_config: deploying vlan from /work/netlab_cicd/junos/node_files/r1/vlan] *** [WARNING]: mgd: statement has no contents; ignored ok: [r3] ok: [r1] 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: [r3] ok: [r1] TASK [Find configuration template for ospf] ************************************ ok: [r3] ok: [r1] TASK [fail] ******************************************************************** skipping: [r1] skipping: [r3] TASK [Find configuration deployment deploy_script for ospf] ******************** ok: [r3] ok: [r1] 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/netlab_gh/netsim/ansible/tasks/deploy-config/junos.yml for r1, r3 TASK [junos_config: deploying ospf from /work/netlab_cicd/junos/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: [r3] ok: [r1] TASK [Print deployed configuration when running in verbose mode] *************** ok: [r1] => { "msg": "vrf configuration for r1\n=========================================\n\nrouting-instances {\n red {\n routing-options {\n router-id 10.0.0.1\n }\n }\n}\npolicy-options {\n delete: policy-statement vrf-red-ospf-export;\n policy-statement vrf-red-ospf-export {\n term redis_connected {\n from {\n protocol direct;\n }\n then accept;\n }\n term redis_local_target {\n from community [ tg_65000_1 ];\n then accept;\n }\n }\n}\nrouting-instances {\n red {\nprotocols {\n delete: ospf;\n}\n\nprotocols {\n ospf {\n export vrf-red-ospf-export;\n area 0.0.0.0 {\n interface ge-0/0/1.0 {\n interface-type p2p;\n passive;\n }\n }\n area 0.0.0.0 {\n interface ge-0/0/2.0 {\n interface-type p2p;\n passive;\n }\n }\n area 0.0.0.0 {\n interface ge-0/0/0.700 {\n interface-type p2p;\n }\n }\n }\n}\n} }\n\nrouting-instances {\n blue {\n routing-options {\n router-id 10.0.0.1\n }\n }\n}\npolicy-options {\n delete: policy-statement vrf-blue-ospf-export;\n policy-statement vrf-blue-ospf-export {\n term redis_connected {\n from {\n protocol direct;\n }\n then accept;\n }\n term redis_local_target {\n from community [ tg_65000_2 ];\n then accept;\n }\n }\n}\nrouting-instances {\n blue {\nprotocols {\n delete: ospf;\n}\n\nprotocols {\n ospf {\n export vrf-blue-ospf-export;\n area 0.0.0.0 {\n interface ge-0/0/3.0 {\n interface-type p2p;\n passive;\n }\n }\n area 0.0.0.0 {\n interface ge-0/0/0.701 {\n interface-type p2p;\n }\n }\n }\n}\n} }\n\n" } ok: [r3] => { "msg": "vrf configuration for r3\n=========================================\n\nrouting-instances {\n red {\n routing-options {\n router-id 10.0.0.3\n }\n }\n}\npolicy-options {\n delete: policy-statement vrf-red-ospf-export;\n policy-statement vrf-red-ospf-export {\n term redis_connected {\n from {\n protocol direct;\n }\n then accept;\n }\n term redis_local_target {\n from community [ tg_65000_1 ];\n then accept;\n }\n }\n}\nrouting-instances {\n red {\nprotocols {\n delete: ospf;\n}\n\nprotocols {\n ospf {\n export vrf-red-ospf-export;\n area 0.0.0.0 {\n interface ge-0/0/1.0 {\n interface-type p2p;\n passive;\n }\n }\n area 0.0.0.0 {\n interface ge-0/0/0.700 {\n interface-type p2p;\n }\n }\n }\n}\n} }\n\nrouting-instances {\n blue {\n routing-options {\n router-id 10.0.0.3\n }\n }\n}\npolicy-options {\n delete: policy-statement vrf-blue-ospf-export;\n policy-statement vrf-blue-ospf-export {\n term redis_connected {\n from {\n protocol direct;\n }\n then accept;\n }\n term redis_local_target {\n from community [ tg_65000_2 ];\n then accept;\n }\n }\n}\nrouting-instances {\n blue {\nprotocols {\n delete: ospf;\n}\n\nprotocols {\n ospf {\n export vrf-blue-ospf-export;\n area 0.0.0.0 {\n interface ge-0/0/2.0 {\n interface-type p2p;\n passive;\n }\n }\n area 0.0.0.0 {\n interface ge-0/0/0.701 {\n interface-type p2p;\n }\n }\n }\n}\n} }\n\n" } TASK [Deploy vrf configuration] ************************************************ included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/junos.yml for r1, r3 TASK [junos_config: deploying vrf from /work/netlab_cicd/junos/node_files/r1/vrf] *** [WARNING]: statement not found changed: [r1] changed: [r3] PLAY [Deploy custom deployment templates] ************************************** skipping: no hosts matched PLAY RECAP ********************************************************************* r1 : ok=32 changed=2 unreachable=0 failed=0 skipped=9 rescued=0 ignored=0 r3 : ok=32 changed=2 unreachable=0 failed=0 skipped=9 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