How OSPF establishes a neighbor
OSPF routers send Hello packets to declare their presence on a network segment and listen for other routers. These Hellos are either multicast to 224.0.0.5 or unicast by static configuration. After OSPF router receives a Hello packet from a neighboring router on the same segment, it performs a series of checks and if they pass, the router is considered a neighbor.
what are the requirements to become a neighbor
Identical area number and type
Identical netmask, both routers must be in the same IP network
Identical Hello and Dead intervals
Matching authentication (if used)
Unique Router IDs
what is an LSA and what are the different types
LSA, or Link State Advertisement, is a data structure used by OSPF to describe an object of the network, its properties and its relation to other objects in the network. There are several types of LSAs in OSPF:
LSA1: Router-LSA. Describes a router and its direction connections to stub networks, transit networks and other routers.
LSA2: Network-LSA. Describes a multiaccess transit network and its connections to other routers attached to it.
LSA3: Summary-LSA. Describes IP prefixes located in other areas
LSA4: Summary-LSA. Describes the autonomous system boundary routers (ASBR routers) present in other areas
LSA5: External-LSA. Describes external routes redistributed by ASBRs into the OSPF from outside.
LSA7: NSSA-LSA. Describes external routes redistributed by ASBRs into the OSPF from outside, specifically in NSSA areas
How OSPF elects DR and BDR
OSPF elects DR and BDR routers on every multiaccess segment in a network. The elections are performed in the 2 Way state based on member routers’ interface priorities and Router IDs. The router with the highest priority becomes the DR, the router with the second highest priority becomes the BDR. If at any point, the priorities are the same, Router ID will be used as a tiebreaker: the router with the higher Router ID will win the particular position. Also, DR/BDR elections are non-preemptive. Once the DR/BDR have been elected, an arrival of a new router with a higher priority will not cause the elections to be repeated.
What are the 5 types of OSPF packets
Hello packet
Database Descriptor packet
Link State Request packet
Link State Update packet
Link State Acknowledgment packet
Hello is a protocol used by OSPF routers to find the neighbor devices and establish neighbor relationships between OSPF routers.
Hello Packet contains the following data:
1. ROUTER ID = Router ID, this is a 32-bit number that is unique to this router
2. HELLOS & DEAD INTERVALS = Hello and dead interval Period of time between hellos and the dead timer, these values must match between two routers becoming neighbors
3. NEIGHBOR LIST = Is a List of neighbor Router IDs that this router sees as their neighbor
4. AREA ID = Area ID Area number, this value must be identical between two routers becoming neighbors
5. ROUTER PRIORIY = Router Priority of this interface, the router advertising the highest priority is elected the designated router during the DR/DBR election process.
6. ROUTER ID = The Router ID of who this router believes is the DR and BDR IP address of designated routers
7. AUTHENTICATION = If you have authentication set it is important that the Password matches between the two routers becoming neighbors.
8. STUB AREA FLAG = If the routers becoming neighbors are in a Stub Area, then the Stub Area Flag must be set