Creating Device configuration snippets [CREATED] h1: initial [CREATED] h2: initial [CREATED] h3: initial [CREATED] h4: initial [CREATED] dut: initial,ospf,bgp,mpls,vrf [CREATED] pe2: normalize,initial,ospf,bgp,mpls,vrf [CREATED] p1: initial,ospf,mpls [CREATED] p2: initial,ospf,mpls Checking Are lab devices ready to be configured? [INFO] Checking SSH server(s) on pe2 Config Normalizing device configurations [INFO] Executing normalize configuration for node pe2 Config Deploying device configurations [INFO] Executing initial configuration for node h1 (namespace clab- ml-17-h1) [INFO] Executing initial configuration for node h2 (namespace clab- ml-17-h2) [INFO] Executing initial configuration for node h3 (namespace clab- ml-17-h3) [INFO] Executing initial configuration for node h4 (namespace clab- ml-17-h4) [INFO] Executing initial configuration for node pe2 [INFO] Executing initial configuration for node p1 [INFO] Executing initial configuration for node p2 [INFO] Executing ospf configuration for node p1 [INFO] Executing ospf configuration for node p2 [INFO] Executing mpls configuration for node p2 [INFO] Executing mpls configuration for node p1 [INFO] Executing ospf configuration for node pe2 [INFO] Executing bgp configuration for node pe2 [INFO] Executing mpls configuration for node pe2 [INFO] Executing vrf configuration for node pe2 [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 [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/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=========================================\n\nupdates:\n\n- path: /interface[name=system0]/subinterface[index=0]\n value:\n description: \"No description\"\n admin-state: enable\n ipv4:\n admin-state: enable\n address:\n - ip-prefix: \"10.0.0.5/32\"\n\n- path: /interface[name=ethernet-1/1]\n value:\n description: \"dut ~ p1\"\n subinterface:\n index: 0\n description: \"dut ~ p1\"\n\n- path: /interface[name=ethernet-1/1]/subinterface[index=0]\n value:\n description: \"dut ~ p1\"\n admin-state: enable\n ipv4:\n admin-state: enable\n address:\n - ip-prefix: \"10.1.0.1/30\"\n primary: [null]\n\n- path: /interface[name=ethernet-1/2]\n value:\n description: \"dut ~ h1\"\n subinterface:\n index: 0\n description: \"dut ~ h1\"\n\n- path: /interface[name=ethernet-1/2]/subinterface[index=0]\n value:\n description: \"dut ~ h1\"\n admin-state: enable\n ipv6:\n admin-state: enable\n address:\n - ip-prefix: \"2001:db8:42::5/64\"\n type: \"global-unicast\"\n neighbor-discovery:\n learn-unsolicited: link-local\n router-advertisement:\n router-role:\n admin-state: enable # no ipv6 nd suppress-ra\n min-advertisement-interval: 4 # Leaving this at platform default 200..600 takes too long at startup\n _annotate_min-advertisement-interval: \"Reduced from platform default 200s\"\n max-advertisement-interval: 5\n\n- path: /interface[name=ethernet-1/3]\n value:\n description: \"dut ~ h3\"\n subinterface:\n index: 0\n description: \"dut ~ h3\"\n\n- path: /interface[name=ethernet-1/3]/subinterface[index=0]\n value:\n description: \"dut ~ h3\"\n admin-state: enable\n ipv6:\n admin-state: enable\n address:\n - ip-prefix: \"2001:db8:42:2::5/64\"\n type: \"global-unicast\"\n neighbor-discovery:\n learn-unsolicited: link-local\n router-advertisement:\n router-role:\n admin-state: enable # no ipv6 nd suppress-ra\n min-advertisement-interval: 4 # Leaving this at platform default 200..600 takes too long at startup\n _annotate_min-advertisement-interval: \"Reduced from platform default 200s\"\n max-advertisement-interval: 5\n\n\n\n- path: /network-instance[name=default]\n value:\n type: default\n interface:\n - name: system0.0\n\n- path: /network-instance[name=default]\n value:\n type: default\n interface:\n - name: ethernet-1/1.0\n\n\n\n# TODO: vdata.rd, vdata.import/export, vdata.af\n- path: /network-instance[name=t1]\n value:\n type: ip-vrf\n interface:\n - name: ethernet-1/2.0\n\n\n\n# TODO: vdata.rd, vdata.import/export, vdata.af\n- path: /network-instance[name=t2]\n value:\n type: ip-vrf\n interface:\n - name: ethernet-1/3.0\n\n\n" } TASK [Deploy initial configuration] ******************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/srlinux.yml for dut TASK [Generate JSON-RPC YAML configuration] ************************************ ok: [dut] TASK [Update SRL initial node configuration (template=/work/netlab_cicd/node_files/dut/initial)] *** changed: [dut] TASK [debug] ******************************************************************* skipping: [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/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut => (item=ospf) included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut => (item=bgp) included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-module.yml for dut => (item=mpls) included: /home/pipi/netlab_gh/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=========================================\nupdates:\n\n\n- path: /network-instance[name=default]\n value:\n router-id: 10.0.0.5\n protocols:\n ospf:\n instance:\n - name: \"0\"\n version: ospf-v2\n admin-state: enable\n max-ecmp-paths: 64\n ldp-synchronization: { }\n area:\n - area-id: 0.0.0.0\n interface:\n - interface-name: system0.0\n passive: True\n - area-id: 0.0.0.0\n interface:\n - interface-name: ethernet-1/1.0\n interface-type: \"point-to-point\"\n failure-detection:\n enable-bfd: False\n # OSPF not configured on external interface ethernet-1/2\n # OSPF not configured on external interface ethernet-1/3\n\n" } TASK [Deploy ospf configuration] *********************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/srlinux.yml for dut TASK [Generate JSON-RPC YAML configuration] ************************************ ok: [dut] TASK [Update SRL ospf node configuration (template=/work/netlab_cicd/node_files/dut/ospf)] *** changed: [dut] TASK [debug] ******************************************************************* skipping: [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=========================================\nupdates:\n\n- path: /routing-policy/policy[name=accept_all]\n value:\n default-action:\n policy-result: accept\n\n- path: /routing-policy/community-set[name=ibgp-mark]\n value:\n member: [ \"65536:0:65536\" ]\n\n- path: /routing-policy/policy[name=ibgp-mark]\n value:\n default-action:\n policy-result: reject\n statement:\n - name: mark-ibgp-routes\n action:\n bgp:\n communities:\n add: ibgp-mark\n policy-result: accept\n\n- path: /routing-policy/prefix-set[name=default_bgp_advertise]\n value:\n prefix: [] # Make sure it exists\n\n- path: /routing-policy/policy[name=default_bgp_export]\n value:\n default-action:\n policy-result: reject\n statement:\n - name: prefixes\n match:\n prefix:\n prefix-set: default_bgp_advertise\n action:\n policy-result: next-policy\n - name: bgp\n match:\n protocol: bgp\n action:\n policy-result: next-policy\n bgp:\n communities:\n remove:\n ibgp-mark\n\n\n- path: /network-instance[name=default]/protocols/bgp\n value:\n admin-state: enable\n autonomous-system: 65001\n router-id: 10.0.0.5\n ebgp-default-policy:\n export-reject-all: False\n import-reject-all: False\n\n afi-safi:\n - afi-safi-name: ipv4-unicast\n admin-state: enable\n afi-safi:\n - afi-safi-name: ipv6-unicast\n admin-state: enable\n\n- path: /routing-policy/prefix-set[name=default_bgp_advertise]\n value:\n prefix:\n - ip-prefix: 10.0.0.5/32\n mask-length-range: exact\n\n\n\n- path: /network-instance[name=default]/protocols/bgp/group[group-name=ibgp-ipv4]\n value:\n admin-state: enable\n# neighbor: {'name': 'pe2', 'as': 65001, 'type': 'ibgp', 'ipv4': '10.0.0.6', '_source_intf': {'type': 'loopback', 'neighbors': [], 'virtual_interface': True, 'ifindex': 0, 'ifname': 'lo0.0', 'ipv4': '10.0.0.5/32'}, 'next_hop_self': 'ebgp', 'activate': {'ipv4': True}, 'vpnv6': '10.0.0.6'}\n# ipv4: True\n# ipv6: True\n afi-safi:\n - afi-safi-name: ipv4-unicast\n admin-state: enable\n send-community-type: ['standard', 'large', 'extended']\n\n import-policy: ['accept_all']\n export-policy: ['default_bgp_export', 'accept_all']\n - afi-safi-name: ipv6-unicast\n admin-state: disable\n send-community-type: ['standard', 'large', 'extended']\n\n import-policy: ['accept_all']\n export-policy: ['default_bgp_export', 'accept_all']\n\n timers:\n connect-retry: 10\n _annotate_connect-retry: \"Reduce default 120s to 10s\"\n minimum-advertisement-interval: 1\n peer-as: 65001\n transport:\n local-address: 10.0.0.5\n next-hop-self: True\n\n\n- path: /network-instance[name=default]/protocols/bgp\n value:\n neighbor:\n - peer-address: \"10.0.0.6\"\n description: pe2\n peer-group: ibgp-ipv4\n # neighbor: {'name': 'pe2', 'as': 65001, 'type': 'ibgp', 'ipv4': '10.0.0.6', '_source_intf': {'type': 'loopback', 'neighbors': [], 'virtual_interface': True, 'ifindex': 0, 'ifname': 'lo0.0', 'ipv4': '10.0.0.5/32'}, 'next_hop_self': 'ebgp', 'activate': {'ipv4': True}, 'vpnv6': '10.0.0.6'}\n # ipv4: True\n # ipv6: False\n afi-safi:\n - afi-safi-name: ipv4-unicast\n admin-state: enable\n send-community-type: ['standard', 'large', 'extended']\n\n - afi-safi-name: ipv6-unicast\n admin-state: disable\n\n\n- path: /network-instance[name=default]/protocols/bgp/afi-safi[afi-safi-name=ipv4-unicast]/ipv4-unicast/next-hop-resolution\n value:\n ipv4-next-hops:\n tunnel-resolution:\n mode: prefer\n _annotate_mode: \"tunnel-table lookup over FIB\"\n allowed-tunnel-types: [ ldp ]\n \n" } TASK [Deploy bgp configuration] ************************************************ included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/srlinux.yml for dut TASK [Generate JSON-RPC YAML configuration] ************************************ ok: [dut] TASK [Update SRL bgp node configuration (template=/work/netlab_cicd/node_files/dut/bgp)] *** changed: [dut] TASK [debug] ******************************************************************* skipping: [dut] TASK [Figure out whether to deploy the module mpls on current device] ********** ok: [dut] TASK [Find configuration template for mpls] ************************************ ok: [dut] TASK [fail] ******************************************************************** skipping: [dut] TASK [Find configuration deployment deploy_script for mpls] ******************** ok: [dut] TASK [Print deployed configuration when running in verbose mode] *************** ok: [dut] => { "msg": "mpls configuration for dut\n=========================================\nupdates:\n- path: /system/mpls/label-ranges/dynamic[name=ldp]\n value:\n start-label: 10000\n end-label: 15000\n\n- path: /network-instance[name=default]/mpls\n value:\n icmp-tunneling: true\n\n- path: /network-instance[name=default]/protocols/ldp\n value:\n admin-state: enable\n dynamic-label-block: ldp\n\n discovery:\n interfaces:\n interface:\n - name: \"ethernet-1/1.0\"\n ipv4:\n admin-state: enable\n\n- path: /system/mpls/label-ranges/dynamic[name=vpn]\n value:\n start-label: 20000\n end-label: 30000\n\n- path: /system/mpls/services\n value:\n network-instance:\n dynamic-label-block: vpn\n\n- path: /network-instance[name=default]/protocols/bgp\n value:\n afi-safi:\n - afi-safi-name: l3vpn-ipv6-unicast\n admin-state: enable\n l3vpn-ipv6-unicast:\n rapid-update: True\n keep-all-routes: True\n- path: /network-instance[name=default]/protocols/bgp/group[group-name=ibgp-ipv4]\n value:\n afi-safi:\n - afi-safi-name: l3vpn-ipv6-unicast\n admin-state: enable\n send-community-type: [ standard, extended ]\n- path: /network-instance[name=t1]/protocols/bgp-ipvpn\n value:\n bgp-instance:\n - id: 1\n admin-state: enable\n mpls:\n next-hop-resolution:\n allowed-tunnel-types: [ ldp, sr-isis ]\n- path: /network-instance[name=t2]/protocols/bgp-ipvpn\n value:\n bgp-instance:\n - id: 1\n admin-state: enable\n mpls:\n next-hop-resolution:\n allowed-tunnel-types: [ ldp, sr-isis ]\n\n" } TASK [Deploy mpls configuration] *********************************************** included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/srlinux.yml for dut TASK [Generate JSON-RPC YAML configuration] ************************************ ok: [dut] TASK [Update SRL mpls node configuration (template=/work/netlab_cicd/node_files/dut/mpls)] *** changed: [dut] TASK [debug] ******************************************************************* skipping: [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\nupdates:\n\n- path: /network-instance[name=t1]\n value:\n type: ip-vrf\n\n\n- path: /routing-policy/community-set[name=C65000_1]\n value:\n member:\n - \"target:65000:1\" # Single member, else matching is AND\n\n- path: /routing-policy/community-set[name=t1_export]\n value:\n member:\n - \"target:65000:1\"\n\n\n- path: /routing-policy/policy[name=t1_bgp_export]\n value:\n default-action:\n policy-result: reject\n statement:\n - name: bgp\n match:\n protocol: bgp\n action:\n policy-result: next-policy\n bgp:\n communities:\n remove:\n ibgp-mark\n - name: mpls_vpn\n match:\n protocol: bgp-ipvpn\n action:\n policy-result: next-policy\n - name: export_local\n match:\n protocol: local\n action:\n policy-result: next-policy\n\n\n- path: /network-instance[name=t1]/protocols/bgp\n value:\n admin-state: enable\n autonomous-system: 65001\n router-id: 10.0.0.5\n ebgp-default-policy:\n export-reject-all: False\n import-reject-all: False\n\n afi-safi:\n - afi-safi-name: ipv6-unicast\n admin-state: enable\n\n- path: /routing-policy/prefix-set[name=t1_bgp_advertise]\n value:\n prefix:\n - ip-prefix: 2001:db8:42::/64\n mask-length-range: exact\n\n\n\n\n- path: /network-instance[name=t1]/protocols/bgp-vpn\n value:\n bgp-instance:\n - id: 1\n route-distinguisher:\n rd: \"65000:1\"\n route-target:\n import-rt: \"target:65000:1\"\n export-rt: \"target:65000:1\"\n\n- path: /network-instance[name=t1]/inter-instance-policies\n value:\n apply-policy:\n export-policy:\n - \"t1_vpn_export\"\n import-policy:\n - \"t1_vpn_import\"\n\n- path: /routing-policy/policy[name=t1_vpn_export]\n value:\n default-action:\n policy-result: \"accept\"\n bgp:\n communities:\n add: \"t1_export\"\n\n- path: /routing-policy/policy[name=t1_vpn_import]\n value:\n default-action:\n policy-result: \"reject\"\n statement:\n - name: 11\n match:\n bgp:\n community-set: \"C65000_1\"\n action:\n policy-result: \"accept\"\n\n\n- path: /network-instance[name=t2]\n value:\n type: ip-vrf\n\n\n- path: /routing-policy/community-set[name=C65000_2]\n value:\n member:\n - \"target:65000:2\" # Single member, else matching is AND\n\n- path: /routing-policy/community-set[name=t2_export]\n value:\n member:\n - \"target:65000:2\"\n\n\n- path: /routing-policy/policy[name=t2_bgp_export]\n value:\n default-action:\n policy-result: reject\n statement:\n - name: bgp\n match:\n protocol: bgp\n action:\n policy-result: next-policy\n bgp:\n communities:\n remove:\n ibgp-mark\n - name: mpls_vpn\n match:\n protocol: bgp-ipvpn\n action:\n policy-result: next-policy\n - name: export_local\n match:\n protocol: local\n action:\n policy-result: next-policy\n\n\n- path: /network-instance[name=t2]/protocols/bgp\n value:\n admin-state: enable\n autonomous-system: 65001\n router-id: 10.0.0.5\n ebgp-default-policy:\n export-reject-all: False\n import-reject-all: False\n\n afi-safi:\n - afi-safi-name: ipv6-unicast\n admin-state: enable\n\n- path: /routing-policy/prefix-set[name=t2_bgp_advertise]\n value:\n prefix:\n - ip-prefix: 2001:db8:42:2::/64\n mask-length-range: exact\n\n\n\n\n- path: /network-instance[name=t2]/protocols/bgp-vpn\n value:\n bgp-instance:\n - id: 1\n route-distinguisher:\n rd: \"65000:2\"\n route-target:\n import-rt: \"target:65000:2\"\n export-rt: \"target:65000:2\"\n\n- path: /network-instance[name=t2]/inter-instance-policies\n value:\n apply-policy:\n export-policy:\n - \"t2_vpn_export\"\n import-policy:\n - \"t2_vpn_import\"\n\n- path: /routing-policy/policy[name=t2_vpn_export]\n value:\n default-action:\n policy-result: \"accept\"\n bgp:\n communities:\n add: \"t2_export\"\n\n- path: /routing-policy/policy[name=t2_vpn_import]\n value:\n default-action:\n policy-result: \"reject\"\n statement:\n - name: 11\n match:\n bgp:\n community-set: \"C65000_2\"\n action:\n policy-result: \"accept\"\n\n" } TASK [Deploy vrf configuration] ************************************************ included: /home/pipi/netlab_gh/netsim/ansible/tasks/deploy-config/srlinux.yml for dut TASK [Generate JSON-RPC YAML configuration] ************************************ ok: [dut] TASK [Update SRL vrf node configuration (template=/work/netlab_cicd/node_files/dut/vrf)] *** changed: [dut] TASK [debug] ******************************************************************* skipping: [dut] PLAY [Deploy custom deployment templates] ************************************** skipping: no hosts matched PLAY RECAP ********************************************************************* dut : ok=42 changed=5 unreachable=0 failed=0 skipped=10 rescued=0 ignored=0 Results of configuration script deployments ================================================================================ h1 Script: initial h2 Script: initial h3 Script: initial h4 Script: initial pe2 Script: normalize,initial,ospf,bgp,mpls,vrf p1 Script: initial,ospf,mpls p2 Script: initial,ospf,mpls The tested device (DUT) is a PE-router running MPLS/VPN with two IPv6-only VRFs. The Linux hosts are attached directly to the PE-router. The PE-router has to run OSPF and LDP with a P-router and exchange VPNv6 routes with another PE-router. The connected IPv6 subnets must be redistributed into VPNv6 AF for the end-to-end connectivity test to work.