Passa al contenuto principale

4.1. Traduzione delle LSA di Type-7 in LSA di Type-5

Questo passaggio viene eseguito come parte del calcolo Dijkstra della NSSA dopo che le route di tipo 5 e di tipo 7 sono state calcolate. Se il router che effettua il calcolo non è un router di confine d'area, questo algoritmo di traduzione dovrebbe essere ignorato. Si dovrebbero ora esaminare tutti i router di confine d'area raggiungibili nella NSSA, individuando quello con l'ID router più elevato. Se tale router è quello con l'ID router più elevato, sarà esso a tradurre le LSA di tipo 7 in LSA di tipo 5 per la NSSA; in caso contrario, l'algoritmo di traduzione non dovrebbe essere eseguito. Dovrebbero essere esaminate tutte le route di tipo 7 che sono state aggiunte alla tabella di routing. Se la LSA di tipo 7 associata alla route esaminata ha il bit P impostato e un indirizzo di inoltro non nullo, dovrebbero essere eseguiti i passaggi seguenti.

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.