4.1. Übersetzen von Type-7-LSAs in Type-5-LSAs
Dieser Schritt wird als Teil der Dijkstra-Berechnung der NSSA durchgeführt, nachdem die Typ-5- und Typ-7-Routen berechnet wurden. Wenn der berechnende Router kein Area-Border-Router ist, sollte dieser Übersetzungsalgorithmus übersprungen werden. Alle erreichbaren Area-Border-Router in der NSSA sollten nun untersucht werden, wobei der Router mit der höchsten Router-ID zu beachten ist. Besitzt dieser Router die höchste Router-ID, so ist er derjenige, der die Typ-7-LSAs für die NSSA in Typ-5-LSAs übersetzt; andernfalls sollte der Übersetzungsalgorithmus nicht ausgeführt werden. Alle Typ-7-Routen, die in die Routing-Tabelle aufgenommen wurden, sollten untersucht werden. Weist die Typ-7-LSA (die mit der untersuchten Route verknüpft ist) ein gesetztes P-Bit und eine von null verschiedene Forwarding-Adresse auf, sollten die folgenden Schritte ausgeführt werden.
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.