Wireshark is used to capture and analyze Bridge Protocol Data Units (BPDUs) live on a network, revealing how Spanning Tree Protocol fields map to real switch behavior. Captured frame data — including root priority, path cost, VLAN ID, and MAC addresses — is cross-referenced against actual switch configurations to confirm STP topology assumptions.
Analyzing BPDUs with Wireshark
One thing that I always love doing is going back and taking a look at the actual bits: what actually are we seeing across the switch? So I'm going to use Wireshark to take a look at the frames that we're seeing coming across from a switch to a PC, because these are actually going out every single interface that there is. We'll see on a PC what's coming into it, and from the Wireshark perspective take a look at those bridge protocol data units.
Here I am on my demo laptop. I'm going to bring up Wireshark. I need to choose the interface that I want to look at, and it's going to be this ethernet interface right here — this is the one that's plugged into my test network. So then I can take a look and I can see that there's some STP information that's coming by. Interesting enough, it's coming every two seconds, about. And then we got some other information that's coming in here also, but all I care really about right now is one of these spanning tree ones.
Let's take a look at the spanning tree. I'm just going to click on it here. I can click any one of these; for the most part they're all going to be the same. Then I'm going to look at the spanning tree section of this to take a look at it.
Here's where there's that protocol identifier, so we identify the protocol and the version and the type. So we got some information in there. It looks like it's just all set to zero here. We got some flags, which also is set to zero here. Those are the ones I'm not as concerned about, and you'd see some differences depending on what version you're using.
Let's take a look at the root identifier. So I take a look at this root identifier, I see the priority on there, it's set to 32768, our default, so that makes sense. Then we also see the root bridge ID extension, and this says — well, if you remember our network, this demo laptop is on VLAN 10, so perhaps that is why this is actually saying 10 right here, is that we're seeing that it's coming across VLAN 10.
We've got the root bridge system ID, and then this is the 0019 E8 9E 0A 80. So if we were to take a look at our switch 1, or whatever switch this is, then we would see that — actually, that would be a good thing to do. Let's go ahead and take a look at our different switches and see what lines up with this MAC address right here.
Then I look at the bridge identifier — oh, excuse me, here's the root path cost. So it's a root path cost of 19, so we know that that's a 100 bed connection, based off of one of those charts that we took a look at earlier. And then we see the bridge identifier, and we see that the bridge identifier is once again 32768. We got a bridge system ID extension once again, because this is part of VLAN 10, and then we've got a different MAC address.
So what this is telling me is that if this is the BPDU coming into the demo laptop, then it's directly connected to this switch right here. If we're seeing cost of 19, then I'm going to assume that the next switch that it's connected to, which is switch 1, is going to be the root bridge. So we can take a look now and verify all that. And then I also see a port number here, and then a few different timers right here.
So let's see if my assumptions are correct, where we're connected directly into switch 2, and this is going to be the MAC address of that, and then switch 1, this will be the MAC address of it. So let's go ahead and jump on these. This is switch 1, so I'll do a restart on here. You can type that in wrong — actually, there we go. And look for our MAC address in here, and we see 0019e8 9e 0 a 0. So is that what we saw in here? Sure enough, that is. So switch 1, that is correct.
And then we'll jump on to switch 2. So I'll do a restart of that session right there. We'll get our credentials plugged into here, and show version on here, and 44 E4 d9978380. And then I take a look, and yep, that sure enough is. So everything adds up. We can take a look inside of Wireshark and see that everything's making sense based off of what we've learned so far.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →