DEV Community

Cover image for tcpdump -i any shows zero packets? LINUX_SLL2 can't filter by ether host
Christian Anderson
Christian Anderson

Posted on

tcpdump -i any shows zero packets? LINUX_SLL2 can't filter by ether host

Short one. If you run tcpdump -i any with a filter that looks at Ethernet headers, it doesn't capture nothing. It refuses to start. And if your script throws stderr away, those two things look exactly the same.

This one's written in my notes as a warning from the night I was hunting dead smart bulbs.

Where I hit it

On 7 August 2026 eight of my WiZ bulbs were unavailable in Home Assistant. I wanted to know what four of them were actually sending, so the obvious move was a capture on the Home Assistant box, filtered on the bulbs' MAC addresses or on broadcast traffic.

That's when -i any bites. The note I wrote that night says: tcpdump -i any gives LINUX_SLL2 and can't do ether host or broadcast filters. It errors out, and if stderr is suppressed it looks exactly like "zero packets". Capture on the real interface and never hide stderr.

For this post I re-ran it on 18 October 2026 to get the exact text. This is tcpdump 4.99.4 with libpcap 1.10.4, inside a Debian container.

What the errors look like

Real tcpdump output: ether host, broadcast and llc filters all fail on -i any with exit 1, the same command with stderr hidden prints nothing, and a genuinely quiet capture prints 0 packets captured

Three different filters, three different error messages, all exit code 1:

  • ether host ... gives ethernet addresses supported only on ethernet/FDDI/token ring/802.11/ATM LANE/Fibre Channel
  • broadcast gives not a broadcast link
  • llc gives 'llc' not supported for Linux cooked v2

The second one is the sneaky one. broadcast reads like a perfectly normal filter, and the message doesn't mention -i any at all.

Why it happens

The clue is the first line every time: data link type LINUX_SLL2. When you capture on any, you aren't on an Ethernet interface. You're on a pseudo-device that gathers packets from every interface, and tcpdump hands you a "cooked" header (Linux cooked v2) instead of the real Ethernet one. Filters that need the real Ethernet header have nothing to match against, so tcpdump refuses the filter.

You can see it with -L, which lists the link types an interface offers:

tcpdump -L shows any only offers LINUX_SLL and LINUX_SLL2, while eth0 offers EN10MB Ethernet; an llc capture on eth0 catches an 8-byte Supervisory Receiver not Ready frame

any only offers LINUX_SLL and LINUX_SLL2. A real interface offers EN10MB, which is Ethernet. I tried forcing the older cooked type with -y LINUX_SLL in case v1 behaved differently. Same error: not a broadcast link.

What still works on any is anything that only looks at IP and above. In the same test, arp, ip broadcast, udp port 38899 and ether proto 0x0806 were all accepted. So it's easy to use -i any for months without hitting this, then hit it the first time you filter on a MAC.

Why it mattered for the bulbs

Here's the kicker. The four wedged bulbs weren't sending any IP traffic at all. No DHCP, no ARP. All they sent was tiny 8-byte 802.3 LLC frames every 10 to 20 seconds, "Supervisory, Receiver not Ready".

So the exact traffic I needed to see was the traffic -i any couldn't filter for. llc is refused outright, and filtering by their MAC is refused too. An IP-level filter on -i any would have run fine and shown nothing, because there was nothing at the IP level to show. That's a really convincing wrong answer: the bulb isn't sending anything.

On the real interface it's fine. The second image is a capture on eth0 with an llc filter, done on 18 October. It caught one of these frames straight away: Null Supervisory, Receiver not Ready, rcv seq 64, Flags [Poll], length 8. Same shape as the bulbs from August. I didn't go hunting for which device sent this one. The point is that the real interface can see it and any can't even be asked to look.

Hiding stderr turns an error into silence

This is the part that turns a clear error into a lie. Look at the middle of the first image:

$ tcpdump -i any -c 3 broadcast 2>/dev/null
[exit 1]
Enter fullscreen mode Exit fullscreen mode

Nothing printed at all. If that's in a script that greps the output, or counts lines, or you're just glancing at a terminal, it reads as "no packets".

Compare it with a capture that really saw nothing:

listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes

0 packets captured
0 packets received by filter
0 packets dropped by kernel
[exit 124]
Enter fullscreen mode Exit fullscreen mode

A real empty capture tells you it was listening and counts zero. (The 124 is from timeout stopping it.) A refused filter never gets as far as listening. Different exit code, different output. But only if you can see the output.

The rules I follow now

  • Capture on the real interface (-i eth0 or whatever yours is) whenever the filter mentions MACs, broadcast or LLC.
  • Never send tcpdump's stderr to /dev/null. The useful lines (listening on ..., the packet counts) go to stderr, and so do the errors.
  • Look for the listening on line. No listening on means it never captured anything, whatever the output says.
  • Check the exit code in scripts. 1 is "refused", not "quiet".
  • Run tcpdump -i <iface> -L if a filter is acting odd, and see what link type you're actually on.

One related thing from the same hunt: my router has no tcpdump at all. On that box, logread | grep -i dhcp was the stand-in for "is this device even asking for an address?". That turned out to be the question that mattered most, but that's the other post.

Have you ever trusted a "0 packets" that was really an error?


🤖 Drafted with AI assistance from my own homelab notes, logs and repos, and fact-checked against them before publishing.

Top comments (0)