Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

OSPF distance vector routing protocols are compared with link-state routing protocols

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Compared with link-state routing protocols, distance vector routing protocols choose routes according to "rumors", while the latter calculates the optimal path independently for each router.

In detail, each router running a link-state routing protocol establishes adjacencies with its neighbors and sends some data to each other (here we use the term "LSA" in OSPF). The LSA contains information about the local link, the link state, the cost of the routed interface to the link, all the neighbors connected to the link, and so on. When a router receives a LSA from another router, it makes a copy of the information and puts it in its own database and continues to send this information to other routers. If all goes well, the databases of all routers will be the same. At this time, the router uses the Dijkstra algorithm to calculate the optimal path to each router, and then finds the subnet connected by each router from the database and writes it into the routing table.

The common link-state routing protocols are OSPF (Open shortest path first), IS-IS (Intermediate system to Intermediate system) and so on.

Neighbor

The first step in establishing a link-state environment is to discover neighbors using Hello Protocol.

The Hello packet must contain information such as the ID of the router and the network address from which the packet was sent. Router ID is used to distinguish a router from a router. Other fields of the Hello packet can also have information such as subnet mask, Hello interval, line type descriptor, and so on.

When two routers establish an adjacency using Hello packets, link-state routing protocols can begin to exchange information in a controlled manner. Unlike distance vector routing protocols, link-state protocols only need to broadcast update information on interfaces that are configured with routing protocols.

Hello packets can also be used to monitor adjacencies. If a router does not receive an Hello packet from a neighbor within a certain period of time, it will consider the neighbor unreachable and break the understanding relationship. The default Hello packet delivery interval for CISCO is 10 seconds, and the death cycle is four times the interval time.

Link-state flooding diffusion

When the adjacency is established, the router begins to send LSA to its neighbors. The router saves the received LSA and spreads it to each of its neighbors in turn. Because LSA is forwarded almost immediately, and distance vector routing protocols update their routing table before sending routing updates (whether newly established or triggered), link-state protocols converge faster than distance vector protocols when the network topology changes.

The use of unicast and multicast addresses, checksums, and proactive acknowledgements can make flooding spread more efficient and reliable.

Because link-state routing protocols must ensure that all routers receive LSA, a problem arises: how does flooding stop when all routers receive LSA? Even if the TTL in the packet is aborted after it expires, these packets will inevitably consume link resources before they expire. The solution to this problem is to add a sequence number to the LSA, and if the router receives a LSA packet with the same sequence number as the previous one, it will automatically discard the packet; it will update the database only when it receives a LSA packet with a higher sequence number than the last one it received. So there's a new question: what if the serial number reaches the upper limit? There are various and complicated ways to solve this problem, as detailed in the next note.

Link-state database

After neighbors are discovered and link-state flooding is carried out, the router establishes a link-state database. The database is built based on the information in LSA. It is important to note that the LSA contains information called a cost, that is, a link to a neighbor. The cost is related to the outgoing interface, so there will be different costs on both sides of the link.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report