This article describes the OSPF protocol, a commonly used network protocol for vrouters, and provides a detailed description of its features, I hope this article will help you.
In view of the many network problems caused by the early distance vector protocol, network designers have developed an updated and more advanced routing protocol-Link State routing protocol. OSPF is a link-State routing protocol. With the rapid development of Internet technology in the world, OSPF has become one of the most widely used routing protocols for Internet Wide Area Networks and Intranet enterprise networks. As a routing protocol for link status, OSPF transmits the LSALink State Advertisement of the link status broadcast packet to all routers in a region, which is different from the distance vector routing protocol. A router running the distance vector routing protocol Transmits some or all route tables to its adjacent routers.
The OSPF routing protocol is also an IGP protocol. It can only work in autonomous domain systems and cannot work across autonomous domain systems. Compared with the distance vector routing protocol, the OSPF Routing Protocol has the advantage of fast convergence and wider applicability.
In a large network topology, if each vro transmits and updates the route information of the entire network, it will seriously occupy bandwidth resources, when audio and video-based data is transmitted, such as the IT Training Center of Rongxin foreign company, the audio and video transmission is not smooth. The OSPF routing protocol solves these problems well. At the beginning of work, we first established a neighbor relationship with the adjacent routers to form a neighbor table, and then exchanged the network topology we knew. The router does not perform any routing operations without learning all the network topologies, because the route table is empty at this time. After the router learns all the network topologies and establishes a topology table, also known as the link state database), it uses the Shortest Path priority SPF algorithm to calculate the optimal route from the topology table. Because all routers running the OSPF Routing Protocol maintain the same topology, And the routers can calculate routes themselves, these routers do not need to periodically send route update packages, this effectively reduces the bandwidth usage.
Tip:
The OSPF Protocol needs to be considered for routing devices. Although the OSPF protocol reduces the bandwidth usage, it needs to calculate the entire network topology, so the hardware facilities of the router, CPU, memory, and so on all have high requirements.
In a network running the OSPF routing protocol, when the network topology changes, for example, a physical line fails. The neighbor router that finds this change will send the triggered route update package-link status update package LSU to other routers ). The LSU contains information about the changed CIDR blocks and the link status announcement LSA ). The router that receives the update packet will continue to send updates to other routers, and re-calculate the route with the changed CIDR Block in the topology table based on the information in LSA. Because there is no link holding time, the OSPF routing protocol converges rapidly, which is critical for large networks.
The OSPF routing protocol can also divide a large network area, which IS similar to IS-IS. The difference IS that there will be a unique backbone area in OSPF. In this way, it plays a very good role in the summary of route information. You can also select devices of different costs based on the location of the region where the devices are used, and have a good plan for engineering costs. This feature also enables OSPF routing protocols to work normally and efficiently in large-scale routing networks.
1. Link
The network line connected to the router that runs the OSPF routing protocol is called a link.
The router checks the network status of the connection and sends the information to the neighbor through all its interfaces. This process is called "Flooding )". The router that runs the OSPF routing protocol obtains information about the link from the neighbor and transmits the information to other neighbors.
2. Link Status
The status of the link, whether it is normal or a fault, is called the link status.
In OSPF, you only need to send the link status information to ensure that the Network is ready. This information is also used to exchange learning route information.
3. Region
The OSPF Routing Protocol divides a large-scale network into multiple small-range regions to avoid the disadvantages of large-scale networks and improve network performance. The division of regions in OSPF is very important. Many companies' interview questions will involve this aspect. We will learn more about OSPF later.
4. Neighbors
When two routers that run the same OSPF routing protocol are physically connected directly, they can become neighbors. Route information can be exchanged only when they become neighbors. When there is a problem with the line, you can view the neighbor status to troubleshoot the fault.
5. Link overhead
The OSPF routing protocol calculates the Optimal Path Selection by calculating the bandwidth of the link. Each link has different metric values based on different bandwidths. This metric value is called "overhead Cost)" In OSPF routing protocol )".
The link overhead of 10 Mbps Ethernet is 10, the link overhead of 16 Mbps licensing ring network is 6, the overhead of FDDI or fast Ethernet is 1, and the overhead of 2 m serial link is 48, the cost of a 56 KB serial line is 1785.
The router adds the overhead of the entire path. The minimum sum is the optimal path.
6. Neighbor table
The OSPF Routing Protocol also needs to maintain three tables, same as that of the source and source networks of the source network. The most basic is the neighbor table.
All vrouters that are physically connected to the router in the OSPF route protocol are included in this table. Only a neighbor table is formed, and the router can learn the topology like other routers.
7. Topology table
After a router has created a neighbor table, the router running the OSPF routing protocol will notify each other of the network topology they know to create a topology table. In a region, all routers should form the same topology. The router can use the SPF algorithm to calculate routes from the topology only after the topology table is created.
8. Route table
The router uses a route table to route data packets. In a router that runs the OSPF routing protocol, after the complete topology table is created, the router calculates the outbound route from the topology table by using the SPF algorithm based on the link bandwidth.
9. Router ID Route ID)
The router ID is not the name of the router, but the identifier of the router in the OSPF routing protocol operation. In general, Loopback Interface is not configured: a virtual Interface on a vro. It exists logically and does not have this physical Interface on the vro. It is permanently enabled .) The maximum IP address configured on all physical interfaces of the vro。 is the ID of the vro. If the loopback address interface is configured on the router, the loopback address is automatically identified by the router regardless of the IP address on the loopback address. When multiple loopback interfaces are configured on the vro, the maximum IP address of these interfaces will be used as the router identifier.
In the actual project, you may encounter a situation where no Route ID is set. The default maximum physical interface address of the router is Route ID, and this interface is not connected to any device, that is, the Shut Down state. At this time, OSPF will not start with the Shut of the Route ID regardless of the status of other interfaces of the router. Therefore, you must use the Loopback address as the Route ID when setting the Route ID, because this address is never closed, and it is best to have a complete plan.
10. LSA and LSU
The status update of a route is called LSA, And the status update of a link is called LSU. the LSU update package can contain multiple LSAs.
11. DR and BDR
When several routers work on the same CIDR Block, the OSPF Routing Protocol defines DR and BDR to reduce the number of route information exchanges in the CIDR block. Collects link status notifications in the network and sends them to other routers in a centralized manner. BDR is actually a DR backup. When the DR itself is normal, BDR does not work. Once the DR encounters a problem, BDR will replace the DR. In actual engineering, the concepts of DR and BDR are not widely used.