📄 mfea_arch.tex
字号:
\item Interface to inform the multicast-related modules about the available virtual interfaces (\eg network interfaces, tunnels, etc.) on the system, and to inform them about any changes on those interfaces (\eg interface going DOWN, network address change, etc.). \item Interface to join or leave a multicast group. \item Interface to add/delete MFC entries, \ie entries to the multicast forwarding engine.\end{itemize}MfeaNode itself does not implement the mechanisms to communicate withthe multicast-related modules (\eg to send or receive control packetsto/from the PIM module). Those mechanisms are outside the scope ofMfeaNode, and must be implemented separately.MfeaNode contains several pure virtual methods (\eg\verb=dataflow_signal_send()= is used to send multicast dataflow-relatedsignals to a multicast-related module that is interested in trackingdataflow-related conditions)that must be implemented by a class that inherits MfeaNode.For example, XrlMfeaNode is a class that uses MfeaNode as a base class;XrlMfeaNode uses XRL-based communication mechanisms between MfeaNodeand other XORP components such as the PIM and MLD/IGMP modules.By default, MfeaNode is disabled; therefore, on startup it must beenabled explicitly.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{MfeaVif Description}MfeaVif is a MFEA-specific virtual (network) interface that is used to keepvarious state per interface. Typically, there would be oneMfeaVif per network interface such as physicalinterface, tunnel, or the loopback interface. In addition, there isone special MfeaVif: the PIM Register virtualinterface that is used for sending and receiving PIM Registerpackets~\footnote{In the future, the PIMRegister MfeaVif interface may not be part of the MFEA anymore, becauseit is strictly PIM-specific.}.One of the purposes of MfeaVif is to keep various information about eachnetwork interface available on the system: network and subnet address,is the interface up or multicast-capable, and so on. This information isobtained from the FEA (the only exception is the PIM Register vif whichis created internally by the MFEA), and is used by the MFEA to keeptrack of any changes to an interface (\eg an alias address has beenadded/deleted, etc). If there is a change to an interface, those changesare saved locally by the MFEA, and then the MFEA informs all protocolmodules that are registered by the MFEA.Another purpose of MfeaVif is to keep track of the multicast groups thathave been joined per interface. For example, if a multicast-relatedmodule that uses the MFEA joins a multicast group on an interface, theMFEA uses the appropriate system call to join the group on thespecified interface, and at the same time it would keep the appropriatestate on the corresponding MfeaVif. Thus, if another module joinsexactly same multicast group on that interface, but later one ofthose modules leaves that group, the MFEA would modify only the appropriatestate in MfeaVif, but will not use a system call to leave the multicastgroup on the interface.Typically, from developer's point of view, all interactions with MfeaVifwould be through MfeaNode~\footnote{For simplicity, currently(March 2007) there are few occasions when XrlMfeaNode uses direct access toMfeaVif.}.The public interface for MfeaVif contains the methods to manipulate avirtual (network) interface. Those methods are to start/stop/enable/disable avirtual interface, and to configure it. The methods are described inthe following files:\begin{itemize} \item \verb=mfea/mfea_vif.hh= \item \verb=libxorp/vif.hh= \item \verb=libproto/proto_unit.hh=\end{itemize}By default, each MfeaVif is disabled; therefore, on startup it must beenabled explicitly.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{MfeaConfig Description}MfeaConfig handles the MFEA-specific configuration~\footnote{Currently(March 2007), MfeaConfig is not implemented; rather, all state iskept inside MfeaNode instead.}. This configuration is used to configure thefollowing units:\begin{itemize} \item MfeaNode: how often to read the unicast forwarding table, default routing metrics and metric preferences to assign to each route, etc.\end{itemize}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{MfeaDft Description}Some protocols such as PIM-SM need the bandwidth of multicast data flowsto be monitored: if the bandwidth of a specific data flow (defined bya source and a group address) is above or below a pre-defined threshold(defined per data flow), the protocol should be informed. For example, if thebandwidth of a data flow is zero for some predefined amount of time, thecorresponding multicast routing entry in the multicast routing protocolmodule might be deleted (as well as the corresponding multicastforwarding entry in the multicast forwarding engine). Another example isthe Shortest-Path Tree switch in case of PIM-SM: the SPT switch istriggered if the bandwidth from a specific source is above apre-configured threshold.If the multicast forwarding engine in the underlying system doessupport bandwidth dataflow monitoring, then any addition ordeletion of a dataflow monitor to the MFEA translates to a system callto the underlying system, and the MFEA itself does not need to keep anystate. However, if the underlying system does not support bandwidthdataflow monitoring, then the MFEA needs to implement that on its own.In case of UNIX kernel for example, the kernel supports an ioctl()system call to obtain the number of octets and packets forwarded so far onan existing MFC entry. Thus, if the MFEA reads this information twice,it can compute the data bandwidth between the two readings.The purpose of the MfeaDft table is to keep state about the dataflows theMFEA is monitoring (only in the case the underlyingsystem does not support bandwidth dataflow monitoring). For each entryin MfeaDft, the MFEA periodically reads the bandwidth forwardingstatistics from the underlying system. If the forwarded bandwidthsatisfies the pre-defined condition for that dataflow, the MFEAoriginates a dataflow signal to the module that has installed thatdataflow monitoring entry. This signal is delivered every time thepre-defined condition is true (until the entry is explicitly deleted bythe module that installed it).%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{ProtoComm Description}ProtoComm is a per-protocol unit for communication with theunderlying system.ProtoComm implements various methods that use the appropriate systemcalls to open or close a socket per protocol, to send or receiveprotocol packets, to join or leave a multicast group (per protocol perinterface), and so on. Typically, there is a single ProtoComm entry perprotocol; \eg one ProtoComm for PIM, another one for IGMP (or MLD incase of IPv6), etc. When a protocol module registers a network protocolwith MFEA, the corresponding ProtoComm for that protocol is created (ifit did not exist).Each ProtoComm entry is also used to keep information about variousprotocol preferences: \eg whether a protocol module instance is interested inreceiving various kernel upcall signals, etc.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{MfeaMrouter Description}MfeaMrouter is an unit used for multicast-related communication with theunderlying system. For example, MfeaMrouter is used for the followingtasks (this list may not be complete):\begin{itemize} \item Start/stop the multicast forwarding engine. \item Add/delete an interface used for multicast forwarding by the underlying system. \item Add/delete a MFC entry within the multicast forwarding engine. \item Install dataflow monitors (only if the underlying system supports that feature). \item Read data bandwidth forwarding statistics per dataflow (only if the underlying system does not support bandwidth dataflow monitoring and upcall).\end{itemize}MfeaMrouter is started when MfeaNode is started, and usually stopsoperation when MfeaNode is stopped.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% APPENDIX%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\appendix\section{Modification History}\begin{itemize} \item December 11, 2002: Initial version 0.1 completed. \item March 10, 2003: Updated to match XORP release 0.2. \item June 9, 2003: Updated to match XORP release 0.3: changes related to the MFEA--FEA merging, and refactoring of some of the MFEA internals. \item August 28, 2003: Updated the version to 0.4, and the date. \item November 6, 2003: Updated the version to 0.5, and the date. \item July 8, 2004: Updated to match XORP release 1.0. \item January 27, 2005: Removed MRIB-related text, because the MFEA does not deal with the MRIB information anymore. \item April 13, 2005: Updated to match XORP release 1.1. \item March 8, 2006: Updated the version to 1.2, and the date. \item August 2, 2006: Updated the version to 1.3, and the date. \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 + -