Point-to-point, multipoint, broadcast and nonbroadcast.
There are five OSPF Network types.
This is the most common kind of OSPF network type. It is a multi-access network like an ethernet segment for which it is the default network type.
Frame-relay and MPLS are where this network type is found, neighbors are statically defined in these networks. It is designed for networks that do no support broadcasts and is the default network type for Frame-relay.
Used in a hub and spoke model where broadcast traffic is permitted. Used with multi-point frame-relay connections.
Used in a hub and spoke model where broadcast traffic is not permitted, it is a variation of point-to-multipoint.
On a point-to-point network there is only one other neighbor on the network so there is no DR and BDR election, along with Broadcast networks these are the two most common OSPF Network types.
Router(config-router)# area 22 stub
Router(config-router)# area 22 stub no-summary
Router(config-router)# area 22 nssa
Router(config-router)# area 22 nssa no-summary
show ip ospf database
Type 1 LSAs pass from a router to everyone else in the same area. They will not leave an area. They advertise the distance of the router and all the links that a router has.
Type 2 LSAs are advertisements sent from the DR. It lists the known routers in the area, the DR and the BDR. If no Type 2 LSA is heard by the routers in an Area for a period of time then an election needs to take place.
Type 3 LSAs traverse area borders. They are only generated by ABRs. If summarization is configured then they are generating Type 3 LSAs, if summarisation is not configured then the ABR is taking a Type 1 LSA generated by another router and flagging it as a Type 3 LSA.
Type 4 LSAs are from ASBRs. If an external network is being redistributed into an area then that will be a Type 4 LSA. These show in the routing table as
O E1 and
O E2 routes.
Type 5 LSAs are routes that originally from outside the AS. Type 4 LSAs work together with Type 5 LSAs to produce routes to external networks. The Type 4 LSAs advertise a route from the router to the ASBR, the Type 5 LSA then provides the route to the external network.
Type 7 LSAs are only used from advertisements that are generated by OSPF NSSAs (Not So Stubby Areas).
Reserved for future use, companies can use these however they want. Cisco assigns them to scopes as per the table.
These are routes that are originated from within the same area.
Routes originated from another area within the same Autonomous System (AS)
These are routes that are redistributed into OSPF
Cost = external cost + internal cost
Cost = external cost
Virtual links should be used as a temporary solution to a fault on the network. They allow a virtual link between a disconnected area and Area 0. When you are configuring a virtual link you should use the router IDs of the routers that are being linked as this will allow OSPF to use the most efficient path to the other side of the link as possible. If you were to use an IP address then the choice of paths to the other side of the virtual link could become limited.