📄 fea.tex
字号:
%% $XORP: xorp/docs/fea/fea.tex,v 1.9 2003/11/06 23:38:10 hodson Exp $%\documentclass[11pt]{article}%\usepackage[dvips]{changebar}\usepackage{subfigure}\usepackage{fullpage}\usepackage{setspace}\usepackage{times}\usepackage{latexsym}\usepackage{psfig}\usepackage{graphicx}\usepackage{xspace}\usepackage{color}\usepackage{amsmath}%\usepackage[dvipdf]{graphics}%\usepackage[dvips]{graphicx}%\usepackage{xorp}\definecolor{gray}{rgb}{0.5,0.5,0.5}\newcommand{\etc}{\emph{etc.}\xspace}\newcommand{\ie}{\emph{i.e.,}\xspace}\newcommand{\eg}{\emph{e.g.,}\xspace}%\newcommand{\comment}[1]{{\color{gray}[\textsf{#1}]}}\newcommand{\comment}[1]{}% Changebar stuff% \newenvironment{colorcode}{\color{blue}}{}% \renewcommand{\cbstart}{\begin{colorcode}}% \renewcommand{\cbend}{\end{colorcode}}% \pagestyle{empty}\begin{document}\title{XORP Forwarding Engine Abstraction \\\vspace{1ex}Version 0.5}\author{ XORP Project \\ International Computer Science Institute \\ Berkeley, CA 94704, USA \\ {\it feedback@xorp.org}}\date{November 6, 2003}\maketitle\thispagestyle{empty}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\section{Introduction}\label{sec:introduction}The role of the Forwarding Engine Abstraction (FEA) in XORP is toprovide a uniform interface to the underlying forwarding engine. Itshields XORP processes from concerns over variations betweenplatforms. As a result, XORP processes need not be concerned whetherthe router is comprised of a single machine, or cluster of machines;or whether the network interfaces are simple, like a PCI Ethernetadapter, or are smart and have processing resources, like an Intel IXPcards.The FEA performs three distinct roles: \emph{interface management},\emph{forwarding table management}, and \emph{interface specificpacket I/O}. Those are described briefly inSection~\ref{sec:introduction:interface_management},Section~\ref{sec:introduction:forwarding_table_management},and Section~\ref{sec:introduction:interface_specific_packet_io}respectively.Section~\ref{sec:design_and_implementation} presentsthe design and implementation of the FEA components.FEA status summary is in Section~\ref{sec:status}.In a standard XORP system, the Multicast Forwarding Engine Abstraction(MFEA) is part of the FEA. The MFEA is conceptually distinct fromFEA, but in practice requires access to similar data as the FEA.Combining the MFEA with the FEA reduces the load on system. Forinformation about the MFEA architecture, see \cite{xorp:mfea}.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{Interface Management}\label{sec:introduction:interface_management}In the normal course of interaction, the RouterManager process is theprincipal source of interface configuration requests to the FEA. TheRouterManager constructs the interface configuration from the routerconfiguration files and the input it receives at the command line.The type of requests the RouterManager sends to the FEA are to enableinterfaces, create virtual interfaces, set interface MTU's, and soforth. The FEA interprets and executes these requests in a mannerappropriate for the underlying forwarding plane.Processes can register with the FEA to be notified of changes ininterface configuration. The registered processes are notified ofchanges, and may query the FEA on the receipt of an update notificationto determine the change that occurred. These notifications areprimarily of interest to routing protocols since these need to knowwhat the state of each interface is at a given time.\begin{figure}[htbp] \begin{center} \includegraphics[width=0.80\textwidth]{figs/ifmgmt} \caption{FEA Interface Management interaction with other XORP processes} \label{fig:ifmgmt} \end{center}\end{figure}Both of the above interactions are depicted in Figure~\ref{fig:ifmgmt}.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{Forwarding Table Management}\label{sec:introduction:forwarding_table_management}The FEA primarily receives forwarding table configuration information from theRIB process. The RIB arbitrates between the routes proposed by thedifferent routing processes, and propagates the results into the FEA'sforwarding table interface. The FEA accepts requests to insert andremove routing entries and propagates the necessary changes into theforwarding plane. The FEA also supports queries on the currentcontents of the forwarding table.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{Interface Specific Packet I/O}\label{sec:introduction:interface_specific_packet_io}Routing protocols, such as OSPF, need to be able to send and receivepackets on specific interfaces in the forwarding plane in order toexchange routing information and to determine the liveness ofconnected paths. Since the forwarding plane may be distributed acrossmultiple machines, these routing protocols delegate the I/O operationson these packets to the FEA. The FEA supports sending and receivingraw and UDP~\footnote{Currently (November 2003), UDP supportis not present.} packets on specific interfaces. The transmission ofpackets through the FEA is straightforward, the routing process simplyhands the FEA a packet and indicates which interface it should be senton. The reception of packets is handled through a register-notifyinterface where the routing process registers which types of packetson which interfaces it is interested.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\section{Design and Implementation}\label{sec:design_and_implementation}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{Overview}The FEA fulfills three discrete roles: Interface Management, ForwardingTable Management, and Interface Specific Packet I/O. The InterfaceManagement and Forwarding Table Management roles follow a similardesign pattern since both relate to the setting and getting ofconfiguration state. The Interface Specific Packet I/O has little incommon with the other two roles. The Interface Management and Forwarding Table Management roles usetransactions for setting configuration state. The transactions are acollection of grouped operations that are queued until committed oraborted. Transactions provide atomic updates to the forwarding plane,which has the virtue of ensuring a consistent state at any particularinstant of time. In addition, forwarding plane updates may incur perupdate costs, and grouping operations may help to reducethese. Queries of the configuration state happen on the immediatestate, and are independent of any transactions that are in progress.The FEA, as with other XORP processes, uses the XRL mechanism forinter-process communication and each role of the FEA is represented bya distinct XRL interface. The Interface Management and InterfaceSpecific Packet I/O roles support the notion of clients that notifiedwhen event occur and client processes are expected to implement knowninterfaces. The FEA XRL and FEA XRL client interfaces are shown inTable~\ref{tbl:xifs}.\begin{table}[h]\begin{center}\begin{tabular}{|l|l|l|}\hlineRole & XRL Interface file & Client XRL Interface\\ \hline\hlineInterface Management & fea\_ifmgr.xif & fea\_ifmgr\_client.xif\\Forwarding Table Management & fti.xif & \\Interface Specific Packet I/O & fea\_rawpkt.xif & fea\_rawpkt\_client.xif\\ \hline\end{tabular}\caption{FEA XRL Interfaces (defined in {\tt \$XORP/xrl/target/fea.tgt})}\label{tbl:xifs}\end{center}\end{table}The XRL handling code is found in {\tt\$XORP/fea/xrl\_target.\{hh,cc\}}. Each XRL interface is handled byan XRL-aware helper class. The helper class understands the semanticsof the implementation, and maps errors and responses to the appropriateXRL forms. The helper classes and their relations to the interfacesare depicted in Figure~\ref{fig:xrl_ifs}.\clearpage\begin{figure}[htbp] \begin{center} \includegraphics[angle=90,height=0.90\textheight]{figs/xrl_ifs} \caption{XRL Interfaces in relation to FEA classes} \label{fig:xrl_ifs} \end{center}\end{figure}\clearpage%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{Interface Management}To succinctly explain the interface management classes and how theyinteract we first describe the representation of interfaceconfiguration state. Interface configuration state is held within{\tt IfTree} class. The {\tt IfTree} structure is used and
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -