⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fea.tex

📁 xorp源码hg
💻 TEX
📖 第 1 页 / 共 2 页
字号:
for one entity to manipulate an interface configuration tree and passit to another entity which can immediately determine the changes fromthe state labels.The interface management functionality of the FEA is represented bythree interacting classes: {\tt IfConfig}, {\tt InterfaceManager},{\tt InterfaceTransactionManager}.  The interaction of these classesis managed by the {\tt XrlInterfaceManager}, which takes external XRLrequests and maps them onto the appropriate operations.  Theinteractions between these classes and related classes are shown inFigure~\ref{fig:ifi}. The {\tt XrlInterfaceManager} is sufficientlyaware of the semantics of the operations to pass back human parseableerror messages when operations fail.The {\tt IfConfig} class is an interface configurator, and containsplug-ins for each supported forwarding plane architecture toaccess, set, or monitor the interface-related information.The functionality of the {\tt IfConfig} is conceptually simple: it canpush-down an {\tt IfTree} to the forwarding plane or pull-up the liveconfiguration state from the forwarding plane as an {\tt IfTree}.The {\tt InterfaceManager} class contains the {\tt IfTree}representing the live configuration, and a reference to the {\ttIfConfig} that should be used to perform the configuration.  The {\ttInterfaceTransactionManager} class holds and dispatches transactions.Each operation within a transaction operates on an item within a {\ttIfTree} structure.  Each transaction operates on a copy of the live{\tt IfTree} and when the commit is made, this structure is pusheddown into the {\tt IfConfig}.The process of configuration is asynchronous, and two phase.  Errorscan occur whilst a transaction is being committed and operating on an{\tt Iftree} (\eg because of a bad operation within a transaction), anderrors can occur when the configuration is pushed down to theforwarding plane (\eg the configuration has an inconsistent number ofinterfaces).  Errors in the first phase are reported by the {\ttInterfaceTransactionManager}.  Errors in the second phase are reportedby the {\tt IfConfig} through a helper class derived from {\ttIfConfigErrorReporterBase}.The interface management role of the FEA is expected to reportconfiguration changes to other XORP processes.  Hence,the {\tt IfConfig} class uses the {\tt XrlIfConfigUpdateReporter}class to report configuration changes.\clearpage\begin{figure}[htbp]  \begin{center}    \includegraphics[angle=90,height=0.90\textheight]{figs/ifi}    \caption{FEA Interface Management classes and their interactions}    \label{fig:ifi}  \end{center}\end{figure}\clearpage%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{Forwarding Table Management}The Forwarding Table Management role propagates routes into theforwarding plane.  The Forwarding Table Management role does notshadow the forwarding information outside of the forwarding planeitself; rather, it relies on the RIB to do this.  As a result, it isconsiderably simpler than the Interface Management role.The classes interacting to provide the Forward Table Management roleare: the {\tt XrlFtiTransactionManager} class, a class that adaptsrequests and responses from the subset of {\tt XrlFeaTarget} methodsthat represent the forwarding table management externally; the {\ttFtiTransactionManager} that builds and executes transactions toconfigure the forwarding table; and class {\tt Fti} that understandshow to program the forwarding plane.The {\tt Fti} class provides the interface for accessing theforwarding plane.  It includes methods for adding andremoving routes, as well as resolving routes in the forwarding table.Modifications to the {\tt Fti} state are only permitted during aconfiguration interval.  The configuration interval is started andstopped using {\tt Fti::start\_configuration} and {\ttFti:end\_configuration}.  The particular access to the forwardingplane is performed by plug-ins that are specific to thatplane. For example, to read the forwarding table currently there areplug-ins that utilize the sysctl(3) mechanism (\eg in case of FreeBSD)or the netlink mechanism (\eg in case of Linux). There areplug-ins to read, set or monitor the forwarding table informationat the granularity of one entry, or the whole table.The {\tt FtiTransactionManager} presents a transactional interface forconfiguring the {\tt Fti} instance.  Command classes exist for eachpossible modifier operation on the {\tt Fti} instance.  The {\tt Fti}methods {\tt start\_configuration} and {\tt end\_configuration} arecalled at the start and end of the transaction.Note that the XRL interface for adding/deleting routes is{\tt redist\_transaction\{4,6\}} which is a generic XRL interfaceused by the RIB to redistribute routes to interested parties.The Forwarding Table Management also provides interface forprocesses to register interest in receiving updates wheneverthe Forwarding Information Base changes. The FEA is observingall FIB changes within the underlying system (including those triggeredby the FIB manipulation by the FEA itself). Those changes are propagatedto all instances of the {\tt FibClient} class (implemented within the{\tt XrlFtiTransactionManager} class).%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{Raw Packet I/O}\label{sec:design:raw_packet_io}The Raw Packet I/O role of the FEA provides a means forXORP processes to send and receive raw packets on particular interfaces.This is an essential function since in a XORP router the forwardingplane may reside on a different machine to the routing processes, itmay be distributed across several machines, or may have custom networkinterfaces that require special programming.The FEA supports both IPv4 and IPv6 raw packets.The text below describes the IPv4 implementation and the IPv4-specificclasses; the IPv6 implementation is similar except the class namescontain {\tt 6} instead of {\tt 4}.The raw packet interface is managed by the {\tt XrlRawSocket4Manager}class.  This manages a single instance of a {\ttFilterRawSocket4}\footnote{The current implementation only works onsingle machine XORP forwarding planes}.  The {\tt FilterRawSocket4}encapsulates a raw socket and allows raw IPv4 packets to be writtenand filters attached to parse raw packets as they are received.  The{\tt XrlRawSocket4Manager} allows an arbitrary number of filters to beassociated with the active raw socket.  The filters are each notifiedwhen a raw packet is received on the raw socket.  TheXrlRawSocket4Manager allows other XORP processes to receive packetsvia XRL on the basis on filter conditions.  Currently (August 2006),the only implemented filter is the {\tt XrlVifInputFilter} whichallows processes to receive raw packets on the basis of the receivingVIF.  In principle, filters could be written to match on any fieldwithin a packet and perform an action.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{TCP/UDP Socket I/O}Similar to the Raw Packet I/O (seeSection~\ref{sec:design:raw_packet_io}), the FEA provides a means forXORP processes to perform TCP or UDP socket operations and to send andreceive TCP/UDP packets.This is an essential function since in a XORP router the forwardingplane may reside on a different machine to the routing processes, itmay be distributed across several machines, or may have custom networkinterfaces that require special programming.The TCP/UDP socket interface is managed by the {\tt XrlSocketServer}class.  This manages TCP and UDP IPv4 and IPv6 sockets\footnote{Thecurrent implementation only works onsingle machine XORP forwarding planes}.  The {\tt XrlSocketServer}performs the particular TCP/UDP socket operations on the underlyingsystem (opening and closing a socket, bind, send and receive, etc),and provides the XRL front-end interface. Note that for simplicitysome of the socket XRL interface combines several system socketoperations in one atomic FEA operation. For example, the {\tt  socket4/0.0/tcp\_open\_bind} XRL interface creates a TCP socket thatbinds it to a specific local address.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\section{Status}\label{sec:status}There are two versions of the FEA: {\tt fea} and {\tt fea\_dummy}.The {\tt fea} is a versionof the FEA that contains plug-ins to access the forwarding plane byusing the following mechanisms:\begin{itemize}  \item {\it getifaddrs(3)}, {\it sysctl(3)}, {\it ioctl(3)}, {\it Linux  netlink(7) sockets}, {\it Linux /proc} and {\it Windows IP Helper  API} to obtain interface-specific information.  \item {\it ioctl(3)}, {\it Linux netlink(7) sockets} and {\it Windows  IP Helper API} to set interface-specific information.  \item {\it BSD routing sockets} and {\it Linux netlink(7) sockets} for  observing changes in the interface-specific information.  \item {\it BSD routing sockets}, {\it Linux netlink(7) sockets} and  {\it Windows IP Helper API} to lookup a single forwarding entry in  the forwarding plane.  \item {\it sysctl(3)}, {\it Linux netlink(7) sockets} and {\it Windows  IP Helper API} to obtain the whole forwarding table from the  forwarding plane.  \item {\it BSD routing sockets}, {\it Linux netlink(7) sockets} and  {\it Windows IP Helper API} to set a single forwarding entry or the  whole table in the forwarding plane.  \item {\it BSD routing sockets} and {\it Linux netlink(7) sockets} to  observe changes in the forwarding table.\end{itemize}In other words, currently (March 2007) the {\tt fea} supports DragonFlyBSD,FreeBSD, NetBSD, OpenBSD, MacOS X, Linux, and Windows Server 2003 (see file{\tt  \$XORP/BUILD\_NOTES} about the specific OS versions the FEA hasbeen tested on).In addition, there is also support for the Click forwarding plane(both kernel-space and user-space). The Click support utilizes theabove plug-in based architecture by providing the appropriate supportto add or delete routes for example to kernel or user-level Click.The {\tt fea\_dummy} is a substitute FEA and may beused for development testing purposes.  The {\tt fea\_dummy}represents an idealized form of FEA, other FEA's may differ in theirresponses due to architectural differences.  Therefore processes thatinteract with the FEA should regard {\tt fea\_dummy} interactions asindicative, but not definitive.The FEA's are still a work in progress and no doubt have some bugs.Any contributions or bug fixes are welcome.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     APPENDIX%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\appendix\section{Modification History}\begin{itemize}  \item December 11, 2002: Initial version 0.1 completed.  \item March 10, 2003: Minor changes.  Updated the version to 0.2, and the date.  \item June 9, 2003: Updated to match XORP release 0.3: changes related  to the MFEA->FEA merging.  \item August 28, 2003: Updated to match XORP release 0.4: added ``Linux  /proc'' to the list of implemented mechanisms for reading network interface  information.  \item November 6, 2003: Updated to match XORP release 0.5: updated the FEA  status.  \item July 8, 2004: Updated to match XORP release 1.0: now there is  support for TCP/UDP socket I/O interface, support for libfeaclient XRL  interface, and support for FIB observer interface.  \item April 13, 2005: Updated to match XORP release 1.1: updated the status  for the raw sockets interface and for Click.  \item March 8, 2006: Updated to match XORP release 1.2: now the FEA supports  Windows Server 2003, and the raw sockets interface is in use.  \item August 2, 2006: Updated to match XORP release 1.3: added DragonFlyBSD  to the list of supported OS-es.  Added ``Modification History'' appendix.  \item March 20, 2007: Updated the version to 1.4, and the date.\end{itemize}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     BIBLIOGRAPHY%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\bibliography{../tex/xorp}\bibliographystyle{plain}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\end{document}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -