[CCNA Certification]——OSPF Protocol An Introduction of OSPF Protocol
OSPF ((Open Shortest Path First) is an Interior Gateway Protocol (IGP) for routing decisions in a single autonomous system (AS). Compared with RIP, OSPF is a link state routing protocol, while RIP is a distance-vector routing protocol. The protocol administrative distance (AD) of OSPF is 110.
In order to adapt to large-scale networks, OSPF protocols divide an AS into multiple areas. Each OSPF router only maintains the link state of the area in which it is.
- The backbone area [transit area]
The main function of backbone area in OSPF is fast and efficient transmission of IP packets. At the same time, it can connect other types of OSPF areas together.
- The conventional area
The main function of conventional area in OSPF is connecting users and resources. By default, the conventional area does not allow another area to use its connection to transmit data streams to other areas. Data streams must be transit through the backbone area.
Note: OSPF adopts a strict two-layer area structure, that is, all conventional areas must be directly connected to area 0 [the backbone area]
Database types in link state routing protocol:
• The Neighbor List – lists all neighbor routers that have established adjacency relationship with each router
• Link State Database (LSDB) – lists the information of other routers in the network, thus displaying the network topology of the whole network
• The Routing Table – lists the best path to each connected network calculated by the SPF algorithm
IT Certification Training Course
The Process of OSPF Router Establishing Adjacency
1. Down: The OSPF router has not exchanged any information with other routers in this state. First, the router sends hello packets from its OSPF interface without knowing DR (if it is a designated router) and any other routers. Multicast address 224.0.0.5 is used to send hello packets.
2. Attempt: It is only applicable to NBMA network. In NBMA network, the neighbor is manually specified. In this state, the router will use HelloInterval instead of PollInterval to send hello packets
3. Init: It indicates that the Hello packet was received in DeadInterval, but the 2-Way communication is still not established
4. Two way: A two-way session is established, and RIDs appear in each other’s neighbor list. (If it is a broadcast network such as Ethernet, DR and BDR should be selected at this time.)
5. ExStart: In the initial state of information exchange, the local router and its neighbors will establish a Master/Slave relationship and determine the DD Sequence Number. The router with a large ID will become a master
6. Exchange: The information exchange status. Local routers and neighbors exchange one or more DBD packets (also known as DDP). DBD contains the abstract information about LSA entries in LSDB).
7. Loading: The information loading status. After receiving the DBD, compare the received information with the information in the LSDB. If there is an updated link state entry in the DBD, an LSR is sent to the other party to request a new LSA.
8. Full: The full adjacency state. The link state database synchronization between adjacencies is completed. It is judged by the fact that the neighbor link state request list is empty and the neighbor state is loading.
Read more: which switch technology establishes a network connection immediately when it is plugged in