From owner-freebsd-questions@FreeBSD.ORG Sat Dec 20 19:41:59 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BF681065673 for ; Sat, 20 Dec 2008 19:41:59 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail5.sea5.speakeasy.net (mail5.sea5.speakeasy.net [69.17.117.7]) by mx1.freebsd.org (Postfix) with ESMTP id 31F158FC0C for ; Sat, 20 Dec 2008 19:41:59 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 13355 invoked from network); 20 Dec 2008 19:41:20 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail5.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 20 Dec 2008 19:41:20 -0000 Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.6]) by be-well.ilk.org (Postfix) with ESMTP id 3CA8C50820; Sat, 20 Dec 2008 14:41:17 -0500 (EST) Received: by lowell-desk.lan (Postfix, from userid 1147) id E2B1E1D051; Sat, 20 Dec 2008 14:41:15 -0500 (EST) To: martes@mgwigglesworth.com References: <1229788709.1583.16.camel@MGW_1> From: Lowell Gilbert Date: Sat, 20 Dec 2008 14:41:15 -0500 In-Reply-To: <1229788709.1583.16.camel@MGW_1> (Martes G. Wigglesworth's message of "Sat\, 20 Dec 2008 10\:58\:29 -0500") Message-ID: <44iqpezlb8.fsf@lowell-desk.lan> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: Network Stack Code Re-write (Possible motivations...?) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Dec 2008 19:41:59 -0000 Martes G Wigglesworth 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 software. 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 far. 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. Be well. -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/