Network Stack Code Re-write (Possible motivations...?)
freebsd-questions-local at be-well.ilk.org
Sat Dec 20 19:41:59 UTC 2008
Martes G Wigglesworth <martes at mgwigglesworth.com> writes:
> I am attempting to research what is meant when, I saw that Juniper had
> re-written the network stack from the base freebsd network stack, to
> what is used in JUNOS. What exactly is meant by this? What is included
> in the network stack, when mentioned that it was completely re-written?
> I am a budding computer scientist, and would like to know where to start
> investigating how this would be done, and why they felt that the defacto
> network-centric OS for decades needed to be rewritten?
> Was this simply so they could rename the portions that they wrote as
> their own, in a business-savvy decision making process, or was it
> necessary from a technical standpoint?
I work for a different router manufacturer, so I have little knowledge
of Juniper internals, but I have had to worry about interoperability
issues, so I've worked with Juniper gear for testing. Also, my general
knowledge of similar issues on other routers is very likely to apply to
the tradeoffs that Juniper made in choosing and developing its stack
I very much doubt that marketing issues were a significant issue.
Off-the-shelf OS networking has always fallen short of supporting
high-end (or even, um, medium-end) hardware routing platforms. There is
reason to hope that this is changing, but it has always been the case so
As someone else already mentioned in this thread, supporting hardware
offload for forwarding is a major issue. Core routers (or even
provider-edge routers) depend on most of the packet forwarding being
done in proprietary hardware. Operating system IP stacks don't support
this very well; all of the routers I've worked on used the kernel IP
stack only for packets going to and from the kernel itself, and used a
different stack for what I call "transit" packets -- those that are
only being forwarded by the local system.
Another issue is router virtualization. Although FreeBSD has made some
recent progress in supporting multiple IP instances, none of this
capability was available when Juniper was deciding to base its operating
system on FreeBSD.
It is also important to note that having a rewritten IP stack doesn't
mean that a system isn't using the original IP stack as well. A number
of routers I've seen do this; they have thoroughly custom IP code for
doing routing, but the local OS kernel in the router still uses the
native stack for its own communications.
I apologize if this message isn't clear; I was avoiding any information
specific to the systems I currently work on, and I may have fuzzed
things out a bit too much.
Lowell Gilbert, embedded/networking software engineer, Boston area
More information about the freebsd-questions