Do you have a question? Post it now! No Registration Necessary
Subject
- Posted on
Spanning-tree Protocol implementation
- 11-20-2009
November 20, 2009, 1:23 am

Hello
Linux kernel has its own implementation of the spanning tree, it comes along
with the bridge functionallity. Many Layer2 switch vendors ship their SDK
(full sources, inlcuding Linux kernel), implementing VLAN, ACL etc.
functions as well as STP.
What is the point of doing this? Is Linux's STP implementation not entirely
802.1d compliant, or not scalable? Or is it a specifics of the Linux'
networking stack architecture?
Thanks.
Linux kernel has its own implementation of the spanning tree, it comes along
with the bridge functionallity. Many Layer2 switch vendors ship their SDK
(full sources, inlcuding Linux kernel), implementing VLAN, ACL etc.
functions as well as STP.
What is the point of doing this? Is Linux's STP implementation not entirely
802.1d compliant, or not scalable? Or is it a specifics of the Linux'
networking stack architecture?
Thanks.
--
Mark
Mark

Re: Spanning-tree Protocol implementation

Their STP implementation has to hook in with their hardware
acceleration. The Linux STP implementation is designed to bridge
network interfaces. A typical switch STP implementation bridges switch
ports which normally don't present as network interfaces to the OS.
For example, when a packet arrives on a network interface, typically
the network interfaces passes it to the operating system. But a switch
will often only present a single network interface to the operating
system. So how would the OSes STP implementation know which port an
STP packet was received on unless there was some custom logic to
interface with the switch ASIC?
So the short answer is that the two implementations are adopted to
completely different purposes. However, you can fairly trivially turn
one into the other. All you need is a special hook to tell the switch
ASIC to pass all STP packets to the OS along with an identifier of
which port they were received on and a special hook to allow the OS to
control which switch ports are in forwarding states and which are in
blocked states (often on a per-VLAN basis on both counts).
DS
Site Timeline
- » RS485 issue on Linux
- — Next thread in » Embedded Linux
-
- » CONFIG_HZ_1000 vs. CONFIG_HZ_250
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » Rules
- — The site's Newest Thread. Posted in » Microcontrollers (Russian)
-