4.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,
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.
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,
the type-5 LSA is suppressed and the component networks
remain hidden from the rest of the AS.
By default (given that the P-bit is set and the LSA has a
non-zero forwarding address) if a network is not contained
in any explicitly configured address range, a type-7 to
type-5 LSA translation will occur.
A new instance of a type-5 LSA should be originated and
flooded to all attached type-5 capable areas if one of the
following is true.
1. There currently is no type-5 LSA originated from this
router corresponding to the type-7 LSA.
2. The path type or the metric in the corresponding
type-5 LSA is different from the type-7 LSA.
3. The forwarding address in the corresponding
type-5 LSA is different from the type-7 LSA.
The newly originated type-5 LSAs 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.
The advertising router field will be the router ID of this
area border router.
As with all newly originated type-5 LSAs, a type-5 LSA that
is the result of a type-7 to type-5 translation (type-7 range
or default case) is flooded to all attached type-5 capable
areas.