📄 forwarding.tex
字号:
%% $XORP: xorp/docs/user_manual/forwarding.tex,v 1.12 2006/10/17 22:26:07 pavlin Exp $%\chapter{Forwarding Engine}\section{Terminology and Concepts}The forwarding engine is that part of a router that receives packetsand forwards then from one interface to another. In the case of XORP,the forwarding engine may be the kernel forwarding path on UNIX,the Click forwarding path~\cite{CLICK-PROJECT}, or it may reside inexternal forwarding hardware.On any particular router, it might be desirable to enable or disabledifferent parts of the forwarding functionality. For example, arouter might only be intended to forward IPv6 packets but not IPv4packets, or it might be intended to forward unicast packets but notmulticast packets. Thus XORP provides the ability to enable andconfigure various forwarding functionality.In XORP, the term ``{\stt fea}'' refers to {\it Forwarding EngineAbstraction} and the term ``{\stt mfea}'' refers to {\it MulticastForwarding Engine Abstraction}. The term ``abstraction'' here refers toa high-level configuration interface that should be the sameirrespective of whether the forwarding engine is provided in softwarein the operating system kernel or in external forwarding hardware.\newpage\section{Configuration of the Forwarding Engine}On a XORP router, forwarding functionality must be explicitly enabledor no packets will be forwarded. Forwarding can be separately enabledfor unicast and multicast, and for IPv4 and IPv6. In addition,multicast interfaces/vifs need to be explicitly enabled individually,and certain special-purpose forwarding functionality can also beenabled for multicast.\subsection{Configuration Syntax}\vspace{0.1in}\noindent\framebox[\textwidth][l]{\scriptsize\begin{minipage}{6in}\begin{alltt}\begin{tabbing}xx\=xx\=xx\=xx\=xx\=\killfea \{\\\>targetname: {\it txt}\\\>unicast-forwarding4 \{\\\>\>disable: {\it bool}\\\>\>forwarding-entries \{\\\>\>\>retain-on-startup: {\it bool}\\\>\>\>retain-on-shutdown: {\it bool}\\\>\>\}\\\>\}\\\>unicast-forwarding6 \{\\\>\>disable: {\it bool}\\\>\>forwarding-entries \{\\\>\>\>retain-on-startup: {\it bool}\\\>\>\>retain-on-shutdown: {\it bool}\\\>\>\}\\\>\}\\\>click \{\\\>\>disable: {\it bool}\\\>\>duplicate-routes-to-kernel: {\it bool}\\\\\>\>kernel-click \{\\\>\>\>disable: {\it bool}\\\>\>\>install-on-startup: {\it bool}\\\>\>\>kernel-click-modules: {\it text}\\\>\>\>mount-directory: {\it text}\\\>\>\>kernel-click-config-generator-file: {\it text}\\\>\>\}\\\\\>\>user-click \{\\\>\>\>disable: {\it bool}\\\>\>\>command-file: {\it text}\\\>\>\>command-extra-arguments: {\it text}\\\>\>\>command-execute-on-startup: {\it bool}\\\>\>\>control-address: {\it IPv4-addr}\\\>\>\>control-socket-port: {\it uint(1..65535)}\\\>\>\>startup-config-file: {\it text}\\\>\>\>user-click-config-generator-file: {\it text}\\\>\>\}\\\>\}\\\}\\{\rm continued overleaf....}\end{tabbing}\end{alltt}\end{minipage}}\newpage\vspace{0.1in}\noindent\framebox[\textwidth][l]{\scriptsize\begin{minipage}{6in}\begin{alltt}\begin{tabbing}xx\=xx\=xx\=xx\=xx\=\killplumbing \{\\\>mfea4 \{\\\>\>disable: {\it bool}\\\>\>interface {\it text} \{\\\>\>\>vif {\it text} \{\\\>\>\>\>disable: {\it bool}\\\>\>\>\}\\\>\>\}\\\>\>interface register\_vif \{\\\>\>\>vif register\_vif \{\\\>\>\>\>disable: {\it bool}\\\>\>\>\}\\\>\>\}\\\>\>traceoptions \{\\\>\>\>flag all \{\\\>\>\>\>disable: {\it bool}\\\>\>\>\}\\\>\>\}\\\>\}\\\\\>mfea6 \{\\\>\>disable: {\it bool}\\\>\>interface {\it text} \{\\\>\>\>vif {\it text} \{\\\>\>\>\>disable: {\it bool}\\\>\>\>\}\\\>\>\}\\\>\>interface register\_vif \{\\\>\>\>vif register\_vif \{\\\>\>\>\>disable: {\it bool}\\\>\>\>\}\\\>\>\}\\\>\>traceoptions \{\\\>\>\>flag \{\\\>\>\>\>all \{\\\>\>\>\>\>disable: {\it bool}\\\>\>\>\>\}\\\>\>\>\}\\\>\>\}\\\>\}\\\}\end{tabbing}\end{alltt}\end{minipage}}\vspace{0.1in}\begin{description}\item{\tt fea}: this delimits the configuration for the unicast forwarding engine functionality. The following unicast forwarding engine parameters can be configured:\begin{description}\item{\tt targetname}: this is the name for this instance of the forwarding engine abstraction. It defaults to ``{\stt fea}'', and it is strongly recommended that this default is {\it not} overridden under normal usage scenarios.\end{description}\item{\tt unicast-forwarding4}: this directive is used to configure the IPv4 forwarding~\footnote{Note that prior to XORP Release-1.1, the {\tt enable-unicast-forwarding4} flag was used instead to enable or disable the IPv4 forwarding.}.\begin{description}\item{\tt disable}: this takes the value {\stt true} or {\stt false}, and disables or enables all IPv4 unicast forwarding on the router. The default is {\stt false}.\item{\tt forwarding-entries}: this directive is used to configure the properties of the IPv4 forwarding entries.\begin{description}\item{\tt retain-on-startup}: this takes the value {\stt true} or {\stt false}, and is used to control whether the XORP IPv4 unicast forwarding entries (if there are any left from a previous execution) are removed on startup by the FEA itself. The default is {\stt false}.\item{\tt retain-on-shutdown}: this takes the value {\stt true} or {\stt false}, and is used to control whether the XORP IPv4 unicast forwarding entries are removed on shutdown by the FEA itself. The default is {\stt false}.\end{description} Note that the {\tt retain-on-startup} and {\tt retain-on-shutdown} statements prevent the FEA itself from deleting the forwarding entries and does not prevent the RIB or any of the unicast routing protocols from deleting the entries on shutdown.\end{description}\item{\tt unicast-forwarding6}: this directive is used to configure the IPv6 forwarding~\footnote{Note that prior to XORP Release-1.1, the {\tt enable-unicast-forwarding6} flag was used instead to enable or disable the IPv6 forwarding.}.\begin{description}\item{\tt disable}: this takes the value {\stt true} or {\stt false}, and disables or enables all IPv6 unicast forwarding on the router. The default is {\stt false}.\item{\tt forwarding-entries}: this directive is used to configure the properties of the IPv6 forwarding entries.\begin{description}\item{\tt retain-on-startup}: this takes the value {\stt true} or {\stt false}, and is used to control whether the XORP IPv6 unicast forwarding entries (if there are any left from a previous execution) are removed on startup by the FEA itself. The default is {\stt false}.\item{\tt retain-on-shutdown}: this takes the value {\stt true} or {\stt false}, and is used to control whether the XORP IPv6 unicast forwarding entries are removed on shutdown by the FEA itself. The default is {\stt false}.\end{description} Note that the {\tt retain-on-startup} and {\tt retain-on-shutdown} statements prevent the FEA itself from deleting the forwarding entries and does not prevent the RIB or any of the unicast routing protocols from deleting the entries on shutdown.\end{description}\item{\tt click}: this directive is used to configure the Click forwarding path.\begin{description}\item{\tt disable}: this takes the value {\stt true} or {\stt false}, and disables or enables the Click forwarding path on the router. The default is {\stt false}.\item{\tt duplicate-routes-to-kernel}: this takes the value {\stt true} or {\stt false}, and is used to control whether the XORP routes added to Click should be added to the system kernel as well. The default is {\stt false}.\item{\tt kernel-click}: this directive is used to configure kernel-level Click.\begin{description}\item{\tt disable}: this takes the value {\stt true} or {\stt false}, and disables or enables the kernel-level Click forwarding path on the router. The default is {\stt false}.\item{\tt install-on-startup}: this takes the value {\stt true} or {\stt false}, and is used to specify whether the kernel-level Click should be installed on startup. The default is {\stt false}.\item{\tt kernel-click-modules}: this specifies the list of Click modules (separated by ':') that should be loaded into the kernel. The default is the list of modules needed by Linux: ``/usr/local/click/linuxmodule/proclikefs.o:/usr/local/click/linuxmodule/click.o'' For FreeBSD, the only module that is needed is ``click.ko'' so the list should be like: ``/path/to/click.ko''.\item{\tt mount-directory}: this specifies the name of the directory to mount the Click file system on. The default is: ``/click''.\item{\tt kernel-click-config-generator-file}: this specifies the name of the program to execute that would generate the kernel-level Click configuration from the XORP configuration. The default is: ``/usr/local/xorp/fea/xorp\_fea\_click\_config\_generator''.\end{description}\item{\tt user-click}: this directive is used to configure user-level Click.\begin{description}\item{\tt disable}: this takes the value {\stt true} or {\stt false}, and disables or enables the user-level Click forwarding path on the router. The default is {\stt false}.\item{\tt command-file}: this specifies the name of the user-level Click binary program to execute. The default is ``/usr/local/bin/click''.\item{\tt command-extra-arguments}: this specifies the extra arguments that should be supplied to the user-level Click binary program when executing it. The default is ``-R''. Note that it should not contain ``\verb=-p <port>='', because it will be in conflict with the FEA's addition of the same argument.\item{\tt command-execute-on-startup}: this takes the value {\stt true} or {\stt false}, and is used to specify whether the user-level Click binary program should be executed on startup. The default is {\stt false}.\item{\tt control-address}: this takes an IPv4 address and is used to specify the address that the user-level Click binary program would be listening on for incoming connections (to control and reconfigure Click). The default is 127.0.0.1.\item{\tt control-socket-port}: this takes an integer in the interval [1..65535] and is used to specify the TCP port number the user-level Click binary program would be listening on for incoming connections (to control and reconfigure Click). The default is 13000.\item{\tt startup-config-file}: this specifies the name of the initial Click configuration file that would loaded on startup. The default is ``/dev/null''.\item{\tt user-click-config-generator-file}: this specifies the name of the program to execute that would generate the user-level Click configuration from the XORP configuration. The default is ``/usr/local/xorp/fea/xorp\_fea\_click\_config\_generator''.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -