From 31c36732586fab9378ee12c543cddf58357ad87d Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Mon, 16 Dec 2024 22:19:38 -0500 Subject: [PATCH 01/25] change uplink switch list type --- .../avd/examples/single-dc-l3ls/README.md | 89 ++++++++++--------- .../single-dc-l3ls/group_vars/DC1.yml | 26 ++---- 2 files changed, 53 insertions(+), 62 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index e07dd352690..7584a430843 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -400,10 +400,8 @@ l3leaf: loopback_ipv4_pool: 10.255.0.0/27 # (2)! loopback_ipv4_offset: 2 # (3)! vtep_loopback_ipv4_pool: 10.255.1.0/27 # (4)! - uplink_interfaces: ['Ethernet1', 'Ethernet2'] # (5)! uplink_switches: ['dc1-spine1', 'dc1-spine2'] # (6)! uplink_ipv4_pool: 10.255.255.0/26 # (7)! - mlag_interfaces: ['Ethernet3', 'Ethernet4'] # (8)! mlag_peer_ipv4_pool: 10.255.1.64/27 # (9)! mlag_peer_l3_ipv4_pool: 10.255.1.96/27 # (10)! virtual_router_mac_address: 00:1c:73:00:00:99 # (11)! @@ -417,33 +415,25 @@ l3leaf: - name: dc1-leaf1a id: 1 mgmt_ip: 172.16.1.101/24 - uplink_switch_interfaces: # (16)! - - Ethernet1 - - Ethernet1 + uplink_switch_interfaces: [Ethernet1, Ethernet1]# (16)! - name: dc1-leaf1b id: 2 mgmt_ip: 172.16.1.102/24 - uplink_switch_interfaces: - - Ethernet2 - - Ethernet2 - - DC1_L3_LEAF2: + uplink_switch_interfaces: [Ethernet2, Ethernet2] + - group: DC1_L3_LEAF2 bgp_as: 65102 nodes: - name: dc1-leaf2a id: 3 mgmt_ip: 172.16.1.103/24 - uplink_switch_interfaces: - - Ethernet3 - - Ethernet3 + uplink_switch_interfaces: [Ethernet3, Ethernet3] - name: dc1-leaf2b id: 4 mgmt_ip: 172.16.1.104/24 - uplink_switch_interfaces: - - Ethernet4 - - Ethernet4 + uplink_switch_interfaces: [Ethernet4, Ethernet4] ``` +###Need to change the numbering TODO 1. `platform` references default settings defined in AVD specific to certain switch platforms. 2. `loopback_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for Loopback0. Please note that this IP pool is identical to the one used for the spine switches in this example. To avoid setting the same IP addresses for several devices, we define the option `loopback_ipv4_offset`. 3. `loopback_ipv4_offset` offsets all assigned loopback IP addresses counting from the beginning of the IP scope. This is required to avoid overlapping IPs when the same IP pool is used for two different node_types (like spine and l3leaf in this example). The offset is "2" because each spine switch uses one loopback address. @@ -476,22 +466,17 @@ l2leaf: - name: dc1-leaf1c id: 1 mgmt_ip: 172.16.1.151/24 - uplink_switch_interfaces: - - Ethernet8 - - Ethernet8 - + uplink_switch_interfaces: [Ethernet8, Ethernet8] - group: DC1_L2_LEAF2 uplink_switches: ['dc1-leaf2a', 'dc1-leaf2b'] nodes: - name: dc1-leaf2c id: 2 mgmt_ip: 172.16.1.152/24 - uplink_switch_interfaces: - - Ethernet8 - - Ethernet8 + uplink_switch_interfaces: [Ethernet8, Ethernet8] ``` -An L2 leaf switch is more simple than an L3 switch. Hence there are fewer settings to define. +An L2 leaf switch is simpler than an L3 switch. Hence there are fewer settings to define. ## Specifying network services (VRFs and VLANs) in the EVPN/VXLAN fabric @@ -578,25 +563,45 @@ This defines the settings for the relevant switch ports to which the endpoints c As an example, here is the configuration for `dc1-leaf1-server1`: ```yaml title="CONNECTED_ENDPOINTS.yml" - dc1-leaf1-server1: +servers: + - name: dc1-leaf1-server1 adapters: # (1)! - - endpoint_ports: [ PCI1, PCI2 ] # (2)! - switch_ports: [ Ethernet5, Ethernet5 ] # (3)! - switches: [ dc1-leaf1a, dc1-leaf1b ] # (4)! - vlans: 11-12,21-22 # (5)! - native_vlan: 4092 # (6)! - mode: trunk # (7)! - spanning_tree_portfast: edge # (8)! - port_channel: # (9)! - endpoint_port_channel: Bond1 - mode: active - - - endpoint_ports: [ iLO ] - switch_ports: [ Ethernet5 ] - switches: [ dc1-leaf1c ] - vlans: 11 - mode: access - spanning_tree_portfast: edge + - endpoint_ports: [ PCI1, PCI2 ] # (2)! + switch_ports: [ Ethernet5, Ethernet5 ] # (3)! + switches: [ dc1-leaf1a, dc1-leaf1b ] # (4)! + vlans: 11-12,21-22 # (5)! + native_vlan: 4092 # (6)! + mode: trunk # (7)! + spanning_tree_portfast: edge # (8)! + port_channel: # (9)! + endpoint_port_channel: Bond1 + mode: active + + - endpoint_ports: [ iLO ] + switch_ports: [ Ethernet5 ] + switches: [ dc1-leaf1c ] + vlans: 11 + mode: access + spanning_tree_portfast: edge + - name: dc1-leaf2-server1 + adapters: + - endpoint_ports: [ PCI1, PCI2 ] + switch_ports: [ Ethernet5, Ethernet5 ] + switches: [ dc1-leaf2a, dc1-leaf2b ] + vlans: 11-12,21-22 + native_vlan: 4092 + mode: trunk + spanning_tree_portfast: edge + port_channel: + endpoint_port_channel: Bond1 #this is not in the group vars + mode: active + + - endpoint_ports: [ iLO ] + switch_ports: [ Ethernet5 ] + switches: [ dc1-leaf2c ] + vlans: 11 + mode: access + spanning_tree_portfast: edge ``` 1. The relevant `adapters` are defined. For example, the `type` set to `server` and `ilo` is purely for documentation and readability. It has no operational significance. diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1.yml index c0028a7f411..ef07139684e 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1.yml @@ -67,31 +67,22 @@ l3leaf: mgmt_ip: 172.16.1.101/24 # Definition of the port to be used in the uplink device facing this device. # Note that the number of elements in this list must match the length of 'uplink_switches' as well as 'uplink_interfaces' - uplink_switch_interfaces: - - Ethernet1 - - Ethernet1 + uplink_switch_interfaces: [Ethernet1, Ethernet1] - name: dc1-leaf1b id: 2 mgmt_ip: 172.16.1.102/24 - uplink_switch_interfaces: - - Ethernet2 - - Ethernet2 - + uplink_switch_interfaces: [Ethernet2, Ethernet2] - group: DC1_L3_LEAF2 bgp_as: 65102 nodes: - name: dc1-leaf2a id: 3 mgmt_ip: 172.16.1.103/24 - uplink_switch_interfaces: - - Ethernet3 - - Ethernet3 + uplink_switch_interfaces: [Ethernet3, Ethernet3] - name: dc1-leaf2b id: 4 mgmt_ip: 172.16.1.104/24 - uplink_switch_interfaces: - - Ethernet4 - - Ethernet4 + uplink_switch_interfaces: [Ethernet4, Ethernet4] # L2 Leaf switch group l2leaf: @@ -106,16 +97,11 @@ l2leaf: - name: dc1-leaf1c id: 1 mgmt_ip: 172.16.1.151/24 - uplink_switch_interfaces: - - Ethernet8 - - Ethernet8 - + uplink_switch_interfaces: [Ethernet8, Ethernet8] - group: DC1_L2_LEAF2 uplink_switches: ['dc1-leaf2a', 'dc1-leaf2b'] nodes: - name: dc1-leaf2c id: 2 mgmt_ip: 172.16.1.152/24 - uplink_switch_interfaces: - - Ethernet8 - - Ethernet8 + uplink_switch_interfaces: [Ethernet8, Ethernet8] From 14e7a10ae1aa030931d5a11ca855db743fa5816e Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Wed, 18 Dec 2024 12:14:32 -0800 Subject: [PATCH 02/25] remove quotes and fix annotation numbering --- .../avd/examples/single-dc-l3ls/README.md | 39 ++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index 7584a430843..3324abd44e9 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -400,22 +400,22 @@ l3leaf: loopback_ipv4_pool: 10.255.0.0/27 # (2)! loopback_ipv4_offset: 2 # (3)! vtep_loopback_ipv4_pool: 10.255.1.0/27 # (4)! - uplink_switches: ['dc1-spine1', 'dc1-spine2'] # (6)! - uplink_ipv4_pool: 10.255.255.0/26 # (7)! - mlag_peer_ipv4_pool: 10.255.1.64/27 # (9)! - mlag_peer_l3_ipv4_pool: 10.255.1.96/27 # (10)! - virtual_router_mac_address: 00:1c:73:00:00:99 # (11)! - spanning_tree_priority: 4096 # (12)! - spanning_tree_mode: mstp # (13)! - - node_groups: # (14)! + uplink_switches: [dc1-spine1, dc1-spine2] # (5)! + uplink_ipv4_pool: 10.255.255.0/26 # (6)! + mlag_peer_ipv4_pool: 10.255.1.64/27 # (7)! + mlag_peer_l3_ipv4_pool: 10.255.1.96/27 # (8)! + virtual_router_mac_address: 00:1c:73:00:00:99 # (9)! + spanning_tree_priority: 4096 # (10)! + spanning_tree_mode: mstp # (11)! + + node_groups: # (12)! - group: DC1_L3_LEAF1 - bgp_as: 65101 # (15)! + bgp_as: 65101 # (13)! nodes: - name: dc1-leaf1a id: 1 mgmt_ip: 172.16.1.101/24 - uplink_switch_interfaces: [Ethernet1, Ethernet1]# (16)! + uplink_switch_interfaces: [Ethernet1, Ethernet1]# (14)! - name: dc1-leaf1b id: 2 mgmt_ip: 172.16.1.102/24 @@ -438,6 +438,7 @@ l3leaf: 2. `loopback_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for Loopback0. Please note that this IP pool is identical to the one used for the spine switches in this example. To avoid setting the same IP addresses for several devices, we define the option `loopback_ipv4_offset`. 3. `loopback_ipv4_offset` offsets all assigned loopback IP addresses counting from the beginning of the IP scope. This is required to avoid overlapping IPs when the same IP pool is used for two different node_types (like spine and l3leaf in this example). The offset is "2" because each spine switch uses one loopback address. 4. `vtep_loopback_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the VTEP (Loopback1). +<<<<<<< HEAD 5. `uplink_interfaces` used by the `l3leaf` nodes to connect to the spine switches. 6. `uplink_switches` defines the uplink switches, which are dc1-spine1 and dc1-spine2. Note that the `uplink_interfaces` and `uplink_switches` are paired vertically. 7. `uplink_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the uplink interfaces that were just defined. @@ -450,6 +451,18 @@ l3leaf: 14. `node_groups` defines settings common to more than one node. For example, when exactly two nodes are part of a node group for leaf switches, AVD will, by default, automatically generate MLAG configuration. 15. `bgp_as` is defined once since an MLAG pair shares a single BGP AS number. 16. `uplink_switch_interfaces` defines the interfaces used on the uplink switches (Ethernet1 on dc1-spine1 and dc1-spine2 in this example). +======= +5. `uplink_switches` defines the uplink switches, which are dc1-spine1 and dc1-spine2. Note that the `uplink_interfaces` and `uplink_switches` are paired vertically. +6. `uplink_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the uplink interfaces that were just defined. +7. `mlag_peer_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the MLAG peer link interface VLAN4094. +8. `mlag_peer_l3_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the iBGP peering established between the two leaf switches via the SVI/IRB interface VLAN4093. +9. `virtual_router_mac_address` defines the MAC address used for the anycast gateway on the various subnets. This is the MAC address connected endpoints will learn when ARPing for their default gateway. +10. `spanning_tree_priority` sets the spanning tree priority. Since spanning tree in an L3LS network is effectively only running locally on the switch, the same priority across all L3 leaf switches can be re-used. +11. `spanning_tree_mode` defines the spanning tree mode. In this case, we are using MSTP, which is the default. However, other modes are supported should they be required, for example, for connectivity to legacy or third-party vendor environments. +12. `node_groups` defines settings common to more than one node. For example, when exactly two nodes are part of a node group for leaf switches, AVD will, by default, automatically generate MLAG configuration. +13. `bgp_as` is defined once since an MLAG pair shares a single BGP AS number. +14. `uplink_switch_interfaces` defines the interfaces used on the uplink switches (Ethernet1 on dc1-spine1 and dc1-spine2 in this example). +>>>>>>> 7e2cb1b78 (remove quotes and fix annotation numbering) Finally, more of the same, but this time for the L2 leaf switches: @@ -461,14 +474,14 @@ l2leaf: node_groups: - group: DC1_L2_LEAF1 - uplink_switches: ['dc1-leaf1a', 'dc1-leaf1b'] + uplink_switches: [dc1-leaf1a, dc1-leaf1b] nodes: - name: dc1-leaf1c id: 1 mgmt_ip: 172.16.1.151/24 uplink_switch_interfaces: [Ethernet8, Ethernet8] - group: DC1_L2_LEAF2 - uplink_switches: ['dc1-leaf2a', 'dc1-leaf2b'] + uplink_switches: [dc1-leaf2a, dc1-leaf2b] nodes: - name: dc1-leaf2c id: 2 From 0e50bfb68dcb9aedad5d89568921760d5cab9a3e Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Wed, 18 Dec 2024 20:53:20 +0000 Subject: [PATCH 03/25] move content from dc1.yml to different switch type --- .../single-dc-l3ls/group_vars/DC1.yml | 101 ------------------ .../group_vars/DC1_L2_LEAVES.yml | 22 ++++ .../group_vars/DC1_L3_LEAVES.yml | 57 ++++++++++ .../single-dc-l3ls/group_vars/DC1_SPINES.yml | 25 +++++ 4 files changed, 104 insertions(+), 101 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1.yml index ef07139684e..b65acd12702 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1.yml @@ -2,106 +2,5 @@ # Default gateway used for the management interface mgmt_gateway: 172.16.1.1 -# Spine switch group -spine: - # Definition of default values that will be configured to all nodes defined in this group - defaults: - # Set the relevant platform as each platform has different default values in Ansible AVD - platform: vEOS-lab - # Pool of IPv4 addresses to configure interface Loopback0 used for BGP EVPN sessions - loopback_ipv4_pool: 10.255.0.0/27 - # ASN to be used by BGP - bgp_as: 65100 - # Definition of nodes contained in this group. - # Specific configuration of device must take place under the node definition. Each node inherits all values defined under 'defaults' - nodes: - # Name of the node to be defined (must be consistent with definition in inventory) - - name: dc1-spine1 - # Device ID definition. An integer number used for internal calculations (ie. IPv4 address of the loopback_ipv4_pool among others) - id: 1 - # Management IP to be assigned to the management interface - mgmt_ip: 172.16.1.11/24 - - name: dc1-spine2 - id: 2 - mgmt_ip: 172.16.1.12/24 - -# L3 Leaf switch group -l3leaf: - defaults: - # Set the relevant platform as each platform has different default values in Ansible AVD - platform: vEOS-lab - # Pool of IPv4 addresses to configure interface Loopback0 used for BGP EVPN sessions - loopback_ipv4_pool: 10.255.0.0/27 - # Offset all assigned loopback IP addresses. - # Required when the < loopback_ipv4_pool > is same for 2 different node_types (like spine and l3leaf) to avoid over-lapping IPs. - # For example, set the minimum offset l3leaf.defaults.loopback_ipv4_offset: < total # spine switches > or vice versa. - loopback_ipv4_offset: 2 - # Definition of pool of IPs to be used as Virtual Tunnel EndPoint (VXLAN origin and destination IPs) - vtep_loopback_ipv4_pool: 10.255.1.0/27 - # Ansible hostname of the devices used to establish neighborship (IP assignments and BGP peering) - uplink_switches: ['dc1-spine1', 'dc1-spine2'] - # Definition of pool of IPs to be used in P2P links - uplink_ipv4_pool: 10.255.255.0/26 - # Definition of pool of IPs to be used for MLAG peer-link connectivity - mlag_peer_ipv4_pool: 10.255.1.64/27 - # iBGP Peering between MLAG peers - mlag_peer_l3_ipv4_pool: 10.255.1.96/27 - # Virtual router mac for VNIs assigned to Leaf switches in format xx:xx:xx:xx:xx:xx - virtual_router_mac_address: 00:1c:73:00:00:99 - spanning_tree_priority: 4096 - spanning_tree_mode: mstp - - # If two nodes (and only two) are in the same node_group, they will automatically form an MLAG pair - node_groups: - # Definition of a node group that will include two devices in MLAG. - # Definitions under the group will be inherited by both nodes in the group - - group: DC1_L3_LEAF1 - # ASN to be used by BGP for the group. Both devices in the MLAG pair will use the same BGP ASN - bgp_as: 65101 - nodes: - # Definition of hostnames under the node_group - - name: dc1-leaf1a - id: 1 - mgmt_ip: 172.16.1.101/24 - # Definition of the port to be used in the uplink device facing this device. - # Note that the number of elements in this list must match the length of 'uplink_switches' as well as 'uplink_interfaces' - uplink_switch_interfaces: [Ethernet1, Ethernet1] - - name: dc1-leaf1b - id: 2 - mgmt_ip: 172.16.1.102/24 - uplink_switch_interfaces: [Ethernet2, Ethernet2] - - group: DC1_L3_LEAF2 - bgp_as: 65102 - nodes: - - name: dc1-leaf2a - id: 3 - mgmt_ip: 172.16.1.103/24 - uplink_switch_interfaces: [Ethernet3, Ethernet3] - - name: dc1-leaf2b - id: 4 - mgmt_ip: 172.16.1.104/24 - uplink_switch_interfaces: [Ethernet4, Ethernet4] - -# L2 Leaf switch group -l2leaf: - defaults: - platform: vEOS-lab - spanning_tree_mode: mstp - - node_groups: - - group: DC1_L2_LEAF1 - uplink_switches: ['dc1-leaf1a', 'dc1-leaf1b'] - nodes: - - name: dc1-leaf1c - id: 1 - mgmt_ip: 172.16.1.151/24 - uplink_switch_interfaces: [Ethernet8, Ethernet8] - - group: DC1_L2_LEAF2 - uplink_switches: ['dc1-leaf2a', 'dc1-leaf2b'] - nodes: - - name: dc1-leaf2c - id: 2 - mgmt_ip: 172.16.1.152/24 - uplink_switch_interfaces: [Ethernet8, Ethernet8] diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES.yml index 327c882d1e7..bf62371666f 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES.yml @@ -1,2 +1,24 @@ --- type: l2leaf + +# L2 Leaf switch group +l2leaf: + defaults: + platform: vEOS-lab + spanning_tree_mode: mstp + + node_groups: + - group: DC1_L2_LEAF1 + uplink_switches: [dc1-leaf1a, dc1-leaf1b] + nodes: + - name: dc1-leaf1c + id: 1 + mgmt_ip: 172.16.1.151/24 + uplink_switch_interfaces: [Ethernet8, Ethernet8] + - group: DC1_L2_LEAF2 + uplink_switches: [dc1-leaf2a, dc1-leaf2b] + nodes: + - name: dc1-leaf2c + id: 2 + mgmt_ip: 172.16.1.152/24 + uplink_switch_interfaces: [Ethernet8, Ethernet8] diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES.yml index 2f6d52d1ce7..01632f32864 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES.yml @@ -1,2 +1,59 @@ --- type: l3leaf + +# L3 Leaf switch group +l3leaf: + defaults: + # Set the relevant platform as each platform has different default values in Ansible AVD + platform: vEOS-lab + # Pool of IPv4 addresses to configure interface Loopback0 used for BGP EVPN sessions + loopback_ipv4_pool: 10.255.0.0/27 + # Offset all assigned loopback IP addresses. + # Required when the < loopback_ipv4_pool > is same for 2 different node_types (like spine and l3leaf) to avoid over-lapping IPs. + # For example, set the minimum offset l3leaf.defaults.loopback_ipv4_offset: < total # spine switches > or vice versa. + loopback_ipv4_offset: 2 + # Definition of pool of IPs to be used as Virtual Tunnel EndPoint (VXLAN origin and destination IPs) + vtep_loopback_ipv4_pool: 10.255.1.0/27 + # Ansible hostname of the devices used to establish neighborship (IP assignments and BGP peering) + uplink_switches: ['dc1-spine1', 'dc1-spine2'] + # Definition of pool of IPs to be used in P2P links + uplink_ipv4_pool: 10.255.255.0/26 + # Definition of pool of IPs to be used for MLAG peer-link connectivity + mlag_peer_ipv4_pool: 10.255.1.64/27 + # iBGP Peering between MLAG peers + mlag_peer_l3_ipv4_pool: 10.255.1.96/27 + # Virtual router mac for VNIs assigned to Leaf switches in format xx:xx:xx:xx:xx:xx + virtual_router_mac_address: 00:1c:73:00:00:99 + spanning_tree_priority: 4096 + spanning_tree_mode: mstp + + # If two nodes (and only two) are in the same node_group, they will automatically form an MLAG pair + node_groups: + # Definition of a node group that will include two devices in MLAG. + # Definitions under the group will be inherited by both nodes in the group + - group: DC1_L3_LEAF1 + # ASN to be used by BGP for the group. Both devices in the MLAG pair will use the same BGP ASN + bgp_as: 65101 + nodes: + # Definition of hostnames under the node_group + - name: dc1-leaf1a + id: 1 + mgmt_ip: 172.16.1.101/24 + # Definition of the port to be used in the uplink device facing this device. + # Note that the number of elements in this list must match the length of 'uplink_switches' as well as 'uplink_interfaces' + uplink_switch_interfaces: [Ethernet1, Ethernet1] + - name: dc1-leaf1b + id: 2 + mgmt_ip: 172.16.1.102/24 + uplink_switch_interfaces: [Ethernet2, Ethernet2] + - group: DC1_L3_LEAF2 + bgp_as: 65102 + nodes: + - name: dc1-leaf2a + id: 3 + mgmt_ip: 172.16.1.103/24 + uplink_switch_interfaces: [Ethernet3, Ethernet3] + - name: dc1-leaf2b + id: 4 + mgmt_ip: 172.16.1.104/24 + uplink_switch_interfaces: [Ethernet4, Ethernet4] diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES.yml index ea38f466bf5..a5bacefdcc6 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES.yml @@ -1,2 +1,27 @@ --- type: spine + +# Spine switch group +spine: + # Definition of default values that will be configured to all nodes defined in this group + defaults: + # Set the relevant platform as each platform has different default values in Ansible AVD + platform: vEOS-lab + # Pool of IPv4 addresses to configure interface Loopback0 used for BGP EVPN sessions + loopback_ipv4_pool: 10.255.0.0/27 + # ASN to be used by BGP + bgp_as: 65100 + + # Definition of nodes contained in this group. + # Specific configuration of device must take place under the node definition. Each node inherits all values defined under 'defaults' + nodes: + # Name of the node to be defined (must be consistent with definition in inventory) + - name: dc1-spine1 + # Device ID definition. An integer number used for internal calculations (ie. IPv4 address of the loopback_ipv4_pool among others) + id: 1 + # Management IP to be assigned to the management interface + mgmt_ip: 172.16.1.11/24 + + - name: dc1-spine2 + id: 2 + mgmt_ip: 172.16.1.12/24 \ No newline at end of file From 74ecfe6fca6029f1280365a1182c996bcf8530b9 Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Wed, 18 Dec 2024 21:26:56 +0000 Subject: [PATCH 04/25] fix anotations --- .../arista/avd/examples/single-dc-l3ls/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index 3324abd44e9..c0e85a756f0 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -433,7 +433,7 @@ l3leaf: uplink_switch_interfaces: [Ethernet4, Ethernet4] ``` -###Need to change the numbering TODO + 1. `platform` references default settings defined in AVD specific to certain switch platforms. 2. `loopback_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for Loopback0. Please note that this IP pool is identical to the one used for the spine switches in this example. To avoid setting the same IP addresses for several devices, we define the option `loopback_ipv4_offset`. 3. `loopback_ipv4_offset` offsets all assigned loopback IP addresses counting from the beginning of the IP scope. This is required to avoid overlapping IPs when the same IP pool is used for two different node_types (like spine and l3leaf in this example). The offset is "2" because each spine switch uses one loopback address. From 11cc52563406bf5acd846fff27b0019a7dfc5771 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 21:14:26 +0000 Subject: [PATCH 05/25] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../avd/examples/single-dc-l3ls/README.md | 26 +++++-------------- .../single-dc-l3ls/group_vars/DC1.yml | 3 --- .../single-dc-l3ls/group_vars/DC1_SPINES.yml | 2 +- 3 files changed, 7 insertions(+), 24 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index c0e85a756f0..9b71cca926e 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -433,25 +433,12 @@ l3leaf: uplink_switch_interfaces: [Ethernet4, Ethernet4] ``` +### Need to change the numbering TODO 1. `platform` references default settings defined in AVD specific to certain switch platforms. 2. `loopback_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for Loopback0. Please note that this IP pool is identical to the one used for the spine switches in this example. To avoid setting the same IP addresses for several devices, we define the option `loopback_ipv4_offset`. 3. `loopback_ipv4_offset` offsets all assigned loopback IP addresses counting from the beginning of the IP scope. This is required to avoid overlapping IPs when the same IP pool is used for two different node_types (like spine and l3leaf in this example). The offset is "2" because each spine switch uses one loopback address. 4. `vtep_loopback_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the VTEP (Loopback1). -<<<<<<< HEAD -5. `uplink_interfaces` used by the `l3leaf` nodes to connect to the spine switches. -6. `uplink_switches` defines the uplink switches, which are dc1-spine1 and dc1-spine2. Note that the `uplink_interfaces` and `uplink_switches` are paired vertically. -7. `uplink_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the uplink interfaces that were just defined. -8. `mlag_interfaces` defines the MLAG interfaces used on each leaf switch. -9. `mlag_peer_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the MLAG peer link interface VLAN4094. -10. `mlag_peer_l3_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the iBGP peering established between the two leaf switches via the SVI/IRB interface VLAN4093. -11. `virtual_router_mac_address` defines the MAC address used for the anycast gateway on the various subnets. This is the MAC address connected endpoints will learn when ARPing for their default gateway. -12. `spanning_tree_priority` sets the spanning tree priority. Since spanning tree in an L3LS network is effectively only running locally on the switch, the same priority across all L3 leaf switches can be reused. -13. `spanning_tree_mode` defines the spanning tree mode. In this case, we are using MSTP, which is the default. However, other modes are supported should they be required, for example, for connectivity to legacy or third-party vendor environments. -14. `node_groups` defines settings common to more than one node. For example, when exactly two nodes are part of a node group for leaf switches, AVD will, by default, automatically generate MLAG configuration. -15. `bgp_as` is defined once since an MLAG pair shares a single BGP AS number. -16. `uplink_switch_interfaces` defines the interfaces used on the uplink switches (Ethernet1 on dc1-spine1 and dc1-spine2 in this example). -======= 5. `uplink_switches` defines the uplink switches, which are dc1-spine1 and dc1-spine2. Note that the `uplink_interfaces` and `uplink_switches` are paired vertically. 6. `uplink_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the uplink interfaces that were just defined. 7. `mlag_peer_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the MLAG peer link interface VLAN4094. @@ -462,7 +449,6 @@ l3leaf: 12. `node_groups` defines settings common to more than one node. For example, when exactly two nodes are part of a node group for leaf switches, AVD will, by default, automatically generate MLAG configuration. 13. `bgp_as` is defined once since an MLAG pair shares a single BGP AS number. 14. `uplink_switch_interfaces` defines the interfaces used on the uplink switches (Ethernet1 on dc1-spine1 and dc1-spine2 in this example). ->>>>>>> 7e2cb1b78 (remove quotes and fix annotation numbering) Finally, more of the same, but this time for the L2 leaf switches: @@ -597,18 +583,18 @@ servers: mode: access spanning_tree_portfast: edge - name: dc1-leaf2-server1 - adapters: - - endpoint_ports: [ PCI1, PCI2 ] + adapters: + - endpoint_ports: [ PCI1, PCI2 ] switch_ports: [ Ethernet5, Ethernet5 ] switches: [ dc1-leaf2a, dc1-leaf2b ] vlans: 11-12,21-22 - native_vlan: 4092 + native_vlan: 4092 mode: trunk spanning_tree_portfast: edge port_channel: - endpoint_port_channel: Bond1 #this is not in the group vars + endpoint_port_channel: Bond1 #this is not in the group vars mode: active - + - endpoint_ports: [ iLO ] switch_ports: [ Ethernet5 ] switches: [ dc1-leaf2c ] diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1.yml index b65acd12702..111bff05815 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1.yml @@ -1,6 +1,3 @@ --- # Default gateway used for the management interface mgmt_gateway: 172.16.1.1 - - - diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES.yml index a5bacefdcc6..97c54ddef78 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES.yml @@ -24,4 +24,4 @@ spine: - name: dc1-spine2 id: 2 - mgmt_ip: 172.16.1.12/24 \ No newline at end of file + mgmt_ip: 172.16.1.12/24 From 715e4d716d5caba2a034865e8d462be32e275131 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 21:33:40 +0000 Subject: [PATCH 06/25] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../arista/avd/examples/single-dc-l3ls/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index 9b71cca926e..ba4210b0f67 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -433,8 +433,6 @@ l3leaf: uplink_switch_interfaces: [Ethernet4, Ethernet4] ``` -### Need to change the numbering TODO - 1. `platform` references default settings defined in AVD specific to certain switch platforms. 2. `loopback_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for Loopback0. Please note that this IP pool is identical to the one used for the spine switches in this example. To avoid setting the same IP addresses for several devices, we define the option `loopback_ipv4_offset`. 3. `loopback_ipv4_offset` offsets all assigned loopback IP addresses counting from the beginning of the IP scope. This is required to avoid overlapping IPs when the same IP pool is used for two different node_types (like spine and l3leaf in this example). The offset is "2" because each spine switch uses one loopback address. From 09d72458c6168f8fd6706723728821364e6f16d2 Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Thu, 19 Dec 2024 12:45:29 -0500 Subject: [PATCH 07/25] test code block --- .../arista/avd/examples/single-dc-l3ls/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index ba4210b0f67..c50c0199114 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -273,6 +273,12 @@ The `ansible-avd-examples/single-dc-l3ls/group_vars/FABRIC.yml` file defines gen The first section defines how the Ansible host connects to the devices: ```yaml title="FABRIC.yml" +--8<-- +examples/single-dc-l3ls/group_vars/FABRIC.yml[2-16] +--8<-- +``` + + The following section specifies variables that generate configuration to be applied to all devices in the fabric: From 42357c09e75c15ac98aab9cd7c315bffc99678f7 Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Thu, 19 Dec 2024 12:58:57 -0500 Subject: [PATCH 08/25] test code block --- .../arista/avd/examples/single-dc-l3ls/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index c50c0199114..9501349ebc4 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -274,7 +274,7 @@ The first section defines how the Ansible host connects to the devices: ```yaml title="FABRIC.yml" --8<-- -examples/single-dc-l3ls/group_vars/FABRIC.yml[2-16] +examples/single-dc-l3ls/group_vars/FABRIC.yml [2-16] --8<-- ``` From 55eb3c0b482f86f15906a2c533c37b8e83a7eecd Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Thu, 19 Dec 2024 13:23:06 -0500 Subject: [PATCH 09/25] test code block --- .../avd/examples/single-dc-l3ls/README.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index 9501349ebc4..9fb2f161220 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -274,27 +274,27 @@ The first section defines how the Ansible host connects to the devices: ```yaml title="FABRIC.yml" --8<-- -examples/single-dc-l3ls/group_vars/FABRIC.yml [2-16] +examples/single-dc-l3ls/group_vars/FABRIC.yml:2:16 --8<-- ``` - +# ```yaml title="FABRIC.yml" +# ansible_connection: ansible.netcommon.httpapi # (1)! +# ansible_network_os: arista.eos.eos # (2)! +# ansible_user: ansible # (3)! +# ansible_password: ansible +# ansible_become: true +# ansible_become_method: enable # (4)! +# ansible_httpapi_use_ssl: true # (5)! +# ansible_httpapi_validate_certs: false # (6)! +# ``` +# +# 1. The Ansible host must use eAPI +# 2. Network OS which in this case is Arista EOS +# 3. The username/password combo +# 4. How to escalate privileges to get write access +# 5. Use SSL +# 6. Do not validate SSL certificates The following section specifies variables that generate configuration to be applied to all devices in the fabric: From f8a17bc8399f0f3ce6907cf158599afaaa58ef50 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 18:26:33 +0000 Subject: [PATCH 10/25] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../avd/examples/single-dc-l3ls/README.md | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index 9fb2f161220..d79a058536c 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -279,22 +279,38 @@ examples/single-dc-l3ls/group_vars/FABRIC.yml:2:16 ``` # ```yaml title="FABRIC.yml" -# ansible_connection: ansible.netcommon.httpapi # (1)! -# ansible_network_os: arista.eos.eos # (2)! -# ansible_user: ansible # (3)! + +# ansible_connection: ansible.netcommon.httpapi # (1) + +# ansible_network_os: arista.eos.eos # (2) + +# ansible_user: ansible # (3) + # ansible_password: ansible + # ansible_become: true -# ansible_become_method: enable # (4)! -# ansible_httpapi_use_ssl: true # (5)! -# ansible_httpapi_validate_certs: false # (6)! + +# ansible_become_method: enable # (4) + +# ansible_httpapi_use_ssl: true # (5) + +# ansible_httpapi_validate_certs: false # (6) + # ``` -# + +# + # 1. The Ansible host must use eAPI + # 2. Network OS which in this case is Arista EOS + # 3. The username/password combo + # 4. How to escalate privileges to get write access + # 5. Use SSL -# 6. Do not validate SSL certificates + +# 6. Do not validate SSL certificates The following section specifies variables that generate configuration to be applied to all devices in the fabric: From 1c847e57f9d1981ea703849a659fd2d0cc76e968 Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Thu, 19 Dec 2024 13:56:37 -0500 Subject: [PATCH 11/25] Change title --- .../avd/examples/single-dc-l3ls/README.md | 38 +------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index d79a058536c..6589c11f167 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -1,6 +1,6 @@ --- # This title is used for search results -title: AVD example for a single data center using L3LS +title: Single Data Center using L3LS --- -# AVD example for a single data center using L3LS +# Single Data Center using L3LS ## Introduction @@ -278,40 +278,6 @@ examples/single-dc-l3ls/group_vars/FABRIC.yml:2:16 --8<-- ``` -# ```yaml title="FABRIC.yml" - -# ansible_connection: ansible.netcommon.httpapi # (1) - -# ansible_network_os: arista.eos.eos # (2) - -# ansible_user: ansible # (3) - -# ansible_password: ansible - -# ansible_become: true - -# ansible_become_method: enable # (4) - -# ansible_httpapi_use_ssl: true # (5) - -# ansible_httpapi_validate_certs: false # (6) - -# ``` - -# - -# 1. The Ansible host must use eAPI - -# 2. Network OS which in this case is Arista EOS - -# 3. The username/password combo - -# 4. How to escalate privileges to get write access - -# 5. Use SSL - -# 6. Do not validate SSL certificates - The following section specifies variables that generate configuration to be applied to all devices in the fabric: ```yaml title="FABRIC.yml" From 84ce01c3cef4d828b4de8336da55f814eaa8b426 Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Thu, 19 Dec 2024 16:03:19 -0500 Subject: [PATCH 12/25] replace config snip with source file --- .../avd/examples/single-dc-l3ls/README.md | 249 ++---------------- 1 file changed, 25 insertions(+), 224 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index 6589c11f167..1d6b05d2d00 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -281,184 +281,43 @@ examples/single-dc-l3ls/group_vars/FABRIC.yml:2:16 The following section specifies variables that generate configuration to be applied to all devices in the fabric: ```yaml title="FABRIC.yml" -fabric_name: FABRIC # (1)! - -underlay_routing_protocol: ebgp -overlay_routing_protocol: ebgp - -local_users: # (2)! - - name: ansible - privilege: 15 - role: network-admin - sha512_password: $6$7u4j1rkb3VELgcZE$EJt2Qff8kd/TapRoci0XaIZsL4tFzgq1YZBLD9c6f/knXzvcYY0NcMKndZeCv0T268knGKhOEwZAxqKjlMm920 - - name: admin - privilege: 15 - role: network-admin - no_password: true - -bgp_peer_groups: # (3)! - evpn_overlay_peers: - password: Q4fqtbqcZ7oQuKfuWtNGRQ== - ipv4_underlay_peers: - password: 7x4B4rnJhZB438m9+BrBfQ== - mlag_ipv4_underlay_peer: - password: 4b21pAdCvWeAqpcKDFMdWw== - -p2p_uplinks_mtu: 1500 # (4)! - -default_interfaces: # (5)! - - types: [ spine ] - platforms: [ default ] - uplink_interfaces: [ Ethernet1-2 ] - downlink_interfaces: [ Ethernet1-8 ] - - types: [ l3leaf ] - platforms: [ default ] - uplink_interfaces: [ Ethernet1-2 ] - mlag_interfaces: [ Ethernet3-4 ] - downlink_interfaces: [ Ethernet8 ] - - types: [ l2leaf ] - platforms: [ default ] - uplink_interfaces: [ Ethernet1-2 ] - -cvp_instance_ips: - - 192.168.1.12 # (6)! -terminattr_smashexcludes: "ale,flexCounter,hardware,kni,pulse,strata" -terminattr_ingestexclude: "/Sysdb/cell/1/agent,/Sysdb/cell/2/agent" -terminattr_disable_aaa: true - -name_servers: # (7)! - - 192.168.1.1 - -ntp_settings: # (8)! - server_vrf: use_mgmt_interface_vrf - servers: - - name: 192.168.200.5 +--8<-- +examples/single-dc-l3ls/group_vars/FABRIC.yml:18:88 +--8<-- ``` -1. The name of the fabric for internal AVD use. This name *must* match the name of an Ansible Group (and therefore a corresponding group_vars file) covering all network devices. -2. Local users/passwords and their privilege levels. In this case, the `ansible` user is set with the password `ansible` and an `admin` user is set with no password. -3. BGP peer groups and their passwords (all passwords are "arista"). -4. Point-to-point interface MTU, in this case, is set to 1500 since the example uses vEOS, but when using hardware, this should be set to 9214 instead. -5. Defines which interfaces to use for uplinks, MLAG peer-links and downlinks. In this example they are specified per node type. - 1. `uplink_interfaces` specify which local interfaces connect to an upstream device. - 2. `mlag_interfaces` specify which local interfaces connect to an MLAG peer. - 3. `downlink_interfaces` specify which local interfaces connect to a downstream device. -6. Relevant settings for the `TerminAttr` software agent on EOS, responsible for streaming telemetry back to CloudVision Portal. -7. DNS Server specification. Used in this example primarily to resolve the IP address of the NTP server. -8. NTP server settings. Correct and synchronized time on EOS is required for proper connectivity to CloudVision Portal. - ## Setting device specific configuration parameters The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1.yml` file defines settings that apply to all children of the `DC1` group as specified in the inventory described earlier. However, this time the settings defined are no longer fabric-wide but are limited to DC1. This example is of limited benefit with only a single data center. Still, it allows us to scale the configuration to a scenario with multiple data centers in the future. ```yaml title="DC1.yml" ---- -mgmt_gateway: 172.16.1.1 # (1)! - -spine: - defaults: - platform: vEOS-lab # (2)! - loopback_ipv4_pool: 10.255.0.0/27 # (3)! - bgp_as: 65100 # (4)! - - nodes: # (5)! - - name: dc1-spine1 - id: 1 # (6)! - mgmt_ip: 172.16.1.11/24 # (7)! - - - name: dc1-spine2 - id: 2 - mgmt_ip: 172.16.1.12/24 +--8<-- +examples/single-dc-l3ls/group_vars/DC1.yml +--8<-- ``` +The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1_SPINES.yml` covers the spine switches. -1. The default gateway for the management interface of all devices in DC1 is defined. -2. `platform` references default settings defined in AVD specific to certain switch platforms. -3. `loopback_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for Loopback0. -4. `bgp_as` defines the BGP AS number. -5. `nodes` defines the actual spine switches, using the hostnames defined in the inventory. -6. `id` is used to calculate the various IP addresses, for example, the IPv4 address for the Loopback0 interface. In this case, dc1-spine1 will get the IPv4 address 10.255.0.1/27 assigned to the Loopback0 interface. -7. `mgmt_ip` defines the IPv4 address of the management interface. As stated earlier, Ansible will perform name lookups using the hostnames specified in the inventory unless using the `ansible_host` option. However, there is no automatic mechanism to grab the result of the name lookup and use that to generate the management interface configuration. +```yaml title="DC1_SPINES.yml" +--8<-- +examples/single-dc-l3ls/group_vars/DC1_SPINES.yml +--8<-- +``` -The following section covers the L3 leaf switches. Significantly more settings need to be set compared to the spine switches: -```yaml title="DC1.yml" -l3leaf: - defaults: - platform: vEOS-lab # (1)! - loopback_ipv4_pool: 10.255.0.0/27 # (2)! - loopback_ipv4_offset: 2 # (3)! - vtep_loopback_ipv4_pool: 10.255.1.0/27 # (4)! - uplink_switches: [dc1-spine1, dc1-spine2] # (5)! - uplink_ipv4_pool: 10.255.255.0/26 # (6)! - mlag_peer_ipv4_pool: 10.255.1.64/27 # (7)! - mlag_peer_l3_ipv4_pool: 10.255.1.96/27 # (8)! - virtual_router_mac_address: 00:1c:73:00:00:99 # (9)! - spanning_tree_priority: 4096 # (10)! - spanning_tree_mode: mstp # (11)! - - node_groups: # (12)! - - group: DC1_L3_LEAF1 - bgp_as: 65101 # (13)! - nodes: - - name: dc1-leaf1a - id: 1 - mgmt_ip: 172.16.1.101/24 - uplink_switch_interfaces: [Ethernet1, Ethernet1]# (14)! - - name: dc1-leaf1b - id: 2 - mgmt_ip: 172.16.1.102/24 - uplink_switch_interfaces: [Ethernet2, Ethernet2] - - group: DC1_L3_LEAF2 - bgp_as: 65102 - nodes: - - name: dc1-leaf2a - id: 3 - mgmt_ip: 172.16.1.103/24 - uplink_switch_interfaces: [Ethernet3, Ethernet3] - - name: dc1-leaf2b - id: 4 - mgmt_ip: 172.16.1.104/24 - uplink_switch_interfaces: [Ethernet4, Ethernet4] -``` +The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES.yml` covers the L3 leaf switches. Significantly more settings need to be set compared to the spine switches. -1. `platform` references default settings defined in AVD specific to certain switch platforms. -2. `loopback_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for Loopback0. Please note that this IP pool is identical to the one used for the spine switches in this example. To avoid setting the same IP addresses for several devices, we define the option `loopback_ipv4_offset`. -3. `loopback_ipv4_offset` offsets all assigned loopback IP addresses counting from the beginning of the IP scope. This is required to avoid overlapping IPs when the same IP pool is used for two different node_types (like spine and l3leaf in this example). The offset is "2" because each spine switch uses one loopback address. -4. `vtep_loopback_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the VTEP (Loopback1). -5. `uplink_switches` defines the uplink switches, which are dc1-spine1 and dc1-spine2. Note that the `uplink_interfaces` and `uplink_switches` are paired vertically. -6. `uplink_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the uplink interfaces that were just defined. -7. `mlag_peer_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the MLAG peer link interface VLAN4094. -8. `mlag_peer_l3_ipv4_pool` defines the IP scope from which AVD assigns IPv4 addresses for the iBGP peering established between the two leaf switches via the SVI/IRB interface VLAN4093. -9. `virtual_router_mac_address` defines the MAC address used for the anycast gateway on the various subnets. This is the MAC address connected endpoints will learn when ARPing for their default gateway. -10. `spanning_tree_priority` sets the spanning tree priority. Since spanning tree in an L3LS network is effectively only running locally on the switch, the same priority across all L3 leaf switches can be re-used. -11. `spanning_tree_mode` defines the spanning tree mode. In this case, we are using MSTP, which is the default. However, other modes are supported should they be required, for example, for connectivity to legacy or third-party vendor environments. -12. `node_groups` defines settings common to more than one node. For example, when exactly two nodes are part of a node group for leaf switches, AVD will, by default, automatically generate MLAG configuration. -13. `bgp_as` is defined once since an MLAG pair shares a single BGP AS number. -14. `uplink_switch_interfaces` defines the interfaces used on the uplink switches (Ethernet1 on dc1-spine1 and dc1-spine2 in this example). +```yaml title="DC1_L3_LEAVES.yml" +--8<-- +examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES.yml +--8<-- +``` Finally, more of the same, but this time for the L2 leaf switches: -```yaml title="DC1.yml" -l2leaf: - defaults: - platform: vEOS-lab - spanning_tree_mode: mstp - - node_groups: - - group: DC1_L2_LEAF1 - uplink_switches: [dc1-leaf1a, dc1-leaf1b] - nodes: - - name: dc1-leaf1c - id: 1 - mgmt_ip: 172.16.1.151/24 - uplink_switch_interfaces: [Ethernet8, Ethernet8] - - group: DC1_L2_LEAF2 - uplink_switches: [dc1-leaf2a, dc1-leaf2b] - nodes: - - name: dc1-leaf2c - id: 2 - mgmt_ip: 172.16.1.152/24 - uplink_switch_interfaces: [Ethernet8, Ethernet8] +```yaml title="DC1_L2_LEAVES.yml" +--8<-- +examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES.yml +--8<-- ``` An L2 leaf switch is simpler than an L3 switch. Hence there are fewer settings to define. @@ -468,69 +327,11 @@ An L2 leaf switch is simpler than an L3 switch. Hence there are fewer settings t The `ansible-avd-examples/single-dc-l3ls/group_vars/NETWORK_SERVICES.yml` file defines All VRF and VLANs. This means that regardless of where a given VRF or VLAN must exist, its existence is defined in this file, but it does not indicate ***where*** in the fabric it exists. That was done at the bottom of the inventory file previously described in the [Inventory](#content-of-the-inventoryyml-file) section. ```yaml title="NETWORK_SERVICES.yml" -tenants: # (1)! - - name: TENANT1 - mac_vrf_vni_base: 10000 # (2)! - vrfs: # (3)! - - name: VRF10 - vrf_vni: 10 # (4)! - vtep_diagnostic: # (5)! - loopback: 10 # (6)! - loopback_ip_range: 10.255.10.0/27 # (7)! - svis: # (8)! - - id: 11 - name: VRF10_VLAN11 # (9)! - enabled: true - ip_address_virtual: 10.10.11.1/24 # (10)! - - id: 12 - name: VRF10_VLAN12 - enabled: true - ip_address_virtual: 10.10.12.1/24 - - name: VRF11 - vrf_vni: 11 - vtep_diagnostic: - loopback: 11 - loopback_ip_range: 10.255.11.0/27 - svis: - - id: 21 - name: VRF11_VLAN21 - enabled: true - ip_address_virtual: 10.10.21.1/24 - - name: 22 - name: VRF11_VLAN22 - enabled: true - ip_address_virtual: 10.10.22.1/24 - - l2vlans: # (11)! - - id: 3401 - name: L2_VLAN3401 - - id: 3402 - name: L2_VLAN3402 +--8<-- +examples/single-dc-l3ls/group_vars/NETWORK_SERVICES.yml +--8<-- ``` -1. Definition of tenants. Additional level of abstraction in addition to VRFs. In this example just one tenant named `TENANT1` is specified. -2. The base number (`10000`) used to generate the L2VNI numbers automatically, `L2VNI = base number + VLAN-id`. For example, L2VNI for VLAN11 = 10000 + 11 = 10011. -3. VRF definitions inside the tenant. -4. VRF VNI definition. -5. Enable VTEP Network diagnostics. This will create a loopback with virtual source-nat enable to perform diagnostics from the switch: - - ```eos - interface Loopback10 - description VRF10_VTEP_DIAGNOSTICS - no shutdown - vrf VRF10 - ip address 10.255.10.3/32 - ! - ip address virtual source-nat vrf VRF10 address 10.255.10.3 - ``` - -6. Loopback interface number. -7. Loopback IP range, a unique IP is derived from this range and assigned to each l3 leaf based on its unique id. -8. SVI Definitions for all SVIs within this tenant. -9. SVI Description. -10. IP anycast gateway to be used in the SVI in every leaf across the fabric. -11. These are pure L2 VLANs. They do not have an SVI defined in the l3leafs and they will be bridged inside the VXLAN fabric. - AVD offers granular control of where Tenants and VLANs are configured using `tags` and `filter`. Those areas are not covered in this basic example. ## Specifying endpoint connectivity in the EVPN/VXLAN fabric From a74ff9a3f1d5ae110d89ef8c7a3120f7b0b1eae2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 21:07:38 +0000 Subject: [PATCH 13/25] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../arista/avd/examples/single-dc-l3ls/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index 1d6b05d2d00..c5f16ff9fda 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -295,6 +295,7 @@ The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1.yml` file defines settin examples/single-dc-l3ls/group_vars/DC1.yml --8<-- ``` + The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1_SPINES.yml` covers the spine switches. ```yaml title="DC1_SPINES.yml" @@ -303,7 +304,6 @@ examples/single-dc-l3ls/group_vars/DC1_SPINES.yml --8<-- ``` - The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES.yml` covers the L3 leaf switches. Significantly more settings need to be set compared to the spine switches. ```yaml title="DC1_L3_LEAVES.yml" From fed371d7e6579cc1303aa40f086df53a11743a0f Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Fri, 20 Dec 2024 09:21:37 -0500 Subject: [PATCH 14/25] remove leaf example from connected_endpoint example --- .../avd/examples/single-dc-l3ls/README.md | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index c5f16ff9fda..48f75f80ea1 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -1,6 +1,6 @@ --- # This title is used for search results -title: Single Data Center using L3LS +title: Single Data Center - L3LS --- -# Single Data Center using L3LS +# Single Data Center - L3LS ## Introduction @@ -369,25 +369,6 @@ servers: vlans: 11 mode: access spanning_tree_portfast: edge - - name: dc1-leaf2-server1 - adapters: - - endpoint_ports: [ PCI1, PCI2 ] - switch_ports: [ Ethernet5, Ethernet5 ] - switches: [ dc1-leaf2a, dc1-leaf2b ] - vlans: 11-12,21-22 - native_vlan: 4092 - mode: trunk - spanning_tree_portfast: edge - port_channel: - endpoint_port_channel: Bond1 #this is not in the group vars - mode: active - - - endpoint_ports: [ iLO ] - switch_ports: [ Ethernet5 ] - switches: [ dc1-leaf2c ] - vlans: 11 - mode: access - spanning_tree_portfast: edge ``` 1. The relevant `adapters` are defined. For example, the `type` set to `server` and `ilo` is purely for documentation and readability. It has no operational significance. From 3a66edb1ae3ca15dee5f8ec62fee12d16a8166a4 Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Wed, 8 Jan 2025 14:44:09 -0500 Subject: [PATCH 15/25] Add folder structure and removes comments for group vars --- .../avd/examples/single-dc-l3ls/README.md | 67 ++++--------------- .../CONNECTED_ENDPOINTS.yml | 15 ----- .../group_vars/{ => DC1}/DC1.yml | 0 .../group_vars/{ => DC1}/DC1_L2_LEAVES.yml | 1 - .../group_vars/DC1/DC1_L3_LEAVES.yml | 40 +++++++++++ .../group_vars/DC1/DC1_SPINES.yml | 16 +++++ .../group_vars/DC1_L3_LEAVES.yml | 59 ---------------- .../single-dc-l3ls/group_vars/DC1_SPINES.yml | 27 -------- .../FABRIC/FABRIC_ANSIBLE_CONNECTIVITY.yml | 9 +++ .../FABRIC_VARIABLES.yml} | 31 --------- .../NETWORK_SERVICES.yml | 13 ---- .../single-dc-l3ls/inventory_without_ip.yml | 43 ++++++++++++ 12 files changed, 121 insertions(+), 200 deletions(-) rename ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/{ => CONNECTED_ENDPOINTS}/CONNECTED_ENDPOINTS.yml (58%) rename ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/{ => DC1}/DC1.yml (100%) rename ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/{ => DC1}/DC1_L2_LEAVES.yml (96%) create mode 100644 ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_L3_LEAVES.yml create mode 100644 ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_SPINES.yml delete mode 100644 ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES.yml delete mode 100644 ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES.yml create mode 100644 ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_ANSIBLE_CONNECTIVITY.yml rename ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/{FABRIC.yml => FABRIC/FABRIC_VARIABLES.yml} (51%) rename ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/{ => NETWORK_SERVICES}/NETWORK_SERVICES.yml (53%) create mode 100644 ansible_collections/arista/avd/examples/single-dc-l3ls/inventory_without_ip.yml diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index 48f75f80ea1..2cae41ebf3e 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -168,50 +168,9 @@ ansible_collections/arista/avd/examples/single-dc-l3ls/inventory.yml The above is what is included in this example, *purely* to make it as simple as possible to get started. However, in the future, please do not carry over this practice to a production environment, where an inventory file for an identical topology should look as follows when using DNS: ```yaml title="inventory.yml" ---- -all: - children: - CLOUDVISION: # (1)! - hosts: - cvp: - # Ansible variables used by the ansible_avd and ansible_cvp roles to push configuration to devices via CVP - ansible_httpapi_host: cvp - ansible_host: cvp - ansible_user: ansible - ansible_password: ansible - ansible_connection: httpapi - ansible_httpapi_use_ssl: true - ansible_httpapi_validate_certs: false - ansible_network_os: eos - # Configuration to get Virtual Env information - ansible_python_interpreter: $(which python3) - FABRIC: - children: - DC1: - children: - DC1_SPINES: - hosts: - dc1-spine1: - dc1-spine2: - DC1_L3_LEAVES: - hosts: - dc1-leaf1a: - dc1-leaf1b: - dc1-leaf2a: - dc1-leaf2b: - DC1_L2_LEAVES: - hosts: - dc1-leaf1c: - dc1-leaf2c: - - NETWORK_SERVICES: # (2)! - children: - DC1_L3_LEAVES: - DC1_L2_LEAVES: - CONNECTED_ENDPOINTS: # (3)! - children: - DC1_L3_LEAVES: - DC1_L2_LEAVES: +--8<-- +examples/single-dc-l3ls/inventory_without_ip.yml +--8<-- ``` 1. `CLOUDVISION` @@ -274,7 +233,7 @@ The first section defines how the Ansible host connects to the devices: ```yaml title="FABRIC.yml" --8<-- -examples/single-dc-l3ls/group_vars/FABRIC.yml:2:16 +examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_ANSIBLE_CONNECTIVITY.yml --8<-- ``` @@ -282,7 +241,7 @@ The following section specifies variables that generate configuration to be appl ```yaml title="FABRIC.yml" --8<-- -examples/single-dc-l3ls/group_vars/FABRIC.yml:18:88 +examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_VARIABLES.yml --8<-- ``` @@ -292,19 +251,19 @@ The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1.yml` file defines settin ```yaml title="DC1.yml" --8<-- -examples/single-dc-l3ls/group_vars/DC1.yml +examples/single-dc-l3ls/group_vars/DC1/DC1.yml --8<-- ``` -The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1_SPINES.yml` covers the spine switches. +The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1/DC1_SPINES.yml` covers the spine switches. ```yaml title="DC1_SPINES.yml" --8<-- -examples/single-dc-l3ls/group_vars/DC1_SPINES.yml +examples/single-dc-l3ls/group_vars/DC1/DC1_SPINES.yml --8<-- ``` -The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES.yml` covers the L3 leaf switches. Significantly more settings need to be set compared to the spine switches. +The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1/DC1_L3_LEAVES.yml` covers the L3 leaf switches. Significantly more settings need to be set compared to the spine switches. ```yaml title="DC1_L3_LEAVES.yml" --8<-- @@ -324,11 +283,11 @@ An L2 leaf switch is simpler than an L3 switch. Hence there are fewer settings t ## Specifying network services (VRFs and VLANs) in the EVPN/VXLAN fabric -The `ansible-avd-examples/single-dc-l3ls/group_vars/NETWORK_SERVICES.yml` file defines All VRF and VLANs. This means that regardless of where a given VRF or VLAN must exist, its existence is defined in this file, but it does not indicate ***where*** in the fabric it exists. That was done at the bottom of the inventory file previously described in the [Inventory](#content-of-the-inventoryyml-file) section. +The `ansible-avd-examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/NETWORK_SERVICES.yml` file defines All VRF and VLANs. This means that regardless of where a given VRF or VLAN must exist, its existence is defined in this file, but it does not indicate ***where*** in the fabric it exists. That was done at the bottom of the inventory file previously described in the [Inventory](#content-of-the-inventoryyml-file) section. ```yaml title="NETWORK_SERVICES.yml" --8<-- -examples/single-dc-l3ls/group_vars/NETWORK_SERVICES.yml +examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/NETWORK_SERVICES.yml --8<-- ``` @@ -336,11 +295,11 @@ AVD offers granular control of where Tenants and VLANs are configured using `tag ## Specifying endpoint connectivity in the EVPN/VXLAN fabric -After the previous section, all VRFs and VLANs across the fabric are now defined. The `ansible-avd-examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS.yml` file specifies the connectivity for all endpoints in the fabric (typically servers): +After the previous section, all VRFs and VLANs across the fabric are now defined. The `ansible-avd-examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/CONNECTED_ENDPOINTS.yml` file specifies the connectivity for all endpoints in the fabric (typically servers): ```yaml title="CONNECTED_ENDPOINTS.yml" --8<-- -ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS.yml +examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/CONNECTED_ENDPOINTS.yml --8<-- ``` diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/CONNECTED_ENDPOINTS.yml similarity index 58% rename from ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS.yml rename to ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/CONNECTED_ENDPOINTS.yml index a7fe951dae4..98597d0ef37 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/CONNECTED_ENDPOINTS.yml @@ -1,31 +1,17 @@ --- -# Definition of connected endpoints in the fabric. servers: - # Name of the defined server. - name: dc1-leaf1-server1 - # Definition of adapters on the server. adapters: - # Name of the server interfaces that will be used in the description of each interface - endpoint_ports: [ PCI1, PCI2 ] - # Device ports where the server ports are connected. switch_ports: [ Ethernet5, Ethernet5 ] - # Device names where the server ports are connected. switches: [ dc1-leaf1a, dc1-leaf1b ] - # VLANs that will be configured on these ports. vlans: 11-12,21-22 - # Native VLAN to be used on these ports. native_vlan: 4092 - # L2 mode of the port. mode: trunk - # Spanning tree portfast configuration on this port. spanning_tree_portfast: edge - # Definition of the pair of ports as port channel. port_channel: - # The port-channel name on the endpoint that will be used in the port-channel description. endpoint_port_channel: Bond1 - # Port channel mode for LACP. mode: active - - endpoint_ports: [ iLO ] switch_ports: [ Ethernet5 ] switches: [ dc1-leaf1c ] @@ -44,7 +30,6 @@ servers: spanning_tree_portfast: edge port_channel: mode: active - - endpoint_ports: [ iLO ] switch_ports: [ Ethernet5 ] switches: [ dc1-leaf2c ] diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1.yml similarity index 100% rename from ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1.yml rename to ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1.yml diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_L2_LEAVES.yml similarity index 96% rename from ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES.yml rename to ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_L2_LEAVES.yml index bf62371666f..f5332ee71ce 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_L2_LEAVES.yml @@ -1,7 +1,6 @@ --- type: l2leaf -# L2 Leaf switch group l2leaf: defaults: platform: vEOS-lab diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_L3_LEAVES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_L3_LEAVES.yml new file mode 100644 index 00000000000..cec62485a23 --- /dev/null +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_L3_LEAVES.yml @@ -0,0 +1,40 @@ +--- +type: l3leaf + +l3leaf: + defaults: + platform: vEOS-lab + loopback_ipv4_pool: 10.255.0.0/27 + loopback_ipv4_offset: 2 + vtep_loopback_ipv4_pool: 10.255.1.0/27 + uplink_switches: ['dc1-spine1', 'dc1-spine2'] + uplink_ipv4_pool: 10.255.255.0/26 + mlag_peer_ipv4_pool: 10.255.1.64/27 + mlag_peer_l3_ipv4_pool: 10.255.1.96/27 + virtual_router_mac_address: 00:1c:73:00:00:99 + spanning_tree_priority: 4096 + spanning_tree_mode: mstp + + node_groups: + - group: DC1_L3_LEAF1 + bgp_as: 65101 + nodes: + - name: dc1-leaf1a + id: 1 + mgmt_ip: 172.16.1.101/24 + uplink_switch_interfaces: [Ethernet1, Ethernet1] + - name: dc1-leaf1b + id: 2 + mgmt_ip: 172.16.1.102/24 + uplink_switch_interfaces: [Ethernet2, Ethernet2] + - group: DC1_L3_LEAF2 + bgp_as: 65102 + nodes: + - name: dc1-leaf2a + id: 3 + mgmt_ip: 172.16.1.103/24 + uplink_switch_interfaces: [Ethernet3, Ethernet3] + - name: dc1-leaf2b + id: 4 + mgmt_ip: 172.16.1.104/24 + uplink_switch_interfaces: [Ethernet4, Ethernet4] diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_SPINES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_SPINES.yml new file mode 100644 index 00000000000..e47367796d7 --- /dev/null +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_SPINES.yml @@ -0,0 +1,16 @@ +--- +type: spine + +spine: + defaults: + platform: vEOS-lab + loopback_ipv4_pool: 10.255.0.0/27 + bgp_as: 65100 + + nodes: + - name: dc1-spine1 + id: 1 + mgmt_ip: 172.16.1.11/24 + - name: dc1-spine2 + id: 2 + mgmt_ip: 172.16.1.12/24 diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES.yml deleted file mode 100644 index 01632f32864..00000000000 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES.yml +++ /dev/null @@ -1,59 +0,0 @@ ---- -type: l3leaf - -# L3 Leaf switch group -l3leaf: - defaults: - # Set the relevant platform as each platform has different default values in Ansible AVD - platform: vEOS-lab - # Pool of IPv4 addresses to configure interface Loopback0 used for BGP EVPN sessions - loopback_ipv4_pool: 10.255.0.0/27 - # Offset all assigned loopback IP addresses. - # Required when the < loopback_ipv4_pool > is same for 2 different node_types (like spine and l3leaf) to avoid over-lapping IPs. - # For example, set the minimum offset l3leaf.defaults.loopback_ipv4_offset: < total # spine switches > or vice versa. - loopback_ipv4_offset: 2 - # Definition of pool of IPs to be used as Virtual Tunnel EndPoint (VXLAN origin and destination IPs) - vtep_loopback_ipv4_pool: 10.255.1.0/27 - # Ansible hostname of the devices used to establish neighborship (IP assignments and BGP peering) - uplink_switches: ['dc1-spine1', 'dc1-spine2'] - # Definition of pool of IPs to be used in P2P links - uplink_ipv4_pool: 10.255.255.0/26 - # Definition of pool of IPs to be used for MLAG peer-link connectivity - mlag_peer_ipv4_pool: 10.255.1.64/27 - # iBGP Peering between MLAG peers - mlag_peer_l3_ipv4_pool: 10.255.1.96/27 - # Virtual router mac for VNIs assigned to Leaf switches in format xx:xx:xx:xx:xx:xx - virtual_router_mac_address: 00:1c:73:00:00:99 - spanning_tree_priority: 4096 - spanning_tree_mode: mstp - - # If two nodes (and only two) are in the same node_group, they will automatically form an MLAG pair - node_groups: - # Definition of a node group that will include two devices in MLAG. - # Definitions under the group will be inherited by both nodes in the group - - group: DC1_L3_LEAF1 - # ASN to be used by BGP for the group. Both devices in the MLAG pair will use the same BGP ASN - bgp_as: 65101 - nodes: - # Definition of hostnames under the node_group - - name: dc1-leaf1a - id: 1 - mgmt_ip: 172.16.1.101/24 - # Definition of the port to be used in the uplink device facing this device. - # Note that the number of elements in this list must match the length of 'uplink_switches' as well as 'uplink_interfaces' - uplink_switch_interfaces: [Ethernet1, Ethernet1] - - name: dc1-leaf1b - id: 2 - mgmt_ip: 172.16.1.102/24 - uplink_switch_interfaces: [Ethernet2, Ethernet2] - - group: DC1_L3_LEAF2 - bgp_as: 65102 - nodes: - - name: dc1-leaf2a - id: 3 - mgmt_ip: 172.16.1.103/24 - uplink_switch_interfaces: [Ethernet3, Ethernet3] - - name: dc1-leaf2b - id: 4 - mgmt_ip: 172.16.1.104/24 - uplink_switch_interfaces: [Ethernet4, Ethernet4] diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES.yml deleted file mode 100644 index 97c54ddef78..00000000000 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -type: spine - -# Spine switch group -spine: - # Definition of default values that will be configured to all nodes defined in this group - defaults: - # Set the relevant platform as each platform has different default values in Ansible AVD - platform: vEOS-lab - # Pool of IPv4 addresses to configure interface Loopback0 used for BGP EVPN sessions - loopback_ipv4_pool: 10.255.0.0/27 - # ASN to be used by BGP - bgp_as: 65100 - - # Definition of nodes contained in this group. - # Specific configuration of device must take place under the node definition. Each node inherits all values defined under 'defaults' - nodes: - # Name of the node to be defined (must be consistent with definition in inventory) - - name: dc1-spine1 - # Device ID definition. An integer number used for internal calculations (ie. IPv4 address of the loopback_ipv4_pool among others) - id: 1 - # Management IP to be assigned to the management interface - mgmt_ip: 172.16.1.11/24 - - - name: dc1-spine2 - id: 2 - mgmt_ip: 172.16.1.12/24 diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_ANSIBLE_CONNECTIVITY.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_ANSIBLE_CONNECTIVITY.yml new file mode 100644 index 00000000000..d21c65b82a3 --- /dev/null +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_ANSIBLE_CONNECTIVITY.yml @@ -0,0 +1,9 @@ +--- +ansible_connection: ansible.netcommon.httpapi +ansible_network_os: arista.eos.eos +ansible_user: ansible +ansible_password: ansible +ansible_become: true +ansible_become_method: enable +ansible_httpapi_use_ssl: true +ansible_httpapi_validate_certs: false \ No newline at end of file diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_VARIABLES.yml similarity index 51% rename from ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC.yml rename to ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_VARIABLES.yml index 01a07191d04..fe6b9b2e148 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_VARIABLES.yml @@ -1,48 +1,24 @@ --- -# Ansible connectivity definitions -# eAPI connectivity via HTTPS is specified (as opposed to CLI via SSH) -ansible_connection: ansible.netcommon.httpapi -# Specifies that we are indeed using Arista EOS -ansible_network_os: arista.eos.eos -# This user/password must exist on the switches to enable Ansible access -ansible_user: ansible -ansible_password: ansible -# User escalation (to enter enable mode) -ansible_become: true -ansible_become_method: enable -# Use SSL (HTTPS) -ansible_httpapi_use_ssl: true -# Do not try to validate certs -ansible_httpapi_validate_certs: false - -# Common AVD group variables fabric_name: FABRIC -# Generate CSVs with fabric link info. eos_designs_documentation: topology_csv: true p2p_links_csv: true -# Define underlay and overlay routing protocol to be used underlay_routing_protocol: ebgp overlay_routing_protocol: ebgp -# Local users local_users: - # Define a new user, which is called "ansible" - name: ansible privilege: 15 role: network-admin - # Password set to "ansible". Same string as the device generates when configuring a username. sha512_password: $6$7u4j1rkb3VELgcZE$EJt2Qff8kd/TapRoci0XaIZsL4tFzgq1YZBLD9c6f/knXzvcYY0NcMKndZeCv0T268knGKhOEwZAxqKjlMm920 - name: admin privilege: 15 role: network-admin no_password: true -# BGP peer groups passwords bgp_peer_groups: - # all passwords set to "arista" evpn_overlay_peers: password: Q4fqtbqcZ7oQuKfuWtNGRQ== ipv4_underlay_peers: @@ -50,12 +26,8 @@ bgp_peer_groups: mlag_ipv4_underlay_peer: password: 4b21pAdCvWeAqpcKDFMdWw== -# P2P interfaces MTU, includes VLANs 4093 and 4094 that are over peer-link -# If you're running vEOS-lab or cEOS, you should use MTU of 1500 instead as shown in the following line -# p2p_uplinks_mtu: 9214 p2p_uplinks_mtu: 1500 -# Set default uplink, downlink, and MLAG interfaces based on node type default_interfaces: - types: [ spine ] platforms: [ default ] @@ -70,18 +42,15 @@ default_interfaces: platforms: [ default ] uplink_interfaces: [ Ethernet1-2 ] -# CloudVision Portal definitions cvp_instance_ips: - 192.168.1.12 terminattr_smashexcludes: "ale,flexCounter,hardware,kni,pulse,strata" terminattr_ingestexclude: "/Sysdb/cell/1/agent,/Sysdb/cell/2/agent" terminattr_disable_aaa: true -# DNS Server name_servers: - 192.168.1.1 -# NTP Servers IP or DNS name, first NTP server will be preferred, and sourced from Management VRF ntp_settings: server_vrf: use_mgmt_interface_vrf servers: diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/NETWORK_SERVICES.yml similarity index 53% rename from ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES.yml rename to ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/NETWORK_SERVICES.yml index e515b84751e..85665610ebd 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/NETWORK_SERVICES.yml @@ -1,29 +1,17 @@ --- tenants: - # Definition of tenants. Additional level of abstraction to VRFs - name: TENANT1 - # Number used to generate the VNI of each VLAN by adding the VLAN number in this tenant. mac_vrf_vni_base: 10000 vrfs: - # VRF definitions inside the tenant. - name: VRF10 - # VRF VNI definition. vrf_vni: 10 - # Enable VTEP Network diagnostics - # This will create a loopback with virtual source-nat enable to perform diagnostics from the switch. vtep_diagnostic: - # Loopback interface number loopback: 10 - # Loopback ip range, a unique ip is derived from this ranged and assigned - # to each l3 leaf based on it's unique id. loopback_ip_range: 10.255.10.0/27 svis: - # SVI definitions. - id: 11 - # SVI Description name: VRF10_VLAN11 enabled: true - # IP anycast gateway to be used in the SVI in every leaf. ip_address_virtual: 10.10.11.1/24 - id: 12 name: VRF10_VLAN12 @@ -45,7 +33,6 @@ tenants: ip_address_virtual: 10.10.22.1/24 l2vlans: - # These are pure L2 vlans. They do not have a SVI defined in the l3leafs and they will be bridged inside the VXLAN fabric - id: 3401 name: L2_VLAN3401 - id: 3402 diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/inventory_without_ip.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/inventory_without_ip.yml new file mode 100644 index 00000000000..f83e48132fb --- /dev/null +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/inventory_without_ip.yml @@ -0,0 +1,43 @@ +--- +all: + children: + CLOUDVISION: # (1)! + hosts: + cvp: + ansible_httpapi_host: cvp + ansible_host: cvp + ansible_user: ansible + ansible_password: ansible + ansible_connection: httpapi + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_network_os: eos + ansible_python_interpreter: $(which python3) + + FABRIC: + children: + DC1: + children: + DC1_SPINES: + hosts: + dc1-spine1: + dc1-spine2: + DC1_L3_LEAVES: + hosts: + dc1-leaf1a: + dc1-leaf1b: + dc1-leaf2a: + dc1-leaf2b: + DC1_L2_LEAVES: + hosts: + dc1-leaf1c: + dc1-leaf2c: + + NETWORK_SERVICES: # (2)! + children: + DC1_L3_LEAVES: + DC1_L2_LEAVES: + CONNECTED_ENDPOINTS: # (3)! + children: + DC1_L3_LEAVES: + DC1_L2_LEAVES: From 5e7fb98a2a955f64caf832d9fae40fbf9d97788c Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Wed, 8 Jan 2025 14:45:47 -0500 Subject: [PATCH 16/25] remove server1 example details --- .../avd/examples/single-dc-l3ls/README.md | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index 2cae41ebf3e..3c23166f938 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -305,41 +305,6 @@ examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/CONNECTED_ENDPOINTS.yml This defines the settings for the relevant switch ports to which the endpoints connect, in this case the two servers `dc1-leaf1-server1` and `dc1-leaf2-server1`. -As an example, here is the configuration for `dc1-leaf1-server1`: - -```yaml title="CONNECTED_ENDPOINTS.yml" -servers: - - name: dc1-leaf1-server1 - adapters: # (1)! - - endpoint_ports: [ PCI1, PCI2 ] # (2)! - switch_ports: [ Ethernet5, Ethernet5 ] # (3)! - switches: [ dc1-leaf1a, dc1-leaf1b ] # (4)! - vlans: 11-12,21-22 # (5)! - native_vlan: 4092 # (6)! - mode: trunk # (7)! - spanning_tree_portfast: edge # (8)! - port_channel: # (9)! - endpoint_port_channel: Bond1 - mode: active - - - endpoint_ports: [ iLO ] - switch_ports: [ Ethernet5 ] - switches: [ dc1-leaf1c ] - vlans: 11 - mode: access - spanning_tree_portfast: edge -``` - -1. The relevant `adapters` are defined. For example, the `type` set to `server` and `ilo` is purely for documentation and readability. It has no operational significance. -2. `endpoint_ports` are defined for use in the interface descriptions on the switch. This does not configure anything on the server. -3. `switch_ports` defines the interfaces used in the switches. In this example the server is dual-connected to Ethernet5 and Ethernet5. These two ports exist on switch dc1-leaf1a and dc1-leaf1b defined in the following line. -4. `switches` defines the switches used, in this case dc1-leaf1a and dc1-leaf1b. Note that the `endpoint_ports`, `switch_ports` and `switches` definitions are paired vertically. -5. `vlans` defines which VLANs are allowed on the switch_ports, in this case it is two ranges, VLAN11-12 and VLAN21-22 for the dual-attached server ports and VLAN11 for the iLO port. -6. `native_vlan` specifies the native VLAN when the switch port mode is set to trunk. -7. `mode` is set to trunk for the dual-attached server ports and access for the iLO port. -8. `spanning_tree_portfast` defines whether the switch port should be a spanning tree edge or network port. -9. `port_channel` defines the port-channel name on the endpoint that will be used in the port-channel description and mode for the port-channel. - ## The playbooks In this example, three playbooks are included, of which two must be used: From e232f5a35054db110abb4aabace6ebda63ecebc5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 19:47:14 +0000 Subject: [PATCH 17/25] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../group_vars/FABRIC/FABRIC_ANSIBLE_CONNECTIVITY.yml | 2 +- .../arista/avd/examples/single-dc-l3ls/inventory_without_ip.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_ANSIBLE_CONNECTIVITY.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_ANSIBLE_CONNECTIVITY.yml index d21c65b82a3..817164537ab 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_ANSIBLE_CONNECTIVITY.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_ANSIBLE_CONNECTIVITY.yml @@ -6,4 +6,4 @@ ansible_password: ansible ansible_become: true ansible_become_method: enable ansible_httpapi_use_ssl: true -ansible_httpapi_validate_certs: false \ No newline at end of file +ansible_httpapi_validate_certs: false diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/inventory_without_ip.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/inventory_without_ip.yml index f83e48132fb..878c712b3e1 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/inventory_without_ip.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/inventory_without_ip.yml @@ -13,7 +13,7 @@ all: ansible_httpapi_validate_certs: false ansible_network_os: eos ansible_python_interpreter: $(which python3) - + FABRIC: children: DC1: From 142bafcf2d2268cc845083b5eb2967b344b24c22 Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Thu, 9 Jan 2025 13:16:19 -0500 Subject: [PATCH 18/25] move group_vars file in folders --- .../{CONNECTED_ENDPOINTS.yml => connected_endpoints.yml} | 0 .../examples/single-dc-l3ls/group_vars/DC1/{DC1.yml => dc1.yml} | 0 .../{DC1/DC1_L2_LEAVES.yml => DC1_L2_LEAVES/l2_leaves.yml} | 0 .../{DC1/DC1_L3_LEAVES.yml => DC1_L3_LEAVES/l3_leaves.yml} | 0 .../group_vars/{DC1/DC1_SPINES.yml => DC1_SPINES/spines.yml} | 0 ...C_ANSIBLE_CONNECTIVITY.yml => fabric_ansible_connectivity.yml} | 0 .../FABRIC/{FABRIC_VARIABLES.yml => fabric_variables.yml} | 0 .../{NETWORK_SERVICES.yml => network_services.yml} | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/{CONNECTED_ENDPOINTS.yml => connected_endpoints.yml} (100%) rename ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/{DC1.yml => dc1.yml} (100%) rename ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/{DC1/DC1_L2_LEAVES.yml => DC1_L2_LEAVES/l2_leaves.yml} (100%) rename ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/{DC1/DC1_L3_LEAVES.yml => DC1_L3_LEAVES/l3_leaves.yml} (100%) rename ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/{DC1/DC1_SPINES.yml => DC1_SPINES/spines.yml} (100%) rename ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/{FABRIC_ANSIBLE_CONNECTIVITY.yml => fabric_ansible_connectivity.yml} (100%) rename ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/{FABRIC_VARIABLES.yml => fabric_variables.yml} (100%) rename ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/{NETWORK_SERVICES.yml => network_services.yml} (100%) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/CONNECTED_ENDPOINTS.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/connected_endpoints.yml similarity index 100% rename from ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/CONNECTED_ENDPOINTS.yml rename to ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/connected_endpoints.yml diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/dc1.yml similarity index 100% rename from ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1.yml rename to ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/dc1.yml diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_L2_LEAVES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES/l2_leaves.yml similarity index 100% rename from ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_L2_LEAVES.yml rename to ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES/l2_leaves.yml diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_L3_LEAVES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/l3_leaves.yml similarity index 100% rename from ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_L3_LEAVES.yml rename to ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/l3_leaves.yml diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_SPINES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES/spines.yml similarity index 100% rename from ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1/DC1_SPINES.yml rename to ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES/spines.yml diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_ANSIBLE_CONNECTIVITY.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_ansible_connectivity.yml similarity index 100% rename from ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_ANSIBLE_CONNECTIVITY.yml rename to ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_ansible_connectivity.yml diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_VARIABLES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_variables.yml similarity index 100% rename from ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_VARIABLES.yml rename to ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_variables.yml diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/NETWORK_SERVICES.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/network_services.yml similarity index 100% rename from ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/NETWORK_SERVICES.yml rename to ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/network_services.yml From 0d574f97d642f8f3980b5158cff01a028418a13b Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Thu, 9 Jan 2025 13:32:13 -0500 Subject: [PATCH 19/25] fix filepath for group_vars in README --- .../avd/examples/single-dc-l3ls/README.md | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index 3c23166f938..69c4d34463e 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -199,27 +199,27 @@ examples/single-dc-l3ls/inventory_without_ip.yml Since this example covers building an L3LS network, AVD must know about the device types, for example, spines, L3 leaves, L2 leaves, etc. The devices are already grouped in the inventory, so the device types are specified in the group variable files with the following names and content: -=== "DC1_SPINES.yml" +=== "dc1_spines.yml" ```yaml --8<-- - ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES.yml + examples/single-dc-l3ls/group_vars/DC1_SPINES/dc1_spines.yml --8<-- ``` -=== "DC1_L3_LEAVES.yml" +=== "dc1_l3_leaves.yml" ```yaml --8<-- - ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES.yml + examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/dc1_l3_leaves.yml --8<-- ``` -=== "DC1_L2_LEAVES.yml" +=== "dc1_l2_leaves.yml" ```yaml --8<-- - ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES.yml + examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES/dc1_l2_leaves.yml --8<-- ``` @@ -227,55 +227,55 @@ For example, all switches that are children of the DC1_SPINES group defined in t ## Setting fabric-wide configuration parameters -The `ansible-avd-examples/single-dc-l3ls/group_vars/FABRIC.yml` file defines generic settings that apply to all children of the `FABRIC` group as specified in the inventory described earlier. +The `ansible-avd-examples/single-dc-l3ls/group_vars/FABRIC` folder contain files that defines generic settings that apply to all children of the `FABRIC` group as specified in the inventory described earlier. -The first section defines how the Ansible host connects to the devices: +The first file defines how the Ansible host connects to the devices: -```yaml title="FABRIC.yml" +```yaml title="fabric_ansible_connectivity.yml" --8<-- -examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_ANSIBLE_CONNECTIVITY.yml +examples/single-dc-l3ls/group_vars/FABRIC/fabric_ansible_connectivity.yml --8<-- ``` The following section specifies variables that generate configuration to be applied to all devices in the fabric: -```yaml title="FABRIC.yml" +```yaml title="fabric_variables.yml" --8<-- -examples/single-dc-l3ls/group_vars/FABRIC/FABRIC_VARIABLES.yml +examples/single-dc-l3ls/group_vars/FABRIC/fabric_variables.yml --8<-- ``` ## Setting device specific configuration parameters -The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1.yml` file defines settings that apply to all children of the `DC1` group as specified in the inventory described earlier. However, this time the settings defined are no longer fabric-wide but are limited to DC1. This example is of limited benefit with only a single data center. Still, it allows us to scale the configuration to a scenario with multiple data centers in the future. +The `ansible-avd-examples/single-dc-l3ls/group_vars/DCI/dc1.yml` file defines settings that apply to all children of the `DC1` group as specified in the inventory described earlier. However, this time the settings defined are no longer fabric-wide but are limited to DC1. This example is of limited benefit with only a single data center. Still, it allows us to scale the configuration to a scenario with multiple data centers in the future. -```yaml title="DC1.yml" +```yaml title="dc1.yml" --8<-- -examples/single-dc-l3ls/group_vars/DC1/DC1.yml +examples/single-dc-l3ls/group_vars/DC1/dc1.yml --8<-- ``` -The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1/DC1_SPINES.yml` covers the spine switches. +The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1/dc1_spines.yml` covers the spine switches. -```yaml title="DC1_SPINES.yml" +```yaml title="dc1_spines.yml" --8<-- -examples/single-dc-l3ls/group_vars/DC1/DC1_SPINES.yml +examples/single-dc-l3ls/group_vars/DC1/dc1_spines.yml --8<-- ``` -The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1/DC1_L3_LEAVES.yml` covers the L3 leaf switches. Significantly more settings need to be set compared to the spine switches. +The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1/dc1_l3_leaves.yml` covers the L3 leaf switches. Significantly more settings need to be set compared to the spine switches. -```yaml title="DC1_L3_LEAVES.yml" +```yaml title="dc1_l3_leaves.yml" --8<-- -examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES.yml +examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/dc1_l3_leaves.yml --8<-- ``` Finally, more of the same, but this time for the L2 leaf switches: -```yaml title="DC1_L2_LEAVES.yml" +```yaml title="dc1_l2_leaves.yml" --8<-- -examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES.yml +examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES/dc1_l2_leaves.yml --8<-- ``` @@ -283,11 +283,11 @@ An L2 leaf switch is simpler than an L3 switch. Hence there are fewer settings t ## Specifying network services (VRFs and VLANs) in the EVPN/VXLAN fabric -The `ansible-avd-examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/NETWORK_SERVICES.yml` file defines All VRF and VLANs. This means that regardless of where a given VRF or VLAN must exist, its existence is defined in this file, but it does not indicate ***where*** in the fabric it exists. That was done at the bottom of the inventory file previously described in the [Inventory](#content-of-the-inventoryyml-file) section. +The `ansible-avd-examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/network_services.yml` file defines All VRF and VLANs. This means that regardless of where a given VRF or VLAN must exist, its existence is defined in this file, but it does not indicate ***where*** in the fabric it exists. That was done at the bottom of the inventory file previously described in the [Inventory](#content-of-the-inventoryyml-file) section. -```yaml title="NETWORK_SERVICES.yml" +```yaml title="network_services.yml" --8<-- -examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/NETWORK_SERVICES.yml +examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/network_services.yml --8<-- ``` @@ -295,11 +295,11 @@ AVD offers granular control of where Tenants and VLANs are configured using `tag ## Specifying endpoint connectivity in the EVPN/VXLAN fabric -After the previous section, all VRFs and VLANs across the fabric are now defined. The `ansible-avd-examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/CONNECTED_ENDPOINTS.yml` file specifies the connectivity for all endpoints in the fabric (typically servers): +After the previous section, all VRFs and VLANs across the fabric are now defined. The `ansible-avd-examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/connected_endpoints.yml` file specifies the connectivity for all endpoints in the fabric (typically servers): -```yaml title="CONNECTED_ENDPOINTS.yml" +```yaml title="connected_endpoints.yml" --8<-- -examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/CONNECTED_ENDPOINTS.yml +examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/connected_endpoints.yml --8<-- ``` From 38df557e7e96cd62ff81dbfc92c0e849dc17302e Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Thu, 9 Jan 2025 13:54:43 -0500 Subject: [PATCH 20/25] fix file path for group_vars --- .../avd/examples/single-dc-l3ls/README.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index 69c4d34463e..8cf8e54293a 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -203,7 +203,7 @@ Since this example covers building an L3LS network, AVD must know about the devi ```yaml --8<-- - examples/single-dc-l3ls/group_vars/DC1_SPINES/dc1_spines.yml + examples/single-dc-l3ls/group_vars/DC1_SPINES/spines.yml --8<-- ``` @@ -211,7 +211,7 @@ Since this example covers building an L3LS network, AVD must know about the devi ```yaml --8<-- - examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/dc1_l3_leaves.yml + examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/l3_leaves.yml --8<-- ``` @@ -219,7 +219,7 @@ Since this example covers building an L3LS network, AVD must know about the devi ```yaml --8<-- - examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES/dc1_l2_leaves.yml + examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES/l2_leaves.yml --8<-- ``` @@ -255,27 +255,27 @@ examples/single-dc-l3ls/group_vars/DC1/dc1.yml --8<-- ``` -The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1/dc1_spines.yml` covers the spine switches. +The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1/spines.yml` covers the spine switches. ```yaml title="dc1_spines.yml" --8<-- -examples/single-dc-l3ls/group_vars/DC1/dc1_spines.yml +examples/single-dc-l3ls/group_vars/DC1/spines.yml --8<-- ``` -The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1/dc1_l3_leaves.yml` covers the L3 leaf switches. Significantly more settings need to be set compared to the spine switches. +The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1/l3_leaves.yml` covers the L3 leaf switches. Significantly more settings need to be set compared to the spine switches. -```yaml title="dc1_l3_leaves.yml" +```yaml title="l3_leaves.yml" --8<-- -examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/dc1_l3_leaves.yml +examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/l3_leaves.yml --8<-- ``` Finally, more of the same, but this time for the L2 leaf switches: -```yaml title="dc1_l2_leaves.yml" +```yaml title="l2_leaves.yml" --8<-- -examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES/dc1_l2_leaves.yml +examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES/l2_leaves.yml --8<-- ``` From 7a12a973d9d2cc94b8d9004fb33a63bfd5ec25a8 Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Thu, 9 Jan 2025 15:18:12 -0500 Subject: [PATCH 21/25] fix file path in README for group_vars --- .../arista/avd/examples/single-dc-l3ls/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index 8cf8e54293a..c9b2a7e0497 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -255,15 +255,15 @@ examples/single-dc-l3ls/group_vars/DC1/dc1.yml --8<-- ``` -The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1/spines.yml` covers the spine switches. +The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1_SPINES/spines.yml` covers the spine switches. -```yaml title="dc1_spines.yml" +```yaml title="spines.yml" --8<-- -examples/single-dc-l3ls/group_vars/DC1/spines.yml +examples/single-dc-l3ls/group_vars/DC1_SPINES/spines.yml --8<-- ``` -The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1/l3_leaves.yml` covers the L3 leaf switches. Significantly more settings need to be set compared to the spine switches. +The `ansible-avd-examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/l3_leaves.yml` covers the L3 leaf switches. Significantly more settings need to be set compared to the spine switches. ```yaml title="l3_leaves.yml" --8<-- From 21cbed1bbccd6a0480c865cd71efb4c9bc265f29 Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Fri, 10 Jan 2025 14:55:33 -0500 Subject: [PATCH 22/25] format spaces adn add comments to group_vars --- .../avd/examples/single-dc-l3ls/README.md | 6 ++--- .../connected_endpoints.yml | 24 +++++++++---------- .../group_vars/DC1_L3_LEAVES/l3_leaves.yml | 2 +- .../group_vars/DC1_SPINES/spines.yml | 11 ++++++++- .../group_vars/FABRIC/fabric_variables.yml | 24 +++++++++---------- 5 files changed, 38 insertions(+), 29 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index c9b2a7e0497..266fc7c1cc9 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -199,7 +199,7 @@ examples/single-dc-l3ls/inventory_without_ip.yml Since this example covers building an L3LS network, AVD must know about the device types, for example, spines, L3 leaves, L2 leaves, etc. The devices are already grouped in the inventory, so the device types are specified in the group variable files with the following names and content: -=== "dc1_spines.yml" +=== "spines.yml" ```yaml --8<-- @@ -207,7 +207,7 @@ Since this example covers building an L3LS network, AVD must know about the devi --8<-- ``` -=== "dc1_l3_leaves.yml" +=== "l3_leaves.yml" ```yaml --8<-- @@ -215,7 +215,7 @@ Since this example covers building an L3LS network, AVD must know about the devi --8<-- ``` -=== "dc1_l2_leaves.yml" +=== "l2_leaves.yml" ```yaml --8<-- diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/connected_endpoints.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/connected_endpoints.yml index 98597d0ef37..ab7631549dc 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/connected_endpoints.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/connected_endpoints.yml @@ -2,9 +2,9 @@ servers: - name: dc1-leaf1-server1 adapters: - - endpoint_ports: [ PCI1, PCI2 ] - switch_ports: [ Ethernet5, Ethernet5 ] - switches: [ dc1-leaf1a, dc1-leaf1b ] + - endpoint_ports: [PCI1, PCI2] + switch_ports: [Ethernet5, Ethernet5] + switches: [dc1-leaf1a, dc1-leaf1b] vlans: 11-12,21-22 native_vlan: 4092 mode: trunk @@ -12,27 +12,27 @@ servers: port_channel: endpoint_port_channel: Bond1 mode: active - - endpoint_ports: [ iLO ] - switch_ports: [ Ethernet5 ] - switches: [ dc1-leaf1c ] + - endpoint_ports: [iLO] + switch_ports: [Ethernet5] + switches: [dc1-leaf1c] vlans: 11 mode: access spanning_tree_portfast: edge - name: dc1-leaf2-server1 adapters: - - endpoint_ports: [ PCI1, PCI2 ] - switch_ports: [ Ethernet5, Ethernet5 ] - switches: [ dc1-leaf2a, dc1-leaf2b ] + - endpoint_ports: [PCI1, PCI2] + switch_ports: [Ethernet5, Ethernet5] + switches: [dc1-leaf2a, dc1-leaf2b] vlans: 11-12,21-22 native_vlan: 4092 mode: trunk spanning_tree_portfast: edge port_channel: mode: active - - endpoint_ports: [ iLO ] - switch_ports: [ Ethernet5 ] - switches: [ dc1-leaf2c ] + - endpoint_ports: [iLO] + switch_ports: [Ethernet5] + switches: [dc1-leaf2c] vlans: 11 mode: access spanning_tree_portfast: edge diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/l3_leaves.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/l3_leaves.yml index cec62485a23..11af0ad5fad 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/l3_leaves.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/l3_leaves.yml @@ -7,7 +7,7 @@ l3leaf: loopback_ipv4_pool: 10.255.0.0/27 loopback_ipv4_offset: 2 vtep_loopback_ipv4_pool: 10.255.1.0/27 - uplink_switches: ['dc1-spine1', 'dc1-spine2'] + uplink_switches: [dc1-spine1, dc1-spine2] uplink_ipv4_pool: 10.255.255.0/26 mlag_peer_ipv4_pool: 10.255.1.64/27 mlag_peer_l3_ipv4_pool: 10.255.1.96/27 diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES/spines.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES/spines.yml index e47367796d7..46e82009f55 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES/spines.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES/spines.yml @@ -2,15 +2,24 @@ type: spine spine: + # Define variables for all nodes of this type defaults: + # Set the relevant platform as each platform has different default values in Ansible AVD + # Arista platform family <- from the documentation page https://avd.arista.com/5.1/roles/eos_designs/docs/input-variables.html#node-type-settings TOREVISE platform: vEOS-lab + # Pool of IPv4 addresses to configure interface Loopback0 used for BGP EVPN sessions loopback_ipv4_pool: 10.255.0.0/27 + # Autonous System Number for BGP bgp_as: 65100 - + # Define variables per node nodes: + # The Node Name is used as “hostname” - name: dc1-spine1 + # Unique identifier used for IP addressing and other algorithms id: 1 + # Node management interface IPv4 address mgmt_ip: 172.16.1.11/24 + - name: dc1-spine2 id: 2 mgmt_ip: 172.16.1.12/24 diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_variables.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_variables.yml index fe6b9b2e148..e4bdfb53e69 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_variables.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_variables.yml @@ -29,18 +29,18 @@ bgp_peer_groups: p2p_uplinks_mtu: 1500 default_interfaces: - - types: [ spine ] - platforms: [ default ] - uplink_interfaces: [ Ethernet1-2 ] - downlink_interfaces: [ Ethernet1-8 ] - - types: [ l3leaf ] - platforms: [ default ] - uplink_interfaces: [ Ethernet1-2 ] - mlag_interfaces: [ Ethernet3-4 ] - downlink_interfaces: [ Ethernet8 ] - - types: [ l2leaf ] - platforms: [ default ] - uplink_interfaces: [ Ethernet1-2 ] + - types: [spine] + platforms: [default] + uplink_interfaces: [Ethernet1-2] + downlink_interfaces: [Ethernet1-8] + - types: [l3leaf] + platforms: [default] + uplink_interfaces: [Ethernet1-2] + mlag_interfaces: [Ethernet3-4] + downlink_interfaces: [Ethernet8] + - types: [l2leaf] + platforms: [default] + uplink_interfaces: [Ethernet1-2] cvp_instance_ips: - 192.168.1.12 From d9a5034a9fd864bb92149d41ae177b4d870d206f Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Fri, 10 Jan 2025 15:03:35 -0500 Subject: [PATCH 23/25] added comments --- .../arista/avd/examples/single-dc-l3ls/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index 266fc7c1cc9..aa321210bcc 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -219,7 +219,7 @@ Since this example covers building an L3LS network, AVD must know about the devi ```yaml --8<-- - examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES/l2_leaves.yml + examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES/l2_leaves.yml:node_groups --8<-- ``` From 5fac225ef106710e17380d596d7d26e847060281 Mon Sep 17 00:00:00 2001 From: Joel Breton Date: Fri, 10 Jan 2025 15:56:45 -0500 Subject: [PATCH 24/25] add comments to group_vars files --- .../avd/examples/single-dc-l3ls/README.md | 2 +- .../connected_endpoints.yml | 15 +++++++++++++ .../group_vars/DC1_L3_LEAVES/l3_leaves.yml | 21 ++++++++++++++++++- .../FABRIC/fabric_ansible_connectivity.yml | 5 +++++ .../group_vars/FABRIC/fabric_variables.yml | 15 +++++++++++++ .../NETWORK_SERVICES/network_services.yml | 13 ++++++++++++ 6 files changed, 69 insertions(+), 2 deletions(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md index aa321210bcc..df8486eac25 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/README.md @@ -219,7 +219,7 @@ Since this example covers building an L3LS network, AVD must know about the devi ```yaml --8<-- - examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES/l2_leaves.yml:node_groups + examples/single-dc-l3ls/group_vars/DC1_L2_LEAVES/l2_leaves.yml:l2leaf --8<-- ``` diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/connected_endpoints.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/connected_endpoints.yml index ab7631549dc..78ae9be9d58 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/connected_endpoints.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/CONNECTED_ENDPOINTS/connected_endpoints.yml @@ -1,17 +1,31 @@ --- +# Definition of connected endpoints in the fabric. servers: + # Name of the defined server. - name: dc1-leaf1-server1 + # Definition of adapters on the server. adapters: + # Name of the server interfaces that will be used in the description of each interface - endpoint_ports: [PCI1, PCI2] + # Device ports where the server ports are connected. switch_ports: [Ethernet5, Ethernet5] + # Device names where the server ports are connected. switches: [dc1-leaf1a, dc1-leaf1b] + # VLANs that will be configured on these ports. vlans: 11-12,21-22 + # Native VLAN to be used on these ports. native_vlan: 4092 + # L2 mode of the port. mode: trunk + # Spanning tree portfast configuration on this port. spanning_tree_portfast: edge + # Definition of the pair of ports as port channel. port_channel: + # The port-channel name on the endpoint that will be used in the port-channel description. endpoint_port_channel: Bond1 + # Port channel mode for LACP. mode: active + - endpoint_ports: [iLO] switch_ports: [Ethernet5] switches: [dc1-leaf1c] @@ -30,6 +44,7 @@ servers: spanning_tree_portfast: edge port_channel: mode: active + - endpoint_ports: [iLO] switch_ports: [Ethernet5] switches: [dc1-leaf2c] diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/l3_leaves.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/l3_leaves.yml index 11af0ad5fad..a5ddd22ccca 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/l3_leaves.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_L3_LEAVES/l3_leaves.yml @@ -1,27 +1,46 @@ --- type: l3leaf +# L3 Leaf switch group l3leaf: defaults: + # Set the relevant platform as each platform has different default values in Ansible AVD platform: vEOS-lab + # Pool of IPv4 addresses to configure interface Loopback0 used for BGP EVPN sessions loopback_ipv4_pool: 10.255.0.0/27 + # Offset all assigned loopback IP addresses. + # Required when the < loopback_ipv4_pool > is same for 2 different node_types (like spine and l3leaf) to avoid over-lapping IPs. + # For example, set the minimum offset l3leaf.defaults.loopback_ipv4_offset: < total # spine switches > or vice versa. loopback_ipv4_offset: 2 + # Definition of pool of IPs to be used as Virtual Tunnel EndPoint (VXLAN origin and destination IPs) vtep_loopback_ipv4_pool: 10.255.1.0/27 - uplink_switches: [dc1-spine1, dc1-spine2] + # Ansible hostname of the devices used to establish neighborship (IP assignments and BGP peering) + uplink_switches: ['dc1-spine1', 'dc1-spine2'] + # Definition of pool of IPs to be used in P2P links uplink_ipv4_pool: 10.255.255.0/26 + # Definition of pool of IPs to be used for MLAG peer-link connectivity mlag_peer_ipv4_pool: 10.255.1.64/27 + # iBGP Peering between MLAG peers mlag_peer_l3_ipv4_pool: 10.255.1.96/27 + # Virtual router mac for VNIs assigned to Leaf switches in format xx:xx:xx:xx:xx:xx virtual_router_mac_address: 00:1c:73:00:00:99 spanning_tree_priority: 4096 spanning_tree_mode: mstp +# If two nodes (and only two) are in the same node_group, they will automatically form an MLAG pair node_groups: + # Definition of a node group that will include two devices in MLAG. + # Definitions under the group will be inherited by both nodes in the group - group: DC1_L3_LEAF1 + # ASN to be used by BGP for the group. Both devices in the MLAG pair will use the same BGP ASN bgp_as: 65101 nodes: + # Definition of hostnames under the node_group - name: dc1-leaf1a id: 1 mgmt_ip: 172.16.1.101/24 + # Definition of the port to be used in the uplink device facing this device. + # Note that the number of elements in this list must match the length of 'uplink_switches' as well as 'uplink_interfaces' uplink_switch_interfaces: [Ethernet1, Ethernet1] - name: dc1-leaf1b id: 2 diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_ansible_connectivity.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_ansible_connectivity.yml index 817164537ab..0c049d00ddd 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_ansible_connectivity.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_ansible_connectivity.yml @@ -1,8 +1,13 @@ --- +# Ansible connectivity definitions +# eAPI connectivity via HTTPS is specified (as opposed to CLI via SSH) ansible_connection: ansible.netcommon.httpapi +# Specifies that we are indeed using Arista EOS ansible_network_os: arista.eos.eos +# This user/password must exist on the switches to enable Ansible access ansible_user: ansible ansible_password: ansible +# User escalation (to enter enable mode) ansible_become: true ansible_become_method: enable ansible_httpapi_use_ssl: true diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_variables.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_variables.yml index e4bdfb53e69..652d26a8049 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_variables.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/FABRIC/fabric_variables.yml @@ -1,24 +1,32 @@ --- +# Common AVD group variables fabric_name: FABRIC +# Generate CSVs with fabric link info. eos_designs_documentation: topology_csv: true p2p_links_csv: true +# Define underlay and overlay routing protocol to be used underlay_routing_protocol: ebgp overlay_routing_protocol: ebgp +# Local users local_users: + # Define a new user, which is called "ansible" - name: ansible privilege: 15 role: network-admin + # Password set to "ansible". Same string as the device generates when configuring a username. sha512_password: $6$7u4j1rkb3VELgcZE$EJt2Qff8kd/TapRoci0XaIZsL4tFzgq1YZBLD9c6f/knXzvcYY0NcMKndZeCv0T268knGKhOEwZAxqKjlMm920 - name: admin privilege: 15 role: network-admin no_password: true +# BGP peer groups passwords bgp_peer_groups: + # all passwords set to "arista" evpn_overlay_peers: password: Q4fqtbqcZ7oQuKfuWtNGRQ== ipv4_underlay_peers: @@ -26,8 +34,12 @@ bgp_peer_groups: mlag_ipv4_underlay_peer: password: 4b21pAdCvWeAqpcKDFMdWw== +# P2P interfaces MTU, includes VLANs 4093 and 4094 that are over peer-link +# If you're running vEOS-lab or cEOS, you should use MTU of 1500 instead as shown in the following line +# p2p_uplinks_mtu: 9214 p2p_uplinks_mtu: 1500 +# Set default uplink, downlink, and MLAG interfaces based on node type default_interfaces: - types: [spine] platforms: [default] @@ -42,15 +54,18 @@ default_interfaces: platforms: [default] uplink_interfaces: [Ethernet1-2] +# CloudVision Portal definitions cvp_instance_ips: - 192.168.1.12 terminattr_smashexcludes: "ale,flexCounter,hardware,kni,pulse,strata" terminattr_ingestexclude: "/Sysdb/cell/1/agent,/Sysdb/cell/2/agent" terminattr_disable_aaa: true +# DNS Server name_servers: - 192.168.1.1 +# NTP Servers IP or DNS name, first NTP server will be preferred, and sourced from Management VRF ntp_settings: server_vrf: use_mgmt_interface_vrf servers: diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/network_services.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/network_services.yml index 85665610ebd..e515b84751e 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/network_services.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/NETWORK_SERVICES/network_services.yml @@ -1,17 +1,29 @@ --- tenants: + # Definition of tenants. Additional level of abstraction to VRFs - name: TENANT1 + # Number used to generate the VNI of each VLAN by adding the VLAN number in this tenant. mac_vrf_vni_base: 10000 vrfs: + # VRF definitions inside the tenant. - name: VRF10 + # VRF VNI definition. vrf_vni: 10 + # Enable VTEP Network diagnostics + # This will create a loopback with virtual source-nat enable to perform diagnostics from the switch. vtep_diagnostic: + # Loopback interface number loopback: 10 + # Loopback ip range, a unique ip is derived from this ranged and assigned + # to each l3 leaf based on it's unique id. loopback_ip_range: 10.255.10.0/27 svis: + # SVI definitions. - id: 11 + # SVI Description name: VRF10_VLAN11 enabled: true + # IP anycast gateway to be used in the SVI in every leaf. ip_address_virtual: 10.10.11.1/24 - id: 12 name: VRF10_VLAN12 @@ -33,6 +45,7 @@ tenants: ip_address_virtual: 10.10.22.1/24 l2vlans: + # These are pure L2 vlans. They do not have a SVI defined in the l3leafs and they will be bridged inside the VXLAN fabric - id: 3401 name: L2_VLAN3401 - id: 3402 From d9d6a99288d8872f4e12694b4317b34185ec9254 Mon Sep 17 00:00:00 2001 From: JulioPDX Date: Wed, 26 Feb 2025 12:03:58 -0800 Subject: [PATCH 25/25] correcting minor quote issue --- .../examples/single-dc-l3ls/group_vars/DC1_SPINES/spines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES/spines.yml b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES/spines.yml index 46e82009f55..188a0514c3f 100644 --- a/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES/spines.yml +++ b/ansible_collections/arista/avd/examples/single-dc-l3ls/group_vars/DC1_SPINES/spines.yml @@ -13,7 +13,7 @@ spine: bgp_as: 65100 # Define variables per node nodes: - # The Node Name is used as “hostname” + # The Node Name is used as "hostname" - name: dc1-spine1 # Unique identifier used for IP addressing and other algorithms id: 1