[quagga-dev 9968] Re: [PATCH 7/7] zebra: add module to communicate routes to FPM

Avneesh Sachdev avneesh at opensourcerouting.org
Tue Nov 6 18:17:48 GMT 2012


On Thu, Nov 1, 2012 at 11:58 PM, Scott Feldman
<sfeldma at cumulusnetworks.com>wrote:

>
> On Oct 22, 2012, at 11:22 PM, Avneesh Sachdev wrote:
>
> > +/*
> > + * show_zebra_fpm_stats
> > + */
> > +DEFUN (show_zebra_fpm_stats,
> > +       show_zebra_fpm_stats_cmd,
> > +       "show zebra fpm stats",
> > +       SHOW_STR
> > +       "Zebra information\n"
> > +       "Forwarding Path Manager information\n"
> > +       "Statistics\n")
>
> Missing a patch to doc/ for all the new DEFUN cmds added, and FPM in
> general.  It is nice to keep the documentation up-to-date.
>

Attached, comments welcome.

Thanks,
Avneesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20121106/3583d71b/attachment-0001.html>
-------------- next part --------------
From b370893d376529435a67ef320a300dd76d76c7ae Mon Sep 17 00:00:00 2001
From: Avneesh Sachdev <avneesh at opensourcerouting.org>
Date: Mon, 5 Nov 2012 19:05:28 -0800
Subject: [PATCH] doc: add blurbs on zebra FPM interface and commands

Update documentation with some text on the zebra interface to the
optional Forwarding Path Manager component, and the related cli
commands.
---
 doc/main.texi |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/doc/main.texi b/doc/main.texi
index a575913..a6bf0d1 100644
--- a/doc/main.texi
+++ b/doc/main.texi
@@ -11,6 +11,7 @@ different routing protocols.
 * Interface Commands::          Commands for zebra interfaces
 * Static Route Commands::       Commands for adding static routes
 * zebra Route Filtering::       Commands for zebra route filtering
+* zebra FIB push interface::    Interface to optional FPM component
 * zebra Terminal Mode Commands::  Commands for zebra's VTY
 @end menu
 
@@ -227,6 +228,54 @@ ip protocol rip route-map RM1
 @end group
 @end example
 
+ at node zebra FIB push interface
+ at section zebra FIB push interface
+
+Zebra supports a 'FIB push' interface that allows an external
+component to learn the forwarding information computed by the Quagga
+routing suite.
+
+In Quagga, the Routing Information Base (RIB) resides inside
+zebra. Routing protocols communicate their best routes to zebra, and
+zebra computes the best route across protocols for each prefix. This
+latter information makes up the Forwarding Information Base
+(FIB). Zebra feeds the FIB to the kernel, which allows the IP stack in
+the kernel to forward packets according to the routes computed by
+Quagga. The kernel FIB is updated in an OS-specific way. For example,
+the @code{netlink} interface is used on Linux, and route sockets are
+used on FreeBSD.
+
+The FIB push interface aims to provide a cross-platform mechanism to
+support scenarios where the router has a forwarding path that is
+distinct from the kernel, commonly a hardware-based fast path. In
+these cases, the FIB needs to be maintained reliably in the fast path
+as well. We refer to the component that programs the forwarding plane
+(directly or indirectly) as the Forwarding Plane Manager or FPM.
+
+The FIB push interface comprises of a TCP connection between zebra and
+the FPM. The connection is initiated by zebra -- that is, the FPM acts
+as the TCP server.
+
+The relevant zebra code kicks in when zebra is configured with the
+ at code{--enable-fpm} flag. Zebra periodically attempts to connect to
+the well-known FPM port. Once the connection is up, zebra starts
+sending messages containing routes over the socket to the FPM. Zebra
+sends a complete copy of the forwarding table to the FPM, including
+routes that it may have picked up from the kernel. The existing
+interaction of zebra with the kernel remains unchanged -- that is, the
+kernel continues to receive FIB updates as before.
+
+The format of the messages exchanged with the FPM is defined by the
+file @file{fpm/fpm.h} in the quagga tree.
+
+The zebra FPM interface uses replace semantics. That is, if a 'route
+add' message for a prefix is followed by another 'route add' message,
+the information in the second message is complete by itself, and
+replaces the information sent in the first message.
+
+If the connection to the FPM goes down for some reason, zebra sends
+the FPM a complete copy of the forwarding table(s) when it reconnects.
+
 @node zebra Terminal Mode Commands
 @section zebra Terminal Mode Commands
 
@@ -271,3 +320,13 @@ If so, the box can't work as a router.
 @deffn Command {show ipv6forward} {}
 Display whether the host's IP v6 forwarding is enabled or not.
 @end deffn
+
+ at deffn Command {show zebra fpm stats} {}
+Display statistics related to the zebra code that interacts with the
+optional Forwarding Plane Manager (FPM) component.
+ at end deffn
+
+ at deffn Command {clear zebra fpm stats} {}
+Reset statistics related to the zebra code that interacts with the
+optional Forwarding Plane Manager (FPM) component.
+ at end deffn
-- 
1.7.9.5


More information about the Quagga-dev mailing list