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

Election of DR and BDR and OSPF message

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

.Dr and BDR

In the broadcast network and NBMA network, routing information is transmitted between any two routers. If there are n routers in the network, n (nmer1) / 2 adjacencies need to be established. This makes the routing changes of any router will lead to multiple transfers, wasting bandwidth resources. In order to solve this problem, the OSPF protocol defines DR (Designated Router, designated router). All routers only send information to DR, and DR sends the link state of the network.

If the DR fails due to some failure, the router in the network must re-elect the DR and synchronize with the new DR. This takes a long time, during which the routing calculation is incorrect. In order to shorten this process, OSPF proposed the concept of BDR (Backup Designated Router).

BDR is actually a backup of DR. While electing DR, BDR,BDR is also elected to establish adjacencies with all routers in this network segment and exchange routing information. When DR fails, BDR becomes DR immediately. Since there is no need for re-election and the adjacency has been established in advance, the process is very short. Of course, a new BDR needs to be re-elected at this time, although it will take a long time, but it will not affect the routing calculation.

Routers other than DR and BDR (called DR Other) will no longer establish adjacencies or exchange any routing information. This reduces the number of adjacencies between routers on the broadcast network and the NBMA network.

As shown in figure 9-20, solid lines represent Ethernet physical connections and dotted lines represent established adjacencies. It can be seen that after adopting the DR/BDR mechanism, only seven adjacencies need to be established between the five routers.

DR and BDR are not artificially specified, but are elected by all the routers in this segment. The DR priority of the router interface determines the qualification of the interface when electing DR and BDR. Routers with DR priority greater than 0 in this network segment can be used as "candidates".

The "ballot paper" used in the election is the Hello message. Each router writes its selected DR into a Hello message and sends it to each router running the OSPF protocol on the network segment. When two routers on the same network segment declare themselves as DR at the same time, the one with the highest DR priority wins. If the priority is equal, the Router ID winner wins. If a router has a priority of 0, it will not be elected as DR or BDR.

In addition, you need to be aware of the following when using DR and BDR:

(1) DR is elected only on broadcast or NBMA type interfaces. There is no need to elect DR on point-to-point or point-to-multipoint interfaces.

Therefore, when two routers are connected by a Serial port, DR/BDR will not be elected.

(2) DR refers to the concept in a network segment, which is specific to the interface of the router. A router may be DR on one interface, BDR or DR Other on another interface.

(3) if DR and BDR have been selected, when a new router joins, even if it has the highest DR priority value, it will not immediately become the DR in this network segment.

(4) DR is not necessarily the router with the highest priority of DR; similarly, BDR is not necessarily the router with the second highest priority of DR.

2.OSPF message type

OSPF has the following five message types:

(1) HELLO message (Hello Packet): the most commonly used message that is sent periodically to the neighbors of this router. It includes some timer values, DR, BDR (Backup Designated Router), and known neighbors.

(2) DD message (Database Description Packet): when the two routers synchronize the database, they use the DD message to describe their LSDB, including the summary of each LSA in the LSDB (the summary refers to the HEAD of the LSA, through which the HEAD can uniquely identify a LSA). This is done to reduce the amount of information passed between routers, because the HEAD of a LSA is only a small part of the total data volume of a LSA, and according to the HEAD, the peer router can determine whether it already has this LSA.

(3) LSR message (Link State Request Packet): after the two routers have exchanged DD messages with each other, they know which LSA of the opposite router is missing by the local LSDB, so they need to send LSR message to the other side to request the required LSA. The content includes a summary of the required LSA.

(4) LSU message (Link State Update Packet): used to send the required LSA to the peer router, the content is a collection of multiple LSA (all content).

(5) LSAck message (Link State Acknowledgment Packet): used to confirm the received LSU message. The content is the HEAD of the LSA that needs to be acknowledged (multiple LSA can be acknowledged in a single message).

The specific election process of 3.DR/BDR

(1) when the router establishes two-way communication (2-way) with its neighbors, by default, the router waits for wait time time (default 40 is the same as dead time) to receive the hello message advertisement DR/BDR sent by the neighbor router. If the router receives the hello message of BDR or the hello message of DR (no specified BDR), it is considered that there is already DR in the network. There is no need to elect DR, and the original DR is used directly. There is no need to wait for wait time time at this time, you can quickly elect BDR (if not).

(2) if the router does not receive the message described in (1), after waiting for wait time time, it declares itself to be DR and BDR (priority > 0).

(3) from the list of all routers that declare themselves to be BDR, elect a BDR based on priority and Router ID. If no router declares itself as BDR, the highest priority is BDR (priority > 0), otherwise the highest Router ID is BDR.

(4) remove the routers in (3), and if any of the remaining routers declare themselves as DR, a new DR is elected according to the priority and Router ID. (this usually occurs when two networks merge, because both networks used to have DR and now need to be re-elected).

(5) if the situation in (4) does not exist, the BDR elected in (3) is called DR and the BDR is re-elected.

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