A while back, a Network Architect told me about a blog by Satish Patel that inspired him for the design of a Spine-Leaf network. In this post, I’m going to use his blog steps and build my own in EVE-NG lab and document the steps here:
UPDATE 5/31/2025: I am keeping all of the configs on Github here under the “ansible/golden configs” directory: https://github.com/Lenniusce/Network-Automation
These are actively getting pushed as they change. Look for future blog posts for developments.
First, we need to setup EVE-NG:

Very cool, with the Refplat images loaded, we are going to focus on the Nexus 9000v image.

I’m also using EVE-NG lab to build EVPN-VxLAN fabric. I am using Cisco Nexus 9K Switches to build fabric. The versions here:
- EVE-NG version:
6.2.0-4 - QEMU version:
2.4.0 - nxosv9k-9300v-9.3.8

Physical Topology
Here is the end result of cabling up the lab:

| Name | Function |
| ISP-01 | First Router to mimic ISP |
| ISP-02 | Second Router to mimic ISP |
| SPINE01 | Aggregate switch for Leafs |
| SPINE02 | Aggregate switch for Leafs |
| ASAv-01 | First Firewall, Eventually to be converted to PANOS |
| ASAv-02 | Standby Firewall, Eventually to be converted to PANOS |
| R1-TOR01 | Leaf switch, top of rack |
| R1-TOR02 | Leaf switch, top of rack |
| R2-TOR01 | Leaf switch, top of rack |
| R2-TOR02 | Leaf switch, top of rack |
| R3-TOR01 | Leaf switch, top of rack |
| R3-TOR02 | Leaf switch, top of rack |
| VPC | Single Workstation |
| VPC | Single Workstation |
Configuration Building
Underlay – BGP/OSPF – What this means is the is the network protocols that provides basic routing and packet forwarding.
Overlay – VXLAN – The “overlay” is a virtual network built on top of the underlay, using tunneling protocols to create virtual connections.
SPINE01 Configuration Notes:
!! We define the virtual device context (VDC) parameters !!vdc SPINE01 id 1 limit-resource vlan minimum 16 maximum 4094 limit-resource vrf minimum 2 maximum 4096 limit-resource port-channel minimum 0 maximum 511 limit-resource m4route-mem minimum 58 maximum 58 limit-resource m6route-mem minimum 8 maximum 8
!! Here we enable the features for BGP, OSPF, Multicast !!nv overlay evpnfeature ospffeature bgpfeature pim
!! PIM Rendezvous Point and group-list are defined !!ip pim rp-address 10.255.0.123 group-list 239.0.0.0/8ip pim ssm range 232.0.0.0/8ip pim anycast-rp 10.255.0.123 10.255.0.1ip pim anycast-rp 10.255.0.123 10.255.0.2
!! Interfaces connecting to the TORs need OSPF point-to-point defined as well as the pim sparse-mode enabled for multicast traffic !!interface Ethernet1/1 description R1-TOR01 no switchport mtu 9216 medium p2p ip unnumbered loopback0 ip ospf network point-to-point ip router ospf UNDERLAY-NET area 0.0.0.0 ip pim sparse-mode no shutdown
!! Loopback 0 is used for the OSPF overlay !!interface loopback0 description ** RID/BGP Overlay ** ip address 10.255.0.1/32 ip router ospf UNDERLAY-NET area 0.0.0.0 ip pim sparse-mode
!! Loopback 1 is our RP !!interface loopback1 description ** Anycast-RP address ** ip address 10.255.0.123/32 ip router ospf UNDERLAY-NET area 0.0.0.0 ip pim sparse-mode
!! OSPF Configuration on the SPINE !!router ospf UNDERLAY-NET router-id 10.255.0.1 log-adjacency-changes
!! BGP Configuration has each neighbor defined as well as the template for each neighbor as "VXLAN_LEAF" !!router bgp 65001 router-id 10.255.0.1 log-neighbor-changes template peer VXLAN_LEAF remote-as 65001 update-source loopback0 address-family ipv4 unicast address-family l2vpn evpn send-community send-community extended route-reflector-client neighbor 10.255.1.1 inherit peer VXLAN_LEAF description R1-TOR01 neighbor 10.255.1.2 inherit peer VXLAN_LEAF description R1-TOR02 neighbor 10.255.1.11 inherit peer VXLAN_LEAF description R2-TOR01 neighbor 10.255.1.12 inherit peer VXLAN_LEAF description R2-TOR02 neighbor 10.255.1.21 inherit peer VXLAN_LEAF description R3-TOR01 neighbor 10.255.1.22 inherit peer VXLAN_LEAF description R3-TOR02
TOR Configuration Notes:
!! We define the virtual device context (VDC) parameters !!vdc SPINE01 id 1 limit-resource vlan minimum 16 maximum 4094 limit-resource vrf minimum 2 maximum 4096 limit-resource port-channel minimum 0 maximum 511 limit-resource m4route-mem minimum 58 maximum 58 limit-resource m6route-mem minimum 8 maximum 8
!! We have more services and features to enable, specifically for evpn and overlay features we didnt have on the Spine !!feature scp-serverfeature ngmvpnnv overlay evpnfeature ospffeature bgpfeature pimfeature fabric forwardingfeature interface-vlanfeature vn-segment-vlan-basedfeature nv overlayfeature vpcfeature lacpfeature bfd
!! Anycast gateway mac address defined for VXLANs !!fabric forwarding anycast-gateway-mac 0000.1111.1111ip pim rp-address 10.255.0.123 group-list 239.0.0.0/8ip pim ssm range 232.0.0.0/8
!! Route map to permit all traffic for BGP !!route-map DIRECT-PERMIT-ALL permit 10 description route-map for bgp
!! Most important configuration or tenant traffic, this is the VRF which servers, laptops, etc use to pass traffic over the datacenter !!vrf context VXLANS description VRF_VXLANS vni 10555
!! The RP being defined !!ip pim rp-address 10.69.69.254 group-list 224.0.0.0/4
!! vPC Domain Configuration:!! - vpc domain 1: Defines the vPC domain ID; must match on both peers.!! - peer-switch: Allows both switches to act as the STP root for VLANs.!! - role priority 10: Sets the vPC role priority (lower = preferred primary).!! - peer-keepalive destination 172.30.0.22 source 172.30.0.21:!! Configures the out-of-band peer-keepalive link to monitor peer liveliness.!! - delay restore 90: Delays vPC port recovery for 90 seconds after peer comes back online.!! - peer-gateway: Enables both switches to respond to the vPC virtual MAC as default gateway.!! - delay restore interface-vlan 30: Adds restore delay specifically for SVI 30.!! - ipv6 nd synchronize: Synchronizes IPv6 ND table between vPC peers.!! - ip arp synchronize: Synchronizes IPv4 ARP table between vPC peers.vpc domain 1 peer-switch role priority 10 peer-keepalive destination 172.30.0.22 source 172.30.0.21 delay restore 90 peer-gateway delay restore interface-vlan 30 ipv6 nd synchronize ip arp synchronize
!! Underlay backup for VPC link !!interface Vlan444 description ** Underlay Backup over vPC Peer-Link ** no shutdown no ip redirects ip address 192.168.0.1/30 no ipv6 redirects ip ospf network point-to-point ip router ospf UNDERLAY-NET area 0.0.0.0 ip pim sparse-mode
!! L3 VNI !!
Notes on config here



Leave a comment