rib.tex

来自「BCAST Implementation for NS2」· TEX 代码 · 共 402 行 · 第 1/2 页

TEX
402
字号
about these.\subsection{RedistTable}{\it Note, August 2003: RedistTable is unfinished.}A RedistTable can by dynamically plumbed into the tree of tables atany point, but it is most likely to be inserted immediately after anOriginTable.  The purpose of a RedistTable is to allow the configured(and possibly filtered) redistribution of routes from one routingprotocol to another.  For example, routes from within an AS might bepropagated from OSPF to BGP for external advertisement.There may be many RedistTables in each RIB.\section{XRL Interface}The RIB supports the following XRLs.\subsection{Routing Protocol Registration}\begin{verbatim}add_igp_table4 ? protocol:txt & unicast:bool & multicast:booladd_igp_table6 ? protocol:txt & unicast:bool & multicast:booladd_egp_table4 ? protocol:txt & unicast:bool & multicast:booladd_egp_table6 ? protocol:txt & unicast:bool & multicast:booldelete_igp_table4 ? protocol:txt & unicast:bool & multicast:booldelete_igp_table6 ? protocol:txt & unicast:bool & multicast:booldelete_egp_table4 ? protocol:txt & unicast:bool & multicast:booldelete_egp_table6 ? protocol: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 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:u32add_route6 ? protocol:txt & unicast:bool & multicast:bool &         network:ipv6net & nexthop:ipv6 & metric:u32replace_route4 ? protocol:txt & unicast:bool & multicast:bool &         network:ipv4net & nexthop:ipv4 & metric:u32replace_route6 ? protocol:txt & unicast:bool & multicast:bool &         network:ipv6net & nexthop:ipv6 & metric:u32delete_route4 ? protocol:txt & unicast:bool & multicast:bool &         network:ipv4netdelete_route6 ? protocol:txt & unicast:bool & multicast:bool &         network:ipv6net\end{verbatim}These XRLs are used to communicate new routes, changed routes, or thedeletion of routes to the RIB.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_route4 ? addr:ipv4 & unicast:bool & multicast:bool         -> nexthop:ipv4lookup_route6 ? 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 ? from:txt & to:txt & unicast:bool & multicast:boolredist_enable6  ? from:txt & to:txt & unicast:bool & multicast:boolredist_disable4 ? from:txt & to:txt & unicast:bool & multicast:boolredist_disable6 ? from:txt & to:txt & unicast:bool & multicast:bool\end{verbatim}These XRLs are intended to be used to enable route redistributionbetween routing protocols.  However, this interface is currently(August 2003) incomplete and should not be used.\subsection{Registration of Interest in Routes}\label{reg}\begin{verbatim}register_interest4 ? target:txt & addr:ipv4         -> resolves:bool & base_addr:ipv4 & prefix:u32 &            realprefix:u32 & nexthop:ipv4 & metric:u32deregister_interest4 ?  target:txt & addr:ipv4 & prefix:u32register_interest6 ? target:txt & addr:ipv6         -> resolves:bool & base_addr:ipv6 & prefix:u32 &            realprefix:u32 & nexthop:ipv6 & metric:u32deregister_interest6 ?  target:txt & addr:ipv6 & prefix: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 realprefix} returns the prefix length of the routingentry that matches the address in the request.  {\tt prefix} returnsthe prefix length of the largest subnet that covers the address and isnot overlayed by a more specific route.  Thus ${\tt prefix} <= {\ttrealprefix}$ and {\tt addr} is an address within the subnet {\ttbase\_addr/prefix} which itself is a subset of the subnet {\ttbase\_addr/realprefix}.  The routing protocol need not ask again for any address that lieswithin {\tt base\_addr/prefix} but can not use this answer to determineanything about addresses that lie outside of {\tt base\_addr/prefix}but within {\tt base\_addr/realprefix}.\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.\subsection{Adding and deleting RIB clients}\begin{verbatim}add_rib_client4	? target_name:txt & unicast:bool & multicast:booladd_rib_client6	? target_name:txt & unicast:bool & multicast:booldelete_rib_client4 ? target_name:txt & unicast:bool & multicast:booldelete_rib_client6 ? target_name:txt & unicast:bool & multicast:boolenable_rib_client4 ? target_name:txt & unicast:bool & multicast:boolenable_rib_client6 ? target_name:txt & unicast:bool & multicast:booldisable_rib_client4 ? target_name:txt & unicast:bool & multicast:booldisable_rib_client6 ? target_name:txt & unicast:bool & multicast:bool\end{verbatim}The RIB's ExportTable is responsible for exporting all the winningunicast routes and any changes of those routes to the FEA.  Howeverfrom the RIB's point of view the FEA is just a RibClient, and otherprocesses may also register to be RibClients and to receive all therouting information.  By default the FEA is a RibClient for unicastroutes only (it doesn't need to register).  Processes may use the {\ttadd\_rib\_client} XRLs above to become a RibClient for unicast routes,for multicast routes, or both.  They may also enable and disable thepropagation of this routing information, or deregister completelyusing {\tt delete\_rib\_client}.\end{document}

⌨️ 快捷键说明

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