Skip to main content
You don’t need two servers and a 10G link to try Wireblast. A veth pair and a network namespace give you a sender and a receiver on one box. A laptop is fine. This is the safest possible place to learn the tool. Nothing you do here can touch your real network, and you can turn on --rx-mode all without any consequence at all.
veth gives you native XDP in copy mode with one queue. Throughput here tells you about your CPU and kernel, not about a NIC, which is exactly right when what you’re testing is your own config.

Build the lab

Two commands’ worth of setup. wb0 stays in your normal namespace and does the sending; wb1 lives in a namespace called wblab and does the receiving.
Check the cable works:

Run a test through it

Two terminals. Receiver first, so it’s listening before traffic starts.
sudo wireblast won’t find a binary that only exists in your user’s GOPATH. Either install it to /usr/local/bin or give the full path, and note that inside ip netns exec you’ll want the absolute path too.

What you should see

Sender:
Receiver:
800,060 sent, 800,060 received. Exactly. That’s the number to look for. If the two ends agree to the packet, everything in between is working. Two other things worth noticing:
  • No link bounce. veth has no physical link to renegotiate, so the attach is instant. On a real NIC this is where you’d wait about 8 seconds.
  • copy not zero-copy. Expected on veth, and covered in hardware and drivers.

How fast does it go?

Single queue on a 12-core box, so you have a reference point: It’s packet-rate bound rather than bit-rate bound, so 1518-byte frames reach around 6.5 Gbit/s while 64-byte frames reach around 0.37 Gbit/s. Again, that’s your CPU and kernel, not a NIC.

Things to try in here

Since nothing here can hurt anything, this is the place to experiment with the settings you’d be careful about on a real box.
You’ll get the typed-yes confirmation. Read what it says: that’s the screen that matters on a real interface. Here, the worst case is that a namespace with nothing in it stops receiving.
Find out what your CPU does with a software interface. Then try --packet-size 64 versus --packet-size 1518 and watch packets/sec and bits/sec trade off against each other.
Run tcpdump -ni wb1 inside the namespace at a low --pps and watch the tuples change.
Capture a few seconds of something real, then put it back on the wire:

Tear it down

Deleting the namespace takes wb1 with it, and a veth pair dies together, so this is all you need:
Verify:

A one-shot script

The examples directory has all of this wrapped up: 001-veth-quickstart builds the lab, sends traffic, and tears it down again in one command.

Then what

When you’re ready for real hardware, the two-box test is the same shape with a switch in the middle, plus the link bounce, VLAN tags and zero-copy that a physical NIC brings.