diff --git a/core-deploy.yml b/core-deploy.yml index 00b15ab..fd0abd0 100644 --- a/core-deploy.yml +++ b/core-deploy.yml @@ -18,12 +18,16 @@ tags: [ template ] tasks: - include_vars: "./nodes.yml" - - name: Gather facts (eos) - eos_facts: - when: ansible_network_os == 'eos' - - name: Gather facts (junos) - junos_facts: - when: ansible_network_os == 'junos' +# - name: Gather facts (eos) +# eos_facts: +# when: +# - ansible_network_os == 'eos' +# - dryrun is not defined +# - name: Gather facts (junos) +# junos_facts: +# when: +# - ansible_network_os == 'junos' +# - dryrun is not defined - name: create the directory for the configuration file: path=core_config state=directory run_once: true diff --git a/core/core-model-sr.yml b/core/core-model-sr.yml new file mode 100644 index 0000000..b607082 --- /dev/null +++ b/core/core-model-sr.yml @@ -0,0 +1,123 @@ +--- + +common: + bgp_asn: 65000 + +nodes: + - name: sr-vmx1 + mgmt: 10.39.0.57 + rid: 192.168.0.1 + sid: 10 + iso: 49.0001.0010.0100.1001.00 + + - name: sr-vmx2 + mgmt: 10.39.0.58 + rid: 192.168.0.2 + sid: 20 + iso: 49.0001.0010.0100.1002.00 + + - name: sr-vmx3 + mgmt: 10.39.0.59 + rid: 192.168.0.3 + sid: 30 + iso: 49.0001.0010.0100.1003.00 + + - name: sr-vmx4 + mgmt: 10.39.0.60 + rid: 192.168.0.4 + sid: 40 + iso: 49.0001.0010.0100.1004.00 + + - name: sr-vmx5 + mgmt: 10.39.0.55 + rid: 192.168.0.5 + sid: 50 + iso: 49.0001.0010.0100.1005.00 + + - name: sr-vmx6 + mgmt: 10.39.0.56 + rid: 192.168.0.6 + sid: 60 + iso: 49.0001.0010.0100.1006.00 + + - name: sr-vmx7 + mgmt: 10.39.0.57 + rid: 192.168.0.7 + sid: 70 + iso: 49.0001.0010.0100.1007.00 + + - name: sr-vmx8 + mgmt: 10.39.0.58 + rid: 192.168.0.8 + sid: 80 + iso: 49.0001.0010.0100.1008.00 + + - name: sr-vmx9 + mgmt: 10.39.0.59 + rid: 192.168.0.9 + sid: 90 + iso: 49.0001.0010.0100.1009.00 + +links: + - {left: sr-vmx1, left_port: ge-0/0/0, left_ip: 10.0.0.0.0, + right: sr-vmx2, right_port: ge-0/0/0, right_ip: 10.0.0.0.1, + mask: 31, cost: 1000, mpls: True, iso: True } + + - {left: sr-vmx1, left_port: ge-0/0/1, left_ip: 10.0.0.2, + right: sr-vmx4, right_port: ge-0/0/1, right_ip: 10.0.0.3, + mask: 31, cost: 1000, mpls: True, iso: True } + + - {left: sr-vmx1, left_port: ge-0/0/2, left_ip: 10.0.0.22, + right: sr-vmx3, right_port: ge-0/0/2, right_ip: 10.0.0.23, + mask: 31, cost: 1000, mpls: True, iso: True } + + - {left: sr-vmx2, left_port: ge-0/0/1, left_ip: 10.0.0.4, + right: sr-vmx5, right_port: ge-0/0/1, right_ip: 10.0.0.5, + mask: 31, cost: 1000, mpls: True, iso: True } + + - {left: sr-vmx3, left_port: ge-0/0/4, left_ip: 10.0.0.24, + right: sr-vmx6, right_port: ge-0/0/4, right_ip: 10.0.0.25, + mask: 31, cost: 1000, mpls: True, iso: True } + + - {left: sr-vmx4, left_port: ge-0/0/0, left_ip: 10.0.0.6, + right: sr-vmx5, right_port: ge-0/0/0, right_ip: 10.0.0.7, + mask: 31, cost: 1000, mpls: True, iso: True } + + - {left: sr-vmx4, left_port: ge-0/0/2, left_ip: 10.0.0.8, + right: sr-vmx6, right_port: ge-0/0/2, right_ip: 10.0.0.9, + mask: 31, cost: 1000, mpls: True, iso: True } + + - {left: sr-vmx4, left_port: ge-0/0/3, left_ip: 10.0.0.10, + right: sr-vmx6, right_port: ge-0/0/3, right_ip: 10.0.0.11, + mask: 31, cost: 1000, mpls: True, iso: True } + + - {left: sr-vmx5, left_port: ge-0/0/2, left_ip: 10.0.0.12, + right: sr-vmx7, right_port: ge-0/0/2, right_ip: 10.0.0.13, + mask: 31, cost: 500, mpls: True, iso: True } + + - {left: sr-vmx6, left_port: ge-0/0/0, left_ip: 10.0.0.14, + right: sr-vmx7, right_port: ge-0/0/0, right_ip: 10.0.0.15, + mask: 31, cost: 1000, mpls: True, iso: True } + + - {left: sr-vmx6, left_port: ge-0/0/1, left_ip: 10.0.0.16, + right: sr-vmx8, right_port: ge-0/0/1, right_ip: 10.0.0.17, + mask: 31, cost: 1000, mpls: True, iso: True } + + - {left: sr-vmx7, left_port: ge-0/0/1, left_ip: 10.0.0.18, + right: sr-vmx9, right_port: ge-0/0/1, right_ip: 10.0.0.19, + mask: 31, cost: 1000, mpls: True, iso: True } + + - {left: sr-vmx8, left_port: ge-0/0/0, left_ip: 10.0.0.20, + right: sr-vmx9, right_port: ge-0/0/0, right_ip: 10.0.0.21, + mask: 31, cost: 1000, mpls: True, iso: True } + + +bgp: + rr: [192.168.0.4, 192.168.0.7] + clients: [192.168.0.1, 192.168.0.2, 192.168.0.8, 192.168.0.9] + af: + - inet + - inet-vpn + +#isis: +# network: p2p diff --git a/core/core-to-nodes.j2 b/core/core-to-nodes.j2 index 2111327..b57c0bf 100644 --- a/core/core-to-nodes.j2 +++ b/core/core-to-nodes.j2 @@ -1,8 +1,8 @@ # # Nodes in the network # -{% macro core_link(name,ip,cost,vlan,remote,mpls,iso) %} -{{name}}.{{vlan}}: { ip: {{ip}}, remote: {{remote}} {% if cost %}, cost: {{cost}}{% endif %} {% if vlan %}, vlan: {{vlan}}{% endif %} {% if mpls %}, mpls: {{mpls}}{% endif %} {% if iso %}, iso: {{iso}}{% endif %}}{% endmacro %} +{% macro core_link(name,ip,mask,cost,vlan,remote,mpls,iso) %} +{{name}}.{{vlan}}: { ip: {{ip}}, remote: {{remote}}{% if mask %}, mask: {{mask}}{% endif %}{% if cost %}, cost: {{cost}}{% endif %}{% if vlan %}, vlan: {{vlan}}{% endif %}{% if mpls %}, mpls: {{mpls}}{% endif %}{% if iso %}, iso: {{iso}}{% endif %}}{% endmacro %} --- @@ -24,9 +24,9 @@ nodes: links: {% for link in links %} {% if link.left == node.name %} - {{ core_link(link.left_port,link.left_ip,link.cost|default(''),link.vlan|default('0'),link.right,link.mpls|default(''),link.iso|default('')) }} + {{ core_link(link.left_port,link.left_ip,link.mask|default(''),link.cost|default(''),link.vlan|default('0'),link.right,link.mpls|default(''),link.iso|default('')) }} {% elif link.right == node.name %} - {{ core_link(link.right_port,link.right_ip, link.cost|default(''),link.vlan|default('0'),link.left,link.mpls|default(''),link.iso|default('')) }} + {{ core_link(link.right_port,link.right_ip,link.mask|default(''),link.cost|default(''),link.vlan|default('0'),link.left,link.mpls|default(''),link.iso|default('')) }} {% endif %} {% endfor %} {% if bgp is defined %} diff --git a/core_config/sr-vmx1-config.txt b/core_config/sr-vmx1-config.txt new file mode 100644 index 0000000..b128079 --- /dev/null +++ b/core_config/sr-vmx1-config.txt @@ -0,0 +1,172 @@ + +version VERSION +system { + host-name sr-vmx1; + no-redirects; + root-authentication { + encrypted-password "$5$mcE0Hfiq$JfBeC3QSAvnd1tjqlOhlYXDgVrwvd6S4G3oVj5wiMO7"; ## SECRET-DATA + } + login { + user salt { + uid 2001; + class super-user; + authentication { + encrypted-password "$5$yp7ziGTI$F5F.6AUlR8hDK2JIsw5WRrTLex/yTCWH3iSR1Auk293"; ## SECRET-DATA + ssh-rsa "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCjxY2hLZ+ju5wdK4GYNhKGgnS8EWLBoEVpo+xQkhDzkTiBx3HGAnmARcVV0B9MqrHZl1omdnirJeygWzVbVY4yPUqGgEcUsTTq9fvK4AjTwtaoB5txAosaOnZq0zewmuZ6EMi6E3RND6A3FGXkf1Il2jg3I8k/dGqdyFI80B7sWy90fk+EqsGMPxVc+l5vAtY2jm84ellxxzBsulxfCSKPH86hZ1GqZ8A1ZBWITu15NjQw0aGssSYGMMTa1T8eFyY4hHWqqdwgOlODg9mZwwP1JdJH79SRoTOjqGGixuAFDGAgH3fNX6u8wTmYya/z7WXH6B2XwiiaZYdcyEbMLPZt"; ## SECRET-DATA + } + } + } + services { + ssh; + netconf { + ssh; + traceoptions { + file nc.txt size 1m world-readable; + flag all; + } + } + } + syslog { + user * { + any emergency; + } + file messages { + any any; + authorization info; + } + file interactive-commands { + interactive-commands any; + } + } +} + +interfaces { + ge-0/0/0 { + description "sr-vmx2" + unit 0 { + family inet { + address 10.0.0.0.0/31 + } + family mpls; + family iso; + } + } + + ge-0/0/1 { + description "sr-vmx4" + unit 0 { + family inet { + address 10.0.0.2/31 + } + family mpls; + family iso; + } + } + + ge-0/0/2 { + description "sr-vmx3" + unit 0 { + family inet { + address 10.0.0.22/31 + } + family mpls; + family iso; + } + } + + fxp0 { + description "OOB to MGMT Network"; + unit 0 { + family inet { + address 10.39.0.57/20; + } + } + } + lo0 { + unit 0 { + family inet { + address 192.168.0.1/32; + } + family iso { + address 49.0001.0010.0100.1001.00; + } + + } + } +} +routing-options { + router-id 192.168.0.1; + autonomous-system 65000; + static { + route 0.0.0.0/0 { + next-hop 10.39.0.1; + no-readvertise; + preference 255; + } + } +} +protocols { + bgp { + group Core { + type internal; + export __Ansible_Core_export; + local-address 192.168.0.1; + family inet { + unicast; + } + family inet-vpn { + unicast; + } + neighbor 192.168.0.4; + neighbor 192.168.0.7; + } + } + isis { + no-ipv6-routing; + source-packet-routing { + node-segment { + ipv4-index 10; + } + } + level 1 disable; + interface ge-0/0/0.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/1.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/2.0 { + point-to-point; + metric 1000; + } + interface lo0.0 { + passive; + } + } + mpls { + interface ge-0/0/0.0; + interface ge-0/0/1.0; + interface ge-0/0/2.0; + } + lldp { + interface ge-0/0/0; + interface ge-0/0/1; + interface ge-0/0/2; + } +} +policy-options { + policy-statement __Ansible_Core_export { + term ebgp { + from { + protocol bgp; + external; + } + then { + next-hop self; + accept; + } + } + } +} diff --git a/core_config/sr-vmx2-config.txt b/core_config/sr-vmx2-config.txt new file mode 100644 index 0000000..ba8bc4c --- /dev/null +++ b/core_config/sr-vmx2-config.txt @@ -0,0 +1,155 @@ + +version VERSION +system { + host-name sr-vmx2; + no-redirects; + root-authentication { + encrypted-password "$5$mcE0Hfiq$JfBeC3QSAvnd1tjqlOhlYXDgVrwvd6S4G3oVj5wiMO7"; ## SECRET-DATA + } + login { + user salt { + uid 2001; + class super-user; + authentication { + encrypted-password "$5$yp7ziGTI$F5F.6AUlR8hDK2JIsw5WRrTLex/yTCWH3iSR1Auk293"; ## SECRET-DATA + ssh-rsa "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCjxY2hLZ+ju5wdK4GYNhKGgnS8EWLBoEVpo+xQkhDzkTiBx3HGAnmARcVV0B9MqrHZl1omdnirJeygWzVbVY4yPUqGgEcUsTTq9fvK4AjTwtaoB5txAosaOnZq0zewmuZ6EMi6E3RND6A3FGXkf1Il2jg3I8k/dGqdyFI80B7sWy90fk+EqsGMPxVc+l5vAtY2jm84ellxxzBsulxfCSKPH86hZ1GqZ8A1ZBWITu15NjQw0aGssSYGMMTa1T8eFyY4hHWqqdwgOlODg9mZwwP1JdJH79SRoTOjqGGixuAFDGAgH3fNX6u8wTmYya/z7WXH6B2XwiiaZYdcyEbMLPZt"; ## SECRET-DATA + } + } + } + services { + ssh; + netconf { + ssh; + traceoptions { + file nc.txt size 1m world-readable; + flag all; + } + } + } + syslog { + user * { + any emergency; + } + file messages { + any any; + authorization info; + } + file interactive-commands { + interactive-commands any; + } + } +} + +interfaces { + ge-0/0/0 { + description "sr-vmx1" + unit 0 { + family inet { + address 10.0.0.0.1/31 + } + family mpls; + family iso; + } + } + + ge-0/0/1 { + description "sr-vmx5" + unit 0 { + family inet { + address 10.0.0.4/31 + } + family mpls; + family iso; + } + } + + fxp0 { + description "OOB to MGMT Network"; + unit 0 { + family inet { + address 10.39.0.58/20; + } + } + } + lo0 { + unit 0 { + family inet { + address 192.168.0.2/32; + } + family iso { + address 49.0001.0010.0100.1002.00; + } + + } + } +} +routing-options { + router-id 192.168.0.2; + autonomous-system 65000; + static { + route 0.0.0.0/0 { + next-hop 10.39.0.1; + no-readvertise; + preference 255; + } + } +} +protocols { + bgp { + group Core { + type internal; + export __Ansible_Core_export; + local-address 192.168.0.2; + family inet { + unicast; + } + family inet-vpn { + unicast; + } + neighbor 192.168.0.4; + neighbor 192.168.0.7; + } + } + isis { + no-ipv6-routing; + source-packet-routing { + node-segment { + ipv4-index 20; + } + } + level 1 disable; + interface ge-0/0/0.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/1.0 { + point-to-point; + metric 1000; + } + interface lo0.0 { + passive; + } + } + mpls { + interface ge-0/0/0.0; + interface ge-0/0/1.0; + } + lldp { + interface ge-0/0/0; + interface ge-0/0/1; + } +} +policy-options { + policy-statement __Ansible_Core_export { + term ebgp { + from { + protocol bgp; + external; + } + then { + next-hop self; + accept; + } + } + } +} diff --git a/core_config/sr-vmx3-config.txt b/core_config/sr-vmx3-config.txt new file mode 100644 index 0000000..06b7aa3 --- /dev/null +++ b/core_config/sr-vmx3-config.txt @@ -0,0 +1,155 @@ + +version VERSION +system { + host-name sr-vmx3; + no-redirects; + root-authentication { + encrypted-password "$5$mcE0Hfiq$JfBeC3QSAvnd1tjqlOhlYXDgVrwvd6S4G3oVj5wiMO7"; ## SECRET-DATA + } + login { + user salt { + uid 2001; + class super-user; + authentication { + encrypted-password "$5$yp7ziGTI$F5F.6AUlR8hDK2JIsw5WRrTLex/yTCWH3iSR1Auk293"; ## SECRET-DATA + ssh-rsa "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCjxY2hLZ+ju5wdK4GYNhKGgnS8EWLBoEVpo+xQkhDzkTiBx3HGAnmARcVV0B9MqrHZl1omdnirJeygWzVbVY4yPUqGgEcUsTTq9fvK4AjTwtaoB5txAosaOnZq0zewmuZ6EMi6E3RND6A3FGXkf1Il2jg3I8k/dGqdyFI80B7sWy90fk+EqsGMPxVc+l5vAtY2jm84ellxxzBsulxfCSKPH86hZ1GqZ8A1ZBWITu15NjQw0aGssSYGMMTa1T8eFyY4hHWqqdwgOlODg9mZwwP1JdJH79SRoTOjqGGixuAFDGAgH3fNX6u8wTmYya/z7WXH6B2XwiiaZYdcyEbMLPZt"; ## SECRET-DATA + } + } + } + services { + ssh; + netconf { + ssh; + traceoptions { + file nc.txt size 1m world-readable; + flag all; + } + } + } + syslog { + user * { + any emergency; + } + file messages { + any any; + authorization info; + } + file interactive-commands { + interactive-commands any; + } + } +} + +interfaces { + ge-0/0/2 { + description "sr-vmx1" + unit 0 { + family inet { + address 10.0.0.23/31 + } + family mpls; + family iso; + } + } + + ge-0/0/4 { + description "sr-vmx6" + unit 0 { + family inet { + address 10.0.0.24/31 + } + family mpls; + family iso; + } + } + + fxp0 { + description "OOB to MGMT Network"; + unit 0 { + family inet { + address 10.39.0.59/20; + } + } + } + lo0 { + unit 0 { + family inet { + address 192.168.0.3/32; + } + family iso { + address 49.0001.0010.0100.1003.00; + } + + } + } +} +routing-options { + router-id 192.168.0.3; + autonomous-system 65000; + static { + route 0.0.0.0/0 { + next-hop 10.39.0.1; + no-readvertise; + preference 255; + } + } +} +protocols { + bgp { + group Core { + type internal; + export __Ansible_Core_export; + local-address 192.168.0.3; + family inet { + unicast; + } + family inet-vpn { + unicast; + } + neighbor 192.168.0.4; + neighbor 192.168.0.7; + } + } + isis { + no-ipv6-routing; + source-packet-routing { + node-segment { + ipv4-index 30; + } + } + level 1 disable; + interface ge-0/0/2.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/4.0 { + point-to-point; + metric 1000; + } + interface lo0.0 { + passive; + } + } + mpls { + interface ge-0/0/2.0; + interface ge-0/0/4.0; + } + lldp { + interface ge-0/0/2; + interface ge-0/0/4; + } +} +policy-options { + policy-statement __Ansible_Core_export { + term ebgp { + from { + protocol bgp; + external; + } + then { + next-hop self; + accept; + } + } + } +} diff --git a/core_config/sr-vmx4-config.txt b/core_config/sr-vmx4-config.txt new file mode 100644 index 0000000..b0e0d75 --- /dev/null +++ b/core_config/sr-vmx4-config.txt @@ -0,0 +1,177 @@ + +version VERSION +system { + host-name sr-vmx4; + no-redirects; + root-authentication { + encrypted-password "$5$mcE0Hfiq$JfBeC3QSAvnd1tjqlOhlYXDgVrwvd6S4G3oVj5wiMO7"; ## SECRET-DATA + } + login { + user salt { + uid 2001; + class super-user; + authentication { + encrypted-password "$5$yp7ziGTI$F5F.6AUlR8hDK2JIsw5WRrTLex/yTCWH3iSR1Auk293"; ## SECRET-DATA + ssh-rsa "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCjxY2hLZ+ju5wdK4GYNhKGgnS8EWLBoEVpo+xQkhDzkTiBx3HGAnmARcVV0B9MqrHZl1omdnirJeygWzVbVY4yPUqGgEcUsTTq9fvK4AjTwtaoB5txAosaOnZq0zewmuZ6EMi6E3RND6A3FGXkf1Il2jg3I8k/dGqdyFI80B7sWy90fk+EqsGMPxVc+l5vAtY2jm84ellxxzBsulxfCSKPH86hZ1GqZ8A1ZBWITu15NjQw0aGssSYGMMTa1T8eFyY4hHWqqdwgOlODg9mZwwP1JdJH79SRoTOjqGGixuAFDGAgH3fNX6u8wTmYya/z7WXH6B2XwiiaZYdcyEbMLPZt"; ## SECRET-DATA + } + } + } + services { + ssh; + netconf { + ssh; + traceoptions { + file nc.txt size 1m world-readable; + flag all; + } + } + } + syslog { + user * { + any emergency; + } + file messages { + any any; + authorization info; + } + file interactive-commands { + interactive-commands any; + } + } +} + +interfaces { + ge-0/0/0 { + description "sr-vmx5" + unit 0 { + family inet { + address 10.0.0.6/31 + } + family mpls; + family iso; + } + } + + ge-0/0/1 { + description "sr-vmx1" + unit 0 { + family inet { + address 10.0.0.3/31 + } + family mpls; + family iso; + } + } + + ge-0/0/2 { + description "sr-vmx6" + unit 0 { + family inet { + address 10.0.0.8/31 + } + family mpls; + family iso; + } + } + + ge-0/0/3 { + description "sr-vmx6" + unit 0 { + family inet { + address 10.0.0.10/31 + } + family mpls; + family iso; + } + } + + fxp0 { + description "OOB to MGMT Network"; + unit 0 { + family inet { + address 10.39.0.60/20; + } + } + } + lo0 { + unit 0 { + family inet { + address 192.168.0.4/32; + } + family iso { + address 49.0001.0010.0100.1004.00; + } + + } + } +} +routing-options { + router-id 192.168.0.4; + autonomous-system 65000; + static { + route 0.0.0.0/0 { + next-hop 10.39.0.1; + no-readvertise; + preference 255; + } + } +} +protocols { + bgp { + group Core { + type internal; + local-address 192.168.0.4; + cluster 192.168.0.4; + family inet { + unicast; + } + family inet-vpn { + unicast; + } + neighbor 192.168.0.1; + neighbor 192.168.0.2; + neighbor 192.168.0.8; + neighbor 192.168.0.9; + } + } + isis { + no-ipv6-routing; + source-packet-routing { + node-segment { + ipv4-index 40; + } + } + level 1 disable; + interface ge-0/0/0.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/1.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/2.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/3.0 { + point-to-point; + metric 1000; + } + interface lo0.0 { + passive; + } + } + mpls { + interface ge-0/0/0.0; + interface ge-0/0/1.0; + interface ge-0/0/2.0; + interface ge-0/0/3.0; + } + lldp { + interface ge-0/0/0; + interface ge-0/0/1; + interface ge-0/0/2; + interface ge-0/0/3; + } +} diff --git a/core_config/sr-vmx5-config.txt b/core_config/sr-vmx5-config.txt new file mode 100644 index 0000000..c06abd2 --- /dev/null +++ b/core_config/sr-vmx5-config.txt @@ -0,0 +1,172 @@ + +version VERSION +system { + host-name sr-vmx5; + no-redirects; + root-authentication { + encrypted-password "$5$mcE0Hfiq$JfBeC3QSAvnd1tjqlOhlYXDgVrwvd6S4G3oVj5wiMO7"; ## SECRET-DATA + } + login { + user salt { + uid 2001; + class super-user; + authentication { + encrypted-password "$5$yp7ziGTI$F5F.6AUlR8hDK2JIsw5WRrTLex/yTCWH3iSR1Auk293"; ## SECRET-DATA + ssh-rsa "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCjxY2hLZ+ju5wdK4GYNhKGgnS8EWLBoEVpo+xQkhDzkTiBx3HGAnmARcVV0B9MqrHZl1omdnirJeygWzVbVY4yPUqGgEcUsTTq9fvK4AjTwtaoB5txAosaOnZq0zewmuZ6EMi6E3RND6A3FGXkf1Il2jg3I8k/dGqdyFI80B7sWy90fk+EqsGMPxVc+l5vAtY2jm84ellxxzBsulxfCSKPH86hZ1GqZ8A1ZBWITu15NjQw0aGssSYGMMTa1T8eFyY4hHWqqdwgOlODg9mZwwP1JdJH79SRoTOjqGGixuAFDGAgH3fNX6u8wTmYya/z7WXH6B2XwiiaZYdcyEbMLPZt"; ## SECRET-DATA + } + } + } + services { + ssh; + netconf { + ssh; + traceoptions { + file nc.txt size 1m world-readable; + flag all; + } + } + } + syslog { + user * { + any emergency; + } + file messages { + any any; + authorization info; + } + file interactive-commands { + interactive-commands any; + } + } +} + +interfaces { + ge-0/0/0 { + description "sr-vmx4" + unit 0 { + family inet { + address 10.0.0.7/31 + } + family mpls; + family iso; + } + } + + ge-0/0/1 { + description "sr-vmx2" + unit 0 { + family inet { + address 10.0.0.5/31 + } + family mpls; + family iso; + } + } + + ge-0/0/2 { + description "sr-vmx7" + unit 0 { + family inet { + address 10.0.0.12/31 + } + family mpls; + family iso; + } + } + + fxp0 { + description "OOB to MGMT Network"; + unit 0 { + family inet { + address 10.39.0.55/20; + } + } + } + lo0 { + unit 0 { + family inet { + address 192.168.0.5/32; + } + family iso { + address 49.0001.0010.0100.1005.00; + } + + } + } +} +routing-options { + router-id 192.168.0.5; + autonomous-system 65000; + static { + route 0.0.0.0/0 { + next-hop 10.39.0.1; + no-readvertise; + preference 255; + } + } +} +protocols { + bgp { + group Core { + type internal; + export __Ansible_Core_export; + local-address 192.168.0.5; + family inet { + unicast; + } + family inet-vpn { + unicast; + } + neighbor 192.168.0.4; + neighbor 192.168.0.7; + } + } + isis { + no-ipv6-routing; + source-packet-routing { + node-segment { + ipv4-index 50; + } + } + level 1 disable; + interface ge-0/0/0.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/1.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/2.0 { + point-to-point; + metric 500; + } + interface lo0.0 { + passive; + } + } + mpls { + interface ge-0/0/0.0; + interface ge-0/0/1.0; + interface ge-0/0/2.0; + } + lldp { + interface ge-0/0/0; + interface ge-0/0/1; + interface ge-0/0/2; + } +} +policy-options { + policy-statement __Ansible_Core_export { + term ebgp { + from { + protocol bgp; + external; + } + then { + next-hop self; + accept; + } + } + } +} diff --git a/core_config/sr-vmx6-config.txt b/core_config/sr-vmx6-config.txt new file mode 100644 index 0000000..178f047 --- /dev/null +++ b/core_config/sr-vmx6-config.txt @@ -0,0 +1,206 @@ + +version VERSION +system { + host-name sr-vmx6; + no-redirects; + root-authentication { + encrypted-password "$5$mcE0Hfiq$JfBeC3QSAvnd1tjqlOhlYXDgVrwvd6S4G3oVj5wiMO7"; ## SECRET-DATA + } + login { + user salt { + uid 2001; + class super-user; + authentication { + encrypted-password "$5$yp7ziGTI$F5F.6AUlR8hDK2JIsw5WRrTLex/yTCWH3iSR1Auk293"; ## SECRET-DATA + ssh-rsa "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCjxY2hLZ+ju5wdK4GYNhKGgnS8EWLBoEVpo+xQkhDzkTiBx3HGAnmARcVV0B9MqrHZl1omdnirJeygWzVbVY4yPUqGgEcUsTTq9fvK4AjTwtaoB5txAosaOnZq0zewmuZ6EMi6E3RND6A3FGXkf1Il2jg3I8k/dGqdyFI80B7sWy90fk+EqsGMPxVc+l5vAtY2jm84ellxxzBsulxfCSKPH86hZ1GqZ8A1ZBWITu15NjQw0aGssSYGMMTa1T8eFyY4hHWqqdwgOlODg9mZwwP1JdJH79SRoTOjqGGixuAFDGAgH3fNX6u8wTmYya/z7WXH6B2XwiiaZYdcyEbMLPZt"; ## SECRET-DATA + } + } + } + services { + ssh; + netconf { + ssh; + traceoptions { + file nc.txt size 1m world-readable; + flag all; + } + } + } + syslog { + user * { + any emergency; + } + file messages { + any any; + authorization info; + } + file interactive-commands { + interactive-commands any; + } + } +} + +interfaces { + ge-0/0/0 { + description "sr-vmx7" + unit 0 { + family inet { + address 10.0.0.14/31 + } + family mpls; + family iso; + } + } + + ge-0/0/1 { + description "sr-vmx8" + unit 0 { + family inet { + address 10.0.0.16/31 + } + family mpls; + family iso; + } + } + + ge-0/0/2 { + description "sr-vmx4" + unit 0 { + family inet { + address 10.0.0.9/31 + } + family mpls; + family iso; + } + } + + ge-0/0/3 { + description "sr-vmx4" + unit 0 { + family inet { + address 10.0.0.11/31 + } + family mpls; + family iso; + } + } + + ge-0/0/4 { + description "sr-vmx3" + unit 0 { + family inet { + address 10.0.0.25/31 + } + family mpls; + family iso; + } + } + + fxp0 { + description "OOB to MGMT Network"; + unit 0 { + family inet { + address 10.39.0.56/20; + } + } + } + lo0 { + unit 0 { + family inet { + address 192.168.0.6/32; + } + family iso { + address 49.0001.0010.0100.1006.00; + } + + } + } +} +routing-options { + router-id 192.168.0.6; + autonomous-system 65000; + static { + route 0.0.0.0/0 { + next-hop 10.39.0.1; + no-readvertise; + preference 255; + } + } +} +protocols { + bgp { + group Core { + type internal; + export __Ansible_Core_export; + local-address 192.168.0.6; + family inet { + unicast; + } + family inet-vpn { + unicast; + } + neighbor 192.168.0.4; + neighbor 192.168.0.7; + } + } + isis { + no-ipv6-routing; + source-packet-routing { + node-segment { + ipv4-index 60; + } + } + level 1 disable; + interface ge-0/0/0.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/1.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/2.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/3.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/4.0 { + point-to-point; + metric 1000; + } + interface lo0.0 { + passive; + } + } + mpls { + interface ge-0/0/0.0; + interface ge-0/0/1.0; + interface ge-0/0/2.0; + interface ge-0/0/3.0; + interface ge-0/0/4.0; + } + lldp { + interface ge-0/0/0; + interface ge-0/0/1; + interface ge-0/0/2; + interface ge-0/0/3; + interface ge-0/0/4; + } +} +policy-options { + policy-statement __Ansible_Core_export { + term ebgp { + from { + protocol bgp; + external; + } + then { + next-hop self; + accept; + } + } + } +} diff --git a/core_config/sr-vmx7-config.txt b/core_config/sr-vmx7-config.txt new file mode 100644 index 0000000..505cb52 --- /dev/null +++ b/core_config/sr-vmx7-config.txt @@ -0,0 +1,160 @@ + +version VERSION +system { + host-name sr-vmx7; + no-redirects; + root-authentication { + encrypted-password "$5$mcE0Hfiq$JfBeC3QSAvnd1tjqlOhlYXDgVrwvd6S4G3oVj5wiMO7"; ## SECRET-DATA + } + login { + user salt { + uid 2001; + class super-user; + authentication { + encrypted-password "$5$yp7ziGTI$F5F.6AUlR8hDK2JIsw5WRrTLex/yTCWH3iSR1Auk293"; ## SECRET-DATA + ssh-rsa "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCjxY2hLZ+ju5wdK4GYNhKGgnS8EWLBoEVpo+xQkhDzkTiBx3HGAnmARcVV0B9MqrHZl1omdnirJeygWzVbVY4yPUqGgEcUsTTq9fvK4AjTwtaoB5txAosaOnZq0zewmuZ6EMi6E3RND6A3FGXkf1Il2jg3I8k/dGqdyFI80B7sWy90fk+EqsGMPxVc+l5vAtY2jm84ellxxzBsulxfCSKPH86hZ1GqZ8A1ZBWITu15NjQw0aGssSYGMMTa1T8eFyY4hHWqqdwgOlODg9mZwwP1JdJH79SRoTOjqGGixuAFDGAgH3fNX6u8wTmYya/z7WXH6B2XwiiaZYdcyEbMLPZt"; ## SECRET-DATA + } + } + } + services { + ssh; + netconf { + ssh; + traceoptions { + file nc.txt size 1m world-readable; + flag all; + } + } + } + syslog { + user * { + any emergency; + } + file messages { + any any; + authorization info; + } + file interactive-commands { + interactive-commands any; + } + } +} + +interfaces { + ge-0/0/0 { + description "sr-vmx6" + unit 0 { + family inet { + address 10.0.0.15/31 + } + family mpls; + family iso; + } + } + + ge-0/0/1 { + description "sr-vmx9" + unit 0 { + family inet { + address 10.0.0.18/31 + } + family mpls; + family iso; + } + } + + ge-0/0/2 { + description "sr-vmx5" + unit 0 { + family inet { + address 10.0.0.13/31 + } + family mpls; + family iso; + } + } + + fxp0 { + description "OOB to MGMT Network"; + unit 0 { + family inet { + address 10.39.0.57/20; + } + } + } + lo0 { + unit 0 { + family inet { + address 192.168.0.7/32; + } + family iso { + address 49.0001.0010.0100.1007.00; + } + + } + } +} +routing-options { + router-id 192.168.0.7; + autonomous-system 65000; + static { + route 0.0.0.0/0 { + next-hop 10.39.0.1; + no-readvertise; + preference 255; + } + } +} +protocols { + bgp { + group Core { + type internal; + local-address 192.168.0.7; + cluster 192.168.0.7; + family inet { + unicast; + } + family inet-vpn { + unicast; + } + neighbor 192.168.0.1; + neighbor 192.168.0.2; + neighbor 192.168.0.8; + neighbor 192.168.0.9; + } + } + isis { + no-ipv6-routing; + source-packet-routing { + node-segment { + ipv4-index 70; + } + } + level 1 disable; + interface ge-0/0/0.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/1.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/2.0 { + point-to-point; + metric 500; + } + interface lo0.0 { + passive; + } + } + mpls { + interface ge-0/0/0.0; + interface ge-0/0/1.0; + interface ge-0/0/2.0; + } + lldp { + interface ge-0/0/0; + interface ge-0/0/1; + interface ge-0/0/2; + } +} diff --git a/core_config/sr-vmx8-config.txt b/core_config/sr-vmx8-config.txt new file mode 100644 index 0000000..7dfa091 --- /dev/null +++ b/core_config/sr-vmx8-config.txt @@ -0,0 +1,155 @@ + +version VERSION +system { + host-name sr-vmx8; + no-redirects; + root-authentication { + encrypted-password "$5$mcE0Hfiq$JfBeC3QSAvnd1tjqlOhlYXDgVrwvd6S4G3oVj5wiMO7"; ## SECRET-DATA + } + login { + user salt { + uid 2001; + class super-user; + authentication { + encrypted-password "$5$yp7ziGTI$F5F.6AUlR8hDK2JIsw5WRrTLex/yTCWH3iSR1Auk293"; ## SECRET-DATA + ssh-rsa "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCjxY2hLZ+ju5wdK4GYNhKGgnS8EWLBoEVpo+xQkhDzkTiBx3HGAnmARcVV0B9MqrHZl1omdnirJeygWzVbVY4yPUqGgEcUsTTq9fvK4AjTwtaoB5txAosaOnZq0zewmuZ6EMi6E3RND6A3FGXkf1Il2jg3I8k/dGqdyFI80B7sWy90fk+EqsGMPxVc+l5vAtY2jm84ellxxzBsulxfCSKPH86hZ1GqZ8A1ZBWITu15NjQw0aGssSYGMMTa1T8eFyY4hHWqqdwgOlODg9mZwwP1JdJH79SRoTOjqGGixuAFDGAgH3fNX6u8wTmYya/z7WXH6B2XwiiaZYdcyEbMLPZt"; ## SECRET-DATA + } + } + } + services { + ssh; + netconf { + ssh; + traceoptions { + file nc.txt size 1m world-readable; + flag all; + } + } + } + syslog { + user * { + any emergency; + } + file messages { + any any; + authorization info; + } + file interactive-commands { + interactive-commands any; + } + } +} + +interfaces { + ge-0/0/0 { + description "sr-vmx9" + unit 0 { + family inet { + address 10.0.0.20/31 + } + family mpls; + family iso; + } + } + + ge-0/0/1 { + description "sr-vmx6" + unit 0 { + family inet { + address 10.0.0.17/31 + } + family mpls; + family iso; + } + } + + fxp0 { + description "OOB to MGMT Network"; + unit 0 { + family inet { + address 10.39.0.58/20; + } + } + } + lo0 { + unit 0 { + family inet { + address 192.168.0.8/32; + } + family iso { + address 49.0001.0010.0100.1008.00; + } + + } + } +} +routing-options { + router-id 192.168.0.8; + autonomous-system 65000; + static { + route 0.0.0.0/0 { + next-hop 10.39.0.1; + no-readvertise; + preference 255; + } + } +} +protocols { + bgp { + group Core { + type internal; + export __Ansible_Core_export; + local-address 192.168.0.8; + family inet { + unicast; + } + family inet-vpn { + unicast; + } + neighbor 192.168.0.4; + neighbor 192.168.0.7; + } + } + isis { + no-ipv6-routing; + source-packet-routing { + node-segment { + ipv4-index 80; + } + } + level 1 disable; + interface ge-0/0/0.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/1.0 { + point-to-point; + metric 1000; + } + interface lo0.0 { + passive; + } + } + mpls { + interface ge-0/0/0.0; + interface ge-0/0/1.0; + } + lldp { + interface ge-0/0/0; + interface ge-0/0/1; + } +} +policy-options { + policy-statement __Ansible_Core_export { + term ebgp { + from { + protocol bgp; + external; + } + then { + next-hop self; + accept; + } + } + } +} diff --git a/core_config/sr-vmx9-config.txt b/core_config/sr-vmx9-config.txt new file mode 100644 index 0000000..4f34dee --- /dev/null +++ b/core_config/sr-vmx9-config.txt @@ -0,0 +1,155 @@ + +version VERSION +system { + host-name sr-vmx9; + no-redirects; + root-authentication { + encrypted-password "$5$mcE0Hfiq$JfBeC3QSAvnd1tjqlOhlYXDgVrwvd6S4G3oVj5wiMO7"; ## SECRET-DATA + } + login { + user salt { + uid 2001; + class super-user; + authentication { + encrypted-password "$5$yp7ziGTI$F5F.6AUlR8hDK2JIsw5WRrTLex/yTCWH3iSR1Auk293"; ## SECRET-DATA + ssh-rsa "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCjxY2hLZ+ju5wdK4GYNhKGgnS8EWLBoEVpo+xQkhDzkTiBx3HGAnmARcVV0B9MqrHZl1omdnirJeygWzVbVY4yPUqGgEcUsTTq9fvK4AjTwtaoB5txAosaOnZq0zewmuZ6EMi6E3RND6A3FGXkf1Il2jg3I8k/dGqdyFI80B7sWy90fk+EqsGMPxVc+l5vAtY2jm84ellxxzBsulxfCSKPH86hZ1GqZ8A1ZBWITu15NjQw0aGssSYGMMTa1T8eFyY4hHWqqdwgOlODg9mZwwP1JdJH79SRoTOjqGGixuAFDGAgH3fNX6u8wTmYya/z7WXH6B2XwiiaZYdcyEbMLPZt"; ## SECRET-DATA + } + } + } + services { + ssh; + netconf { + ssh; + traceoptions { + file nc.txt size 1m world-readable; + flag all; + } + } + } + syslog { + user * { + any emergency; + } + file messages { + any any; + authorization info; + } + file interactive-commands { + interactive-commands any; + } + } +} + +interfaces { + ge-0/0/0 { + description "sr-vmx8" + unit 0 { + family inet { + address 10.0.0.21/31 + } + family mpls; + family iso; + } + } + + ge-0/0/1 { + description "sr-vmx7" + unit 0 { + family inet { + address 10.0.0.19/31 + } + family mpls; + family iso; + } + } + + fxp0 { + description "OOB to MGMT Network"; + unit 0 { + family inet { + address 10.39.0.59/20; + } + } + } + lo0 { + unit 0 { + family inet { + address 192.168.0.9/32; + } + family iso { + address 49.0001.0010.0100.1009.00; + } + + } + } +} +routing-options { + router-id 192.168.0.9; + autonomous-system 65000; + static { + route 0.0.0.0/0 { + next-hop 10.39.0.1; + no-readvertise; + preference 255; + } + } +} +protocols { + bgp { + group Core { + type internal; + export __Ansible_Core_export; + local-address 192.168.0.9; + family inet { + unicast; + } + family inet-vpn { + unicast; + } + neighbor 192.168.0.4; + neighbor 192.168.0.7; + } + } + isis { + no-ipv6-routing; + source-packet-routing { + node-segment { + ipv4-index 90; + } + } + level 1 disable; + interface ge-0/0/0.0 { + point-to-point; + metric 1000; + } + interface ge-0/0/1.0 { + point-to-point; + metric 1000; + } + interface lo0.0 { + passive; + } + } + mpls { + interface ge-0/0/0.0; + interface ge-0/0/1.0; + } + lldp { + interface ge-0/0/0; + interface ge-0/0/1; + } +} +policy-options { + policy-statement __Ansible_Core_export { + term ebgp { + from { + protocol bgp; + external; + } + then { + next-hop self; + accept; + } + } + } +} diff --git a/group_vars/junos b/group_vars/junos index 8d6ff1f..ba7367d 100644 --- a/group_vars/junos +++ b/group_vars/junos @@ -1,6 +1,8 @@ --- #ansible_connection: network_cli -ansible_connection: netconf +#ansible_connection: netconf +ansible_connection: local ansible_network_os: junos ansible_user: salt ansible_ssh_private_key_file: /srv/salt/ssh/id_rsa +ansible_net_version: VERSION diff --git a/hosts_sr b/hosts_sr new file mode 100644 index 0000000..f237fb4 --- /dev/null +++ b/hosts_sr @@ -0,0 +1,28 @@ +--- +all: + children: + junos: + children: + vmx: + hosts: + sr-vmx1: +# ansible_host: 10.0.0.1 + sr-vmx2: +# ansible_host: 10.0.0.2 + sr-vmx3: +# ansible_host: 10.0.0.3 + sr-vmx4: +# ansible_host: 10.0.0.4 + sr-vmx5: +# ansible_host: 10.0.0.5 + sr-vmx6: +# ansible_host: 10.0.0.6 + sr-vmx7: +# ansible_host: 10.0.0.7 + sr-vmx8: +# ansible_host: 10.0.0.8 + sr-vmx9: +# ansible_host: 10.0.0.9 + vars: + model: core-model-sr.yml + dryrun: True diff --git a/hosts_sr.orig b/hosts_sr.orig new file mode 100644 index 0000000..19a2bc7 --- /dev/null +++ b/hosts_sr.orig @@ -0,0 +1,28 @@ +--- +all: + children: + junos: + children: + vmx: + hosts: + sr-vmx1: + ansible_host: 10.0.0.1 + sr-vmx2: + ansible_host: 10.0.0.2 + sr-vmx3: + ansible_host: 10.0.0.3 + sr-vmx4: + ansible_host: 10.0.0.4 + sr-vmx5: + ansible_host: 10.0.0.5 + sr-vmx6: + ansible_host: 10.0.0.6 + sr-vmx7: + ansible_host: 10.0.0.7 + sr-vmx8: + ansible_host: 10.0.0.8 + sr-vmx9: + ansible_host: 10.0.0.9 + vars: + model: core-model-sr.yml + dryrun: True diff --git a/junos/core.j2 b/junos/core.j2 index ef28eb7..17d2aec 100644 --- a/junos/core.j2 +++ b/junos/core.j2 @@ -201,11 +201,9 @@ protocols { {% for intf, intf_attr in node.links.items()|sort %} interface {{ intf }} { point-to-point; -{# {% if intf_attr.cost is defined %} metric {{intf_attr.cost }}; {% endif %} -#} } {% endfor %} interface lo0.0 { @@ -218,7 +216,7 @@ protocols { ### LDP Variables ###### ************************************************** #} -{% if node.ldp is not defined %} +{% if node.ldp is defined %} ldp { {% for intf, intf_attr in node.links.items()|sort %} interface {{intf}}; @@ -231,7 +229,7 @@ protocols { ### RSVP Variables ###### ************************************************** #} -{% if node.rsvp is not defined %} +{% if node.rsvp is defined %} rsvp { {% for intf, intf_attr in node.links.items()|sort %} interface {{intf}}; diff --git a/nodes.yml b/nodes.yml index 37dc85c..219ce95 100644 --- a/nodes.yml +++ b/nodes.yml @@ -9,137 +9,169 @@ common: nodes: - ansible-vmx1: + sr-vmx1: mgmt: 10.39.0.57 - rid: 10.39.8.41 + rid: 192.168.0.1 sid: 10 iso: 49.0001.0010.0100.1001.00 links: - ge-0/0/0.0: { ip: 172.10.12.1, remote: ansible-vmx2 , cost: 10 , vlan: 0 , mpls: True , iso: True} - ge-0/0/1.0: { ip: 172.10.13.1, remote: ansible-vmx3 , cost: 10 , vlan: 0 , mpls: True , iso: True} - ge-0/0/3.0: { ip: 172.10.15.1, remote: ansible-veos5 , cost: 10 , vlan: 0 , mpls: True , iso: True} + ge-0/0/0.0: { ip: 10.0.0.0.0, remote: sr-vmx2, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/1.0: { ip: 10.0.0.2, remote: sr-vmx4, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/2.0: { ip: 10.0.0.22, remote: sr-vmx3, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} bgp: ibgp: - rr: true peers: - - 10.39.8.42 - - 10.39.8.43 - - 10.39.8.44 + - 192.168.0.4 + - 192.168.0.7 af: - inet - inet-vpn - ansible-vmx2: + sr-vmx2: mgmt: 10.39.0.58 - rid: 10.39.8.42 + rid: 192.168.0.2 sid: 20 iso: 49.0001.0010.0100.1002.00 links: - ge-0/0/0.0: { ip: 172.10.12.2, remote: ansible-vmx1 , cost: 10 , vlan: 0 , mpls: True , iso: True} - ge-0/0/2.0: { ip: 172.10.24.2, remote: ansible-vmx4 , cost: 10 , vlan: 0 , mpls: True , iso: True} - ge-0/0/3.0: { ip: 172.10.25.2, remote: ansible-veos5 , cost: 10 , vlan: 0 , mpls: True , iso: True} + ge-0/0/0.0: { ip: 10.0.0.0.1, remote: sr-vmx1, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/1.0: { ip: 10.0.0.4, remote: sr-vmx5, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} bgp: ibgp: peers: - - 10.39.8.41 + - 192.168.0.4 + - 192.168.0.7 af: - inet - inet-vpn - ansible-vmx3: + sr-vmx3: mgmt: 10.39.0.59 - rid: 10.39.8.43 + rid: 192.168.0.3 sid: 30 iso: 49.0001.0010.0100.1003.00 links: - ge-0/0/0.0: { ip: 172.10.13.3, remote: ansible-vmx1 , cost: 10 , vlan: 0 , mpls: True , iso: True} - ge-0/0/2.0: { ip: 172.10.34.3, remote: ansible-vmx4 , cost: 10 , vlan: 0 , mpls: True , iso: True} - ge-0/0/3.0: { ip: 172.10.36.3, remote: ansible-veos6 , cost: 10 , vlan: 0 , mpls: True , iso: True} + ge-0/0/2.0: { ip: 10.0.0.23, remote: sr-vmx1, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/4.0: { ip: 10.0.0.24, remote: sr-vmx6, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} bgp: ibgp: peers: - - 10.39.8.41 + - 192.168.0.4 + - 192.168.0.7 af: - inet - inet-vpn - ansible-vmx4: + sr-vmx4: mgmt: 10.39.0.60 - rid: 10.39.8.44 + rid: 192.168.0.4 sid: 40 iso: 49.0001.0010.0100.1004.00 links: - ge-0/0/1.0: { ip: 172.10.24.4, remote: ansible-vmx2 , cost: 10 , vlan: 0 , mpls: True , iso: True} - ge-0/0/2.0: { ip: 172.10.34.4, remote: ansible-vmx3 , cost: 10 , vlan: 0 , mpls: True , iso: True} - ge-0/0/3.0: { ip: 172.10.46.4, remote: ansible-veos6 , cost: 10 , vlan: 0 , mpls: True , iso: True} + ge-0/0/1.0: { ip: 10.0.0.3, remote: sr-vmx1, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/0.0: { ip: 10.0.0.6, remote: sr-vmx5, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/2.0: { ip: 10.0.0.8, remote: sr-vmx6, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/3.0: { ip: 10.0.0.10, remote: sr-vmx6, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} bgp: ibgp: + rr: true peers: - - 10.39.8.41 + - 192.168.0.1 + - 192.168.0.2 + - 192.168.0.8 + - 192.168.0.9 af: - inet - inet-vpn - ansible-veos5: + sr-vmx5: mgmt: 10.39.0.55 - rid: 10.39.8.55 + rid: 192.168.0.5 sid: 50 iso: 49.0001.0010.0100.1005.00 links: - Ethernet1.0: { ip: 172.10.15.5, remote: ansible-vmx1 , cost: 10 , vlan: 0 , mpls: True , iso: True} - Ethernet2.0: { ip: 172.10.25.5, remote: ansible-vmx2 , cost: 10 , vlan: 0 , mpls: True , iso: True} - Ethernet3.0: { ip: 172.10.55.5, remote: ansible-veos55 , vlan: 0 } + ge-0/0/1.0: { ip: 10.0.0.5, remote: sr-vmx2, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/0.0: { ip: 10.0.0.7, remote: sr-vmx4, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/2.0: { ip: 10.0.0.12, remote: sr-vmx7, mask: 31, cost: 500, vlan: 0, mpls: True, iso: True} bgp: ibgp: peers: - - 10.39.8.41 - - 163.253.39.165 + - 192.168.0.4 + - 192.168.0.7 af: - inet - inet-vpn - - inet-lu - ansible-veos55: - mgmt: 10.39.0.155 - rid: 10.39.8.155 + sr-vmx6: + mgmt: 10.39.0.56 + rid: 192.168.0.6 + sid: 60 + iso: 49.0001.0010.0100.1006.00 links: - Ethernet1.0: { ip: 172.10.55.55, remote: ansible-veos5 , vlan: 0 } + ge-0/0/4.0: { ip: 10.0.0.25, remote: sr-vmx3, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/2.0: { ip: 10.0.0.9, remote: sr-vmx4, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/3.0: { ip: 10.0.0.11, remote: sr-vmx4, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/0.0: { ip: 10.0.0.14, remote: sr-vmx7, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/1.0: { ip: 10.0.0.16, remote: sr-vmx8, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} bgp: ibgp: peers: - - 10.39.8.41 + - 192.168.0.4 + - 192.168.0.7 af: - inet - inet-vpn - ansible-veos6: - mgmt: 10.39.0.56 - rid: 10.39.8.56 - sid: 60 - iso: 49.0001.0010.0100.1006.00 + sr-vmx7: + mgmt: 10.39.0.57 + rid: 192.168.0.7 + sid: 70 + iso: 49.0001.0010.0100.1007.00 + links: + ge-0/0/2.0: { ip: 10.0.0.13, remote: sr-vmx5, mask: 31, cost: 500, vlan: 0, mpls: True, iso: True} + ge-0/0/0.0: { ip: 10.0.0.15, remote: sr-vmx6, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/1.0: { ip: 10.0.0.18, remote: sr-vmx9, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + bgp: + ibgp: + rr: true + peers: + - 192.168.0.1 + - 192.168.0.2 + - 192.168.0.8 + - 192.168.0.9 + af: + - inet + - inet-vpn + + sr-vmx8: + mgmt: 10.39.0.58 + rid: 192.168.0.8 + sid: 80 + iso: 49.0001.0010.0100.1008.00 links: - Ethernet1.0: { ip: 172.10.36.6, remote: ansible-vmx3 , cost: 10 , vlan: 0 , mpls: True , iso: True} - Ethernet2.0: { ip: 172.10.46.6, remote: ansible-vmx4 , cost: 10 , vlan: 0 , mpls: True , iso: True} - Ethernet3.0: { ip: 172.10.66.6, remote: ansible-veos66 , vlan: 0 } + ge-0/0/1.0: { ip: 10.0.0.17, remote: sr-vmx6, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/0.0: { ip: 10.0.0.20, remote: sr-vmx9, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} bgp: ibgp: peers: - - 10.39.8.41 - - 163.253.39.165 + - 192.168.0.4 + - 192.168.0.7 af: - inet - inet-vpn - - inet-lu - ansible-veos66: - mgmt: 10.39.0.156 - rid: 10.39.8.156 + sr-vmx9: + mgmt: 10.39.0.59 + rid: 192.168.0.9 + sid: 90 + iso: 49.0001.0010.0100.1009.00 links: - Ethernet1.0: { ip: 172.10.66.66, remote: ansible-veos6 , vlan: 0 } + ge-0/0/1.0: { ip: 10.0.0.19, remote: sr-vmx7, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} + ge-0/0/0.0: { ip: 10.0.0.21, remote: sr-vmx8, mask: 31, cost: 1000, vlan: 0, mpls: True, iso: True} bgp: ibgp: peers: - - 10.39.8.41 + - 192.168.0.4 + - 192.168.0.7 af: - inet - inet-vpn