📄 rfc1587.txt
字号:
for the most part must contain a forwarding address. The execption to this is if the translation to a type-5 LSA is the result of an address range match, in which case the type-5 LSA will not contain a forwarding address (see section 4.1 for details). The forwarding address contained in type-5 LSAs will result in more efficient routing to the AS external networks when there are multiple NSSA area border routers. Having the forwarding address in the type-7 LSAs will ease the translation of type-7 into type-5 LSAs as the NSSA area border router will not be required to compute the forwarding address. If the network between the NSSA AS boundary router and the adjacent AS is advertised into OSPF as an internal OSPFColtun & Fuller [Page 6]RFC 1587 OSPF NSSA Option March 1994 route, the forwarding address should be the next hop address as is currently done in type-5 LSAs, but unlike type-5 LSAs if the intervening network is not advertised into OSPF as an internal OSPF route, the forwarding address should be any one of the router's active OSPF interface addresses. Type-5 and type-7 metrics and path types are directly comparable.3.4 Originating Type-7 LSAs NSSA AS boundary routers may originate type-7 LSAs. All NSSA area border routers must also be AS boundary routers since they all must have the capability of translating a type-7 LSAs into a type-5 LSAs (see section 3.6 routes for the translation algorithm). NSSA area border routers must set the E-bit (external bit) as well as the B-bit (border bit) in its router (type-1) LSAs (both in the backbone and in the NSSA area). When an NSSA internal AS boundary router originates a type-7 LSA that it wants to be translated into a type-5 LSA by the NSSA area border router (and subsequently flooded into the backbone), it must set the P-bit in the LS header's option field and add a valid forwarding address in the type-7 LSA. If a router is attached to another AS and is also an NSSA area border router, it may originate a both a type-5 and a type-7 LSA for the same network. The type-5 LSA will be flooded to the backbone (and all attached type-5 capable areas) and the type-7 will be flooded into the NSSA. If this is the case, the P-bit must be reset in the type-7 NSSA so the type-7 LSA isn't again translated into a type-5 LSA by another NSSA area border router. A type-7 default route (network 0.0.0.0) may be originated into the NSSA by an NSSA area border router or by an NSSA AS boundary router which is internal to the NSSA. The type-7 default route originated by the NSSA area border router must have the P-bit reset so that the default route originated by the NSSA area border router will not find its way out of the NSSA into the rest of the AS system via another NSSA area border router. The type-7 default route originated by an NSSA AS boundary router which is not an NSSA area border router may have the P-bit set. Type-7 routes which are originated by the NSSA area border router will not get added to other NSSA area border router's routing table. A default route must not be injected into the NSSA as a summary (type-3) LSA as in the stub area case. The reason for this is that the preferred summary default route would be chosen over all moreColtun & Fuller [Page 7]RFC 1587 OSPF NSSA Option March 1994 specific type-7 routes. Because summary routes are preferred to external routes and to ensure that summary routes are chosen over external within the NSSA, all summary routes (unlike stub areas in which this is optional) must be imported into an NSSA.3.5 Calculating Type-7 AS External Routes This section is very similar to section 16.4 (Calculating AS external routes) in the OSPF specification. An NSSA area border router should examine both type-5 LSAs and type-7 LSAs if either type-5 or type-7 routes need to be updated. Type-7 LSAs should be examined after type-5 LSAs. An NSSA internal router should examine type-7 LSAs when type-7 routes need to be recalculated. In relation to the steps to calculate the routing table as presented in the OSPF specification (chapter 16, "Calculation of the Routing Table"), type-7 LSAs should be examined after step 5 where the routes to external destinations are calculated. Type-7 routes are calculated by examining type-7 LSAs. Each of LSAs are considered in turn. Most type-7 LSAs describe routes to specific IP destinations. A type-7 LSA can also describe a default route for the NSSA (destination = DefaultDestination). For each type-7 LSA: 1. If the metric specified by the LSA is LSInfinity, the age of the LSA equals MaxAge or the advertising router field is equal to this router's router ID, examine the next advertisement. 2. Call the destination described by the LSA N. Look up the routing table entry for the AS boundary router (ASBR) that originated the LSA. If no entry exists for the ASBR (i.e., ASBR is unreachable), do nothing with this LSA and consider the next in the list. If the destination is the default route (destination = DefaultDestination) and if the originator of the LSA and the calculating router are both NSSA area border routers do nothing with this LSA and consider the next in the list. Else, this LSA describes an AS external path to destination N. If the forwarding address (as specified in the forwarding address field of the LSA) is 0.0.0.0, the packets routed to the external destination N will be routed to the originating ASBR. If the forwarding address is not 0.0.0.0, look up the forwarding address in the routing table. Packets routed to the external destination N will be routed within the NSSA to this forwarding address. An intra-area pathColtun & Fuller [Page 8]RFC 1587 OSPF NSSA Option March 1994 must therefore exist to the forwarding address. If no such path exists, do nothing with the LSA and consider the next in the list. Call the routing table distance to the forwarding address (or the distance to the originating ASBR if the forwarding address is 0.0.0.0) X, and the cost specified in the type-7 LSA Y. X is in terms of the link-state metric, and Y is a Type-1 or Type-2 external metric. 3. Now, look up the routing table entry for the destination N. If no entries exist for N, install the AS external path to N, with the next hop equal to the list of next hops to the forwarding address/ASBR, and the advertising router equal to ASBR. If the external metric type is 1, then the path-type is set to Type-1 external and the cost is equal to X + Y. If the external metric type is 2, the path-type is set to Type-2 external, the link-state component of the route's cost is X, and the Type-2 cost is Y. 4. Else, if the paths present in the table are not Type-1 or Type-2 external paths, do nothing (AS external paths have the lowest priority). 5. Otherwise, compare the cost of this new AS external path to the ones present in the table. Note that type-5 and type-7 routes are directly comparable. Type-1 external paths are always shorter than Type-2 external paths. Type-1 external paths are compared by looking at the sum of the distance to the forwarding address/ASBR and the advertised Type-1 paths (X+Y). Type-2 external paths are compared by looking at the advertised Type-2 metrics, and then if necessary, the distance to the forwarding address/ASBR. When a type-5 LSA and a type-7 LSA are found to have the same type and an equal distance, the following priorities apply (listed from highest to lowest) for breaking the tie. a. Any type 5 LSA. b. A type-7 LSA with the P-bit set and the forwarding address non-zero. c. Any other type-7 LSA. If the new path is shorter, it replaces the present paths in the routing table entry. If the new path is the same cost, it is added to the routing table entry's list of paths.Coltun & Fuller [Page 9]RFC 1587 OSPF NSSA Option March 19943.6 Incremental Updates Incremental updates for type-7 LSAs should be treated the same as incremental updates for type-5 LSAs (see section 16.6 of the OSPF specification). That is, if a new instance of a type-7 LSA is received it is not necessary to recalculate the entire routing table. If there is already an OSPF internal route to the destination represented by the type-7 LSA, no recalculation is necessary. Otherwise, the procedure in the proceeding section will have to be performed but only for the external routes (type-5 and type-7) whose networks describe the same networks as the newly received LSA.4.0 Originating Type-5 LSAs4.1 Translating Type-7 LSAs Into Type-5 LSAs This step is performed as part of the NSSA's Dijkstra calculation after type-5 and type-7 routes have been calculated. If the calculating router is not an area border router this translation algorithm should be skipped. All reachable area border routers in the NSSA should now be examined noting the one with the highest router ID. If this router has the highest router ID, it will be the one translating type-7 LSAs into type-5 LSAs for the NSSA, otherwise the translation algorithm should not be performed. All type-7 routes that have been added to the routing table should be examined. If the type-7 LSA (associated with the route being examined) has the P-bit set and a non-zero forwarding address, the following steps should be taken. The translation procedure must first check for a configured type-7 address range. Recall that an type-7 address range consists of an [address,mask] pair and a status indication of either Advertise or DoNotAdvertise. At most a single type-5 LSA is made for each range. If the route being examined falls within the type-7 address range, (the [address,mask] pair of the route equal to or a more specific instance of the [address,mask] pair of the type-7 address range), one of following three actions may take place. 1. When the range's status indicates Advertise and the route's address and mask are equal to the address and mask of the type-7 range a type-5 LSA should be originated if: o there currently is no type-5 LSA originated from this router corresponding to the type-7 LSA,Coltun & Fuller [Page 10]RFC 1587 OSPF NSSA Option March 1994 o the path type or the metric in the corresponding type-5 LSA is different from the type-7 LSA or o The forwarding address in the corresponding type-5 LSA is different from the type-7 LSA. The newly originated type-5 LSA will describe the same network and have the same network mask, metrics, forwarding address, external route tag and path type as the type-7 LSA, however, the advertising router field will be the router ID of this area border router. 2. When the range's status indicates Advertise and the route's address or mask indicates a more specific route (i.e., the route's address is subsumed by the range or the route has a longer mask), a type-5 LSA is generated with link-state ID equal to the range's address (if necessary, the link-state ID can also have one or more of the range's "host" bits set; see Appendix F of the OSPF specification for details), the network mask, external route tag and path type will be set to the configured type-7 range values. The advertising router field will be the router ID of this area border router. The forwarding address will not be set. The path type should always be set to the highest path type that is subsumed by the net range. The metric for the type-5 LSA will be set as follows: o if the path type is externl type 2, the type-5 metric should be set to the largest type-7 metric subsumed by this net range + 1. o if the path type is external type 1, the type-5 metric should be set to the largest metric. For example, given a net range of [10.0.0.0, 255.0.0.0] for an area that has type-7 routes of: 10.1.0.0 path type 1, metric 10 10.2.0.0 path type 1, metric 11 10.3.0.0 path type 2, metric 5 a type-5 LSA will be generated with a path type of 2 and a metric of 6.Coltun & Fuller [Page 11]RFC 1587 OSPF NSSA Option March 1994 As another example, given a net range of [10.0.0.0, 255.0.0.0] for an area that has type-7 routes of: 10.1.0.0 path type 1, metric 10 10.2.0.0 path type 1, metric 11 10.3.0.0 path type 1, metric 5 a type-5 LSA will be generated with a path type of 1 and a metric of 11. These metric and path type rules will avoid routing loops in the event that path type 1 and 2 are both used within the area. 3. When the range's status indicates DoNotAdvertise,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -