Introduction to OSPF Dynamic Routing Protocol

Source: Internet
Author: User


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. The Open Shortest Path First (OSPF) routing protocol is proposed by the IETF (Internet Engineering Task Force) IGP team. It is a SPF-based routing protocol, currently, the OSPF protocol is the second version, which is defined in RFC1247 and RFC1583. Www.2cto.com
-- OSPF is a typical Link-state routing protocol, which is generally used in the same routing domain. Here, a routing domain refers to an Autonomous System (Autonomous System), that is, AS, which refers to a group of networks that exchange route information through a unified routing policy or routing protocol. In this AS, all OSPF routers maintain a database that describes the AS structure and stores the status information of the corresponding link in the routing domain, the OSPF router uses this database to calculate its OSPF route table. -- As a Link status routing protocol, OSPF transmits the Link status broadcast packet LSA (Link State Advertisement) to all routers in a region, this 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.
Directly Connected neighbor router: After the router loses contact with the neighbor router, the router uses the Hello message to determine the neighbor's survival status. If no Hello Message from the neighbor is received within 10 seconds, or the Hello message sent from the router to the neighbor is not returned, the router will delete the route in the route table and then send other routers in the LSA announcement area. Other routers in the network or region and their connected networks: the routers use LSA to learn about other routers and networks. The LSA is spread to the entire network, which is stored in the topology table (LSDB.
Optimal Path to each destination: Use the SPF algorithm to calculate the optimal path to each destination in the network. The SPF algorithm is the basis of the OSPF routing protocol. The SPF algorithm is also known as Dijkstra algorithm, because the Shortest Path Priority Algorithm SPF was invented by Dijkstra. The SPF algorithm uses Each router as the ROOT to calculate the distance from the router to each destination. Each router calculates the topology of the routing domain based on a unified database accounting structure, which is similar to a tree, in the SPF algorithm, it is called the Shortest Path Tree. In the OSPF routing protocol, the trunk length of the shortest path tree, that is, the distance from the OSPF router to each destination router, which is called the OSPF Cost. The algorithm is as follows: cost = 100x106/link bandwidth. Here, the link bandwidth is expressed in bps. That is to say, the Cost of OSPF is inversely proportional to the bandwidth of the link. The higher the bandwidth, the smaller the Cost, which indicates the closer the OSPF to the destination. For example, the Cost of FDDI or fast Ethernet is 1, the Cost of 2 m serial links is 48, the Cost of 10 M Ethernet is 10, and the link overhead of 56 K serial lines is 1785. Add the Cost value of the root router to each destination, and set the minimum value to the optimal path. Www.2cto.com
Concept of 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. Transit region (backbone region Area0): This function is used to quickly and efficiently transmit OSPF domains of IP groups. The intermediate area connects other OSPF areas. Generally, there are no end users in the intermediate area. According to the definition, OSPF Region 0 (backbone region Area0) is the transit region. General area: the main function is to connect users and resources in the OSPF area. Regular areas are usually divided by functions or geographical locations. By default, the conventional region does not allow another region to use its connection to transmit data streams to other regions. All data streams from other regions must pass through the transit region (for example, Region 0 ). We recommend that you have no more than 50 machines in each region. The entire network supports up to 1024 vrouters.
Three tables maintained by OSPF: Neighbor table: All routers that the router considers to have a neighbor relationship with itself will appear in this table. Only when a neighbor table is formed can the router learn the network topology from other routers. Topology table: After a router establishes 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.
Route table: the router uses the 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. Router ID (route ID): the router ID is not the name of the router, but the router ID in the OSPF route protocol operation. Generally, a Loopback interface (Loopback interface) is a virtual interface on a router. It exists in Roger and does not have such a physical interface during the routing period, it is permanently enabled .) The maximum IP address configured on all physical interfaces during the routing period is the ID of the router. If the loopback address interface is configured on the vro, the IP address is automatically identified by the vro。 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. OSPF basic configuration Router1: interface ethernet 0ip address 192.1.0.129 route limit 192! Interface serial 0ip address 192.200.10.5 255.255.255.252! Www.2cto.com router ospf 100 // 100 is the process number of the ospf protocol. The range is 1-65535. Different routers in the same network that uses the OSPF Router Protocol can use different process numbers. One vro can enable multiple OSPF processes. Network 192.200.10.4 0.0.0.3 area 0 // network publishes the CIDR block address of the interface added to the OSPF protocol. Area 0 publishes the port to Area 0.
Network 192.1.0.128 0.0.0.63 area 1! Router2: interface ethernet 0ip address 192.1.0.65 255.255.255.192! Interface serial 0ip address 192.200.10.6 255.255.255.252! Router ospf 200 network 192.200.10.4 0.0.0.3 area 0 network 192.1.0.64 0.0.0.63 area 2! Router3: interface ethernet 0ip address 192.1.0.130 255.255.255.255.192! Router ospf 300 network 192.1.0.128 0.0.63 area 1! Router4: interface ethernet 0ip address 192.1.0.66 too many bytes 192! Router ospf 400 network 192.1.0.64 0.0.0.63 area 1! Run the "show ip ospf interface show ip ospf neighbor show ip route" command on www.2cto.com. Project: IT Training Center of Rongxin foreign company has set up two branches in Shanghai, it needs to be interconnected with two branches in Beijing. For good scalability, the routers of the two branches need to connect to the two core devices of the headquarters respectively, and then connect the two core devices. Use the OSPF routing protocol for interconnection. Project requirements: plan the network topology and configure devices. Multi-domain OSPF application virtual-link: 1. A domain is not connected to a backbone domain and requires a virtual-link2. there cannot be multiple OSPF domains in one OSPF network. If there are more than two OSPF domains, virtual-link3 needs to be enabled. virtual-link command expression: area-id virtual-link router-idarea-id should use the id of the area in the middle of the two areas that need to be connected, the router-id uses the router-id of the Peer device.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.