Skip to main content

13. Maintaining the forwarding cache

A MOSPF router may, for resource reasons, limit the size of its forwarding cache. At any time cache entries can be purged to make room for newer entries, since the purged entries can always be rebuilt when necessary. This memo does not specify an algorithm to select which entries to purge. However, care should be taken to ensure that any particular entry is not continually rebuilt and then purged again (i.e., thrashing should be avoided).

The building of the forwarding cache has been previously described in Section 12. There are events that force one or more forwarding cache entries to be deleted; these events are described below. Note that deleted cache entries will be rebuilt on an as-needed basis.

  • When the internal topology of the MOSPF system changes, all forwarding cache entries must be deleted. This is because internal topology changes may invalidate the previously calculated datagram shortest-path trees. Since the multicast routing calculation depends on the result of the unicast routing calculations, the forwarding cache should be cleared after the unicast routing table is rebuilt. Internal topology changes are indicated when both a) a new instance of either a router-LSA or a network-LSA is received and b) the contents of the new advertisement (other than the LS age, LS sequence number and LS checksum fields) are different from the previous instance. This covers routers and links going up or down, routers that change from being multicast-incapable to being multicast-capable, etc.

  • When a Type 3 summary-link-LSA (network summary) changes, those forwarding cache entries specifying datagram sources belonging to the range of addresses described by the updated summary-link-LSA must be deleted. See Sections 12.2.3 and 12.2.5.

  • Suppose that the content of an AS external-link-LSA changes. If the AS external-link-LSA describes an external network N, then all forwarding cache entries specifying an external source network that is contained in N or that contains N (i.e., external sources that are a subset or a superset of N) must be deleted.

  • When membership in a multicast group changes, all forwarding cache entries for the particular group must be deleted. Group membership changes are indicated when either a) the content of a group-membership-LSA changes or b) an entry in the local group database (see Section 8.4) changes.

  • When the cost to an AS boundary router or to a forwarding address specified by one or more AS external-link-LSAs changes, all forwarding cache entries specifying an external network as datagram source must be deleted. In this case, potentially all inter-AS datagram shortest-path trees have been invalidated. The forwarding cache entries should be deleted after the new best cost to the AS boundary router/forwarding address has been calculated.