Replace flood-and-learn with a control plane. S1 becomes an iBGP route reflector for the L2VPN EVPN address family; each leaf advertises its VNI (a type-3 route) and its hosts (type-2 routes), and the leaves find each other from those routes.
CCNP Data Center track · Cisco Nexus (NX-OS-style) · 5 objectives
The simulator ticks each one as soon as the network meets it.
On S1 enable feature bgp, feature nv overlay and nv overlay evpn. In router bgp 65000 (router-id 3.3.3.3) add neighbors 1.1.1.1 and 2.2.2.2: remote-as 65000, update-source loopback0, and under address-family l2vpn evpn send-community extended and route-reflector-client.
On L1 and L2 enable feature bgp, feature nv overlay, feature vn-segment-vlan-based and nv overlay evpn; map VLAN 10 to vn-segment 10010; peer with 3.3.3.3 the same way (address-family l2vpn evpn, send-community extended).
On both leaves: interface nve1 with no shutdown, source-interface loopback0, host-reachability protocol bgp and member vni 10010 with ingress-replication protocol bgp; and evpn / vni 10010 l2 with rd auto and route-target import auto, export auto.
show bgp l2vpn evpn on L1: the type-3 route of 2.2.2.2 is there.