Creating Device configuration snippets [CREATED] dut: initial,ospf,bgp,vrf [CREATED] r1: initial,ospf [CREATED] r2: initial,bgp [CREATED] r3: initial,ospf [CREATED] r4: initial,bgp Checking Are lab devices ready to be configured? [INFO] Checking lab devices with an Ansible playbook [WARNING]: Could not match supplied host pattern, ignoring: netlab_ready_ssh [WARNING]: Found variable using reserved name: hosts PLAY [Wait for SSH servers] **************************************************** skipping: no hosts matched PLAY [Wait for device-specific conditions] ************************************* TASK [Set variables that cannot be set with VARS] ****************************** ok: [dut] TASK [Find device readiness script] ******************************************** ok: [dut] TASK [Wait for device to become ready] ***************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/readiness-check/junos.yml for dut TASK [set_fact] **************************************************************** ok: [dut] TASK [Wait for first interface (et-0/0/0)] ************************************* ok: [dut] PLAY RECAP ********************************************************************* dut : ok=5 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Config Deploying device configurations [INFO] Executing initial configuration for node r1 [INFO] Executing initial configuration for node r2 [INFO] Executing initial configuration for node r3 [INFO] Executing initial configuration for node r4 [INFO] Executing ospf configuration for node r3 [INFO] Executing bgp configuration for node r2 [INFO] Executing ospf configuration for node r1 [INFO] Executing bgp configuration for node r4 [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: [dut] TASK [Normalize config on bridge-like devices] ********************************* included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut TASK [Figure out whether to deploy the module normalize on current device] ***** ok: [dut] TASK [Find configuration template for normalize] ******************************* ok: [dut] TASK [fail] ******************************************************************** skipping: [dut] TASK [Find configuration deployment deploy_script for normalize] *************** ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** skipping: [dut] TASK [Deploy normalize configuration] ****************************************** skipping: [dut] TASK [Deploy initial configuration] ******************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut TASK [Figure out whether to deploy the module initial on current device] ******* ok: [dut] TASK [Find configuration template for initial] ********************************* ok: [dut] TASK [fail] ******************************************************************** skipping: [dut] TASK [Find configuration deployment deploy_script for initial] ***************** ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** ok: [dut] => { "msg": "initial configuration for dut\n=========================================\nsystem {\n host-name dut;\n static-host-mapping {\n r1 inet 10.0.0.2;\n r2 inet 10.0.0.3;\n r3 inet 10.0.0.4;\n r4 inet 10.0.0.5;\n }\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 et-0/0/0.0;\n interface et-0/0/1.0;\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 et-0/0/2.0;\n interface et-0/0/3.0;\n\n }\n\n}\ninterfaces {\n et-0/0/0 {\n mtu 1514;\n }\n et-0/0/1 {\n mtu 1514;\n }\n et-0/0/2 {\n mtu 1514;\n }\n et-0/0/3 {\n mtu 1514;\n }\n\n lo0.0 {\n \n family inet {\n address 10.0.0.1/32;\n }\n \n }\n et-0/0/0.0 {\n description \"dut -> r1\";\n \n family inet {\n address 10.1.0.1/30;\n }\n \n }\n et-0/0/1.0 {\n description \"dut -> r2 [external]\";\n \n family inet {\n address 10.1.0.5/30;\n }\n \n }\n et-0/0/2.0 {\n description \"dut -> r3\";\n \n family inet {\n address 10.1.0.9/30;\n }\n \n }\n et-0/0/3.0 {\n description \"dut -> r4 [external]\";\n \n family inet {\n address 10.1.0.13/30;\n }\n \n }\n}\nprotocols {\n lldp {\n interface re0:mgmt-0 {\n disable;\n }\n interface all;\n }\n}\n" } TASK [Deploy initial configuration] ******************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/junos.yml for dut TASK [junos_config: deploying initial from /work/netlab_cicd/other_vm/node_files/dut/initial] *** changed: [dut] PLAY [Deploy module-specific configurations] *********************************** TASK [Set variables that cannot be set with VARS] ****************************** ok: [dut] TASK [Deploy individual configuration modules] ********************************* included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut => (item=ospf) included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut => (item=bgp) included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-module.yml for dut => (item=vrf) TASK [Figure out whether to deploy the module ospf on current device] ********** ok: [dut] TASK [Find configuration template for ospf] ************************************ ok: [dut] TASK [fail] ******************************************************************** skipping: [dut] TASK [Find configuration deployment deploy_script for ospf] ******************** ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** ok: [dut] => { "msg": "ospf configuration for dut\n=========================================\n" } TASK [Deploy ospf configuration] *********************************************** included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/junos.yml for dut TASK [junos_config: deploying ospf from /work/netlab_cicd/other_vm/node_files/dut/ospf] *** ok: [dut] TASK [Figure out whether to deploy the module bgp on current device] *********** ok: [dut] TASK [Find configuration template for bgp] ************************************* ok: [dut] TASK [fail] ******************************************************************** skipping: [dut] TASK [Find configuration deployment deploy_script for bgp] ********************* ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** ok: [dut] => { "msg": "bgp configuration for dut\n=========================================\n\nrouting-options {\n autonomous-system 65000;\n router-id 10.0.0.1\n}\n\n\npolicy-options {\n delete: policy-statement next-hop-ebgp-ipv4;\n delete: policy-statement next-hop-all-ipv4;\n delete: policy-statement next-hop-ebgp-ipv6;\n delete: policy-statement next-hop-all-ipv6;\n\n delete: policy-statement bgp-default-redistribute;\n delete: route-filter-list bgp-default-announce-ipv4;\n delete: route-filter-list bgp-default-announce-ipv6;\n\n community x-route-permit-mark members large:65535:0:65536;\n\n policy-statement bgp-final {\n term final-option {\n from community x-route-permit-mark;\n then {\n community delete x-route-permit-mark;\n accept;\n }\n }\n term default-reject {\n then reject;\n }\n }\n\n route-filter-list bgp-default-announce-ipv4 {\n 10.0.0.1/32 exact;\n }\n\n policy-statement bgp-default-redistribute {\n term advertise-ipv4 {\n from {\n route-filter-list bgp-default-announce-ipv4;\n }\n then {\n community add x-route-permit-mark;\n next policy;\n }\n }\n\n term redis_bgp {\n from protocol bgp;\n then {\n community add x-route-permit-mark;\n next policy;\n }\n }\n\n term default {\n then reject;\n }\n }\n\n\n policy-statement next-hop-ebgp-ipv4 {\n term next-hop-self-ipv4 {\n from {\n family inet;\n route-type external;\n }\n then {\n next-hop self;\n }\n }\n }\n policy-statement next-hop-all-ipv4 {\n term next-hop-self-ipv4 {\n from {\n family inet;\n }\n then {\n next-hop self;\n }\n }\n }\n policy-statement next-hop-ebgp-ipv6 {\n term next-hop-self-ipv6 {\n from {\n family inet6;\n route-type external;\n }\n then {\n next-hop self;\n }\n }\n }\n policy-statement next-hop-all-ipv6 {\n term next-hop-self-ipv6 {\n from {\n family inet6;\n }\n then {\n next-hop self;\n }\n }\n }\n\n policy-statement bgp-initial {\n term initial-cleanup {\n from community x-route-permit-mark;\n then {\n community delete x-route-permit-mark;\n next policy;\n }\n }\n }\n\n}\nprotocols {\n delete: bgp;\n}\nprotocols {\n bgp {\n group ibgp-peers-ipv4 {\n type internal;\n export [ \n next-hop-ebgp-ipv4 bgp-default-redistribute bgp-final\n ];\n advertise-inactive;\n }\n group ebgp-peers {\n export [ \n bgp-default-redistribute bgp-final\n ];\n advertise-inactive;\n }\n }\n}\n" } TASK [Deploy bgp configuration] ************************************************ included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/junos.yml for dut TASK [junos_config: deploying bgp from /work/netlab_cicd/other_vm/node_files/dut/bgp] *** [WARNING]: statement not found 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\n=========================================\n\n\npolicy-options {\n delete: policy-statement bgp-red-redistribute;\n delete: route-filter-list bgp-red-announce-ipv4;\n delete: route-filter-list bgp-red-announce-ipv6;\n\n community x-route-permit-mark members large:65535:0:65536;\n\n policy-statement bgp-final {\n term final-option {\n from community x-route-permit-mark;\n then {\n community delete x-route-permit-mark;\n accept;\n }\n }\n term default-reject {\n then reject;\n }\n }\n\n\n policy-statement bgp-red-redistribute {\n\n term redis_bgp {\n from protocol bgp;\n then {\n community add x-route-permit-mark;\n next policy;\n }\n }\n term redist_connected {\n from {\n protocol direct;\n }\n then {\n community add x-route-permit-mark;\n next policy;\n }\n }\n term redist_ospf {\n from {\n protocol ospf;\n }\n then {\n community add x-route-permit-mark;\n next policy;\n }\n }\n\n term default {\n then reject;\n }\n }\n\n\n delete: policy-statement bgp-blue-redistribute;\n delete: route-filter-list bgp-blue-announce-ipv4;\n delete: route-filter-list bgp-blue-announce-ipv6;\n\n community x-route-permit-mark members large:65535:0:65536;\n\n policy-statement bgp-final {\n term final-option {\n from community x-route-permit-mark;\n then {\n community delete x-route-permit-mark;\n accept;\n }\n }\n term default-reject {\n then reject;\n }\n }\n\n\n policy-statement bgp-blue-redistribute {\n\n term redis_bgp {\n from protocol bgp;\n then {\n community add x-route-permit-mark;\n next policy;\n }\n }\n term redist_connected {\n from {\n protocol direct;\n }\n then {\n community add x-route-permit-mark;\n next policy;\n }\n }\n term redist_ospf {\n from {\n protocol ospf;\n }\n then {\n community add x-route-permit-mark;\n next policy;\n }\n }\n\n term default {\n then reject;\n }\n }\n\n\n}\n\n\nrouting-instances {\n\n red {\n routing-options {\n autonomous-system 65000;\n router-id 10.0.0.1\n }\n\n protocols {\n bgp {\n\n group ebgp-peers {\n export [ bgp-red-redistribute bgp-final ];\n advertise-inactive;\n neighbor 10.1.0.6 {\n\n peer-as 65100;\n description r2;\n }\n }\n }\n }\n }\n\n\n blue {\n routing-options {\n autonomous-system 65000;\n router-id 10.0.0.1\n }\n\n protocols {\n bgp {\n\n group ebgp-peers {\n export [ bgp-blue-redistribute bgp-final ];\n advertise-inactive;\n neighbor 10.1.0.14 {\n\n peer-as 65101;\n description r4;\n }\n }\n }\n }\n }\n\n}\nrouting-instances {\n red {\n routing-options {\n router-id 10.100.0.1\n }\n }\n}\n\npolicy-options {\n policy-statement vrf-red-ospf-export {\n term redis_direct {\n from {\n protocol direct;\n }\n then accept;\n }\n term redis_bgp {\n from protocol bgp;\n then {\n accept;\n }\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 et-0/0/0.0 {\n interface-type p2p;\n }\n }\n }\n}\n} }\n\nrouting-instances {\n blue {\n routing-options {\n router-id 10.101.0.1\n }\n }\n}\n\npolicy-options {\n policy-statement vrf-blue-ospf-export {\n term redis_direct {\n from {\n protocol direct;\n }\n then accept;\n }\n term redis_bgp {\n from protocol bgp;\n then {\n accept;\n }\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 et-0/0/2.0 {\n interface-type p2p;\n }\n }\n }\n}\n} }\n\n" } TASK [Deploy vrf configuration] ************************************************ included: /home/pipi/net101/tools/netsim/ansible/tasks/deploy-config/junos.yml for dut TASK [junos_config: deploying vrf from /work/netlab_cicd/other_vm/node_files/dut/vrf] *** changed: [dut] PLAY [Deploy custom deployment templates] ************************************** skipping: no hosts matched PLAY RECAP ********************************************************************* dut : ok=34 changed=3 unreachable=0 failed=0 skipped=7 rescued=0 ignored=0 Results of configuration script deployments ================================================================================ r1 Script: initial,ospf r2 Script: initial,bgp r3 Script: initial,ospf r4 Script: initial,bgp The device under test has two VRFs with two interfaces in each VRF. Routers are attached to those interfaces and run OSPF and BGP with device under test. Assuming the OSPF and BGP multi-vrf test cases succeeded, this one tests OSPF-to-BGP two-way redistribution. * r1 and r2 should be able to ping each other * r3 and r4 should be able to ping each other * r1 should not be able to reach r3