How to ethernet managable network switch manage the dynamic table entries although receive "port base MAC address frame" like RSTP,STP protocole ?

I know the dynamic mac table save the entries with received Frame's "Source Address". But like a BPDU frames have different structure in Source Address bytes. How to ethernet switches seperate it's BPDU or ARP-ICMP etc. packet and saved it's dynamic table ?

Static or Multicast table work with DA but the dynamic table looks just Source Address. How to decide it saved or not ?

For example type of below topology

Switch 1 (03:0b:aa:00:00:01)
Switch 2  (03:0b:aa:00:00:02)
Switch 3  (03:0b:aa:00:00:03)

(I: refer to ethernet cable between them)

How to decide which one is save on Switch2's Dynamic Mac tables;

  1. received BPDU packets from Switch1's port 1 with Source address is ((03:0b:aa:00:00:01) + 01( port Info))

  2. or Switch 3's Base MAC address ? (03:0b:aa:00:00:01)

It is very technical question, but I coulndt find anywhere for answer ?

  • You do not manage the switch CAM table, except that some switches may let you add static entries. Switches will automatically populate the CAM table from framers that pass through the switch. The source address of every frame passing through the switch is updated in the CAM table.. STP uses a link-only protocol, so the frames do not pass beyond the link, and there is no need to enter in the CAM table, We have already covered this. The switch interfaces are not destinations, so why would you place them in a CAM table that is used for destinations?
    – Ron Maupin
    May 20, 2021 at 14:40
  • @RonMaupin As you said "STP frames, do not pass beyond the link," , Switch 1 send BPDU just Switch 2 because they connect each other. So Switch 2 only have Switch1's BPDU. But Again it received this bpdu and it have Source Address. So did you mean that , the frames cames and it is BPDU frame so, dynamic Table doest save this packet's source address like a normal ethernet frame ?
    – mathco
    May 20, 2021 at 14:49
  • That source address will never be used as a destination address, so why does it need to be in a table used for destinations? What a particular switch model actually does depends on how the vendor designed it. You will need to provide a specific switch model to get an answer to what happens.
    – Ron Maupin
    May 20, 2021 at 14:52
  • You seem to keep fishing for a one-size-fits-all answer where one does not exist.
    – Ron Maupin
    May 20, 2021 at 14:53
  • @RonMaupin Could this be different for each switch? I am a new student starting this subject, excuse my question.
    – mathco
    May 20, 2021 at 15:02

2 Answers 2


If I understand correctly, you are looking for section 7.12.7 in 802.1D. Section 7.12.7 specifies that BPDUs (together with two other types of frames) are processed as if they were received by a separate entity, and are not subject to normal learning/forwarding rules.

Frames, with destination addresses in table 7.9 (which includes BPDU destination address) are sent directly to MAC service/LLC and do not go through normal relaying process.

It seems to me that 802.1W does not overwrite this paragraph, although you should verify this. There is a comment, referencing similar entry in 802.1Q.

enter image description here

  • 1
    Clause 7.12.7 refers to the xSTP, GARP and management functions being treated like if they were external to the switch (or like they were attached to some internal bridge port). The frames addressed to these functions aren't forwarded externally, but the clause doesn't say anything about learning or not learning the source addresses. A switch might skip learning source addresses from these non-traffic frames but then again, it might not.
    – Zac67
    Oct 17, 2021 at 18:31
  • is xSTP not STP?
    – Effie
    Oct 17, 2021 at 18:33
  • I use xSTP for STP, RSTP, MSTP interchangeably.
    – Zac67
    Oct 17, 2021 at 18:34
  • 2
    The more up-to-date 802.1Q is a bit more detailed (see clause 8.2) and includes the learning function in the "MAC Relay Entity". That would actually preclude MAC learning for BPDUs.
    – Zac67
    Oct 17, 2021 at 18:40
  • i think 802.1D 7.4. or 7.7 put forwarding function there. do you mind adding clause 8.2 to the answer, i cba looking for another ethernet standard today :X
    – Effie
    Oct 17, 2021 at 18:50

A switch learns MAC-to-port associations by inspecting each frame's source MAC address. Then it forwards frames based in the learned source address table by their destination address.

Whether the frames are xSTP BPDUs or not doesn't matter. A BPDU is the payload of an Ethernet LLC frame with 0x42 SAPs and a multicast/group destination address of 01:80:c2:00:00:00. The source address is one that the source switch uses - either the plain base address or base address + port index.

EDIT As @Effie has pointed out, IEEE 802.1 does make a distinction between normal traffic frames and frames addressed to one of a switch's STP, GARP, or management 'higher-layer entities'. The most current IEEE 802.1Q-2018 locates source MAC learning within the MAC Relay Entity (see clause 8.2 Bridge architecture) - outside the higher-layer entities.

It's up to the switch vendor to provide unique MAC addresses and to ensure that there's no address collision. That is, a switch using multiple source addresses (for RSTP/MSTP, SVIs, ...) needs to be allocated the full range. E.g. a 48-port switch might be allocated xx:xx:xx:00:00:00 to xx:xx:xx:00:00:3f and the next one in line xx:xx:xx:00:00:40 to xx:xx:xx:00:00:7f.

Of course, each MAC address needs to be unique at least within the local segment.

It's definitely not up to the neighbor switches to decide which source addresses should be entered into their own source address table and which shouldn't - they all are.

  • Thanks for your comment, is there a resource or a document about the specific spacing of these MAC addresses? Technically, I want to learn about this topic?
    – mathco
    May 20, 2021 at 14:55
  • @mathco, how it is done is up to each manufacturer. For example, Cisco sets aside 1024 MAC addresses in each switch to be used for interfaces (both physical and virtual). Other vendors do it differently.
    – Ron Maupin
    May 20, 2021 at 15:10
  • @mathco The only requirement is that the manufacturer ensures uniqueness for all used addresses as detailed in IEEE 802 Clause 8.
    – Zac67
    May 20, 2021 at 16:36
  • The Destination address for BPDU is a multicast MAC and it's programmed into the switch, so there is no need for the switch to store source address off of the BPDU in CAM.
    – Rais
    May 20, 2021 at 17:32
  • @rais That's right, there's no need. However, source address parsing and CAM population is likely done in hardware, before the software gets to parse the BPDU. Should the software delete the CAM entry? It might be in use for other traffic than BPDUs. Where's the problem feeding it to the CAM? There are at least 16K entries there and wasting a small handful doesn't hurt anyone. Of course, a switch designer might well choose to implement something to actually exempt those frames from learning - do you really care?
    – Zac67
    May 20, 2021 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.