rfc1583.txt
来自「RFC 的详细文档!」· 文本 代码 · 共 1,357 行 · 第 1/5 页
TXT
1,357 行
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.
2.4. TOS-based routing
OSPF can calculate a separate set of routes for each IP Type of
Service. This means that, for any destination, there can
potentially be multiple routing table entries, one for each IP
TOS. The IP TOS values are represented in OSPF exactly as they
appear in the IP packet header.
Up to this point, all examples shown have assumed that routes do
not vary on TOS. In order to differentiate routes based on TOS,
separate interface costs can be configured for each TOS. For
example, in Figure 2 there could be multiple costs (one for each
TOS) listed for each interface. A cost for TOS 0 must always be
specified.
When interface costs vary based on TOS, a separate shortest path
Moy [Page 20]
RFC 1583 OSPF Version 2 March 1994
tree is calculated for each TOS (see Section 2.1). In addition,
external costs can vary based on TOS. For example, in Figure 2
Router RT7 could advertise a separate type 1 external metric for
each TOS. Then, when calculating the TOS X distance to Network
N15 the cost of the shortest TOS X path to RT7 would be added to
the TOS X cost advertised by RT7 for Network N15 (see Section
2.2).
All OSPF implementations must be capable of calculating routes
based on TOS. However, OSPF routers can be configured to route
all packets on the TOS 0 path (see Appendix C), eliminating the
need to calculate non-zero TOS paths. This can be used to
conserve routing table space and processing resources in the
router. These TOS-0-only routers can be mixed with routers that
do route based on TOS. TOS-0-only routers will be avoided as
much as possible when forwarding traffic requesting a non-zero
TOS.
It may be the case that no path exists for some non-zero TOS,
even if the router is calculating non-zero TOS paths. In that
case, packets requesting that non-zero TOS are routed along the
TOS 0 path (see Section 11.1).
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 topological
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
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 topological database. A router
actually has a separate topological 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 topological databases.
Moy [Page 21]
RFC 1583 OSPF Version 2 March 1994
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 backbone consists of those networks not contained in any
area, their attached routers, and those routers that belong to
multiple areas. The backbone must be contiguous.
It is possible to define areas in such a way that the backbone
is no longer contiguous. In this case the system administrator
must restore backbone connectivity by configuring 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 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.
The backbone is responsible for distributing routing information
between areas. The backbone itself has all of the properties of
an area. The topology of the backbone is invisible to each of
the areas, while the backbone itself knows nothing of the
topology of the areas.
3.2. Inter-area routing
When routing a packet between two 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.
Looking at this another way, inter-area routing can be pictured
Moy [Page 22]
RFC 1583 OSPF Version 2 March 1994
as forcing a star configuration on the Autonomous System, with
the backbone as hub and each of the 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 other networks 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. Routers with only backbone interfaces also
belong to this category. 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 and an additional copy for the
backbone. 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. 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 connected to the backbone are considered to be
internal routers.
Moy [Page 23]
RFC 1583 OSPF Version 2 March 1994
AS boundary routers
A router that exchanges routing information with routers
belonging to other Autonomous Systems. Such a router has AS
external routes that are advertised throughout the
Autonomous System. The path to each AS boundary router is
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 topological database for the Area
1. The figure completely describes that area's intra-area
routing. It also shows the complete view of the internet for
the two internal routers RT1 and RT2. It is the job of the area
border routers, RT3 and RT4, to advertise into Area 1 the
distances to all destinations external to the area. These are
indicated in Figure 7 by the dashed stub routes. Also, RT3 and
RT4 must advertise into Area 1 the location of the AS boundary
routers RT5 and RT7. Finally, external advertisements from RT5
and RT7 are flooded throughout the entire AS, and in particular
throughout Area 1. These advertisements are included in Area
1's database, and yield routes to Networks N12-N15.
Routers RT3 and RT4 must also summarize Area 1's topology for
distribution to the backbone. Their backbone advertisements are
shown in Table 4. These summaries show which networks are
contained in Area 1 (i.e., Networks N1-N4), and the distance to
these networks from the routers RT3 and RT4 respectively.
Moy [Page 24]
RFC 1583 OSPF Version 2 March 1994
...........................
. + .
. | 3+---+ . N12 N14
. N1|--|RT1|\ 1 . \ N13 /
. | +---+ \ . 8\ |8/8
. + \ ____ . \|/
. / \ 1+---+8 8+---+6
. * N3 *---|RT4|------|RT5|-------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?