Starter lab: a small BGP leaf-spine
Two spines, two leaves, and a host on each leaf. Free images, short configs, and four checks that tell you the fabric works.
Uses the FRR 10.2.1 and Alpine 3.20 images that ship with VEX-NX, so you need no vendor downloads. Timers and counters in your output will differ from the samples.
Topology
Links and addressing
| Endpoint A | Endpoint B | Subnet |
|---|---|---|
| spine1 eth1 | leaf1 eth1 | 10.0.1.0/31 |
| spine1 eth2 | leaf2 eth1 | 10.0.1.2/31 |
| spine2 eth1 | leaf1 eth2 | 10.0.2.0/31 |
| spine2 eth2 | leaf2 eth2 | 10.0.2.2/31 |
| leaf1 eth3 | host1 eth1 | 192.168.11.0/24 |
| leaf2 eth3 | host2 eth1 | 192.168.12.0/24 |
Nodes
| Node | Image | ASN | Address |
|---|---|---|---|
| spine1 | FRRouting | 65000 | 10.255.0.1/32 |
| spine2 | FRRouting | 65000 | 10.255.0.2/32 |
| leaf1 | FRRouting | 65101 | 10.255.1.1/32 |
| leaf2 | FRRouting | 65102 | 10.255.1.2/32 |
| host1 | Alpine | – | 192.168.11.10/24 |
| host2 | Alpine | – | 192.168.12.10/24 |
What you need
| Role | Image | Licence | Version |
|---|---|---|---|
| Spines and leaves | quay.io/frrouting/frr:10.2.1 | GPL-2.0 | Seeded offline on current builds |
| Hosts | alpine:3.20 | Free | Seeded offline on current builds |
| Appliance | Any VEX-NX install; the minimum sizing (4 vCPU, 8 GB) is enough for this lab. | ||
Build it in VEX-NX
New to the interface? Run the two-node walkthrough in the docs first, then come back.
Step 1
Check the images
On Home, confirm Docker is up in Host checks. If Start later reports a missing image, run the seed command on the appliance.
appliance shell$ sudo vexnx-seed-docker$ docker images | grep -E 'frr|alpine'Step 2
Create the lab
Labs → Create blank lab, named leaf-spine. In Design mode, add four frrouting nodes and two alpine nodes, and name them as in the table.
Step 3
Connect the links
Connect data ports to match the addressing table. Keep each link on the interface numbers shown so the configs line up.
Step 4
Start and configure
Operate → Start all. Open Terminal on each node and apply its startup config: paste the FRR config into vtysh (configure, then paste), and run the host commands in the Alpine shell.
Docs: First lab walkthrough, Design mode, Operate and consoles.
Startup configs
Paste each FRR block after running vtysh and then configure. If router bgp is rejected, bgpd is not running: set bgpd=yes in /etc/frr/daemons and restart the node.
hostname spine1
!
interface lo
ip address 10.255.0.1/32
!
interface eth1
description to leaf1 eth1
ip address 10.0.1.0/31
!
interface eth2
description to leaf2 eth1
ip address 10.0.1.2/31
!
router bgp 65000
bgp router-id 10.255.0.1
no bgp ebgp-requires-policy
neighbor 10.0.1.1 remote-as 65101
neighbor 10.0.1.3 remote-as 65102
!
address-family ipv4 unicast
network 10.255.0.1/32
maximum-paths 4
exit-address-family
!hostname spine2
!
interface lo
ip address 10.255.0.2/32
!
interface eth1
description to leaf1 eth2
ip address 10.0.2.0/31
!
interface eth2
description to leaf2 eth2
ip address 10.0.2.2/31
!
router bgp 65000
bgp router-id 10.255.0.2
no bgp ebgp-requires-policy
neighbor 10.0.2.1 remote-as 65101
neighbor 10.0.2.3 remote-as 65102
!
address-family ipv4 unicast
network 10.255.0.2/32
maximum-paths 4
exit-address-family
!hostname leaf1
!
interface lo
ip address 10.255.1.1/32
!
interface eth1
description to spine1 eth1
ip address 10.0.1.1/31
!
interface eth2
description to spine2 eth1
ip address 10.0.2.1/31
!
interface eth3
description to host1
ip address 192.168.11.1/24
!
router bgp 65101
bgp router-id 10.255.1.1
no bgp ebgp-requires-policy
neighbor 10.0.1.0 remote-as 65000
neighbor 10.0.2.0 remote-as 65000
!
address-family ipv4 unicast
network 10.255.1.1/32
network 192.168.11.0/24
maximum-paths 4
exit-address-family
!hostname leaf2
!
interface lo
ip address 10.255.1.2/32
!
interface eth1
description to spine1 eth2
ip address 10.0.1.3/31
!
interface eth2
description to spine2 eth2
ip address 10.0.2.3/31
!
interface eth3
description to host2
ip address 192.168.12.1/24
!
router bgp 65102
bgp router-id 10.255.1.2
no bgp ebgp-requires-policy
neighbor 10.0.1.2 remote-as 65000
neighbor 10.0.2.2 remote-as 65000
!
address-family ipv4 unicast
network 10.255.1.2/32
network 192.168.12.0/24
maximum-paths 4
exit-address-family
!ip addr add 192.168.11.10/24 dev eth1
ip link set eth1 up
ip route add 192.168.12.0/24 via 192.168.11.1ip addr add 192.168.12.10/24 dev eth1
ip link set eth1 up
ip route add 192.168.11.0/24 via 192.168.12.1Verify the fabric
Run each check after the nodes boot.
Check 1 on leaf1
Both BGP sessions are established on leaf1
Pass when: Two neighbors, each showing a prefix count (not Idle, Connect, or Active).
leaf1$ vtysh -c "show bgp ipv4 unicast summary"Expected outputNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt 10.0.1.0 4 65000 12 11 0 0 0 00:02:31 3 5 10.0.2.0 4 65000 12 11 0 0 0 00:02:30 3 5 Total number of neighbors 2Check 2 on leaf1
leaf1 load-shares toward host2’s subnet across both spines
Pass when: Two next hops, one through each spine.
leaf1$ vtysh -c "show ip route 192.168.12.0/24"Expected outputRouting entry for 192.168.12.0/24 Known via "bgp", distance 20, metric 0, best * 10.0.1.0, via eth1, weight 1 * 10.0.2.0, via eth2, weight 1Check 3 on host1
host1 reaches host2
Pass when: 0% packet loss.
host1$ ping -c 3 192.168.12.10Expected output3 packets transmitted, 3 packets received, 0% packet lossCheck 4 on host1
The path crosses one spine
Pass when: Four hops: leaf1, a spine, leaf2, host2. Hop 2 may be 10.0.2.0 instead.
host1$ traceroute -n 192.168.12.10Expected output1 192.168.11.1 2 10.0.1.0 3 10.0.1.3 4 192.168.12.10
If a check fails
- Sessions stuck in Active or Connect
- Ping the neighbor address from the leaf. If it fails, the link or the interface address is wrong; compare with the addressing table.
- Sessions up, but no prefixes received
- Confirm
no bgp ebgp-requires-policyis present; FRR otherwise filters eBGP routes without a policy. - Only one next hop toward the remote subnet
- Check
maximum-paths 4under the IPv4 address family, and that both spine sessions are established. - Hosts cannot ping each other
- Check each host’s route toward the far subnet with
ip route.