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

📄 xorp.tex

📁 BCAST Implementation for NS2
💻 TEX
📖 第 1 页 / 共 2 页
字号:
programmer's job harder at first, it is essential for robustness thatthe programmer is made aware that the failure modes of IPC are different from those ofa local procedure call.  To help the programmer and improve performance, an IDL and a stubgenerator exist, so most XRL clients never need to parse the humanreadable form.The original motivation for XRLs was to encapsulate existingprotocols within our consistent IPC framework.   For example, wemight wish to run third-party software that uses SNMPv3 forconfiguration. To integrate this software into our XRL-based management framework, wemight write an SNMP `protocol family' for the XRL client library.Then XORP processes could transparently interoperate with the third-partysoftware via XRLs that start with `\xrl{snmp:}'.XRLs are general enough to encompass simplecommunication with the kernel via \texttt{ioctl}s, and even signalingvia \texttt{kill()}.  At the present time, we have not had a need toadd this functionality, but should the need arise, our architecturewould support it.  The current XRL library supportsXORP-specific protocols for remote procedure call, one layered overTCP and the other over UDP, and a local procedure call mechanism forintra-process communication.\subsubsection{XRL Example: Command-line Interface}One of the biggest issues faced by an {extensible} router is the integration of separately maintained components into a coherentsystem.  Consider the interaction between management mechanisms suchas a command-line interface (CLI) and a new routing protocol.  Theauthor of each of the management processes has no knowledge of futurerouting protocols.  At the same time, the author of each routingprotocol has no knowledge of future management mechanisms. Oursolution is for all management, including initial configuration, totake place using XRLs.  To add support for a specific managementmechanism, such as SNMP or a command-line interface, the protocolimplementor writes simple text files that map management requests toXRL calls.  These thin mapping files are easy enough to write thatthird parties might add them as new management interfaces becomeavailable.To get more concrete, our configuration manager has a strict hierarchyof configuration parameters, which is directly reflected in ourdefault CLI.  A fragment of a router configuration file might looklike:\begin{quotation}\noindent \sf \small protocols ospf \{\\\parindent 10pt \indent     router-id: 128.16.64.1\\\indent     area 128.16.0.1 \{\\\\parindent 20pt \indent       interface xl0 \{\\\parindent 30pt \indent         hello-interval: 30\\\parindent 20pt \indent       \}\\\parindent 10pt \indent     \}\\\}\end{quotation}The configuration manager takes a directory of template files, whichdefine the possible configurable parameters for each XORP routingprotocol, and generates mappings of configuration parameters to XRLdispatches.  The designer of a new routing protocol can simply add atemplate file specifying the new functionality provided.  Thus, thetemplate entry for OSPF might contain the fragment:\begin{quotation}\noindent \sf \small hello-interval: uint \{ \\\parindent 10pt \indent \%set: xrl ``ospf/ospf/1.0/set\_hello\_interval?\\\parindent 60pt \indent if:txt=\$(IFNAME)\&interval:i32=\$(VALUE)'';\\\parindent 10pt \indent \%get: xrl ``ospf/ospf/1.0/hello\_interval?if:txt\\\parindent 60pt \indent -$>$ interval:i32'';\\\}\end{quotation}The configuration manager can read the template file, discover the newfunctionality, and know how to communicate with the process to use it.The new functionality is then immediately available through the CLI.\subsection{Performance}Simultaneouly satisfying the three goals of extensibility,performance, and robustness without compromise is probably notpossible. Different parts of XORP have different priorities.User-level XORP does not need particularly performance-consciousdesign.  Route updates can arrive at high rates, but nowhere near therates of packet arrival.  It is well within the capabilities of adesktop PC to handle the volume of data and computation required forunicast routing. (The main issues here are of the computationalcomplexity of the protocol implementations.)  At user-level, ourpriorities are extensibility and robustness.The forwarding path, however, must touch every packet and performanceis paramount.  Initially we have focused on a PC-based hardwareplatform as this allows for easy testing and early deployment, butgreat care is being taken to design a modular forwarding patharchitecture which can support some or all of the forwarding functionshappening in hardware.  For our own work, the preferred forwardingpath is based on the Click modular router~\cite{click}.  Clickprovides a high-performance forwarding path in the kernel, running on commodity hardware, andallows for run-time extensions and reconfiguration.  Click'smodularity allows for many divisions of work between software andhardware.  If researchers or developers decide they want to augmentXORP with network processors\footnote{Network processors~\cite{ixp1200} are interfacecards containing a number of high-speed network interfaces, typicallytogether with a processor and some specialized programmable hardwarefor performing forwarding.  Typically the network processor canperform simple forwarding very well, but more complex functionalityneeds to be off-loaded to be handled by software running on the hostprocessor~\cite{scoutixp}.} or special-purpose hardware~\cite{fpx}, this willbe an advantage.Click forwarding paths are extensible in two key ways:\begin{itemize}\vspace{-0.07in}\item Existing defined elements can by interposed into a forwardingpath to add new functionality.\vspace{-0.07in}\item New Click elements can be created, loaded as kernel modules, andthen plumbed in to the forwarding path.\vspace{-0.07in}\end{itemize}In the context of XORP, this extensibility can aid performance.For example, a network administrator can ensure that only a small subset oftraffic goes through a possibly-slow extension, by defininga new special-purpose classifier that matches extension traffic and inserting it intothe relevant place in the forwarding path.% When we need to use hardware assistance to improve performance, Click% should aid the integration of such hardware.  It is a fairly natural% process whereby some parts of the forwarding path are performed in% what to other Click elements look like just another element, but in% fact are a shim to special purpose hardware.  However our initial% implementation does not target advanced platforms due to our limited% resources.\subsection{Robustness}The routing and coordination processes in XORP run in user space on atraditional UNIX operating system.  Routing processes are protectedfrom each other and can have their resources constrained according toadministrative preference.  Furthermore, routing processes can crashwithout affecting the kernel, forwarding plane, or each other.  And ifa routing protocol does crash, the RIB will remove its routesfrom the forwarding engine, and optionally inform the re-startingrouting process of the routes it previously held.Multiple processes are used in Zebra~\cite{zebra} and Cisco's proposed ENArouter operating system, but not by some of the largercommercial vendors today.A significant aspect of robustness is security.  One benefit ofbeing forwarding-path agnostic is that we can abstractprivileged operations, such as sending on a raw socket, intothe FEA via XRLs.  This allows us to run many routing protocolsin a sandbox. They have no interaction with the outside world exceptthrough XRLs and packets, and so an exploitable vulnerability in a routingprotocol is far more difficult to escalate into full control of therouter.Robustness in the forwarding path is also important, but solutionssuch as memory protection that work well in user-space are notacceptable.  In the Click forwarding path robustness comes from thegranularity and simplicity of Click's components.  Each element issmall enough to be well understood and tested in isolation.  And sincemany of Click's components can be run and debugged in user-space,confidence about their robustness can be attained before being used inthe kernel.% \subsection{Leftover Crud}% The routing protocol needs to be able to send routes to the routing% information base (RIB), which coordinates route updates from different% routing protocols.  But it also may need access to routes from other% routing protocols.  For example BGP needs to know when an IGP route% changes, and PIM-SM needs to know how to get to the multicast source% or PIM RP router.  Most likely it needs this information to be% supplied to it asynchronously, as changes occur. To do this% efficiently in a multi-process environment requires careful design of% this API, so that the RIB client can register interest in an% appropriate granularity of information.% But perhaps most important factor is the design of the IPC mechanism% used.  This is illustrated by considering how a management process% such a command-line interface (CLI), embedded web server, or SNMP% might interact with the new routing protocol.  The author of each of% the management processes has no knowledge of future routing protocols.% At the same time, the author of each routing protocol has no knowledge% of future management mechanisms.  Thus it is not viable to build CLI,% web or SNMP support directly into a routing protocol.  The only really% viable solution is for the routing protocol to interact with the rest% of the router through the IPC mechanism, providing a control interface% that is relatively independent of who is doing the control.  How then% does the introduction of the new routing protocol cause the management% protocols to increase the functionality available to the user?  Our% solution to this problem is an IPC mechanism we call XORP Resource% Locations or XRLs.

⌨️ 快捷键说明

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