You’ll know it at a glance: OSPF protocol

1. Why is a dynamic routing protocol needed?

Static routing is a routing entry manually configured and maintained by engineers. The command line is simple and clear, and is suitable for small or stable networks. Static routing has the following problems:

  1. Unable to adapt to larger networks: As the number of devices increases, the amount of configuration increases dramatically.
  2. Unable to dynamically respond to network changes: When the network changes, the network cannot automatically converge, requiring engineers to manually modify it.

2. Classification of dynamic routing protocols

3. Distance vector routing protocol

Routers running distance vector routing protocols periodically flood their routing tables. Through routing interaction, each router learns routes from adjacent routers and loads them into its own routing table.

For all routers in the network, the router does not know the topology of the network, but simply knows where to go to a certain destination and how far away it is. This is the essence of the distance vector algorithm.

4. Link State Routing Protocol - LSA Flooding

Unlike distance vector routing protocols, link state routing protocols advertise link states rather than routing tables. Routers running link state routing protocols will first establish a protocol neighbor relationship, and then start exchanging LSA (Link State Advertisement) with each other.

5. Link state routing protocol - LSDB establishment

Each router generates LSAs, and the router puts the received LSAs into its own LSDB (Link State DataBase, link state database). The router masters the topology of the entire network through LSDB.

6. Link state routing protocol - SPF calculation

Each router is based on LSDB and uses the SPF (Shortest Path First) algorithm for calculation. Each router calculates a "tree" with itself as the root, a loop, and the shortest path. With this "tree," the router already knows the preferred path to every corner of the network.

7. Summary of link state routing protocols

  • Link state routing protocol has four steps:
    • The first step is to establish neighbor relationships between adjacent routers.
    • The second step is to exchange link status information and synchronize LSDB between neighbors.
    • The third step is to calculate the optimal path.
    • The fourth step is to generate routing table entries based on the shortest path tree and load them into the routing table.

Reference books:

Guess you like

Origin blog.csdn.net/yuyeconglong/article/details/132779765