OSPF summary
Background
OSPF uses IP protocol 89 to communicate.
OSPF also uses two multicast groups: AllSPFRouters = 224.0.0.5, and ALLDRouters = 224.0.0.6
LSA types
OSPF routers originate LSAs to describe the local environment. All LSAs, taken together, form the link state database.
Type 1: Router-LSA
- Reports router's active interfaces, IP addresses, and neighbors.
- One such LSA per router.
- Distributed using reliable flooding: if a new, different LSA is received, the router acks it, then sends it out all of its other interfaces.
Type 2: Network-LSA
- On broadcast subnets, for all routers to form adjacencies with all other routers would require n*(n-1) links.
- Instead, each router has a link to the subnet's Network-LSA (and vice versa).
- The designated router (DR) originates the network-LSA on behalf of the subnet.
- This LSA has a list of all of the attached routers.
- On NBMA networks, all routers need to know (by configuration?) the DR and BDR, not the others. They must be able to reach the others (full mesh).
- (On point-to-multipoint networks, a full mesh is not required. There is no DR, and hence no Type 2 LSAs; only Type 1 LSAs are used.)
Type 3: Summary-LSA
- Generated by ABR to leak one area's summary address info into another area
- ABR will generate more than one summary-LSA for an area if that area's addresses cannot be properly aggregated by only one prefix.
- Reduces the size of the link state database
- Constrains flooding to an area
- Makes areas somewhat insensitive to link or router failures in another area.
- Since OSPF prefers intra-area paths, duplicate routes in another area won't affect this one.
Type 5: AS-external-LSA
- Unlike all other LSAs, these have "AS flooding scope", not"area flooding scope". In other works, they are flooded unmodified across area boundaries.
- Originated by ASBRs
- Advertises a single prefix, learned from another routing protocol.
- Coming from another internal protocol, usually use Type 1 metrics.
- Coming from an external source, usually use Type 2 metrics.
- Flooded across area boundaries, instead of being re-originated by ABRs.
Type 4: ASBR-summary-LSA
- Originated by ABRs when an ASBR is present to let other areas know where the ASBR is.
- Handled just like summary-LSAs.
Type 7: Type-7-LSA
- Used only by NSSAs, which are stub areas that contain one or more ASBRs.
- Type 7s are originated by ASBRs (only if area is configured to be a NSSA).
- ABRs hear the Type 7s, then change them into Type 5s before forwarding them.
- Identical in format to type 5s, except that they have only area flooding scope.
- Can have a N/P (do not propagate) bit set.
Type 8: external-attributes-LSA
- Never been implemented or deployed.
- Used when BGP info is carried across OSPF AS.
- Only needed when the BGP AS-path does not fit into the available 4 bytes in the AS-external-LSA "Tag" field.
- If used, the associated Type 5's tag field is set equal to the link state ID of the Type 8.
- Allows OSPF to be used instead of IBGP, and still preserves the AS-path attribute. Advantages of OSPF over IBGP:
- IBGP requires n2 mesh
- With OSPF, each BGP route traverses a subnet only once, using the OSPF flooding mechanism
- Some OSPF routers would be required to store BGP info in the form of Type 8s, requiring more memory.
Special area types
Stub areas
- Design goal: allow the use of routers with limited memory and processor.
- No AS-external-LSAs (5).
- No summary LSAs (3,4).
NSSA (not-so-stubby-area)
- Allows stub area to provide transit for small sub routing domains that are not OSPF (such as a small RIP network.
- Still protects internal routers from other area's external-LSAs.
- All routers in an area must agree that it is an NSSA, so that there are no AS-external-LSAs. Therefore, N/P bit is also part of the Hello packet.