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

📄 rfc2178.txt

📁 RFC 的详细文档!
💻 TXT
📖 第 1 页 / 共 5 页
字号:
   metrics.  For each advertised external route, the total cost from
   Router RT6 is calculated as the sum of the external route's
   advertised cost and the distance from Router RT6 to the advertising
   router.  When two routers are advertising the same external
   destination, RT6 picks the advertising router providing the minimum
   total cost. RT6 then sets the next hop to the external destination
   equal to the next hop that would be used when routing packets to the
   chosen advertising router.

   In Figure 2, both Router RT5 and RT7 are advertising an external
   route to destination Network N12.  Router RT7 is preferred since it
   is advertising N12 at a distance of 10 (8+2) to Router RT6, which is
   better than Router RT5's 14 (6+8).  Table 3 shows the entries that
   are added to the routing table when external routes are examined:



                 Destination   Next  Hop   Distance
                 __________________________________
                 N12           RT10        10
                 N13           RT5         14
                 N14           RT5         14
                 N15           RT10        17


          Table 3: The portion of Router RT6's routing table
                     listing external destinations.

   Processing of Type 2 external metrics is simpler.  The AS boundary
   router advertising the smallest external metric is chosen, regardless
   of the internal distance to the AS boundary router.  Suppose in our
   example both Router RT5 and Router RT7 were advertising Type 2
   external routes.  Then all traffic destined for Network N12 would be
   forwarded to Router RT7, since 2 < 8. When several equal-cost Type 2
   routes exist, the internal distance to the advertising routers is
   used to break the tie.

   Both Type 1 and Type 2 external metrics can be present in the AS at
   the same time.  In that event, Type 1 external metrics always take
   precedence.

   This section has assumed that packets destined for external
   destinations are always routed through the advertising AS boundary
   router.  This is not always desirable.  For example, suppose in
   Figure 2 there is an additional router attached to Network N6, called
   Router RTX. Suppose further that RTX does not participate in OSPF



Moy                         Standards Track                    [Page 21]

RFC 2178                     OSPF Version 2                    July 1997


   routing, but does exchange BGP information with the AS boundary
   router RT7.  Then, Router RT7 would end up advertising OSPF external
   routes for all destinations that should be routed to RTX.  An extra
   hop will sometimes be introduced if packets for these destinations
   need always be routed first to Router RT7 (the advertising router).

   To deal with this situation, the OSPF protocol allows an AS boundary
   router to specify a "forwarding address" in its AS- external-LSAs. In
   the above example, Router RT7 would specify RTX's IP address as the
   "forwarding address" for all those destinations whose packets should
   be routed directly to RTX.

   The "forwarding address" has one other application.  It enables
   routers in the Autonomous System's interior to function as "route
   servers".  For example, in Figure 2 the router RT6 could become a
   route server, gaining external routing information through a
   combination of static configuration and external routing protocols.
   RT6 would then start advertising itself as an AS boundary router, and
   would originate a collection of OSPF AS-external-LSAs.  In each AS-
   external-LSA, Router RT6 would specify the correct Autonomous System
   exit point to use for the destination through appropriate setting of
   the LSA's "forwarding address" field.

2.4.  Equal-cost multipath

   The above discussion has been simplified by considering only a single
   route to any destination.  In reality, if multiple equal-cost routes
   to a destination exist, they are all discovered and used.  This
   requires no conceptual changes to the algorithm, and its discussion
   is postponed until we consider the tree-building process in more
   detail.

   With equal cost multipath, a router potentially has several available
   next hops towards any given destination.

3.  Splitting the AS into Areas

   OSPF allows collections of contiguous networks and hosts to be
   grouped together.  Such a group, together with the routers having
   interfaces to any one of the included networks, is called an area.
   Each area runs a separate copy of the basic link-state routing
   algorithm. This means that each area has its own link-state database
   and corresponding graph, as explained in the previous section.

   The topology of an area is invisible from the outside of the area.
   Conversely, routers internal to a given area know nothing of the
   detailed topology external to the area.  This isolation of knowledge
   enables the protocol to effect a marked reduction in routing traffic



Moy                         Standards Track                    [Page 22]

RFC 2178                     OSPF Version 2                    July 1997


   as compared to treating the entire Autonomous System as a single
   link-state domain.

   With the introduction of areas, it is no longer true that all routers
   in the AS have an identical link-state database.  A router actually
   has a separate link-state database for each area it is connected to.
   (Routers connected to multiple areas are called area border routers).
   Two routers belonging to the same area have, for that area, identical
   area link-state databases.

   Routing in the Autonomous System takes place on two levels, depending
   on whether the source and destination of a packet reside in the same
   area (intra-area routing is used) or different areas (inter-area
   routing is used).  In intra-area routing, the packet is routed solely
   on information obtained within the area; no routing information
   obtained from outside the area can be used.  This protects intra-area
   routing from the injection of bad routing information.  We discuss
   inter-area routing in Section 3.2.

3.1.  The backbone of the Autonomous System

   The OSPF backbone is the special OSPF Area 0 (often written as Area
   0.0.0.0, since OSPF Area ID's are typically formatted as IP
   addresses). The OSPF backbone always contains all area border
   routers. The backbone is responsible for distributing routing
   information between non-backbone areas. The backbone must be
   contiguous. However, it need not be physically contiguous; backbone
   connectivity can be established/maintained through the configuration
   of virtual links.

   Virtual links can be configured between any two backbone routers that
   have an interface to a common non-backbone area.  Virtual links
   belong to the backbone.  The protocol treats two routers joined by a
   virtual link as if they were connected by an unnumbered point-to-
   point backbone network.  On the graph of the backbone, two such
   routers are joined by arcs whose costs are the intra-area distances
   between the two routers.  The routing protocol traffic that flows
   along the virtual link uses intra-area routing only.

3.2.  Inter-area routing

   When routing a packet between two non-backbone areas the backbone is
   used.  The path that the packet will travel can be broken up into
   three contiguous pieces: an intra-area path from the source to an
   area border router, a backbone path between the source and
   destination areas, and then another intra-area path to the
   destination.  The algorithm finds the set of such paths that have the
   smallest cost.



Moy                         Standards Track                    [Page 23]

RFC 2178                     OSPF Version 2                    July 1997


   Looking at this another way, inter-area routing can be pictured as 
   forcing a star configuration on the Autonomous System, with the
   backbone as hub and each of the non-backbone areas as spokes.

   The topology of the backbone dictates the backbone paths used between
   areas.  The topology of the backbone can be enhanced by adding
   virtual links.  This gives the system administrator some control over
   the routes taken by inter-area traffic.

   The correct area border router to use as the packet exits the source
   area is chosen in exactly the same way routers advertising external
   routes are chosen.  Each area border router in an area summarizes for
   the area its cost to all networks external to the area.  After the
   SPF tree is calculated for the area, routes to all inter-area
   destinations are calculated by examining the summaries of the area
   border routers.

3.3.  Classification of routers

   Before the introduction of areas, the only OSPF routers having a
   specialized function were those advertising external routing
   information, such as Router RT5 in Figure 2.  When the AS is split
   into OSPF areas, the routers are further divided according to
   function into the following four overlapping categories:


   Internal routers
      A router with all directly connected networks belonging to the
      same area. These routers run a single copy of the basic routing
      algorithm.

   Area border routers
      A router that attaches to multiple areas.  Area border routers run
      multiple copies of the basic algorithm, one copy for each attached
      area. Area border routers condense the topological information of
      their attached areas for distribution to the backbone.  The
      backbone in turn distributes the information to the other areas.

   Backbone routers
      A router that has an interface to the backbone area.  This
      includes all routers that interface to more than one area (i.e.,
      area border routers).  However, backbone routers do not have to be
      area border routers.  Routers with all interfaces connecting to
      the backbone area are supported.







Moy                         Standards Track                    [Page 24]

RFC 2178                     OSPF Version 2                    July 1997


   AS boundary routers
      A router that exchanges routing information with routers belonging
      to other Autonomous Systems.  Such a router advertises AS external
      routing information throughout the Autonomous System.  The paths
      to each AS boundary router are known by every router in the AS.
      This classification is completely independent of the previous
      classifications: AS boundary routers may be internal or area
      border routers, and may or may not participate in the backbone.

3.4.  A sample area configuration

   Figure 6 shows a sample area configuration.  The first area consists
   of networks N1-N4, along with their attached routers RT1-RT4.  The
   second area consists of networks N6-N8, along with their attached
   routers RT7, RT8, RT10 and RT11.  The third area consists of networks
   N9-N11 and Host H1, along with their attached routers RT9, RT11 and
   RT12.  The third area has been configured so that networks N9-N11 and
   Host H1 will all be grouped into a single route, when advertised
   external to the area (see Section 3.5 for more details).

   In Figure 6, Routers RT1, RT2, RT5, RT6, RT8, RT9 and RT12 are
   internal routers.  Routers RT3, RT4, RT7, RT10 and RT11 are area
   border routers.  Finally, as before, Routers RT5 and RT7 are AS
   boundary routers.

   Figure 7 shows the resulting link-state database for the Area 1.  The
   figure completely describes that area's intra-area routing.
























Moy                         Standards Track                    [Page 25]

RFC 2178                     OSPF Version 2                    July 1997


             .

⌨️ 快捷键说明

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