does RB5009UG support MSTP protocol?

i cant find relevent infomation in user manual
https://help.mikrotik.com/docs/spaces/UM/pages/78086262/RB5009UG+S+IN

what about other L2 protocol such as LLDP or LACP?

Check generic ROS pages for MSTP, LLDP, LACP.

Apart from switching features, most things are common in ROS.
If not in HW, at least via SW.

On the bridge interface ( its in RoS, not hardware specific ) is the STP tab.

Check out protocol mode here and scroll down to read about bridge Spanning Tree Protocol —> https://help.mikrotik.com/docs/spaces/ROS/pages/328068/Bridging+and+Switching

Check out general spanning tree protocol page → https://help.mikrotik.com/docs/spaces/ROS/pages/21725254/Spanning+Tree+Protocol

ex of bridge confg:
..
Screenshot 2024-11-08 102050.png

this info also can be useful

https://help.mikrotik.com/docs/spaces/ROS/pages/328068/Bridging+and+Switching#BridgingandSwitching-BridgeHardwareOffloading

Thank you all !
actrually , I wonder how CPU get the source port index from the packet in etherent routers so that L2 protocols such as STP LLDP LACP can be supported。

for example , let’s look at the block diagram of RB5009UG

some switch chip will insert “cpu tag” where the source port information can be inserted into the frame forworded to cpu, some chip won’t .