A designated forwarder election method, system and network device
Patent Information
- Application Number
- CN202510749780.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2045-06-05
AI Technical Summary
[0004]但是,若在同一时刻冗余组中存在多个网络设备均为DF,则多个作为DF的网络设备均会转发报文导致报文的冗余转发问题,或者同一时刻冗余组中的所有网络设备均为BDF,会导致没有网络设备转发报文,导致报文转发失败产生丢包问题,进而导致网络传输不稳定
[0083] In the scheme provided in this application embodiment, both the first network device and the second network device perform DF election, and they exchange effective timestamps. Both devices configure resources according to their respective election results upon reaching their effective timestamps. The effective timestamp is a preset time period after the first network device begins DF election. Therefore, before the effective timestamp arrives, the first network device has time to perform DF election and send the first election result to the hardware for resource configuration. It also provides time for the first network device to send the second routing information to the second network device, for the second network device to receive the second routing information, perform DF election, and send the second election result to the hardware for resource configuration. In other words, theoretically, the first and second network devices can complete the pre-configuration of resource configuration before the effective timestamp arrives. By jointly performing resource configuration at the effective timestamp, the timing of their resource configuration is the same, theoretically allowing them to be configured as DF and BDF respectively at the same time. This avoids the problem of multiple DFs in the redundancy group at the same time or all network devices in the redundancy group being BDFs at the same time, thereby improving network transmission stability.
Smart Images

Figure CN120455232B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network technology, and in particular to a method, system and network device for electing a designated repeater. Background Technology
[0002] EVPN (Ethernet Virtual Private Network) is a high-efficiency Layer 2 network virtualization technology widely used in data centers and wide area networks to achieve flexible connectivity in multi-tenant environments. EVPN allows for the configuration of redundancy groups, which contain multiple network devices connected to the same endpoint. All network devices in the redundancy group can forward packets for the endpoint; therefore, a failure of some network devices in the redundancy group will not affect the normal forwarding of packets.
[0003] In a redundancy group, network devices are divided into Designated Forwarders (DFs) and Backup Designated Forwarders (BDFs). When each network device is operating normally, the DF is used for packet forwarding. If the original DF fails, the original BDF, acting as a backup, can re-elect a DF to replace it for packet forwarding. According to the EVPN protocol, each network device in the redundancy group performs a DF election to determine whether it will become a DF or a BDF.
[0004] However, if multiple network devices in the redundancy group are all DFs at the same time, the multiple DFs will forward packets, leading to redundant packet forwarding. Alternatively, if all network devices in the redundancy group are BDFs at the same time, no network device will forward packets, resulting in packet forwarding failure and packet loss, which in turn leads to unstable network transmission. Summary of the Invention
[0005] The purpose of this application is to provide a designated repeater election method, system, and network device to improve the stability of network transmission. The specific technical solution is as follows:
[0006] In a first aspect, embodiments of this application provide a designated repeater election method, applied to a first network device, the method comprising:
[0007] Receive the first routing information sent by the second network device;
[0008] Based on the first routing information, the second routing information of the first network device, and the preset designated forwarder (DF) election rules, a DF election is performed to obtain the first election result;
[0009] Send the second routing information and the effective timestamp to the second network device so that the second network device can perform DF election based on the first routing information, the second routing information and the preset DF election rules, and obtain the second election result. When the effective timestamp is reached, resource configuration is performed according to the second election result. The effective timestamp is the timestamp after a preset time period since the first network device started performing DF election.
[0010] Resource allocation is performed according to the first election result upon reaching the effective timestamp.
[0011] In one embodiment of this application, the step of configuring resources according to the first election result upon reaching the effective timestamp includes:
[0012] The first election result and the effective timestamp are sent to the first hardware driver of the first network device so that the first hardware driver can perform resource configuration according to the first election result when the effective timestamp is reached.
[0013] In one embodiment of this application, the first routing information includes first DF election information and first Ethernet segment information of the second network device. The first Ethernet segment information represents the Ethernet segment where the second network device is located. The second routing information includes second DF election information and second Ethernet segment information of the first network device. The second Ethernet segment information represents the Ethernet segment where the first network device is located. The step of performing DF election based on the first routing information, the second routing information of the first network device, and a preset designated forwarder DF election rule to obtain a first election result includes:
[0014] If the Ethernet segment information represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then a DF election is performed based on the first DF election information, the second DF election information, and the preset DF election rules to obtain the first election result.
[0015] In one embodiment of this application, the first network device is connected to a clock source, and the method further includes:
[0016] Receive the time reference signal sent by the clock source;
[0017] The clock of the first network device is calibrated according to the time reference signal;
[0018] Based on the clock of the first network device, a valid timestamp is generated, and it is determined whether the valid timestamp has been reached.
[0019] Secondly, embodiments of this application provide a designated repeater election method, applied to a second network device, the method comprising:
[0020] Send first routing information to the first network device so that the first network device can perform DF election based on the first routing information, the second routing information of the first network device and the preset specified forwarder DF election rules, obtain the first election result, and perform resource configuration according to the first election result when the effective timestamp is reached. The effective timestamp is the timestamp after a preset time period since the first network device started performing DF election.
[0021] Receive the second routing information and the effective timestamp sent by the first network device;
[0022] Based on the first routing information, the second routing information, and the preset DF election rules, a DF election is performed to obtain a second election result;
[0023] Resource allocation is performed according to the second election result upon reaching the effective timestamp.
[0024] In one embodiment of this application, the step of configuring resources according to the second election result of DF upon reaching the effective timestamp includes:
[0025] The second election result and the effective timestamp are sent to the second hardware driver of the second network device so that the second hardware driver can perform resource configuration according to the second election result when the effective timestamp is reached.
[0026] In one embodiment of this application, the first routing information includes first DF election information and first Ethernet segment information of the second network device, wherein the first Ethernet segment information represents the Ethernet segment where the second network device is located, and the second routing information includes second DF election information and second Ethernet segment information of the first network device, wherein the second Ethernet segment information represents the Ethernet segment where the first network device is located, and the step of performing DF election based on the first routing information, the second routing information, and the preset DF election rules to obtain a second election result includes:
[0027] If the Ethernet segment information represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then a DF election is performed based on the first DF election information, the second DF election information, and the preset DF election rules to obtain a second election result.
[0028] In one embodiment of this application, the second network device is connected to a clock source, and the method further includes:
[0029] Receive the time reference signal sent by the clock source;
[0030] The clock of the second network device is calibrated according to the time reference signal;
[0031] Based on the timing of the clock of the second network device, determine whether the effective timestamp has been reached.
[0032] Thirdly, embodiments of this application provide a designated repeater election system, the system comprising: a first network device and a second network device;
[0033] The second network device is used to send first routing information to the first network device;
[0034] The first network device is configured to perform a DF election based on the first routing information, the second routing information of the first network device, and a preset specified DF election rule to obtain a first election result; send the second routing information and an effective timestamp to the second network device; and perform resource configuration according to the first election result when the effective timestamp is reached.
[0035] The second network device is further configured to perform DF election based on the first routing information, the second routing information, and the preset DF election rules; and to perform resource configuration according to the second election result when the effective timestamp is reached.
[0036] In one embodiment of this application, the first network device is specifically used for:
[0037] The first election result and the effective timestamp are sent to the first hardware driver of the first network device so that the first hardware driver can perform resource configuration according to the first election result when the effective timestamp is reached;
[0038] The second network device is specifically used for:
[0039] The second election result and the effective timestamp are sent to the second hardware driver of the second network device so that the second hardware driver can perform resource configuration according to the second election result when the effective timestamp is reached.
[0040] In one embodiment of this application, the first routing information includes first DF election information and first Ethernet segment information of the second network device, wherein the first Ethernet segment information represents the Ethernet segment in which the second network device is located, and the second routing information includes second DF election information and second Ethernet segment information of the first network device, wherein the second Ethernet segment information represents the Ethernet segment in which the first network device is located.
[0041] The first network device is specifically used for:
[0042] If the Ethernet segment information represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then DF election is performed based on the first DF election information, the second DF election information and the preset DF election rules to obtain the first election result;
[0043] The second network device is specifically used for:
[0044] If the Ethernet segment information represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then a DF election is performed based on the first DF election information, the second DF election information, and the preset DF election rules to obtain a second election result.
[0045] In one embodiment of this application, the first network device and the second network device are connected to the same clock source;
[0046] The first network device is further configured to:
[0047] Receive a time reference signal sent by the clock source; calibrate the clock of the first network device according to the time reference signal; generate an effective timestamp based on the timing of the clock of the first network device, and determine whether the effective timestamp has been reached;
[0048] The second network device is also used for:
[0049] Receive the time reference signal sent by the clock source; calibrate the clock of the second network device according to the time reference signal; determine whether the effective timestamp has been reached based on the timing of the clock of the second network device.
[0050] Fourthly, embodiments of this application provide a network device, the network device comprising:
[0051] processor;
[0052] transceiver;
[0053] A machine-readable storage medium storing machine-executable instructions that can be executed by the processor, the machine-executable instructions causing the processor to perform the steps of the method described in either the first aspect or the second aspect.
[0054] Fifthly, embodiments of this application provide a designated repeater election device, applied to a first network device, the device comprising:
[0055] The first information receiving module is used to receive the first routing information sent by the second network device;
[0056] The first election module is used to perform DF election based on the first routing information, the second routing information of the first network device, and the preset designated forwarder DF election rules, and obtain the first election result;
[0057] The second information sending module is used to send the second routing information and the effective timestamp to the second network device, so that the second network device can perform DF election based on the first routing information, the second routing information and the preset DF election rules, obtain the second election result, and perform resource configuration according to the second election result when the effective timestamp is reached. The effective timestamp is the timestamp after a preset time period since the first network device started performing DF election.
[0058] The first resource configuration module is used to configure resources according to the first election result when the effective timestamp is reached.
[0059] In one embodiment of this application, the first resource configuration module is specifically used for:
[0060] The first election result and the effective timestamp are sent to the first hardware driver of the first network device so that the first hardware driver can perform resource configuration according to the first election result when the effective timestamp is reached.
[0061] In one embodiment of this application, the first routing information includes first DF election information and first Ethernet segment information of the second network device. The first Ethernet segment information represents the Ethernet segment where the second network device is located. The second routing information includes second DF election information and second Ethernet segment information of the first network device. The second Ethernet segment information represents the Ethernet segment where the first network device is located. The first election module is specifically used for:
[0062] If the Ethernet segment information represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then a DF election is performed based on the first DF election information, the second DF election information, and the preset DF election rules to obtain the first election result.
[0063] In one embodiment of this application, the first network device is connected to a clock source, and the apparatus further includes:
[0064] The first reference signal receiving module is used to receive the time reference signal sent by the clock source;
[0065] The first clock calibration module is used to calibrate the clock of the first network device according to the time reference signal;
[0066] The first timestamp determination module is used to generate an effective timestamp based on the clock of the first network device and determine whether the effective timestamp has been reached.
[0067] Sixthly, embodiments of this application provide a designated repeater election device, applied to a second network device, the device comprising:
[0068] The first information sending module is used to send first routing information to the first network device, so that the first network device can perform DF election based on the first routing information, the second routing information of the first network device and the preset specified forwarder DF election rules, obtain the first election result, and perform resource configuration according to the first election result when the effective timestamp is reached. The effective timestamp is the timestamp after a preset time period since the first network device started performing DF election.
[0069] The second information receiving module is used to receive the second routing information and the effective timestamp sent by the first network device;
[0070] The second election module is used to perform DF election based on the first routing information, the second routing information, and the preset DF election rules to obtain a second election result;
[0071] The second resource configuration module is used to configure resources according to the second election result when the effective timestamp is reached.
[0072] In one embodiment of this application, the second resource configuration module is specifically used for:
[0073] The second election result and the effective timestamp are sent to the second hardware driver of the second network device so that the second hardware driver can perform resource configuration according to the second election result when the effective timestamp is reached.
[0074] In one embodiment of this application, the first routing information includes first DF election information and first Ethernet segment information of the second network device, wherein the first Ethernet segment information represents the Ethernet segment where the second network device is located, and the second routing information includes second DF election information and second Ethernet segment information of the first network device, wherein the second Ethernet segment information represents the Ethernet segment where the first network device is located, and the second election module is specifically used for:
[0075] If the Ethernet segment information represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then a DF election is performed based on the first DF election information, the second DF election information, and the preset DF election rules to obtain a second election result.
[0076] In one embodiment of this application, the second network device is connected to a clock source, and the apparatus further includes:
[0077] The second reference signal receiving module is used to receive the time reference signal sent by the clock source;
[0078] The second clock calibration module is used to calibrate the clock of the second network device according to the time reference signal;
[0079] The second timestamp determination module is used to determine whether the effective timestamp has been reached based on the clock of the second network device.
[0080] In a seventh aspect, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described in either the first or second aspect.
[0081] Eighthly, embodiments of this application also provide a computer program product containing instructions that, when run on a computer, cause the computer to perform the methods described in either the first or second aspect.
[0082] Beneficial effects of the embodiments in this application:
[0083] In the scheme provided in this application embodiment, both the first network device and the second network device perform DF election, and they exchange effective timestamps. Both devices configure resources according to their respective election results upon reaching their effective timestamps. The effective timestamp is a preset time period after the first network device begins DF election. Therefore, before the effective timestamp arrives, the first network device has time to perform DF election and send the first election result to the hardware for resource configuration. It also provides time for the first network device to send the second routing information to the second network device, for the second network device to receive the second routing information, perform DF election, and send the second election result to the hardware for resource configuration. In other words, theoretically, the first and second network devices can complete the pre-configuration of resource configuration before the effective timestamp arrives. By jointly performing resource configuration at the effective timestamp, the timing of their resource configuration is the same, theoretically allowing them to be configured as DF and BDF respectively at the same time. This avoids the problem of multiple DFs in the redundancy group at the same time or all network devices in the redundancy group being BDFs at the same time, thereby improving network transmission stability. Attached Figure Description
[0084] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0085] Figure 1 A flowchart illustrating the first designated repeater election method provided in this application embodiment;
[0086] Figure 2 A schematic diagram of a network structure provided in an embodiment of this application;
[0087] Figure 3 A flowchart illustrating the second designated repeater election method provided in this application embodiment;
[0088] Figure 4 A flowchart illustrating the third designated repeater election method provided in this application embodiment;
[0089] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0090] Figure 6 A schematic diagram of the structure of the first designated repeater election device provided in the embodiments of this application;
[0091] Figure 7 This is a schematic diagram of the structure of a second designated repeater election device provided in an embodiment of this application. Detailed Implementation
[0092] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.
[0093] To highlight the differences between the embodiments of this application and related technologies, the related technologies will be described first.
[0094] RFC 8584 provides a detailed specification for the DF election mechanism in EVPN, defining a timer-based DF election delay mechanism. This mechanism allows network nodes to delay the DF election operation for a certain period (default 3 seconds) after receiving new routing information. This avoids frequent changes in network state over a period of time, which would cause network nodes to frequently receive new routing information, frequently perform DF elections, and frequently configure resources based on the election results, thus affecting network stability. Furthermore, the delay provides time for network devices to exchange routing information, ensuring that network devices have consistent routing information during DF elections. Electing based on consistent routing information avoids conflicts in DF election results among network devices in redundant groups.
[0095] However, if the above mechanism is adopted, after network device 1 receives the routing information from network device 2, it sends its own routing information to network device 2 and performs DF election after a certain delay. Network device 2, after receiving the routing information from network device 1, also performs DF election after a certain delay. However, network device 1 starts timing its delay after receiving the routing information from network device 2 and sends its own routing information to network device 2. Since the routing information takes some time to be sent to network device 2, the timing of the delay start for network device 1 and network device 2 differs, leading to different arrival times for their timing and different start times for DF election. Network device 1 is highly likely to complete DF election before network device 2, causing it to prioritize changing its DF or BDF configuration, while network device 2 has not yet changed it. This results in multiple network devices in the redundancy group being DFs or all devices being BDFs at the same time.
[0096] To address the above issues, a fast DF election mechanism based on timestamps has been further proposed in related technologies. As shown in the scenario above, after network device 1 receives routing information from network device 2, it calculates time B, the time after which it will wait from time A, based on the time A at which it received the routing information from network device 2. It then sends the routing information and the timestamp of time B to network device B. Both network device A and network device B begin DF election when time B arrives.
[0097] Using timestamps allows network device 1 and network device 2 to start DF election at the same time, avoiding inconsistencies in the start times of DF election caused by routing information transmission delays. This improves the accuracy of DF election and enhances network stability and efficiency. Furthermore, network device 2 can begin DF election without waiting for the full aforementioned delay, further accelerating the speed and accuracy of DF election.
[0098] However, network device 1 and network device 2 have different computing resources, so the time required for them to conduct DF election may differ. Furthermore, after obtaining the election results, they need to be sent to the hardware driver for configuration before the election results take effect; the time required for each device to send the election results to the hardware driver may also differ. Therefore, the time when the election results take effect may still be different for the two devices. This could still result in multiple network devices in the redundancy group being DFs at the same time, or all devices being BDFs.
[0099] Therefore, in order to improve network stability, embodiments of this application provide a designated repeater election method, system, and network device.
[0100] See Figure 1 This is a flowchart illustrating the first designated repeater election method provided in this application embodiment. It is applied to a first network device, which is any network device within a redundancy group in an EVPN network. The redundancy group contains at least two network devices. The method includes the following steps S101-S104.
[0101] S101: Receive the first routing information sent by the second network device.
[0102] During DF election, multiple network devices interact with each other. Within the redundancy group, all network devices except the first network device act as second network devices, sending their own first routing information to the first network device. The second network devices will also send their own first routing information to the first network device after determining that the network environment has changed.
[0103] The first network device and the second network device are BGP (Border Gateway Protocol) neighbors and exchange routing information based on the BGP protocol.
[0104] S102: Based on the first routing information, the second routing information of the first network device, and the preset designated repeater election rules, a designated repeater election is performed to obtain the first election result.
[0105] In one embodiment of this application, the first network device can perform DF election based on a hash algorithm or priority rules. For example, if the network interface priority of the network device is included in the first and second routing information, the node with the highest network interface priority is selected as the DF node; if the IP address of the network device is included in the first and second routing information, the node with the largest IP address is selected as the DF node, and so on. Based on the same preset DF election rules, network nodes in the redundancy group can elect the same network node as the DF node through a consensus algorithm, while other nodes become BDF nodes. In other words, the election results of different network nodes in the redundancy group are the same.
[0106] In another embodiment of this application, the first routing information includes first DF election information and first Ethernet segment information of the second network device, wherein the first Ethernet segment information represents the Ethernet segment in which the second network device is located, and the second routing information includes second DF election information and second Ethernet segment information of the first network device, wherein the second Ethernet segment information represents the Ethernet segment in which the first network device is located. Step S102 can be implemented through step A.
[0107] Step A: If the Ethernet segment information represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then DF election is performed based on the first DF election information, the second DF election information and the preset DF election rules to obtain the first election result.
[0108] If the first Ethernet segment information and the second Ethernet segment information are the same, it means that the first network device and the second network device belong to the same Ethernet segment, and therefore they are in the same redundancy group. Based on this, the first network device can determine that the routing information of the second network device in the same redundancy group has changed, and then re-elect the DF (Deployment Leader) election.
[0109] The aforementioned first DF election information may include the IP address of the second network device, the priority of its network interface, etc. The aforementioned second DF election information may include the IP address of the first network device, the priority of its network interface, etc.
[0110] The aforementioned first Ethernet segment information and second Ethernet segment information can be ESI (Ethernet Segment Identifier).
[0111] For details on the specific DF election method, please refer to the relevant technical documentation; it will not be elaborated upon here.
[0112] S103: Send the second routing information and effective timestamp to the second network device so that the second network device can perform a designated repeater election based on the first routing information, the second routing information and the preset designated repeater election rules, obtain a second election result, and perform resource configuration according to the second election result when the effective timestamp is reached.
[0113] The aforementioned effective timestamp is the timestamp after a preset duration following the start of DF election by the first network device.
[0114] Specifically, the aforementioned preset duration can be determined based on the time required for the first network device to send the second routing information to the second network device, the time required for the first and second network devices to conduct DF election, and the time required for the first and second network devices to send the election results to the hardware driver. Based on the above durations in historical data, a first historical duration can be determined from the start of DF election by the first network device to the time when the first network device sends the election results to the hardware driver, and a second historical duration can be determined from the start of DF election by the first network device to the time when the second network device sends the election results to the hardware driver.
[0115] The first historical duration is the time required for the first network device to conduct DF election plus the time required for the first network device to send the first election result to the hardware driver.
[0116] The second historical duration is the time required for the first network device to send the second routing information to the second network device + the time required for the second network device to conduct DF election + the time required for the second network device to send the second election result to the hardware driver.
[0117] The longest historical duration between the first and second historical durations is selected as the preset duration, and the effective timestamp is determined so that when the effective timestamp is reached, both the first and second network devices can send the election results to the hardware driver.
[0118] Alternatively, if the longest historical duration is used as the preset duration, in most cases, the first and second network devices will not take that long to send the election results to the hardware driver. This would result in an excessively long waiting time between the first and second network devices sending the election results to the hardware driver and the election results taking effect. Therefore, the longest historical duration can be multiplied by a preset ratio to obtain the preset duration. For example, the preset ratio could be 80%, 75%, etc.
[0119] Based on experience, the preset duration can be set to 3s, 3.5s, 4s, etc.
[0120] S104: When the above effective timestamp is reached, resources will be allocated according to the above first election results.
[0121] In one embodiment of this application, step S104 is achieved through step B.
[0122] Step B: Send the first election result and the effective timestamp to the first hardware driver of the first network device, so that the first hardware driver can perform resource configuration according to the first election result when the effective timestamp is reached.
[0123] In one embodiment of this application, the first hardware driver may call an SDK (Software Development Kit) for resource configuration to perform resource configuration.
[0124] Specifically, if the first network device is a DF (Deployment Provider), then resource configuration is performed to enable network resources for packet forwarding; if the first network device is a BDF (Browser Provider Provider), then resource configuration is performed to disable network resources for packet forwarding. The same applies to the second network device.
[0125] In one embodiment of this application, in order to further ensure that the first network device and the second network device can configure resources simultaneously, the first network device is connected to a clock source, and the first network device further performs the following steps C-E.
[0126] Step C: Receive the time reference signal sent by the clock source mentioned above.
[0127] Step D: Based on the aforementioned time reference signal, calibrate the clock of the first network device.
[0128] Step E: Based on the timing of the clock of the first network device, generate an effective timestamp and determine whether the effective timestamp has been reached.
[0129] In other words, the clock of the first network device is synchronized with the clock source.
[0130] Furthermore, both the first network device and the second network device are connected to a clock source. Both the first network device and the second network device generate a time reference signal based on the clock source to determine the time, and use a precise time synchronization protocol (NTP, Network Time Protocol) to synchronize the time of the first network device and the second network device.
[0131] As can be seen from the above, both the first and second network devices perform DF election, and they exchange effective timestamps. Upon reaching the effective timestamp, both devices configure resources according to their respective election results. The effective timestamp is a preset time period after the first network device begins DF election. Therefore, before the effective timestamp arrives, the first network device has time to perform DF election and send the first election result to the hardware for resource configuration. It also provides time for the first network device to send the second routing information to the second network device, for the second network device to receive the second routing information, perform DF election, and send the second election result to the hardware for resource configuration. In other words, theoretically, the first and second network devices can complete the pre-configuration preparations for resource configuration before the effective timestamp arrives. Performing resource configuration simultaneously at the effective timestamp ensures that their resource configuration times are the same. Therefore, theoretically, they can be configured as DF and BDF respectively at the same time, avoiding the problem of multiple DFs in the redundancy group or all network devices in the redundancy group being BDFs at the same time, thus improving network transmission stability.
[0132] See Figure 2 This is a schematic diagram of a network structure provided in an embodiment of this application.
[0133] The diagram includes Provider Edge Device 1, Provider Edge Device 2, and Provider Edge Device 3. Provider Edge Device 1 is connected to User Edge Device 1 and is located on Ethernet segment 1. Provider Edge Device 2 and Provider Edge Device 3 are connected to User Edge Device 2. Provider Edge Device 2 and Provider Edge Device 3 belong to the same redundancy group and are both located on Ethernet segment 2. Communication between Provider Edge Device 1 and Provider Edge Device 2, and between Provider Edge Device 1 and Provider Edge Device 3, is based on Internet Protocol / Multiprotocol Label Switching (MPLS).
[0134] The clocks of Provider Edge Device 1, Provider Edge Device 2, and Provider Edge Device 3 in the network are synchronized. If Provider Edge Device 2 recovers after a failure, it establishes a BGP neighbor relationship with Provider Edge Device 1 and Provider Edge Device 3.
[0135] Provider Edge Device 2, acting as the first network device, receives first routing information from Provider Edge Device 1 and Provider Edge Device 3 (which act as second network devices). It determines that the first Ethernet segment information carried in the first routing information sent by Provider Edge Device 3 is the same as the second Ethernet segment information in Provider Edge Device 2's own second routing information. Therefore, it determines that Provider Edge Device 3 and Provider Edge Device 2 are in the same Ethernet segment and meet its election conditions. Based on the first routing information sent by Provider Edge Device 3 and its own second routing information, it begins DF election and obtains the first election result. It then sends the first routing information and an effective timestamp to Provider Edge Device 3 (acting as the second network device), and configures resources based on the first election result upon reaching the effective timestamp. Furthermore, Provider Edge Device 2 determines that the first Ethernet segment information carried in the first routing information sent by Provider Edge Device 1 is different from the second Ethernet segment information in its own second routing information. Therefore, it determines that Provider Edge Device 3 and Provider Edge Device 2 are in different Ethernet segments, and DF election is not required between Provider Edge Device 2 and Provider Edge Device 1.
[0136] Provider edge device 3 performs DF election based on the second routing information received from provider edge device 2 and its own first routing information, obtains the second election result, and configures resources based on the second election result when the effective timestamp arrives.
[0137] Corresponding to the aforementioned designated repeater election method applied to the first network device, this application embodiment also provides a designated repeater election method applied to the second network device.
[0138] See Figure 3 This is a flowchart illustrating a second designated repeater election method provided in this application embodiment, applied to a second network device. The method includes the following steps S301-S304.
[0139] S301: Send first routing information to the first network device so that the first network device can perform a designated forwarder election based on the first routing information, the second routing information of the first network device, and the preset designated forwarder election rules, obtain a first election result, and perform resource configuration according to the first election result when the effective timestamp is reached.
[0140] The aforementioned effective timestamp is the timestamp after a preset duration following the start of the DF election by the first network device.
[0141] S302: Receive the second routing information and the effective timestamp sent by the first network device.
[0142] S303: Based on the first routing information, the second routing information, and the preset designated forwarder election rules, a designated forwarder election is performed to obtain the second election result.
[0143] S304: When the above effective timestamp is reached, resources will be allocated according to the above second election results.
[0144] As can be seen from the above, both the first and second network devices perform DF election, and they exchange effective timestamps. Upon reaching the effective timestamp, both devices configure resources according to their respective election results. The effective timestamp is a preset time period after the first network device begins DF election. Therefore, before the effective timestamp arrives, the first network device has time to perform DF election and send the first election result to the hardware for resource configuration. It also provides time for the first network device to send the second routing information to the second network device, for the second network device to receive the second routing information, perform DF election, and send the second election result to the hardware for resource configuration. In other words, theoretically, the first and second network devices can complete the pre-configuration preparations for resource configuration before the effective timestamp arrives. Performing resource configuration simultaneously at the effective timestamp ensures that their resource configuration times are the same. Therefore, theoretically, they can be configured as DF and BDF respectively at the same time, avoiding the problem of multiple DFs in the redundancy group or all network devices in the redundancy group being BDFs at the same time, thus improving network transmission stability.
[0145] In one embodiment of this application, step S304 is implemented by step F.
[0146] Step F: Send the second election result and the effective timestamp to the second hardware driver of the second network device, so that the second hardware driver can perform resource configuration according to the second election result when the effective timestamp is reached.
[0147] In one embodiment of this application, the first routing information includes first DF election information and first Ethernet segment information of the second network device, wherein the first Ethernet segment information represents the Ethernet segment in which the second network device is located, and the second routing information includes second DF election information and second Ethernet segment information of the first network device, wherein the second Ethernet segment information represents the Ethernet segment in which the first network device is located. Step S303 can be implemented through the following step G.
[0148] Step G: If the Ethernet segment represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then DF election is performed based on the first DF election information, the second DF election information and the preset DF election rules to obtain the second election result.
[0149] In one embodiment of this application, the second network device is connected to a clock source, and the method further includes steps H-J.
[0150] Step H: Receive the time reference signal sent by the clock source mentioned above.
[0151] Step 1: Based on the aforementioned time reference signal, calibrate the clock of the second network device.
[0152] Step J: Based on the timing of the clock of the second network device, determine whether the above-mentioned effective timestamp has been reached.
[0153] Corresponding to the aforementioned designated repeater election method, this application also provides a designated repeater election system.
[0154] See Figure 4 This is a flowchart illustrating the third designated repeater election method provided in this application embodiment, including the following steps S401-S406.
[0155] S401: The second network device sends the first routing information to the first network device.
[0156] S402: The first network device performs a designated forwarder election based on the first routing information, the second routing information of the first network device, and the preset designated forwarder election rules, and obtains the first election result.
[0157] S403: The first network device sends the second routing information and effective timestamp to the second network device.
[0158] S404: The first network device shall perform resource configuration in accordance with the first election result when the effective timestamp is reached.
[0159] S405: The second network device above performs designated repeater election based on the first routing information, the second routing information, and the preset DF election rules.
[0160] S406: When the second network device reaches the above effective timestamp, it will perform resource configuration according to the above second election results.
[0161] As can be seen from the above, both the first and second network devices perform designated repeater elections, and they exchange effective timestamps. Upon reaching the effective timestamp, both devices configure resources according to their respective election results. The effective timestamp is a preset time period after the first network device begins its DF election. Therefore, before the effective timestamp arrives, the first network device has time to perform DF election and send the first election result to the hardware for resource configuration. It also provides time for the first network device to send the second routing information to the second network device, for the second network device to receive the second routing information, perform DF election, and send the second election result to the hardware for resource configuration. In other words, theoretically, the first and second network devices can complete the pre-configuration of resource configuration before the effective timestamp arrives. Performing resource configuration simultaneously at the effective timestamp ensures that both devices are configured as DF and BDF respectively at the same time. This avoids the problem of multiple DFs in the redundancy group or all network devices in the redundancy group being BDFs at the same time, thus improving network transmission stability.
[0162] In one embodiment of this application, the first network device is specifically used for:
[0163] The first election result and the effective timestamp are sent to the first hardware driver of the first network device, so that the first hardware driver can perform resource configuration according to the first election result when the effective timestamp is reached;
[0164] The aforementioned second network device is specifically used for:
[0165] The second election result and the effective timestamp are sent to the second hardware driver of the second network device so that the second hardware driver can perform resource configuration according to the second election result when the effective timestamp is reached.
[0166] In one embodiment of this application, the first routing information includes first DF election information and first Ethernet segment information of the second network device, wherein the first Ethernet segment information represents the Ethernet segment where the second network device is located, and the second routing information includes second DF election information and second Ethernet segment information of the first network device, wherein the second Ethernet segment information represents the Ethernet segment where the first network device is located.
[0167] The first network device is specifically used for:
[0168] If the Ethernet segment information represented by the first Ethernet segment is the same as that represented by the second Ethernet segment information, then a DF election is performed based on the first DF election information, the second DF election information and the preset DF election rules to obtain the first election result.
[0169] The second network device is specifically used for:
[0170] If the Ethernet segment represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then a DF election is performed based on the first DF election information, the second DF election information, and the preset DF election rules to obtain a second election result.
[0171] In one embodiment of this application, the first network device and the second network device are connected to the same clock source;
[0172] The aforementioned first network device is also used for:
[0173] Receive the time reference signal sent by the aforementioned clock source; calibrate the clock of the aforementioned first network device according to the aforementioned time reference signal; generate an effective timestamp based on the timing of the clock of the aforementioned first network device, and determine whether the effective timestamp has been reached;
[0174] The aforementioned second network device is also used for:
[0175] Receive the time reference signal sent by the aforementioned clock source; calibrate the clock of the aforementioned second network device according to the aforementioned time reference signal; determine whether the aforementioned effective timestamp has been reached based on the timing of the clock of the aforementioned second network device.
[0176] As can be seen from the above, the clocks of the first network device and the second network device are synchronized, which can further ensure that the first network device and the second network device can configure resources at the same time.
[0177] Corresponding to the aforementioned designated repeater election method, this application embodiment also provides a network device.
[0178] See Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device includes:
[0179] Processor 501;
[0180] Transceiver 504;
[0181] A machine-readable storage medium 502 stores machine-executable instructions that can be executed by the processor 501, the machine-executable instructions causing the processor 501 to execute the specified repeater election method applied to the first network device or the specified repeater election method applied to the second network device.
[0182] like Figure 5 As shown, the network device may also include a communication bus 503. The processor 501, machine-readable storage medium 502, and transceiver 504 communicate with each other via the communication bus 503. The communication bus 503 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 503 can be divided into an address bus, a data bus, a control bus, etc.
[0183] Transceiver 504 can be a wireless communication module. Under the control of processor 501, transceiver 504 interacts with other devices for data exchange.
[0184] Machine-readable storage medium 502 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Alternatively, machine-readable storage medium 502 may also be at least one storage device located remotely from the aforementioned processor.
[0185] Processor 501 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0186] As can be seen from the above, both the first and second network devices perform DF election, and they exchange effective timestamps. Upon reaching the effective timestamp, both devices configure resources according to their respective election results. The effective timestamp is a preset time period after the first network device begins DF election. Therefore, before the effective timestamp arrives, the first network device has time to perform DF election and send the first election result to the hardware for resource configuration. It also provides time for the first network device to send the second routing information to the second network device, for the second network device to receive the second routing information, perform DF election, and send the second election result to the hardware for resource configuration. In other words, theoretically, the first and second network devices can complete the pre-configuration preparations for resource configuration before the effective timestamp arrives. Performing resource configuration simultaneously at the effective timestamp ensures that their resource configuration times are the same. Therefore, theoretically, they can be configured as DF and BDF respectively at the same time, avoiding the problem of multiple DFs in the redundancy group or all network devices in the redundancy group being BDFs at the same time, thus improving network transmission stability.
[0187] Corresponding to the aforementioned designated repeater election method applied to the first network device, this application embodiment also provides a designated repeater election device applied to the first network device.
[0188] See Figure 6 This is a schematic diagram of the structure of a first designated repeater election device provided in an embodiment of this application, applied to a first network device. The device includes:
[0189] The first information receiving module 601 is used to receive first routing information sent by the second network device;
[0190] The first election module 602 is used to perform DF election based on the first routing information, the second routing information of the first network device, and the preset designated forwarder DF election rules to obtain the first election result;
[0191] The second information sending module 603 is used to send the second routing information and the effective timestamp to the second network device, so that the second network device performs DF election based on the first routing information, the second routing information and the preset DF election rules, obtains the second election result, and performs resource configuration according to the second election result when the effective timestamp is reached. The effective timestamp is the timestamp after a preset time period since the first network device started performing DF election.
[0192] The first resource configuration module 604 is used to configure resources according to the first election result when the effective timestamp is reached.
[0193] As can be seen from the above, both the first and second network devices perform DF election, and they exchange effective timestamps. Upon reaching the effective timestamp, both devices configure resources according to their respective election results. The effective timestamp is a preset time period after the first network device begins DF election. Therefore, before the effective timestamp arrives, the first network device has time to perform DF election and send the first election result to the hardware for resource configuration. It also provides time for the first network device to send the second routing information to the second network device, for the second network device to receive the second routing information, perform DF election, and send the second election result to the hardware for resource configuration. In other words, theoretically, the first and second network devices can complete the pre-configuration preparations for resource configuration before the effective timestamp arrives. Performing resource configuration simultaneously at the effective timestamp ensures that their resource configuration times are the same. Therefore, theoretically, they can be configured as DF and BDF respectively at the same time, avoiding the problem of multiple DFs in the redundancy group or all network devices in the redundancy group being BDFs at the same time, thus improving network transmission stability.
[0194] In one embodiment of this application, the first resource configuration module 604 is specifically used for:
[0195] The first election result and the effective timestamp are sent to the first hardware driver of the first network device so that the first hardware driver can perform resource configuration according to the first election result when the effective timestamp is reached.
[0196] In one embodiment of this application, the first routing information includes first DF election information and first Ethernet segment information of the second network device, wherein the first Ethernet segment information represents the Ethernet segment in which the second network device is located, and the second routing information includes second DF election information and second Ethernet segment information of the first network device, wherein the second Ethernet segment information represents the Ethernet segment in which the first network device is located.
[0197] The first election module 602 is specifically used for:
[0198] If the Ethernet segment information represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then a DF election is performed based on the first DF election information, the second DF election information, and the preset DF election rules to obtain the first election result.
[0199] In one embodiment of this application, the first network device is connected to a clock source, and the apparatus further includes:
[0200] The first reference signal receiving module is used to receive the time reference signal sent by the clock source;
[0201] The first clock calibration module is used to calibrate the clock of the first network device according to the time reference signal;
[0202] The first timestamp determination module is used to generate an effective timestamp based on the clock of the first network device and determine whether the effective timestamp has been reached.
[0203] Corresponding to the aforementioned designated repeater election method applied to a second network device, this application embodiment also provides a designated repeater election device applied to a second network device.
[0204] See Figure 7 This is a schematic diagram of the structure of a second designated repeater election device provided in an embodiment of this application, applied to a second network device. The device includes:
[0205] The first information sending module 701 is used to send first routing information to the first network device, so that the first network device performs DF election based on the first routing information, the second routing information of the first network device and the preset specified forwarder DF election rules, obtains the first election result, and performs resource configuration according to the first election result when the effective timestamp is reached. The effective timestamp is the timestamp after a preset time period since the first network device started performing DF election.
[0206] The second information receiving module 702 is used to receive the second routing information and the effective timestamp sent by the first network device;
[0207] The second election module 703 is used to perform DF election based on the first routing information, the second routing information, and the preset DF election rules to obtain a second election result;
[0208] The second resource configuration module 704 is used to configure resources according to the second election result when the effective timestamp is reached.
[0209] As can be seen from the above, both the first and second network devices perform DF election, and they exchange effective timestamps. Upon reaching the effective timestamp, both devices configure resources according to their respective election results. The effective timestamp is a preset time period after the first network device begins DF election. Therefore, before the effective timestamp arrives, the first network device has time to perform DF election and send the first election result to the hardware for resource configuration. It also provides time for the first network device to send the second routing information to the second network device, for the second network device to receive the second routing information, perform DF election, and send the second election result to the hardware for resource configuration. In other words, theoretically, the first and second network devices can complete the pre-configuration preparations for resource configuration before the effective timestamp arrives. Performing resource configuration simultaneously at the effective timestamp ensures that their resource configuration times are the same. Therefore, theoretically, they can be configured as DF and BDF respectively at the same time, avoiding the problem of multiple DFs in the redundancy group or all network devices in the redundancy group being BDFs at the same time, thus improving network transmission stability.
[0210] In one embodiment of this application, the second resource configuration module 704 is specifically used for:
[0211] The second election result and the effective timestamp are sent to the second hardware driver of the second network device so that the second hardware driver can perform resource configuration according to the second election result when the effective timestamp is reached.
[0212] In one embodiment of this application, the first routing information includes first DF election information and first Ethernet segment information of the second network device. The first Ethernet segment information represents the Ethernet segment where the second network device is located. The second routing information includes second DF election information and second Ethernet segment information of the first network device. The second Ethernet segment information represents the Ethernet segment where the first network device is located. The second election module 703 is specifically used for:
[0213] If the Ethernet segment information represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then a DF election is performed based on the first DF election information, the second DF election information, and the preset DF election rules to obtain a second election result.
[0214] In one embodiment of this application, the second network device is connected to a clock source, and the apparatus further includes:
[0215] The second reference signal receiving module is used to receive the time reference signal sent by the clock source;
[0216] The second clock calibration module is used to calibrate the clock of the second network device according to the time reference signal;
[0217] The second timestamp determination module is used to determine whether the effective timestamp has been reached based on the clock of the second network device.
[0218] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements any of the steps of the specified repeater election method applied to the first network device or the second network device.
[0219] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the specified repeater election methods applied to a first network device or a second network device in the above embodiments.
[0220] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0221] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0222] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system, network device, apparatus, and computer-readable storage medium embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0223] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A method for electing a designated repeater, characterized in that, Applied to a first network device, the method includes: Receive the first routing information sent by the second network device; Based on the first routing information, the second routing information of the first network device, and the preset designated forwarder (DF) election rules, a DF election is performed to obtain the first election result; Send the second routing information and the effective timestamp to the second network device so that the second network device can perform DF election based on the first routing information, the second routing information and the preset DF election rules, and obtain the second election result. When the effective timestamp is reached, resource configuration is performed according to the second election result. The effective timestamp is the timestamp after a preset time period since the first network device started performing DF election. Resource allocation is performed according to the first election result upon reaching the effective timestamp; The step of allocating resources according to the first election result upon reaching the effective timestamp includes: The first election result and the effective timestamp are sent to the first hardware driver of the first network device so that the first hardware driver can perform resource configuration according to the first election result when the effective timestamp is reached.
2. The method according to claim 1, characterized in that, The first routing information includes the first DF election information and the first Ethernet segment information of the second network device. The first Ethernet segment information indicates the Ethernet segment in which the second network device is located. The second routing information includes the second DF election information and the second Ethernet segment information of the first network device. The second Ethernet segment information indicates the Ethernet segment in which the first network device is located. The step of performing a DF election based on the first routing information, the second routing information of the first network device, and a preset designated forwarder DF election rule to obtain a first election result includes: If the Ethernet segment information represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then a DF election is performed based on the first DF election information, the second DF election information, and the preset DF election rules to obtain the first election result.
3. The method according to claim 1 or 2, characterized in that, The first network device is connected to a clock source, and the method further includes: Receive the time reference signal sent by the clock source; The clock of the first network device is calibrated according to the time reference signal; Based on the clock of the first network device, a valid timestamp is generated, and it is determined whether the valid timestamp has been reached.
4. A method for electing a designated repeater, characterized in that, Applied to a second network device, the method includes: Send first routing information to the first network device so that the first network device can perform DF election based on the first routing information, the second routing information of the first network device and the preset specified forwarder DF election rules, obtain the first election result, and perform resource configuration according to the first election result when the effective timestamp is reached. The effective timestamp is the timestamp after a preset time period since the first network device started performing DF election. Receive the second routing information and the effective timestamp sent by the first network device; Based on the first routing information, the second routing information, and the preset DF election rules, a DF election is performed to obtain a second election result; Resource allocation is performed according to the second election result upon reaching the effective timestamp; The step of configuring resources according to the second election result of DF upon reaching the effective timestamp includes: The second election result and the effective timestamp are sent to the second hardware driver of the second network device so that the second hardware driver can perform resource configuration according to the second election result when the effective timestamp is reached.
5. The method according to claim 4, characterized in that, The first routing information includes the first DF election information and the first Ethernet segment information of the second network device. The first Ethernet segment information indicates the Ethernet segment in which the second network device is located. The second routing information includes the second DF election information and the second Ethernet segment information of the first network device. The second Ethernet segment information indicates the Ethernet segment in which the first network device is located. The step of performing DF election based on the first routing information, the second routing information, and the preset DF election rules to obtain the second election result includes: If the Ethernet segment information represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then a DF election is performed based on the first DF election information, the second DF election information, and the preset DF election rules to obtain a second election result.
6. The method according to claim 4 or 5, characterized in that, The second network device is connected to a clock source, and the method further includes: Receive the time reference signal sent by the clock source; The clock of the second network device is calibrated according to the time reference signal; Based on the timing of the clock of the second network device, determine whether the effective timestamp has been reached.
7. A designated repeater election system, characterized in that, The system includes: a first network device and a second network device; The second network device is used to send first routing information to the first network device; The first network device is configured to perform a DF election based on the first routing information, the second routing information of the first network device, and a preset specified DF election rule to obtain a first election result; send the second routing information and an effective timestamp to the second network device; and perform resource configuration according to the first election result when the effective timestamp is reached. The second network device is further configured to perform a DF election based on the first routing information, the second routing information, and a preset DF election rule to obtain a second election result; and to perform resource configuration according to the second election result when the effective timestamp is reached. The first network device is specifically used for: The first election result and the effective timestamp are sent to the first hardware driver of the first network device so that the first hardware driver can perform resource configuration according to the first election result when the effective timestamp is reached; The second network device is specifically used for: The second election result and the effective timestamp are sent to the second hardware driver of the second network device so that the second hardware driver can perform resource configuration according to the second election result when the effective timestamp is reached.
8. The system according to claim 7, characterized in that, The first routing information includes the first DF election information and the first Ethernet segment information of the second network device. The first Ethernet segment information indicates the Ethernet segment in which the second network device is located. The second routing information includes the second DF election information and the second Ethernet segment information of the first network device. The second Ethernet segment information indicates the Ethernet segment in which the first network device is located. The first network device is specifically used for: If the Ethernet segment information represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then DF election is performed based on the first DF election information, the second DF election information and the preset DF election rules to obtain the first election result; The second network device is specifically used for: If the Ethernet segment information represented by the first Ethernet segment information is the same as that represented by the second Ethernet segment information, then a DF election is performed based on the first DF election information, the second DF election information, and the preset DF election rules to obtain a second election result.
9. The system according to claim 7 or 8, characterized in that, The first network device and the second network device are connected to the same clock source; The first network device is further configured to: Receive a time reference signal sent by the clock source; calibrate the clock of the first network device according to the time reference signal; generate an effective timestamp based on the timing of the clock of the first network device, and determine whether the effective timestamp has been reached; The second network device is also used for: Receive the time reference signal sent by the clock source; calibrate the clock of the second network device according to the time reference signal; determine whether the effective timestamp has been reached based on the timing of the clock of the second network device.
10. A network device, characterized in that, The network device includes: processor; transceiver; A machine-readable storage medium storing machine-executable instructions that can be executed by the processor, the machine-executable instructions causing the processor to perform the steps of the method according to any one of claims 1-3 or 4-6.
11. A designated repeater election device, characterized in that, Applied to a first network device, the device includes: The first information receiving module is used to receive the first routing information sent by the second network device; The first election module is used to perform DF election based on the first routing information, the second routing information of the first network device, and the preset designated forwarder DF election rules, and obtain the first election result; The second information sending module is used to send the second routing information and the effective timestamp to the second network device, so that the second network device can perform DF election based on the first routing information, the second routing information and the preset DF election rules, obtain the second election result, and perform resource configuration according to the second election result when the effective timestamp is reached. The effective timestamp is the timestamp after a preset time period since the first network device started performing DF election. The first resource configuration module is used to configure resources according to the first election result when the effective timestamp is reached; The first resource configuration module is specifically used to: send the first election result and the effective timestamp to the first hardware driver of the first network device, so that the first hardware driver performs resource configuration according to the first election result when the effective timestamp is reached.
12. A designated repeater election device, characterized in that, Applied to a second network device, the device includes: The first information sending module is used to send first routing information to the first network device, so that the first network device can perform DF election based on the first routing information, the second routing information of the first network device and the preset specified forwarder DF election rules, obtain the first election result, and perform resource configuration according to the first election result when the effective timestamp is reached. The effective timestamp is the timestamp after a preset time period since the first network device started performing DF election. The second information receiving module is used to receive the second routing information and the effective timestamp sent by the first network device; The second election module is used to perform DF election based on the first routing information, the second routing information, and the preset DF election rules to obtain a second election result; The second resource configuration module is used to configure resources according to the second election result when the effective timestamp is reached; The second resource configuration module is specifically used to: send the second election result and the effective timestamp to the second hardware driver of the second network device, so that the second hardware driver performs resource configuration according to the second election result when the effective timestamp is reached.
Citation Information
Patent Citations
A method and apparatus for designating forwarder election
CN109104364A
Method and equipment for assigning DF election of forwarder
CN115811499A