📄 forwarding.tex
字号:
\end{description}Note that it is possible to configure and run both kernel-level anduser-level Click. In that case, typically{\stt kernel-click-config-generator-file} and{\stt user-click-config-generator-file} would point to differentgenerators. Otherwise, a single common generator wouldn't know whetherto generate configuration for kernel-level Click or for user-levelClick.\end{description}\item{\tt plumbing}: this delimits a part of the router configuration used for the plumbing together of packet forwarding functionality. Multicast forwarding configuration must be part of this grouping.\item{\tt mfea4}: this delimits the part of the router configuration related to multicast forwarding of IPv4 packets. The following multicast forwarding parameters can be configured:\begin{description}\item{\tt disable}: this takes the value {\stt true} or {\stt false}, and disables or enables all IPv4 multicast forwarding on the router~\footnote{Note that prior to XORP Release-1.1, the {\tt enable} flag was used instead of {\tt disable}.}. The default is {\stt false}.\item{\tt interface}: this specifies an interface to be used for multicast IPv4 forwarding. Each interface to be used for multicast forwarding needs to be explicitly listed. In addition to the normal network interfaces, a special-purpose interface called {\stt register\_vif} needs to be configured for PIM-SM (see Chapter \ref{pimsm}) to be able to send register-encapsulated packets to the PIM Rendezvous Point. PIM-SM will not work correctly unless this is configured. The {\stt register\_vif} interface must be configured with a vif also called {\stt register\_vif}.\item{\tt vif}: this specifies a vif to be used for multicast IPv4 forwarding. Each vif to be used for multicast forwarding needs to be explicitly listed. Each vif can take the following parameter:\begin{description}\item{\tt disable}: this takes the value {\stt true} or {\stt false}, and disables or enables multicast forwarding on this vif~\footnote{Note that prior to XORP Release-1.1, the {\tt enable} flag was used instead of {\tt disable}.}. The default is {\stt false}.\end{description}\end{description}\item{\tt traceoptions}: this directive delimits the configuration of debugging and tracing options for multicast forwarding.\begin{description}\item{\tt flag}: this directive is used to specify which tracing options are enabled. Possible parameters are:\begin{description}\item{\tt all}: this directive specifies that all tracing options should be enabled. Possible parameters are:\begin{description}\item{\tt disable}: this takes the value {\stt true} or {\stt false}, and disables or enables tracing~\footnote{Note that prior to XORP Release-1.1, the {\tt enable} flag was used instead of {\tt disable}.}. The default is {\stt false}.\end{description}\end{description}\end{description}\item{\tt mfea6}: this delimits the part of the router configuration related to multicast forwarding of IPv6 packets. The possible parameters are the same as for {\stt mfea4}, but affect IPv6 multicast forwarding rather than IPv4.\end{description}\newpage\subsection{Example Configurations}\vspace{0.1in}\noindent\framebox[\textwidth][l]{\scriptsize\begin{minipage}{6in}\begin{alltt}\begin{tabbing}xx\=xx\=xx\=xx\=xx\=\killfea \{\\\>unicast-forwarding4 \{\\\>\>disable: false\\\>\}\\\>unicast-forwarding6 \{\\\>\>disable: true\\\>\}\\\}\\plumbing \{\\\>mfea4 \{\\\>\>disable: false\\\>\>interface dc0 \{\\\>\>\>vif dc0 \{\\\>\>\>\>disable: false\\\>\>\>\}\\\>\>\}\\\>\>interface register\_vif \{\\\>\>\>vif register\_vif \{\\\>\>\>\>/* Note: this vif should be always enabled */\\\>\>\>\>disable: false\\\>\>\>\}\\\>\>\}\\\>\>traceoptions \{\\\>\>\>flag all \{\\\>\>\>\>disable: false\\\>\>\>\}\\\>\>\}\\\>\}\\\\\>mfea6 \{\\\>\>disable: false\\\>\>interface dc0 \{\\\>\>\>vif dc0 \{\\\>\>\>\>disable: false\\\>\>\>\}\\\>\>\}\\\>\>interface register\_vif \{\\\>\>\>vif register\_vif \{\\\>\>\>\>/* Note: this vif should be always enabled */\\\>\>\>\>disable: false\\\>\>\>\}\\\>\>\}\\\>\}\\\}\end{tabbing}\end{alltt}\end{minipage}}\vspace{0.1in}The configuration above enables unicast IPv4 forwarding, but disablesIPv6 unicast forwarding.In addition, it enables multicast forwarding for IPv4 and IPv6 oninterface/vif {\stt dc0/dc0}, and enables the register vif for use byPIM-SM multicast routing.\newpage\vspace{0.1in}\noindent\framebox[\textwidth][l]{\scriptsize\begin{minipage}{6in}\begin{alltt}\begin{tabbing}xx\=xx\=xx\=xx\=xx\=xx\=xx\=\killinterfaces \{\\\>interface eth0 \{\\\>\>description: "control interface"\\\>\>vif eth0 \{\\\>\>\>address 10.10.10.10 \{\\\>\>\>\>prefix-length: 24\\\>\>\>\>broadcast: 10.10.10.255\\\>\>\>\}\\\>\>\}\\\>\>mac: aa:bb:cc:dd:ee:ff\\\>\>mtu: 1500\\\>\}\\\}\\\\fea \{\\\>unicast-forwarding4 \{\\\>\>disable: false\\\>\}\\\\\>click \{\\\>\>disable: false\\\>\>duplicate-routes-to-kernel: false\\\\\>\>kernel-click \{\\\>\>\>disable: true\\\>\>\>install-on-startup: true\\\>\>\>kernel-click-modules: "/path/to/proclikefs.o:/path/to/click.o";\\\>\>\>mount-directory: "/click"\\\>\>\>kernel-click-config-generator-file: "/path/to/kernel\_click\_config\_generator"\\\>\>\}\\\\\>\>user-click \{\\\>\>\>disable: false\\\>\>\>command-file: "/path/to/click"\\\>\>\>command-extra-arguments: "-R"\\\>\>\>command-execute-on-startup: true\\\>\>\>control-address: 127.0.0.1\\\>\>\>control-socket-port: 13000\\\>\>\>startup-config-file: "/dev/null"\\\>\>\>user-click-config-generator-file: "/path/to\_user\_click\_config\_generator"\\\>\>\}\\\>\}\\\}\\\end{tabbing}\end{alltt}\end{minipage}}\vspace{0.1in}The configuration above enables configures both kernel-level anduser-level Click (eventually on Linux given that it contains two kernelClick modules), but enables only user-level Click.\section{Monitoring the Forwarding Engine}The {\stt show mfea dataflow} command can be used to displayinformation about MFEA IPv4 dataflow filters:\vspace{0.1in}\noindent\framebox[\textwidth][l]{\scriptsize\begin{minipage}{6in}\begin{alltt}\begin{tabbing}xx\=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\=xxxxx\=xx\=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\=xx\=\killuser@hostname> \textbf{show mfea dataflow}\\Group \>\>\>\>Source\\224.0.1.20 \>\>\>\>10.2.0.1\\\>Measured(Start|Packets|Bytes)\>Type\>Thresh(Interval|Packets|Bytes)\>\>Remain\\\>1091667269.982158|0|? \><= \>\>210.0|0|? \>\>202.434319\\\>1091667269.984406|?|0 \>>= \>\>100.0|?|102400 \>\>92.436567\end{tabbing}\end{alltt}\end{minipage}}\vspace{0.1in}Note that the above information is shown only if the filters are kept atuser-space. If the filters are kept at kernel-space (\eg in case of UNIXsystem with advanced multicast API support), then currently \xorpshcannot be used to show the information. In that case, the appropriate systemcommand should be used instead (e.g., the UNIX {\stt netstat -gn} command).The {\stt show mfea interface} command can be used to displayinformation about MFEA IPv4 interfaces:\vspace{0.1in}\noindent\framebox[\textwidth][l]{\scriptsize\begin{minipage}{6in}\begin{alltt}\begin{tabbing}xxxxxxxxxxxxx\=xxxxxxxxx\=xxxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxx\=\killuser@hostname> \textbf{show mfea interface}\\Interface \>State \>Vif/PifIndex \>Addr \>Flags\\dc0 \>UP \>0/6 \>10.4.0.1 \>MULTICAST BROADCAST KERN\_UP\\dc2 \>UP \>1/8 \>10.3.0.2 \>MULTICAST BROADCAST KERN\_UP\\register\_vif \>UP \>2/6 \>10.4.0.1 \>PIM\_REGISTER KERN\_UP\end{tabbing}\end{alltt}\end{minipage}}\vspace{0.1in}The {\stt show mfea interface address} command can be used to displayinformation about MFEA IPv4 interface addresses:\vspace{0.1in}\noindent\framebox[\textwidth][l]{\scriptsize\begin{minipage}{6in}\begin{alltt}\begin{tabbing}xxxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxxxx\killuser@hostname> \textbf{show mfea interface address}\\Interface \>Addr \>Subnet \>Broadcast \>P2Paddr\\dc0 \>10.4.0.1 \>10.4.0.0/24 \>10.4.0.255 \>0.0.0.0\\dc2 \>10.3.0.2 \>10.3.0.0/24 \>10.3.0.255 \>0.0.0.0\\register\_vif \>10.4.0.1 \>10.4.0.1/32 \>10.4.0.1 \>0.0.0.0\end{tabbing}\end{alltt}\end{minipage}}The equivalent commands for IPv6 multicast forwarding are:\begin{description}\item{\stt show mfea6 dataflow}\item{\stt show mfea6 interface}\item{\stt show mfea6 interface address}\end{description}\vspace{0.1in}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -