VALE(4)

πŸ’– VALE(4) πŸ’–

okay bestie, sit down, we're talking about vale from the Kernel Interfaces Manual and honestly? it's giving main character energy ✨


🌸 NAME 🌸

vale β€” a very fast Virtual Local Ethernet using the netmap API πŸ¦‹


✨ SYNOPSIS ✨

device netmap

that's it. that's the whole vibe. one line. iconic. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

vale is a feature of the netmap(4) module, and what it does is literally implement multiple Virtual switches that can interconnect netmap clients 🫢 β€” and by clients we mean traffic sources and sinks, packet forwarders, userspace firewalls, and so on. the whole little friend group fr fr.

and the way that it's implemented completely in software?? no cap, it is extremely fast πŸ”₯. 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. like. excuse me?? that's not a flex, that's a whole personality πŸ˜­πŸ‘‘


πŸŽ€ OPERATION πŸŽ€

vale dynamically creates switches and ports as clients connect to it using the netmap(4) API. no pre-config, no drama, it just happens ✨

vale ports are named valeSSS:PPP where:

  • vale is the prefix indicating a VALE switch rather than a standard interface 🌈
  • SSS indicates a specific switch (the colon : is a separator) πŸ‘‘
  • PPP indicates a port within the switch πŸ¦‹

both SSS and PPP have the form [0-9a-zA-Z_]+ , the string cannot exceed IFNAMSIZ characters, and PPP cannot be the name of any existing OS network interface ⚠️ (yes that's a hard rule, don't test it)

see netmap(4) for details on the API πŸ’–

🧚 LIMITS

vale currently supports up to 8 switches, with 254 ports per switch. that's the ceiling bestie, plan accordingly πŸ’€


⭐ SYSCTL VARIABLES ⭐

see netmap(4) for a list of sysctl variables that affect vale bridges 🫢


🌸 EXAMPLES 🌸

okay so first 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 &
and second: 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 ... &

literally look at that. four qemus. two switches. ate. πŸ”₯


πŸ’œ SEE ALSO πŸ’œ


πŸ‘‘ AUTHORS πŸ‘‘

the vale switch was designed and implemented in 2012 by Luigi Rizzo and Giuseppe Lettieri at the Universita` di Pisa πŸŽ“βœ¨ absolute legends, no notes.

vale was funded by the European Commission within FP7 Projects CHANGE (257422) and OPENLAB (287581) πŸ’–


and that's the whole page bestie!! this one's from the Debian crew, dated February 6, 2020 β€” so if you're reading this, shoutout to them, mwah πŸ’‹πŸ«Ά go build some virtual switches, you got this ⭐

πŸ“¦ where this page comes from