VALE(4)
π VALE(4) π β the very fast Virtual Local Ethernet, netmap edition
okay bestie so this is the vale page from the Kernel Interfaces Manual and honestly? it's a whole vibe. buckle up π
β¨ NAME β¨
vale β a very fast Virtual Local Ethernet using the netmap API π¦
πΈ SYNOPSIS πΈ
device netmap
that's it. that's the whole synopsis. iconic.
π DESCRIPTION π
so vale is a feature of the netmap(4) module, and what it does is implement multiple Virtual switches β plural, a whole lil ecosystem β that you can use to interconnect netmap clients. and when we say clients we mean everything: traffic sources and sinks, packet forwarders, userspace firewalls, and so on. the whole friend group π«Ά
the bestie part? vale is implemented completely in software, and it is extremely fast. no cap. on a modern machine it can move almost 20 Million packets per second (Mpps) per core with small frames, and about 70 Gbit/s with 1500 byte frames. that's not a typo, that's just her being her. π
β¨
π¦ OPERATION π¦
vale dynamically creates switches and ports as clients connect to it using the netmap(4) API. it just... makes them. on demand. main character energy fr fr.
here's the naming tea, because you will need it:
valeports are namedvaleSSS:PPPvaleis the prefix that says "hey, this is a VALE switch, not a standard interface"SSSis a specific switch (the colon is the separator π)PPPis a port within that switch
and the rules for the names:
- both
SSSandPPPhave the form[0-9a-zA-Z_]+ - the string cannot exceed
IFNAMSIZcharacters - and
PPPcannot be the name of any existing OS network interface β like, hard no, don't even try it π
see netmap(4) for details on the API. π§
π LIMITS π
okay so the boundaries, bestie:
valecurrently supports up to 254 ports per switch.- the maximum number of switches is provided by the
max_bridgessysctl variable.
that's the whole limit situation. respect the 254. π₯
β SYSCTL VARIABLES β
see netmap(4) for a list of sysctl variables that affect vale bridges. that's where the knobs live, go look π
π EXAMPLES π
example one: create one switch, with a traffic generator connected to one port, and a netmap-enabled tcpdump instance on another port:
tcpdump -ni valea:1 &
pkt-gen -i valea:0 -f tx &
example two: create two switches, each connected to two qemu machines on different ports:
qemu -net nic -net netmap,ifname=vale1:a ... &
qemu -net nic -net netmap,ifname=vale1:b ... &
qemu -net nic -net netmap,ifname=vale2:c ... &
qemu -net nic -net netmap,ifname=vale2:d ... &
look at her go. four machines, two switches, zero drama. ππ₯
π SEE ALSO π
also this absolute classic, which you should absolutely read:
Luigi Rizzo, Giuseppe Lettieri: VALE, a switched ethernet for virtual machines, June 2012, http://info.iet.unipi.it/~luigi/vale/
π AUTHORS π
the vale switch was designed and implemented in 2012 by Luigi Rizzo and Giuseppe Lettieri at the Universita di Pisa. legends, honestly. π«Ά
vale was funded by the European Commission within FP7 Projects CHANGE (257422) and OPENLAB (287581). shoutout to the funding besties, none of this would exist without y'all π
quick vibe check reminder:PPPreally cannot be the name of any existing OS network interface, and the whole name can't exceedIFNAMSIZcharacters. no cap, it will not work, save yourself the heartbreak π
okay that's the whole page, and yes this shipped on Debian, dated August 30, 2024, and it's VALE(4) β the very fast one. slay, go build a switch π
β¨π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2012 Luigi Rizzo, Universita` di Pisa
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms