📄 rfc1247.txt
字号:
Figure 6: A sample OSPF area configuration __________________________________________[Moy] [Page 17]RFC 1247 OSPF Version 2 July 1991 Network RT3 adv. RT4 adv. _____________________________ N1 4 4 N2 4 4 N3 1 1 N4 2 3 Table 4: Networks advertised to the backbone by routers RT3 and RT4. ______________________________________ (Figure not included in text version.) Figure 7: Area 1's Database Figure 8: The backbone database ______________________________________Again, routers RT3, RT4, RT7, RT10 and RT11 are area border routers. Asrouters RT3 and RT4 did above, they have condensed the routinginformation of their attached areas for distribution via the backbone;these are the dashed stubs that appear in Figure 8. Remember that thethird area has been configured to condense networks N9-N11 and Host H1into a single route. This yields a single dashed line for networks N9-N11 and Host H1 in Figure 8. Routers RT5 and RT7 are AS boundaryrouters; their externally derived information also appears on the graphin Figure 8 as stubs.The backbone enables the exchange of summary information between areaborder routers. Every area border router hears the area summaries fromall other area border routers. It then forms a picture of the distanceto all networks outside of its area by examining the collectedadvertisements, and adding in the backbone distance to each advertisingrouter.Again using routers RT3 and RT4 as an example, the procedure goes asfollows: They first calculate the SPF tree for the backbone. This givesthe distances to all other area border routers. Also noted are thedistances to networks (Ia and Ib) and AS boundary routers (RT5 and RT7)that belong to the backbone. This calculation is shown in Table 5.Next, by looking at the area summaries from these area border routers,RT3 and RT4 can determine the distance to all networks outside their[Moy] [Page 18]RFC 1247 OSPF Version 2 July 1991 Area border dist from dist from router RT3 RT4 ______________________________________ to RT3 * 21 to RT4 22 * to RT7 20 14 to RT10 15 22 to RT11 18 25 ______________________________________ to Ia 20 27 to Ib 15 22 ______________________________________ to RT5 14 8 to RT7 20 14 Table 5: Backbone distances calculated by routers RT3 and RT4.area. These distances are then advertised internally to the area by RT3and RT4. The advertisements that router RT3 and RT4 will make into Area1 are shown in Table 6. Note that Table 6 assumes that an area rangehas been configured for the backbone which groups I5 and I6 into asingle advertisement.The information imported into Area 1 by routers RT3 and RT4 enables aninternal router, such as RT1, to choose an area border routerintelligently. Router RT1 would use RT4 for traffic to network N6, RT3for traffic to network N10, and would load share between the two for Destination RT3 adv. RT4 adv. _________________________________ Ia,Ib 15 22 N6 16 15 N7 20 19 N8 18 18 N9-N11,H1 19 26 _________________________________ RT5 14 8 RT7 20 14 Table 6: Destinations advertised into Area 1 by routers RT3 and RT4.[Moy] [Page 19]RFC 1247 OSPF Version 2 July 1991traffic to network N8.Router RT1 can also determine in this manner the shortest path to the ASboundary routers RT5 and RT7. Then, by looking at RT5 and RT7'sexternal advertisements, router RT1 can decide between RT5 or RT7 whensending to a destination in another Autonomous System (one of thenetworks N12-N15).Note that a failure of the line between routers RT6 and RT10 will causethe backbone to become disconnected. Configuring another virtual linkbetween routers RT7 and RT10 will give the backbone more connectivityand more resistance to such failures. Also, a virtual link between RT7and RT10 would allow a much shorter path between the third area(containing N9) and the router RT7, which is advertising a good route toexternal network N12.3.5 IP subnetting supportOSPF attaches an IP address mask to each advertised route. The maskindicates the range of addresses being described by the particularroute. For example, a summary advertisement for the destination128.185.0.0 with a mask of 0xffff0000 actually is describing a singleroute to the collection of destinations 128.185.0.0 - 128.185.255.255.Similarly, host routes are always advertised with a mask of 0xffffffff,indicating the presence of only a single destination.Including the mask with each advertised destination enables theimplementation of what is commonly referred to as variable-length subnetmasks. This means that a single IP class A, B, or C network number canbe broken up into many subnets of various sizes. For example, thenetwork 128.185.0.0 could be broken up into 64 variable-sized subnets:16 subnets of size 4K, 16 subnets of size 256, and 32 subnets of size 8.Table 7 shows some of the resulting network addresses together withtheir masks: Network address IP address mask Subnet size _______________________________________________ 128.185.16.0 0xfffff000 4K 128.185.1.0 0xffffff00 256 128.185.0.8 0xfffffff8 8 Table 7: Some sample subnet sizes.[Moy] [Page 20]RFC 1247 OSPF Version 2 July 1991There are many possible ways of dividing up a class A, B, and C networkinto variable sized subnets. The precise procedure for doing so isbeyond the scope of this specification. The specification howeverestablishes the following guideline: When an IP packet is forwarded, itis always forwarded to the network that is the best match for thepacket's destination. Here best match is synonymous with the longest ormost specific match. For example, the default route with destination of0.0.0.0 and mask 0x00000000 is always a match for every IP destination.Yet it is always less specific than any other match. Subnet masks mustbe assigned so that the best match for any IP destination isunambiguous.The OSPF area concept is modelled after an IP subnetted network. OSPFareas have been loosely defined to be a collection of networks. Inactuality, an OSPF area is specified to be a list of address ranges (seeSection C.2 for more details). Each address range is defined as an[address,mask] pair. Many separate networks may then be contained in asingle address range, just as a subnetted network is composed of manyseparate subnets. Area border routers then summarize the area contents(for distribution to the backbone) by advertising a single route foreach address range. The cost of the route is the minimum cost to any ofthe networks falling in the specified range.For example, an IP subnetted network can be configured as a single OSPFarea. In that case, the area would be defined as a single addressrange: a class A, B, or C network number along with its natural IP mask.Inside the area, any number of variable sized subnets could be defined.External to the area, a single route for the entire subnetted networkwould be distributed, hiding even the fact that the network is subnettedat all. The cost of this route is the minimum of the set of costs tothe component subnets.3.6 Supporting stub areasIn some Autonomous Systems, the majority of the topological database mayconsist of external advertisements. An OSPF external advertisement isusually flooded throughout the entire AS. However, OSPF allows certainareas to be configured as "stub areas". External advertisements are notflooded into/throughout stub areas; routing to AS external destinationsin these areas is based on a (per-area) default only. This reduces thetopological database size, and therefore the memory requirements, for astub area's internal routers.In order to take advantage of the OSPF stub area support, defaultrouting must be used in the stub area. This is accomplished as follows.One or more of the stub area's area border routers must advertise adefault route into the stub area via summary advertisements. These[Moy] [Page 21]RFC 1247 OSPF Version 2 July 1991summary defaults are flooded throughout the stub area, but no further.(For this reason these defaults pertain only to the particular stubarea). These summary default routes will match any destination that isnot explicitly reachable by an intra-area or inter-area path (i.e., ASexternal destinations).An area can be configured as stub when there is a single exit point fromthe area, or when the choice of exit point need not be made on a per-external-destination basis. For example, area 3 in Figure 6 could beconfigured as a stub area, because all external traffic must travelthough its single area border router RT11. If area 3 were configured asa stub, router RT11 would advertise a default route for distributioninside area 3 (in a summary advertisement), instead of flooding theexternal advertisements for networks N12-N15 into/throughout the area.The OSPF protocol ensures that all routers belonging to an area agree onwhether the area has been configured as a stub. This guarantees that noconfusion will arise in the flooding of external advertisements.There are a couple of restrictions on the use of stub areas. Virtuallinks cannot be configured through stub areas. In addition, AS boundaryrouters cannot be placed internal to stub areas.3.7 Partitions of areasOSPF does not actively attempt to repair area partitions. When an areabecomes partitioned, each component simply becomes a separate area. Thebackbone then performs routing between the new areas. Some destinationsreachable via intra-area routing before the partition will now requireinter-area routing.In the previous section, an area was described as a list of addressranges. Any particular address range must still be completely containedin a single component of the area partition. This has to do with theway the area contents are summarized to the backbone. Also, thebackbone itself must not partition. If it does, parts of the AutonomousSystem will become unreachable. Backbone partitions can be repaired byconfiguring virtual links (see Section 15).Another way to think about area partitions is to look at the AutonomousSystem graph that was introduced in Section 2. Area IDs can be viewedas colors for the graph's edges.[1] Each edge of the graph connects to anetwork, or is itself a point-to-point network. In either case, theedge is colored with the network's Area ID.A group of edges, all having the same color, and interconnected byvertices, represents an area. If the topology of the Autonomous System[Moy] [Page 22]RFC 1247 OSPF Version 2 July 1991is intact, the graph will have several regions of color, each colorbeing a distinct Area ID.When the AS topology changes, one of the areas may become partitioned.The graph of the AS will then have multiple regions of the same color(Area ID). The routing in the Autonomous System will continue tofunction as long as these regions of same color are connected by thesingle backbone region.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -