Essentially, authentication is used to recognize which router can participate exchanging OSPF messages. For instance, a company has 4 routers and for security reasons, they are going to use OSPF authentication. Every router will have the same password and key id, so they are going to form a OSPF neighborhood. Let's say a fifth router is connected to the network with no good intention (it is connected to inject fake routes to fake sites.) If that router does not have the same password and same key id, it will never participate into the OSPF messages and obviously, it will never modify the routes.
By default, an OSPF device will form an adjacency with any other OSPF device as long as they have common attributes, such as network and area parameter (which can be determined by watching what an OSPF device is transmitting in its hello packets).
Also by default, OSPF edge networks (e.g. user networks) will allow an OSPF adjacency.
OSPF authentication helps insure an OSPF adjacent device is authorized to exchange routing information with your device.
I'm working on a project that includes basic router configurations. I configurated everything including: line console 0, line vty 0 15 and secret passwords. There are 3 routers in the network and every LAN is going t...