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

📄 rib.tex

📁 xorp源码hg
💻 TEX
📖 第 1 页 / 共 2 页
字号:
The RIB supports the following XRLs.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{Routing Protocol Registration}\begin{verbatim}add_igp_table4 ? protocol:txt & target_class:txt & target_instance:txt               & unicast:bool & multicast:booladd_igp_table6 ? protocol:txt & target_class:txt & target_instance:txt               & unicast:bool & multicast:booladd_egp_table4 ? protocol:txt & target_class:txt & target_instance:txt               & unicast:bool & multicast:booladd_egp_table6 ? protocol:txt & target_class:txt & target_instance:txt               & unicast:bool & multicast:booldelete_igp_table4 ? protocol:txt & target_class:txt & target_instance:txt               & unicast:bool & multicast:booldelete_igp_table6 ? protocol:txt & target_class:txt & target_instance:txt               & unicast:bool & multicast:booldelete_egp_table4 ? protocol:txt & target_class:txt & target_instance:txt               & unicast:bool & multicast:booldelete_egp_table6 ? protocol:txt & target_class:txt & target_instance:txt               & unicast:bool & multicast:bool\end{verbatim}These XRLs are used by routing protocols to register with the RIBprocess, and hence to create OriginTables in all the RIBs.The {\tt \_igp\_} xrls will plumb the OriginTable on the Internal sideof the ExtIntTable.  The {\tt \_egp\_} xrls will plumb the OriginTableon the External side of the ExtIntTable.{\tt protocol} is a text string used to identify the routing protocol.Currently it MUST be a protocol the RIB knows about, or anadministrative distance cannot be assigned to the routes.  Futureversions of the RIB may make this interface more extensible.{\tt target\_class} and {\tt target\_instance} specify theclass and instance associated with the target.{\tt unicast} and {\tt multicast} indicate whether the routingprotocol will insert routes into the unicast RIB or the multicast RIBor both.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{Adding and Deleting Routes}\begin{verbatim}add_route4      ? protocol:txt & unicast:bool & multicast:bool  \                & network:ipv4net & nexthop:ipv4 & metric:u32   \                & policytags:listadd_route6      ? protocol:txt & unicast:bool & multicast:bool  \                & network:ipv6net & nexthop:ipv6 & metric:u32   \                & policytags:listreplace_route4  ? protocol:txt & unicast:bool & multicast:bool  \                & network:ipv4net & nexthop:ipv4 & metric:u32   \                & policytags:listreplace_route6  ? protocol:txt & unicast:bool & multicast:bool  \                & network:ipv6net & nexthop:ipv6 & metric:u32   \                & policytags:listdelete_route4   ? protocol:txt & unicast:bool & multicast:bool  \                & network:ipv4netdelete_route6   ? protocol:txt & unicast:bool & multicast:bool  \                & network:ipv6netadd_interface_route4    ? protocol:txt                          \                        & unicast:bool & multicast:bool         \                        & network:ipv4net & nexthop:ipv4        \                        & ifname:txt & vifname:txt & metric:u32 \                        & policytags:listadd_interface_route6    ? protocol:txt                          \                        & unicast:bool & multicast:bool         \                        & network:ipv6net & nexthop:ipv6        \                        & ifname:txt & vifname:txt & metric:u32 \                        & policytags:listreplace_interface_route4 ? protocol:txt                         \                        & unicast:bool & multicast:bool         \                        & network:ipv4net & nexthop:ipv4        \                        & ifname:txt & vifname:txt & metric:u32 \                        & policytags:listreplace_interface_route6 ? protocol:txt                         \                        & unicast:bool & multicast:bool         \                        & network:ipv6net & nexthop:ipv6        \                        & ifname:txt & vifname:txt & metric:u32 \                        & policytags:list\end{verbatim}These XRLs are used to communicate new routes, changed routes, or thedeletion of routes to the RIB.The {\tt add\_interface\_route} and {\tt replace\_interface\_route}XRLs are similar to the {\tt add\_route} and {\tt replace\_route}XRLs except that the origin explicitly specifies the outgoingnetwork interface and vif for the route.Note that sending an {\tt add\_route} for a route that is already inthe OriginTable for that protocol is an error, as is sending a {\ttreplace\_route} or {\tt delete\_route} for a route that is not in theOriginTable for that protocol.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{Route Lookup}\begin{verbatim}lookup_route_by_dest4 ? addr:ipv4 & unicast:bool & multicast:bool         -> nexthop:ipv4lookup_route_by_dest6 ? addr:ipv6 & unicast:bool & multicast:bool         -> nexthop:ipv6\end{verbatim}These XRLs may be used to see how the RIB would route a packet for aspecific destination.{\tt nexthop} will return the resolved nexthop if the request is successful,or all zeros otherwise.  It is an error for the unicast and multicastfields to both be true or both false.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{VIF Management (test interface)}\begin{verbatim}new_vif ? name:txtadd_vif_addr4 ? name:txt & addr:ipv4 & subnet:ipv4netadd_vif_addr6 ? name:txt & addr:ipv6 & subnet:ipv6net\end{verbatim}These XRLs can be used to inform the RIB about directly connected(virtual) interfaces.  The use of these XRLs is intended only fortesting purposes - the RIB normally learns of VIFs directly from theFEA process.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{Route Redistribution}\begin{verbatim}redist_enable4 ? to_xrl_target:txt & from_protocol:txt & unicast:bool               & multicast:bool & cookie:txtredist_enable6 ? to_xrl_target:txt & from_protocol:txt & unicast:bool               & multicast:bool & cookie:txtredist_disable4 ? to_xrl_target:txt & from_protocol:txt & unicast:bool               & multicast:bool & cookie:txtredist_disable6 ? to_xrl_target:txt & from_protocol:txt & unicast:bool               & multicast:bool & cookie:txtredist_transaction_enable4 ? to_xrl_target:txt & from_protocol:txt               & unicast:bool & multicast:bool & cookie:txtredist_transaction_enable6 ? to_xrl_target:txt & from_protocol:txt               & unicast:bool & multicast:bool & cookie:txtredist_transaction_disable4 ? to_xrl_target:txt & from_protocol:txt               & unicast:bool & multicast:bool & cookie:txtredist_transaction_disable6 ? to_xrl_target:txt & from_protocol:txt               & unicast:bool & multicast:bool & cookie:txt\end{verbatim}These XRLs are intended to be used to enable and disable routeredistribution from a RIB table to an XRL target.The {\tt *\_transaction\_*} XRLs are used for registering interest intransaction-based route redistribution (\ie where there is{\tt start\_transaction} and {\tt commit\_transaction} around each blockof add/delete routes).%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\subsection{Registration of Interest in Routes}\label{reg}\begin{verbatim}register_interest4 ? target:txt & addr:ipv4         -> resolves:bool & base_addr:ipv4 & prefix_len:u32 &            real_prefix_len:u32 & nexthop:ipv4 & metric:u32register_interest6 ? target:txt & addr:ipv6         -> resolves:bool & base_addr:ipv6 & prefix_len:u32 &            real_prefix_len:u32 & nexthop:ipv6 & metric:u32deregister_interest4 ?  target:txt & addr:ipv4 & prefix_len:u32deregister_interest6 ?  target:txt & addr:ipv6 & prefix_len:u32\end{verbatim}These XRLs are used to register and deregister interest in routinginformation related to a specific IP address. Target is the name of the XRL module that registered the interest.{\tt resolves} indicates whether or not the address is routable.  Ifit is not routable, the values of {\tt nexthop} and {\tt metric} areundefined.  {\tt real\_prefix\_len} returns the prefix length of the routingentry that matches the address in the request.  {\tt prefix\_len} returnsthe prefix length of the largest subnet that covers the address and isnot overlayed by a more specific route.  Thus ${\tt prefix\_len} >= {\ttreal\_prefix\_len}$ and {\tt addr} is an address within the subnet {\ttbase\_addr/prefix\_len} which itself is a subset of the subnet {\ttbase\_addr/real\_prefix\_len}.  The routing protocol need not ask again for any address that lieswithin {\tt base\_addr/prefix\_len} but can not use this answer to determineanything about addresses that lie outside of {\tt base\_addr/prefix\_len}but within {\tt base\_addr/real\_prefix\_len}.\subsection{Registration of Interest in Routes: Client Interface}When a routing protocol has registered interest in routes, the RIBwill need to be able to asynchronously call the routing protocol toinform it of any changes.  Thus the routing protocol must implementthe rib client interface.  This consists of the following XRLs:\begin{verbatim}route_info_changed4 ? addr:ipv4 & prefix_len:u32 &         nexthop:ipv4 & metric:u32route_info_changed6 ? addr:ipv6 & prefix_len:u32 &         nexthop:ipv6 & metric:u32route_info_invalid4 ? addr:ipv4 & prefix_len:u32route_info_invalid6 ? addr:ipv6 & prefix_len:u32\end{verbatim}The {\tt route\_info\_changed} XRLs inform the routing protocol that thenexthop or metric associated with the route with subnet {\ttaddr/prefix\_len} has changed.  The registration with the RIB is stillvalid.The {\tt route\_info\_invalid} XRLs inform the routing protocol that theinformation associated with the specified subnet is no longer correct.The registration with the RIB is no longer valid, and the routingprotocol must re-register with the RIB to find out what happened.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     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: described the new  RibClient registration mechanism.  \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: replaced ExportTable  with RedistTable, and fixed the XRLs specification.  \item April 13, 2005: Updated to match XORP release 1.1: fixed the XRL names  and added description for the add\_interface\_route and  replace\_interface\_route XRLs.  \item March 8, 2006: Updated the version to 1.2, and the date.  \item August 2, 2006: Added ``Modification History'' appendix.  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 + -