A method and apparatus for synchronizing a table entry

CN115801568BActive Publication Date: 2026-08-07NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2022-10-31
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0004]但是,随着DR设备上配置的增加,DR设备之间进行信息同步的时间也会增加,用户很难准确地设置延迟恢复时间的定时器

Benefits of technology

[0033] In the embodiments described in this specification, after a DR system is established between DR devices, the number of entries to be synchronized is obtained. By sending the number of entries to be synchronized to the peer DR device, the timing time is determined based on the number of entries to be synchronized, and a delay recovery timer is set. Entries are synchronized based on this delay recovery timer, which improves the accuracy of the time required for entry synchronization and enhances the reliability of data forwarding after entry synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115801568B_ABST
    Figure CN115801568B_ABST
Patent Text Reader

Abstract

The specification provides a table entry synchronization method and device, and relates to the technical field of communication. A table entry synchronization method applied to a DR device comprises the following steps: after a DR system is established with a peer DR device, the number of to-be-synchronized table entries stored by the DR device is acquired; a DRCP negotiation message carrying the number of to-be-synchronized table entries is sent to the peer DR device, so that the peer DR device sets a delay recovery timer according to the number of to-be-synchronized table entries and a timing time determined by negotiation with the DR device; and table entry synchronization is performed with the peer DR device based on the delay recovery timer. Through the above method, the reliability of data forwarding of a network device can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of communication technology, and in particular to a method and apparatus for synchronizing table entries. Background Technology

[0002] As people's demands for network performance increase, network devices need to have greater bandwidth. When a single network device cannot provide higher bandwidth, the aggregation of multiple network devices across devices based on DRNI (Distributed Resilient Network Interconnect) technology has become an option.

[0003] After two network devices are configured as DR (Distributed Relay) devices, they can establish an aggregation through interface aggregation. Subsequently, the DR devices can synchronize information by setting a timer with a delayed recovery period. Before the timer expires, the DR device's service interface is in a DOWN state; after the timer expires, the service interface switches to an UP state and begins data forwarding.

[0004] However, as more configurations are added to DR devices, the time required for information synchronization between DR devices also increases, making it difficult for users to accurately set the delay recovery timer. Inaccurate timer settings may cause DR devices to continue synchronizing or learning even after the service interface is online, leading to the loss of service packets during this process. Alternatively, the service interface may be unable to switch to an online state for an extended period, preventing DR devices from quickly achieving load balancing and ultimately affecting the reliability of data forwarding by network devices. Summary of the Invention

[0005] To overcome the problems existing in related technologies, this specification provides a method and apparatus for synchronizing table entries.

[0006] In conjunction with a first aspect of the embodiments described herein, this application provides a table entry synchronization method applied to a DR device, comprising:

[0007] After establishing a DR system with the peer DR device, obtain the number of entries to be synchronized stored in your own database;

[0008] Send a DRCP negotiation message carrying the number of entries to be synchronized to the peer DR device, so that the peer DR device can set a delay recovery timer based on the time interval determined by negotiation with itself according to the number of entries to be synchronized.

[0009] Synchronization of entries with the peer DR device is performed based on a delay recovery timer.

[0010] Optionally, retrieve the number of entries stored within the device that need to be synchronized, including:

[0011] Scan the entries stored in its own database;

[0012] The number of entries to be synchronized is determined by negotiating the number of entries in the DRCP message exchange table.

[0013] Optionally, after obtaining the number of entries to be synchronized stored within itself, the following steps are also included:

[0014] The first timing period is determined based on the query timer setting table stored within the system.

[0015] After receiving the second timing time determined by the peer DR device based on the number of entries to be synchronized, if the first timing time is greater than the second timing time, the delay recovery timer of the device is set to the first timing time, and a DRCP negotiation message carrying the first timing time is sent to the peer DR device. If the second timing time is greater than the first timing time, a DRCP negotiation message carrying a determination mark is sent to the peer DR device.

[0016] Optionally, the DRCP negotiation message may contain at least the bridge MAC address of the DR device and the DRCP destination MAC address.

[0017] Optionally, the entries to be synchronized include at least ARP entries, ND entries, and MAC entries.

[0018] In conjunction with a second aspect of the embodiments described herein, this application provides an entry synchronization device applied to a DR device, comprising:

[0019] The acquisition unit is used to acquire the number of entries to be synchronized stored in itself after establishing a DR system with the peer DR device.

[0020] The interaction unit is used to send a DRCP negotiation message carrying the number of entries to be synchronized to the peer DR device, so that the peer DR device can set a delay recovery timer based on the number of entries to be synchronized and the timing time determined by negotiation with itself.

[0021] The synchronization unit is used to synchronize table entries with the peer DR device based on the delay recovery timer.

[0022] Optionally, the acquisition unit may also include:

[0023] The scanning module is used to scan the table entries it stores;

[0024] The determination module is used to determine the number of entries to be synchronized by negotiating the number of entries in the DRCP message exchange.

[0025] Optionally, the acquisition unit may also include:

[0026] The query module is used to determine the first timing time based on its own stored query timer setting table;

[0027] The comparison module is used to, after receiving the second timing time determined by the peer DR device based on the number of entries to be synchronized, set its own delay recovery timer to the first timing time if the first timing time is greater than the second timing time, and send a DRCP negotiation message carrying the first timing time to the peer DR device. If the second timing time is greater than the first timing time, it sends a DRCP negotiation message carrying a determination mark to the peer DR device.

[0028] Optionally, the DRCP negotiation message may contain at least the bridge media access control MAC address of the DR device and the DRCP destination MAC address.

[0029] Optionally, the entries to be synchronized include at least ARP entries, ND entries, and MAC entries.

[0030] In conjunction with a third aspect of the embodiments of this specification, this application provides a network device including a transceiver, a processor, and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, the processor being prompted by the machine-executable instructions to implement the method steps of any of the above.

[0031] In conjunction with the fourth aspect of the embodiments of this specification, this application provides a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method steps of any of the above-described embodiments.

[0032] The technical solutions provided by the embodiments in this specification may include the following beneficial effects:

[0033] In the embodiments described in this specification, after a DR system is established between DR devices, the number of entries to be synchronized is obtained. By sending the number of entries to be synchronized to the peer DR device, the timing time is determined based on the number of entries to be synchronized, and a delay recovery timer is set. Entries are synchronized based on this delay recovery timer, which improves the accuracy of the time required for entry synchronization and enhances the reliability of data forwarding after entry synchronization.

[0034] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description

[0035] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.

[0036] Figure 1 This is a flowchart of a table entry synchronization method involved in this application;

[0037] Figure 2 This is a network diagram of an entry synchronization method according to an embodiment of this application;

[0038] Figure 3 This is a schematic diagram of the structure of a table entry synchronization device involved in this application;

[0039] Figure 4 This is a schematic diagram of the structure of a network device involved in this application. Detailed Implementation

[0040] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification.

[0041] In conjunction with the first aspect of the embodiments described herein, this application provides a table entry synchronization method applied to a DR device, such as... Figure 1 As shown, it includes:

[0042] S100: After establishing a DR system with the peer DR device, obtain the number of entries to be synchronized stored in the device.

[0043] In such Figure 2 The network topology shown includes two network devices. The DR (Direct Relay) system is configured on these two devices, and they are connected via their internal control interfaces (also known as peer-link interfaces) and keepalive interfaces. The DRCP (Distributed Relay Control Protocol) protocol runs on the peer-link interface for negotiation of the DR system between the network devices. When the DR system configurations on the two network devices are identical, such as using the default MAC (Media Access Control) address (non-bridge MAC address) in the DRCP protocol, the two network devices form a DR system, and these two network devices can be referred to as DR devices within the DR system. The uplink directions of these two network devices can each connect to other network devices to form a network, such as... Figure 2 As shown.

[0044] After the DR system is established, the initial roles of the two DR devices are None, meaning no role is assigned. Following system setup, the roles of the two DR devices are determined based on interactive DRCP negotiation messages. For example, this can be based on the presence or absence of a DR interface, the current role, priority level, and bridge MAC address. Assuming DR device 1 has a smaller bridge MAC address and DR device 2 has a larger bridge MAC address, DR device 1 is designated as the Primary DR device, and DR device 2 is designated as the Secondary DR device.

[0045] Afterwards, DR devices can exchange entries to determine the entries to be synchronized. These entries can include ARP (Address Resolution Protocol) entries, ND (Neighbor Discovery Protocol) entries, and MAC entries. Optionally, the entries to be synchronized should include at least ARP, ND, and MAC entries. These entries are used to forward data to upstream and downstream network devices in the DR system, but the entries that need to be synchronized are not limited to these. The types of entries that need to be synchronized can be set according to actual needs.

[0046] Specifically, step S100, obtaining the number of entries to be synchronized stored within itself, includes:

[0047] S100A scans the entries stored in its own database.

[0048] After a DR system is established through negotiation among network devices, DR device 1 and DR device 2 can scan the entries stored in their own storage spaces. For example, before the DR system is formed, DR device 1 works independently and has recorded 10k ARP entries, 5k ND entries, and 20k MAC entries according to various protocols, while DR device 2 is a newly added network device and has not stored any entries.

[0049] S100B determines the number of entries to be synchronized by negotiating the number of entries in the DRCP message exchange table.

[0050] After determining the number of entries they store, DR device 1 and DR device 2 can carry the number of these scanned entries in a DRCP negotiation message. Since DRCP is an extensible protocol, DR devices can identify DRCP negotiation messages carrying the number of entries by adding new message types. A DRCP message contains source address, destination address, version number, type, message length, and a series of TLV (Type-Length-Value) information. The number of entries can be carried in the DRCP negotiation message according to the entry type, which can be identified by pre-setting on both sides of the DR device. For example, in the TLV of the DRCP negotiation message, the message type can be marked as "DRCP negotiation message," the type in the TLV indicates the type of entries being transmitted, and the value in the TLV indicates the number of entries. For example, recording A: 10, B: 5, C: 20 sequentially allows the DR device to identify the number of entries stored in the other DR device. To distinguish it from the following description, this message is called the first DRCP negotiation message. Since the number of items is generally quite large, the quantity is expressed in thousands.

[0051] In the above example, if the DR device determines that it does not store any entries, that is, the number of each entry is 0, it can send a first DRCP negotiation message carrying the number of entries to the peer DR device, such as DR device 2; if the DR device determines that it stores entries, that is, the number of entries is not 0, it needs to send a first DRCP negotiation message carrying the number of entries to the peer DR device, such as DR device 1.

[0052] After receiving the number of entries, DR device 2 compares it with the number of entries it stores. It then determines that it needs to obtain 10k ARP entries, 5k ND entries, and 20k MAC entries from DR device 1, totaling 35k entries. At this point, DR device 2 can determine that the above-mentioned number is the number of entries to be synchronized.

[0053] If a certain number of entries have already been stored on DR device 2, and since the two DR devices are assigned to the same network, it can be assumed that there is some overlap between them, and the entries can also be considered similar. Therefore, the difference between the number of received entries and the number of entries stored can be used as the number of entries to be synchronized.

[0054] S101. Send a DRCP negotiation message carrying the number of entries to be synchronized to the peer DR device, so that the peer DR device can set a delay recovery timer based on the number of entries to be synchronized and the time interval determined by negotiation with itself.

[0055] After determining the number of entries to be synchronized, DR device 2 can send a first DRCP negotiation message carrying the number of entries to be synchronized to DR device 1. This DRCP negotiation message is called the second DRCP negotiation message, and its message type is different from the first DRCP negotiation message mentioned above.

[0056] After receiving the second DRCP negotiation message, DR device 1 can identify and parse the message to obtain the number of entries to be synchronized carried in the message.

[0057] The DR device can pre-store a table that maps entries to timer configurations; this table will be referred to as the timer setting table, as shown in Table 1 below:

[0058] ARP / ND+MAC(k) scope Timer (seconds) 5 1K-5K 100 10 5K-10K 300 20 10K-20K 600 40 20K-40K 900 80 40K-80K 1800

[0059] Table 1

[0060] The DR devices need to synchronize ARP, ND, and MAC entries. The timer setting is determined by the sum of the number of these three entries. In the example above, DR device 1 needs to synchronize 35k entries, so the timer needs to be set to 900 seconds.

[0061] After determining the timer time, if DR device 1 also needs to start a timer, it starts a 900-second timer to achieve table entry synchronization between DR devices. It then sends the timer setting in another DRCP negotiation message (hereinafter referred to as the third DRCP negotiation message) to DR device 2 so that DR device 2 starts a 900-second delay recovery timer.

[0062] S102. Synchronize table entries with the peer DR device based on the delay recovery timer.

[0063] After the delayed recovery timer is started, DR device 1 and DR device 2 synchronize entries. During the delayed recovery timer period, non-reserved interfaces on the DR devices will be offline. Reserved interfaces generally refer to keepalive interfaces and peer-link interfaces, but are not limited to these. Reserved interfaces can be added through configuration. Interfaces other than the above-mentioned reserved interfaces can be understood as non-reserved interfaces, such as business interfaces (interfaces bound to DR interfaces).

[0064] If the delayed recovery timer reaches the set time, it is considered that the DR devices have completed the table entry synchronization, the non-reserved interface of the DR device is switched to the online state, and the DR system begins to forward its uplink and downlink data.

[0065] In the embodiments described in this specification, after a DR system is established between DR devices, the number of entries to be synchronized is obtained. By sending the number of entries to be synchronized to the peer DR device, the timing time is determined based on the number of entries to be synchronized, and a delay recovery timer is set. Entries are synchronized based on this delay recovery timer, which improves the accuracy of the time required for entry synchronization and enhances the reliability of data forwarding after entry synchronization.

[0066] In addition, in the DR system, the master DR device stores entries, while the slave DR device may be a newly started network device that does not store entries. Therefore, it is also possible to configure only the master DR device to synchronize entries with the slave DR device. Then, DR device 1, as the master DR device, can directly send a DRCP negotiation message carrying the number of entries to be synchronized to DR device 2, which is the slave DR device, after scanning the number of its own entries.

[0067] Optionally, the aforementioned DRCP negotiation message carries at least the bridge MAC address of the DR device and the DRCP destination MAC address. The bridge MAC address can be used to distinguish between the master and slave DR devices, and the DRCP destination MAC address can identify the message as a DRCP protocol message. Specifically, the DR device's bridge MAC address serves as the source MAC address of the DRCP negotiation message, and the DRCP destination MAC address is the DRCP protocol MAC address in a DR system where the DRCP protocol is enabled.

[0068] In cases requiring only one DRCP negotiation, DRCP negotiation messages can be used interchangeably, identified solely by their DRCP MAC addresses. However, in cases requiring multiple negotiations, DRCP negotiation messages can include message type markers to distinguish between the first, second, and third DRCP negotiation messages. Nevertheless, all these DRCP negotiation messages will carry the DRCP destination MAC address and the bridge MAC address of the network device.

[0069] Optionally, after step S100, obtaining the number of stored entries to be synchronized, the method further includes:

[0070] S103. Determine the first timing time based on the query timer setting table stored in the system.

[0071] In the case of bidirectional interaction between DR devices regarding the number of entries, that is, a DR device sends the number of entries it stores to the peer DR device and can also receive DRCP negotiation messages sent by the peer DR device. In this case, to avoid changes in the entries during the interaction, the two DR devices can each determine their own timing interval. For example, DR device 1 determines a timing interval of 300 seconds, and DR device 2 determines a timing interval of 600 seconds.

[0072] S104. After receiving the second timing time determined by the peer DR device based on the number of entries to be synchronized, if the first timing time is greater than the second timing time, the delay recovery timer of the device is set to the first timing time, and a DRCP negotiation message carrying the first timing time is sent to the peer DR device. If the second timing time is greater than the first timing time, a DRCP negotiation message carrying a determination mark is sent to the peer DR device.

[0073] After determining their own timing time, each DR device sends a DRCP negotiation message carrying that timing time to the other DR device; that is, DR device 1 and DR device 2 send messages to each other. After the two DR devices obtain the timing time, they compare it with their own determined timing time.

[0074] If its own timing time is greater than the timing time of the peer DR device, it sends its own timing time to the peer DR device as the timing time of the delay recovery timer in the DR system; if its own timing time is less than the timing time of the peer DR device, it sends a DRCP negotiation message containing a determination flag to the peer DR device so that the peer DR device can determine that its own timing time will be set as the timing time of the delay recovery timer in the DR system.

[0075] The identification marker can be the received timing information from the peer DR device, or it can be a preset marker for identification; there are no restrictions on this.

[0076] Through the above process, a more reliable timing time can be negotiated in the DR system to avoid the problem of inconsistent timing of the delayed recovery timer in the DR system, and further improve the reliability of data forwarding by network devices.

[0077] Correspondingly, this application provides a table entry synchronization device, such as... Figure 3 As shown, it is applied to DR equipment and includes:

[0078] The acquisition unit is used to acquire the number of entries to be synchronized stored in itself after establishing a DR system with the peer DR device.

[0079] The interaction unit is used to send a DRCP negotiation message carrying the number of entries to be synchronized to the peer DR device, so that the peer DR device can set a delay recovery timer based on the number of entries to be synchronized and the timing time determined by negotiation with itself.

[0080] The synchronization unit is used to synchronize table entries with the peer DR device based on the delay recovery timer.

[0081] Optionally, the acquisition unit may also include:

[0082] The scanning module is used to scan the table entries it stores;

[0083] The determination module is used to determine the number of entries to be synchronized by negotiating the number of entries in the DRCP message exchange.

[0084] Optionally, the acquisition unit may also include:

[0085] The query module is used to determine the first timing time based on its own stored query timer setting table;

[0086] The comparison module is used to, after receiving the second timing time determined by the peer DR device based on the number of entries to be synchronized, set its own delay recovery timer to the first timing time if the first timing time is greater than the second timing time, and send a DRCP negotiation message carrying the first timing time to the peer DR device. If the second timing time is greater than the first timing time, it sends a DRCP negotiation message carrying a determination mark to the peer DR device.

[0087] Optionally, the DRCP negotiation message may contain at least the bridge media access control MAC address of the DR device and the DRCP destination MAC address.

[0088] Optionally, the entries to be synchronized include at least Address Resolution Protocol (ARP) entries, Neighbor Discovery Protocol (ND) entries, and MAC entries.

[0089] Correspondingly, this application provides a network device, such as Figure 4 As shown, it includes a transceiver, a processor, and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, which in turn causes the processor to implement the method steps of any of the above.

[0090] Correspondingly, this application provides a machine-readable storage medium storing machine-executable instructions, which, when called and executed by a processor, cause the processor to implement any of the method steps described above.

[0091] The technical solutions provided by the embodiments in this specification may include the following beneficial effects:

[0092] In the embodiments described in this specification, after a DR system is established between DR devices, the number of entries to be synchronized is obtained. By sending the number of entries to be synchronized to the peer DR device, the timing time is determined based on the number of entries to be synchronized, and a delay recovery timer is set. Entries are synchronized based on this delay recovery timer, which improves the accuracy of the time required for entry synchronization and enhances the reliability of data forwarding after entry synchronization.

[0093] It should be understood that this specification is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

[0094] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification shall be included within the scope of protection of this specification.

Claims

1. A method for synchronizing table entries, characterized in that, Applications in distributed aggregation DR devices include: After establishing a DR system with the peer DR device, the number of entries to be synchronized stored in the device is obtained. The process of obtaining the number of entries to be synchronized stored in the device includes: scanning the entries stored in the device, exchanging the number of entries through a DRCP negotiation message carrying the number of entries, and determining the number of entries to be synchronized. Sending a Distributed Aggregation Control Protocol (DRCP) negotiation message carrying the number of entries to be synchronized to the peer DR device, so that the peer DR device can set a delayed recovery timer based on the timer time determined by negotiation with itself according to the number of entries to be synchronized, including: determining a first timer time by querying a timer setting table stored in itself; after receiving a second timer time determined by the peer DR device based on the number of entries to be synchronized, if the first timer time is greater than the second timer time, setting its own delayed recovery timer to the first timer time and sending a DRCP negotiation message carrying the first timer time to the peer DR device; if the second timer time is greater than the first timer time, sending a DRCP negotiation message carrying a determination mark to the peer DR device, so that the peer DR device can determine that its own timer time will be set as the timer timer timer timer in the DR system; The table entries are synchronized with the peer DR device based on the delay recovery timer.

2. The method according to claim 1, characterized in that, The DRCP negotiation message carries at least the bridge media access control MAC address of the DR device and the DRCP destination MAC address.

3. The method according to claim 1, characterized in that, The entries to be synchronized include at least Address Resolution Protocol (ARP) entries, Neighbor Discovery Protocol (ND) entries, and MAC entries.

4. A table entry synchronization device, characterized in that, Applications in distributed aggregation DR devices include: The acquisition unit is used to acquire the number of entries to be synchronized stored in itself after establishing a DR system with the peer DR device. The acquisition unit includes: a scanning module for scanning the entries stored in itself; and a determination module for determining the number of entries to be synchronized by exchanging the number of entries through a DRCP negotiation message carrying the number of entries. The interaction unit is used to send a DRCP negotiation message carrying the number of entries to be synchronized to the peer DR device, so that the peer DR device sets a delay recovery timer based on the number of entries to be synchronized and a timer determined by negotiation with itself. The acquisition unit further includes: a query module, used to determine a first timer based on a query timer setting table stored in itself; and a comparison module, used to, after receiving a second timer determined by the peer DR device based on the number of entries to be synchronized, if the first timer is greater than the second timer, set its own delay recovery timer to the first timer and send a DRCP negotiation message carrying the first timer to the peer DR device, and if the second timer is greater than the first timer, send a DRCP negotiation message carrying a determination mark to the peer DR device, so that the peer DR device determines that its own timer will be set as the timer of the delay recovery timer in the DR system. A synchronization unit is used to synchronize table entries with the peer DR device based on the delay recovery timer.

5. The apparatus according to claim 4, characterized in that, The DRCP negotiation message carries at least the bridge media access control MAC address of the DR device and the DRCP destination MAC address.

6. The apparatus according to claim 4, characterized in that, The entries to be synchronized include at least ARP entries, ND entries, and MAC entries.

7. A network device, characterized in that, The method includes a transceiver, a processor, and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, which is prompted by the machine-executable instructions to perform the steps of the method according to any one of claims 1-3.

8. A machine-readable storage medium, characterized in that, The device stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the steps of the method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Table entry synchronization method, gateway device, networking system and storage medium

    CN113746733A

  • Forwarding table item synchronization method and equipment

    CN115118660A