In the data centre the switches route between each other (no loops, no spanning tree). Servers that need to be in the same network are connected to different switches, though. How does a VLAN cross a routed network?
The solution
VXLAN wraps the whole Ethernet frame in a UDP packet (port 4789) and sends it via IP to the switch on the other side. There it is unwrapped and put into the VLAN.
[ Ethernet | IP loopback→loopback | UDP 4789 | VXLAN VNI 10010 | Ethernet | IP | ICMP ]
outside (underlay) inside (the original frame)
Term
Meaning
VTEP
VXLAN tunnel endpoint, usually a layer 3 switch (leaf)
VNI
24-bit identifier of the segment (instead of the 12-bit VLAN ID, so up to 16 million)
Underlay
the routed network between the VTEPs, often with OSPF or BGP
In leyoNET the other VTEPs are in a fixed list; the control protocol EVPN is not modelled.
How to do it in leyoNET
The same text as in the app’s help (F1 key).
VXLAN
VXLAN (RFC 7348) extends a VLAN across a routed network. A VTEP (here a layer-3 switch) wraps every frame of the VLAN including its MAC addresses in a UDP packet (port 4789) with the VNI, a 24-bit number for the segment, and sends it by IP to the other VTEPs.
Link VLAN and VNI: in the VLAN vn-segment 10010.
Tunnel source: usually a Loopback interfaces (interface nve1, source-interface loopback0), reachable in the underlay via OSPF or statically.
Enter the other VTEPs as a fixed list (ingress replication): member vni 10010 peer-ip 10.255.0.2. Broadcasts and unknown destinations go to all, learned MAC addresses only to their VTEP («flood and learn»).
Frames from VTEPs not in the list are dropped.
In the form: tab Switching, section VXLAN. Display: show nve vni, show nve peers, show mac address-table (entries «nve1»). EVPN (BGP distributes the MAC addresses) is not modelled.
See an example
VXLAN between two sites
Two layer-3 switches extend VLAN 10 via VXLAN across a routed network (OSPF). The PCs in Zürich and Bern are in the same subnet.
First the switches learn the loopbacks (10.255.0.1 and .2) via OSPF. Then the Zürich PC pings the Bern PC: ARP and ping run wrapped in UDP 4789 across the spine. Filter «vxlan».
A data centre like those of large providers: two spines, three leafs, every leaf connected to both spines. The underlay routes with eBGP (one AS per leaf), the overlay extends VLAN 10 (web) and VLAN 20 (database) over all leafs with VXLAN.
First the switches set up their BGP sessions and learn the loopbacks. Then Web 1 pings Web 2 and DB 1 pings DB 2 – both within the same subnet, but across two routed hops. Filter “vxlan” or “bgp”.