chatgpt-4o-latest-20250326· OpenAI
LMArena Human Preference 140K
Provide me the commands that I need to configure BGP EVPN on an Arista network switch.…
- User
Provide me the commands that I need to configure BGP EVPN on an Arista network switch. Provide the CLI commands. provide spines and leaf configs 1 spine and 1 leaf
- Assistant
Sure! Below is a basic example of how to configure BGP EVPN on an Arista switch using CLI commands. This example includes configuration for:
- 1 Spine switch
- 1 Leaf switch
This setup assumes:
- EVPN is used as the control plane for VXLAN.
- iBGP is used between spine and leaf.
- Loopback interfaces are used for BGP peering and VTEP (VXLAN Tunnel Endpoints).
- Underlay routing is already configured (e.g., via OSPF or static routes).
- ASN numbers are unique per device (eBGP EVPN model).
🧠 Assumptions:
Device Hostname ASN Loopback0 IP VTEP IP (same as Loopback0) Spine Spine1 65000 10.0.0.1/32 N/A Leaf Leaf1 65101 10.0.0.2/32 10.0.0.2
Spine1 Configuration (BGP Route Reflector)
! hostname Spine1 ! interface Loopback0 ip address 10.0.0.1/32 ! router bgp 65000 router-id 10.0.0.1 no bgp default ipv4-unicast bgp log-neighbor-changes neighbor LEAF1 peer-group neighbor LEAF1 remote-as 65101 neighbor LEAF1 update-source Loopback0 neighbor 10.0.0.2 peer-group LEAF1 ! address-family evpn neighbor LEAF1 activate !
Leaf1 Configuration (VTEP + EVPN)
! hostname Leaf1 ! interface Loopback0 ip address 10.0.0.2/32 ! interface Vxlan1 vxlan source-interface Loopback0 vxlan udp-port 4789 vxlan vlan 10 vni 1010 vxlan vlan 20 vni 1020 vxlan evpn ! interface Vlan10 ip address 192.168.10.1/24 vxlan vlan 10 vni 1010 ! interface Vlan20 ip address 192.168.20.1/24 vxlan vlan 20 vni 1020 ! router bgp 65101 router-id 10.0.0.2 no bgp default ipv4-unicast bgp log-neighbor-changes neighbor SPINE1 peer-group neighbor SPINE1 remote-as 65000 neighbor SPINE1 update-source Loopback0 neighbor 10.0.0.1 peer-group SPINE1 ! address-family evpn neighbor SPINE1 activate advertise-all-vni !
✅ Notes:
- The spine acts as a route reflector for EVPN routes.
- The leaf advertises its VTEP and MAC/IP routes via EVPN.
- You can add more VLANs/VNIs as needed.
- Underlay routing (e.g., OSPF or static routes) must be configured to ensure Loopback0 reachability between spine and leaf.
Let me know if you want to include underlay routing (e.g., OSPF) or multiple leaves.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.