To configure BGP EVPN on an Arista network switch, you will need to set up both the spine and leaf switches. Below are example configurations for a simple 2-node topology consisting of 1 spine and 1 leaf. This setup assumes a basic understanding of EVPN and BGP configurations.
Assumptions:
- The spine switch is
spine1 and the leaf switch is leaf1.
- The IP addresses used for underlay are in the
10.0.0.0/24 range for the spine-leaf connections.
- The BGP ASN for
spine1 is 65000 and for leaf1 is 65001.
- EVPN is used for VXLAN overlay.
Spine Configuration (spine1)
! Configure the switch hostname
hostname spine1
! Enable the necessary features
feature bgp
feature vxlan
feature interface-vxlan
! Configure the underlay interface to leaf1
interface Ethernet1
description to leaf1
no switchport
ip address 10.0.0.1/30
! Configure BGP
router bgp 65000
router-id 10.0.0.1
maximum-paths 4
neighbor 10.0.0.2 remote-as 65001
neighbor 10.0.0.2 description leaf1
neighbor 10.0.0.2 ebgp-multihop 2
neighbor 10.0.0.2 update-source 10.0.0.1
neighbor 10.0.0.2 send-community extended
address-family ipv4
neighbor 10.0.0.2 activate
address-family l2vpn evpn
neighbor 10.0.0.2 activate
! Configure the loopback interface for EVPN
interface Loopback0
description EVPN Loopback
ip address 10.0.1.1/32
ip router bgp 65000
! Optional: Configure VXLAN VTEP (if needed for specific EVPN use cases)
! This part is not always necessary for spine unless it's also acting as a VTEP for some reason
Leaf Configuration (leaf1)
! Configure the switch hostname
hostname leaf1
! Enable the necessary features
feature bgp
feature vxlan
feature interface-vxlan
! Configure the underlay interface to spine1
interface Ethernet1
description to spine1
no switchport
ip address 10.0.0.2/30
! Configure the loopback interface for EVPN
interface Loopback0
description EVPN Loopback
ip address 10.0.1.2/32
ip router bgp 65001
! Configure the VXLAN VTEP
interface Vxlan1
vxlan source-interface Loopback0
vxlan udp-port 4789
vxlan vlan 10 vni 1010
vxlan vlan 20 vni 2020
vxlan flood vtep 10.0.1.1
! Configure BGP
router bgp 65001
router-id 10.0.0.2
maximum-paths 4
neighbor 10.0.0.1 remote-as 65000
neighbor 10.0.0.1 description spine1
neighbor 10.0.0.1 ebgp-multihop 2
neighbor 10.0.0.1 update-source 10.0.0.2
neighbor 10.0.0.1 send-community extended
address-family ipv4
neighbor 10.0.0.1 activate
address-family l2vpn evpn
neighbor 10.0.0.1 activate
! Configure VLANs and SVIs for VXLAN
vlan 10
name VLAN10
vlan 20
name VLAN20
interface Vlan10
description VLAN10 SVI
ip address 10.10.10.1/24
interface Vlan20
description VLAN20 SVI
ip address 10.20.20.1/24
! Map VLANs to VXLAN VNIs (already done under Vxlan1 interface)
! Configure the access ports (example for Ethernet2 and Ethernet3)
interface Ethernet2
description Server1
switchport access vlan 10
interface Ethernet3
description Server2
switchport access vlan 20
Notes:
- Underlay Configuration: The underlay is configured using BGP for IP routing between the spine and leaf. Ensure that the IP addresses and ASNs are correctly set according to your network design.
- Overlay Configuration: The overlay is configured using EVPN, which is activated under the BGP configuration. The
Loopback0 interface is used as the source for the VXLAN tunnel.
- VXLAN Configuration: On the leaf, the VXLAN VTEP is configured with the
Loopback0 IP as its source. VLAN-VNI mappings are also defined.
- Server Ports: On the leaf, server-facing ports are configured as access ports in the respective VLANs.
This is a simplified example. Depending on your network requirements, you might need to add more configurations, such as MLAG for redundancy, more complex routing policies, or additional VXLAN settings. Always refer to the latest Arista documentation for the most current configuration guidelines and best practices.