Read the RFCs once, then watch the control plane do it: two leaves, one spine, BGP EVPN between them, a VLAN mapped to a VNI, and show bgp l2vpn evpn plus show vxlan remotemac all after every step. SONiC's config is config_db.json, so the lab also teaches how a change is applied and saved on that OS. With NetPilot connected in your assistant, you ask for the fabric in plain words, and the assistant builds it and runs each verification command on the devices.
SONiC is already on your lab VM
The community SONiC VS image is preloaded on every lab VM, so the assistant can deploy SONiC nodes in any lab from the first prompt. Replace it with your own build under Images whenever you want a different version.
Ask for the fabric in plain words
Two leaves, one spine, the AS numbers, the loopbacks, one host per leaf. The assistant designs the topology, writes the config for each node and deploys the lab with containerlab.
Check the underlay
The leaves must reach each other's loopback before any overlay exists. On a leaf, vtysh -c "show bgp summary" shows the spine session Established, and show ip route shows the other leaf's loopback learned over it.
Check the EVPN session
BGP on SONiC is FRR, so the EVPN address family is read through vtysh. show bgp l2vpn evpn summary on each leaf shows the EVPN neighbour Established and a prefix count once the VNIs are advertised.
Map the VLAN to a VNI
This is the step that teaches the SONiC way of doing things: config vlan add, config vlan member add, config vxlan add for the VTEP with the loopback as source, config vxlan evpn_nvo add to bind the VTEP to EVPN, and config vxlan map add for the VLAN to VNI mapping. show vxlan vlanvnimap and vtysh -c "show evpn vni" confirm it.
Send traffic and read the routes
Ping from the host on leaf1 to the host on leaf2. show vxlan remotevni all now lists the remote VTEP, show vxlan remotemac all lists the remote host's MAC learned over EVPN, and vtysh -c "show bgp l2vpn evpn route type macip" shows the type-2 route that carried it.
Save it the SONiC way
SONiC saves in two halves. config save -y writes CONFIG_DB to /etc/sonic/config_db.json, with the VLAN, VNI and interfaces. vtysh -c write saves FRR's BGP config to /etc/frr/frr.conf. Neither file covers the other, and show runningconfiguration all prints the running CONFIG_DB as JSON.
Say this to the assistant
Build two SONiC leaves and one SONiC spine. eBGP underlay on point-to-point links, spine AS 65000, leaf1 AS 65001, leaf2 AS 65002, loopbacks 10.1.1.1 and 10.1.1.2 on the leaves. BGP EVPN overlay between the leaves through the spine. On each leaf create VLAN 100, map it to VNI 10100 and attach one Linux host in VLAN 100. After each step run the verification command and show me the output.
These are the SONiC CLI lines for step five on leaf1, with 10.1.1.1 as the VTEP source and Ethernet4 as the host port. Each config command writes to the running config database, and config save writes it to config_db.json, while BGP is saved separately with vtysh -c write. The assistant runs them for you and reads the result, and you can type them yourself on the device over SSH.
root@leaf1:/# config vlan add 100 root@leaf1:/# config vlan member add -u 100 Ethernet4 root@leaf1:/# config vxlan add vtep1 10.1.1.1 root@leaf1:/# config vxlan evpn_nvo add nvo1 vtep1 root@leaf1:/# config vxlan map add vtep1 100 10100 root@leaf1:/# config save -y root@leaf1:/# vtysh -c write
The EVPN session through vtysh, then the three vxlan show commands after the hosts have exchanged traffic. The remote VTEP in show vxlan remotevni all and the remote MAC in show vxlan remotemac all are the two lines that say the overlay is carrying the host's reachability.
root@leaf1:/# vtysh -c "show bgp l2vpn evpn summary" BGP router identifier 10.1.1.1, local AS number 65001 vrf-id 0 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc 10.0.1.0 4 65000 11 11 2 0 0 00:00:30 2 4 N/A
root@leaf1:/# show vxlan vlanvnimap +---------+-------+ | VLAN | VNI | +=========+=======+ | Vlan100 | 10100 | +---------+-------+ Total count : 1 root@leaf1:/# show vxlan remotevni all +---------+--------------+-------+ | VLAN | RemoteVTEP | VNI | +=========+==============+=======+ | Vlan100 | 10.1.1.2 | 10100 | +---------+--------------+-------+ Total count : 1 root@leaf1:/# show vxlan remotemac all +---------+-------------------+--------------+-------+---------+ | VLAN | MAC | RemoteVTEP | VNI | Type | +=========+===================+==============+=======+=========+ | Vlan100 | aa:c1:ab:db:0b:42 | 10.1.1.2 | 10100 | dynamic | +---------+-------------------+--------------+-------+---------+ Total count : 1
This output is from a real run of the same fabric. To run it on your own Linux host with containerlab, clone the public EVPN lab. The prompt above ran as written, and it is in our prompt library with the result of the run.
Leaf-spine design, symmetric and asymmetric IRB, multi-site, the concepts behind the commands.
SONiC switches in your browser, built from a prompt, with public labs for your own host.
SONiC in the same fabric as Cisco NX-OS and Arista EOS, with the per-vendor EVPN commands.
The same lab shape, used to pin down a control-plane problem.
SONiC, FRR and SR Linux labs for teams that build on open network operating systems.
How to connect, what the tools do, which plan is needed, lab credits and the idle timeout.
What each plan includes, with lab credits and idle timeouts.
One vJunos-router spine and two vJunos-switch leaves: OSPF underneath, BGP EVPN on top, VLAN 10 on VNI 10010, each layer read on the Junos CLI.
Create a NetPilot account, pick Pro or above, and connect NetPilot in Claude, ChatGPT, Gemini, Codex, Meta Muse or any MCP assistant.