An AC LIF maintenance method, electronic device, apparatus, and storage medium

By first requesting an AC LIF and creating a MEP entry after the device interface is created, and then deleting the MEP entry, AC interface, and device interface in sequence, the CFM thread error caused by frequent additions and deletions of the AC interface is resolved, and the stable distribution of MEP entries is achieved.

CN119420713BActive Publication Date: 2025-10-28NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411375868.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-10-28
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

In L2VPN scenarios, frequent addition and deletion operations on the AC interface cause errors in the creation of MEP entries by the CFM thread, and existing technologies cannot effectively solve this problem.

Method used

After the device interface is created, first apply for an AC LIF and create a MEP entry. When deleting, delete the MEP entry, AC interface and device interface in sequence to decouple the AC interface from the MEP entry.

Benefits of technology

This avoids errors in the CFM thread creating MEP entries when the AC interface is frequently added or deleted, ensuring the normal distribution of MEP entries and improving system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420713B_ABST
    Figure CN119420713B_ABST
Patent Text Reader

Abstract

This application provides an AC LIF maintenance method, electronic device, apparatus, and storage medium, relating to the field of communication technology. The method includes: after creating a device interface, applying for a first AC LIF; wherein the device interface includes a physical interface, a Layer 2 sub-interface, and a Layer 3 sub-interface; when there is a need to create an AC interface, creating a first AC interface corresponding to the first AC LIF, and then creating a first MEP entry corresponding to the first AC LIF; when there is a need to delete a device interface, sequentially deleting the first MEP entry, the first AC interface, the first AC LIF, and the device interface. Applying the solution provided by this application can avoid the problem of errors occurring when the CFM thread creates MEP entries when there are frequent addition and deletion operations on AC interfaces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to an AC LIF maintenance method, electronic device, apparatus and storage medium. Background Art

[0002] CFM (Connectivity Fault Management) defines OAM (Operations Administration and Maintenance) functions for connectivity detection on Ethernet bearer networks, enabling functions such as fault detection, packet loss management, and latency assessment in the network.

[0003] Most mainstream switching chips currently support CFM functionality. By binding the switching chip's LIF (Logical Interface) and issuing MEP (Maintenance Assosiation End Point) entries, the switching chip's interface can be configured with MEP, thereby enabling CFM functionality.

[0004] If CFM is applied in an L2VPN scenario, MEP entries must be bound to the LIF (Access Controller) of the L2VPN scenario to be issued. In other words, MEP entries can only be successfully configured if the AC LIF exists. Therefore, in scenarios where the L2VPN (Layer 2 Virtual Private Network) thread interacts with the CFM thread, the CFM thread can only create MEP entries after the L2VPN thread creates the AC LIF, and the L2VPN thread can only delete the AC LIF after the CFM thread deletes the MEP entry. That is, the CFM thread must create MEP entries after the L2VPN thread creates the AC LIF, and the CFM thread must delete MEP entries before the L2VPN thread deletes the AC LIF.

[0005] However, because the creation of AC LIFs is tied to the creation of AC interfaces, frequent additions and deletions of AC interfaces can lead to situations where an AC interface is deleted while the AC LIF application and AC interface creation are complete and the MEP entry is being created. Since the AC interface is deleted, the corresponding AC LIF must also be deleted. At this point, the corresponding MEP entry is still being created and cannot be found in the software records. Therefore, if the corresponding MEP entry is not found, the L2VPN thread can delete the AC LIF directly without waiting for the MEP entry to be deleted. If the corresponding MEP entry is created after the L2VPN thread deletes the AC LIF, a situation will arise where the MEP entry is created, but the corresponding AC LIF does not exist. In this case, the CFM thread creating the MEP will return an error. Summary of the Invention

[0006] The purpose of this application is to provide an AC LIF maintenance method, electronic device, apparatus, and storage medium to avoid errors in the CFM thread's creation of MEP entries when frequent add / delete operations occur on the AC interface. The specific technical solution is as follows:

[0007] In a first aspect of this application, an AC LIF maintenance method is provided, the method comprising:

[0008] After creating the device interface, apply for the first access controller AC logical interface LIF; wherein, the device interface includes a physical interface, a Layer 2 sub-interface, and a Layer 3 sub-interface;

[0009] If there is a need to create an AC interface, after creating the first AC interface corresponding to the first AC LIF, create the first maintenance endpoint MEP entry corresponding to the first AC LIF.

[0010] If there is a need to delete the device interface, delete the first MEP entry, the first AC interface, the first AC LIF, and the device interface in sequence.

[0011] In one possible embodiment, the step of creating the first AC interface corresponding to the first AC LIF and then creating the first MEP entry corresponding to the first AC LIF after creating the first AC interface when there is a need to create an AC interface includes:

[0012] When there is a need to create an AC interface, the first AC interface corresponding to the first AC LIF, the software record corresponding to the first AC interface, and the first MEP entry corresponding to the first AC LIF are created sequentially; wherein, the software record records the information of the first AC interface.

[0013] The method further includes:

[0014] If there is a need to delete the AC interface, delete the software record corresponding to the first AC interface.

[0015] In one possible embodiment, the method further includes:

[0016] If there is a need to modify the AC interface, then determine whether the first AC LIF can be obtained after modifying the first AC interface;

[0017] If the first AC LIF can be obtained, then delete the first AC interface and create a new second AC interface corresponding to the first AC LIF;

[0018] If the first AC LIF cannot be obtained, then a second AC LIF is requested, and the first MEP entry, the first AC interface, and the first AC LIF are deleted in sequence. Then, the second AC interface and the second MEP entry corresponding to the second AC LIF are created in sequence.

[0019] In one possible embodiment, the method further includes:

[0020] After creating an aggregation group, if the aggregation group does not contain member interfaces, a target logical port is requested and written into the aggregation group, and the target logical port does not perform message forwarding.

[0021] A third MEP entry is created based on the aggregate group.

[0022] In one possible embodiment, the method further includes:

[0023] After writing a valid member interface into the aggregation group containing the target logical port, the target logical port in the aggregation group is deleted; wherein, the valid member interface is capable of packet forwarding.

[0024] In one possible embodiment, the method further includes:

[0025] If all valid member interfaces in the aggregation group are deleted, then the target logical port is written into the aggregation group.

[0026] In a second aspect of this application, an electronic device is provided, including a memory, a transceiver, and a processor:

[0027] A memory for storing computer programs; a transceiver for sending and receiving data under the control of the processor; and a processor for reading the computer programs from the memory and performing the following operations:

[0028] After creating the device interface, apply for the first access controller AC logical interface LIF; wherein, the device interface includes a physical interface, a Layer 2 sub-interface, and a Layer 3 sub-interface;

[0029] If there is a need to create an AC interface, after creating the first AC interface corresponding to the first AC LIF, create the first maintenance endpoint MEP entry corresponding to the first AC LIF.

[0030] If there is a need to delete the device interface, delete the first MEP entry, the first AC interface, the first AC LIF, and the device interface in sequence.

[0031] In one possible embodiment, the processor is specifically used for:

[0032] When there is a need to create an AC interface, the first AC interface corresponding to the first AC LIF, the software record corresponding to the first AC interface, and the first MEP entry corresponding to the first AC LIF are created sequentially; wherein, the software record records the information of the first AC interface.

[0033] The processor is also used for:

[0034] If there is a need to delete the AC interface, delete the software record corresponding to the first AC interface.

[0035] In one possible embodiment, the processor is further configured to:

[0036] If there is a need to modify the AC interface, then determine whether the first AC LIF can be obtained after modifying the first AC interface;

[0037] If the first AC LIF can be obtained, then delete the first AC interface and create a new second AC interface corresponding to the first AC LIF;

[0038] If the first AC LIF cannot be obtained, then a second AC LIF is requested, and the first MEP entry, the first AC interface, and the first AC LIF are deleted in sequence. Then, the second AC interface and the second MEP entry corresponding to the second AC LIF are created in sequence.

[0039] In one possible embodiment, the processor is further configured to:

[0040] After creating an aggregation group, if the aggregation group does not contain member interfaces, a target logical port is requested and written into the aggregation group, and the target logical port does not perform message forwarding.

[0041] A third MEP entry is created based on the aggregate group.

[0042] In one possible embodiment, the processor is further configured to:

[0043] After writing a valid member interface into the aggregation group containing the target logical port, the target logical port in the aggregation group is deleted; wherein, the valid member interface is capable of packet forwarding.

[0044] In one possible embodiment, the processor is further configured to:

[0045] If all valid member interfaces in the aggregation group are deleted, then the target logical port is written into the aggregation group.

[0046] In a third aspect of this application, an AC LIF maintenance device is provided, the device comprising:

[0047] The first application module is used to apply for a first access controller AC logical interface LIF after creating a device interface; wherein, the device interface includes a physical interface, a Layer 2 sub-interface, and a Layer 3 sub-interface;

[0048] The first creation module is used to create the first AC interface corresponding to the first AC LIF and then create the first maintenance endpoint MEP table entry corresponding to the first AC LIF when there is a need to create an AC interface.

[0049] The first deletion module is used to delete the first MEP entry, the first AC interface, the first AC LIF, and the device interface in sequence when there is a need to delete the device interface.

[0050] In one possible embodiment, the first creation module is specifically used for:

[0051] When there is a need to create an AC interface, the first AC interface corresponding to the first AC LIF, the software record corresponding to the first AC interface, and the first MEP entry corresponding to the first AC LIF are created sequentially; wherein, the software record records the information of the first AC interface.

[0052] The device further includes:

[0053] The second deletion module is used to delete the software record corresponding to the first AC interface when there is a need to delete the AC interface.

[0054] In one possible embodiment, the device further includes:

[0055] The interface judgment module is used to determine whether the first AC LIF can be obtained after modifying the first AC interface if there is a need to modify the AC interface.

[0056] The second creation module is used to delete the first AC interface and create a new second AC interface corresponding to the first AC LIF if the first AC LIF can be obtained.

[0057] The third creation module is used to request a second AC LIF if the first AC LIF cannot be obtained, and to delete the first MEP entry, the first AC interface, and the first AC LIF in sequence. Then, it sequentially creates the second AC interface and the second MEP entry corresponding to the second AC LIF.

[0058] In one possible embodiment, the device further includes:

[0059] The second application module is used to apply for and write a target logical port into the aggregation group if the aggregation group does not contain a member interface after the aggregation group is created. The target logical port does not perform message forwarding.

[0060] The fourth creation module is used to create a third MEP entry based on the aggregate group.

[0061] In one possible embodiment, the device further includes:

[0062] The third deletion module is used to delete the target logical port in the aggregation group after writing a valid member interface into the aggregation group containing the target logical port; wherein the valid member interface is capable of packet forwarding.

[0063] In one possible embodiment, the device further includes:

[0064] The logic port writing module is used to write the target logic port into the aggregation group if all valid member interfaces in the aggregation group are deleted.

[0065] In another aspect of this application, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the steps of any of the methods described in the first aspect above.

[0066] Beneficial effects of the embodiments in this application:

[0067] The AC LIF maintenance method provided in this application embodiment applies for a first AC LIF after creating a device interface. If there is a need to create an AC interface, the method creates a first AC interface corresponding to the first AC LIF and then creates a first MEP entry corresponding to the first AC LIF.

[0068] When there is a need to delete a device interface, the first MEP entry, the first AC interface, the first AC LIF, and the device interface are deleted sequentially. This indicates that the requested AC LIF existed and remained unchanged before the device interface was deleted. The deletion of the AC LIF is unrelated to the AC interface but is related to the deletion of the device interface. Therefore, regardless of whether the AC interface is deleted, the creation of MEP entries by the CFM thread is unaffected, thus decoupling the creation of MEP entries from the AC interface. This avoids the problem of errors in the creation of MEP entries by the CFM thread when the AC interface is frequently added or deleted.

[0069] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0070] 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.

[0071] Figure 1 This is an interaction diagram of a CFM thread and an L2VPN thread in related technologies;

[0072] Figure 2 A flowchart illustrating the first AC LIF maintenance method provided in this application embodiment;

[0073] Figure 3 A flowchart illustrating the second AC LIF maintenance method provided in this application embodiment;

[0074] Figure 4 A flowchart illustrating the third AC LIF maintenance method provided in this application embodiment;

[0075] Figure 5 A flowchart illustrating the fourth AC LIF maintenance method provided in this application embodiment;

[0076] Figure 6 This is a flowchart illustrating an AC LIF maintenance method in related technologies.

[0077] Figure 7 This is an interaction diagram of a CFM thread and an aggregation group thread in a related technology;

[0078] Figure 8 A flowchart illustrating the first MEP creation method provided in this application embodiment;

[0079] Figure 9 A flowchart illustrating the second MEP creation method provided in this application embodiment;

[0080] Figure 10 A flowchart illustrating the third MEP creation method provided in this application embodiment;

[0081] Figure 11 A schematic diagram illustrating the configuration of an aggregated group member interface provided in an embodiment of this application;

[0082] Figure 12 This is an interaction diagram of a CFM thread, an L2VPN thread, and an aggregation group thread in related technologies.

[0083] Figure 13 An interaction diagram of a CFM thread, an L2VPN thread, and an aggregation group thread provided in an embodiment of this application;

[0084] Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0085] Figure 15 This is a schematic diagram of an AC LIF maintenance device provided in an embodiment of this application. Detailed Implementation

[0086] 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.

[0087] See Figure 1 This is an interaction diagram of a CFM thread and an L2VPN thread in related technologies.

[0088] from Figure 1 As can be seen, when the L2VPN thread and the CFM thread interact at the platform layer, the CFM thread obtains information related to the L2VPN thread, and the L2VPN thread sends L2VPN UP (on) / DOWN (off) notifications to the CFM thread. If L2VPN is UP, the CFM thread issues a MEP entry. If L2VPN is DOWN, the CFM thread deletes the MEP entry.

[0089] When the L2VPN thread and the CFM thread interact at the driver layer, after the L2VPN thread creates the AC LIF, the CFM thread creates the MEP entry, and after the CFM thread deletes the MEP entry, the L2VPN thread deletes the AC LIF.

[0090] During the interaction between the L2VPN thread and the CFM thread at the driver layer, if the AC interface is frequently added or deleted, there may be a situation where the AC interface is deleted just as the application for the AC LIF and the creation of the AC interface are completed, and the MEP entry is being created. This will cause the CFM thread that creates the MEP to return an error.

[0091] Based on this, this application provides an AC LIF maintenance method, see [link to relevant documentation]. Figure 2 The above is a flowchart and diagram of the first AC LIF maintenance method provided in the embodiments of this application, which includes S201-S203.

[0092] S201, after creating the device interface, apply for the first AC LIF.

[0093] The device interface includes a physical interface, a Layer 2 sub-interface, and a Layer 3 sub-interface.

[0094] In S201, physical interfaces are created by the driver layer. Physical interfaces can be network interfaces used for data transmission between devices, fiber optic interfaces dedicated to fiber optic communication, storage interfaces for connecting hard drives and other storage devices, USB (Universal Serial Bus) interfaces, etc. Layer 2 and Layer 3 sub-interfaces are logical sub-interfaces that rely on physical interfaces. A Layer 2 sub-interface can be a Layer 2 VLAN (Virtual Local Area Network) sub-interface, and a Layer 3 sub-interface can be a Layer 3 routing sub-interface.

[0095] After creating the device interface, the L2VPN thread requests the first AC LIF.

[0096] AC LIF is a logical interface used to implement more advanced network functions or services, such as VLAN, VPN (Virtual Private Network), QoS (Quality of Service), etc.

[0097] S202, if there is a need to create an AC interface, after creating the first AC interface corresponding to the first AC LIF, create the first MEP entry corresponding to the first AC LIF.

[0098] In S202, the first AC interface is used to manage and control traffic entering a specific network area.

[0099] The first MEP entry contains information about the first AC LIF, such as VLAN ID (Virtual Local Area Network Identifier), interface information, etc. Switches or other network devices can use this information for access control and traffic management.

[0100] After creating the first AC interface corresponding to the first AC LIF, the CFM thread creates the first MEP entry corresponding to the first AC LIF. The first AC interface and the first MEP entry are created by calling the hardware program under the chip SDK (Software Development Kit) interface.

[0101] S203, if there is a need to delete a device interface, delete the first MEP entry, the first AC interface, the first AC LIF, and the device interface in sequence.

[0102] In S203, when there is a need to delete a device interface, the first MEP entry is deleted first, then the first AC interface is deleted, and then the first AC LIF is deleted. This ensures that the first AC LIF exists and remains unchanged even when the first AC interface is deleted, thus preventing the CFM thread from creating the first MEP entry.

[0103] Using the above embodiment, after creating the device interface, a first AC LIF is applied for. If there is a need to create an AC interface, after creating the first AC interface corresponding to the first AC LIF, a first MEP entry corresponding to the first AC LIF is created.

[0104] When there is a need to delete a device interface, the first MEP entry, the first AC interface, the first AC LIF, and the device interface are deleted sequentially. This indicates that the requested AC LIF existed and remained unchanged before the device interface was deleted. The deletion of the AC LIF is unrelated to the AC interface but is related to the deletion of the device interface. Therefore, regardless of whether the AC interface is deleted, the creation of MEP entries by the CFM thread is unaffected, thus decoupling the creation of MEP entries from the AC interface. This avoids the problem of errors in the creation of MEP entries by the CFM thread when the AC interface is frequently added or deleted.

[0105] In one possible embodiment, see Figure 3 This is a flowchart illustrating the second AC LIF maintenance method provided in this application embodiment. Figure 2 Compared to the illustrated embodiment, the above-described S202 can be implemented by S202A, and the above method also includes S301.

[0106] S202A, when there is a need to create an AC interface, sequentially create the first AC interface corresponding to the first AC LIF, the software record corresponding to the first AC interface, and the first MEP entry corresponding to the first AC LIF.

[0107] The software log records information about the first AC interface. Furthermore, each AC interface maintains its own software log.

[0108] The software log is a software record maintained by the L2VPN thread that is related to the AC interface. It is also a software record that the L2VPN thread considers to indicate whether the AC interface exists. The software log contains a lot of information related to the AC interface, such as AC interface statistics and AC Bypass function.

[0109] S301, if there is a need to delete the AC interface, delete the software record corresponding to the first AC interface.

[0110] In S301, deleting the software record corresponding to the first AC interface means that the system no longer maintains the relevant status and configuration of the first AC interface, and theoretically, the first AC interface no longer exists in the network.

[0111] S301 needs to be executed before S203.

[0112] Using the above embodiment, when there is a need to create an AC interface, the first AC interface corresponding to the first AC LIF, the software record corresponding to the first AC interface, and the first MEP entry corresponding to the first AC LIF are created sequentially, so that the information of the first AC interface can be recorded.

[0113] When there is a need to delete AC interfaces, deleting the software record corresponding to the first AC interface means that the first AC interface is only theoretically deleted, not actually deleted. Therefore, the AC LIF does not need to be deleted, and the MEP entry does not need to be deleted either. Thus, by deleting the software record corresponding to the first AC interface, the coupling between creating MEP entries and AC interfaces can be decoupled, thereby avoiding errors in MEP entry creation by the CFM thread when frequent add / delete operations occur on the AC interface.

[0114] In one possible embodiment, see Figure 4 This is a flowchart illustrating the third AC LIF maintenance method provided in this application embodiment. Figure 2 Compared to the embodiments shown, the above method also includes S401-S403.

[0115] S401, if there is a need to modify the AC interface, then determine whether the first AC LIF can be obtained after modifying the first AC interface.

[0116] In S401, if there is a need to modify the AC interface, the driver layer will query the software records maintained by the first AC interface to determine whether the first AC LIF can be obtained. If yes, then S402 is executed. If not, then S403 is executed.

[0117] S402, delete the first AC interface and create a new second AC interface corresponding to the first AC LIF.

[0118] In S402, if the first AC LIF can be obtained, it means that only a new AC interface needs to be created, and there is no need to apply for a new AC LIF.

[0119] Specifically, when creating a new AC interface, the first AC interface (i.e., the old AC interface) is first deleted, and then the second AC interface (i.e., the new AC interface) corresponding to the first AC LIF is created.

[0120] S403, request the second AC LIF, and delete the first MEP entry, the first AC interface, and the first AC LIF in sequence. Then, create the second AC interface and the second MEP entry corresponding to the second AC LIF in sequence.

[0121] In S403, if the first AC LIF cannot be obtained, it means that not only a new AC interface needs to be created, but a new AC LIF also needs to be requested.

[0122] Specifically, the driver layer first requests a second AC LIF (i.e., a new AC LIF), then deletes the first MEP entry (i.e., the old MEP entry), followed by deleting the first AC interface (i.e., the old AC interface) and the first AC LIF (i.e., the old AC LIF). Afterward, it sequentially creates the second AC interface (i.e., the new AC interface) and the second MEP entry (i.e., the new MEP entry) corresponding to the second AC LIF (i.e., the new AC LIF).

[0123] Using the above embodiments, if there is a need to modify the AC interface, and the first AC LIF can be obtained after modifying the first AC interface, it means that only a new AC interface needs to be created, without applying for a new AC LIF. The original first AC interface can be deleted directly, and a new second AC interface can be created. Since the AC LIF does not need to be deleted and reapplied, the MEP entries also do not need to be deleted and recreated.

[0124] If the first AC LIF cannot be obtained after modifying the first AC interface, it indicates that not only a new AC interface needs to be created, but a new AC LIF also needs to be requested. Therefore, a second AC LIF needs to be requested first. Then, the first MEP entry, the first AC interface, and the first AC LIF are deleted sequentially. Next, the second AC interface and the second MEP entry corresponding to the second AC LIF are created sequentially, thus modifying the AC interface. Furthermore, in practical applications, AC interface modifications are infrequent, and the situation of not being able to obtain the AC LIF is almost impossible. Therefore, even if it is necessary to delete and recreate the MEP entry, there is a high probability that the CFM thread for creating the MEP will return an error.

[0125] In one possible embodiment, see Figure 5 This is a flowchart illustrating the fourth AC LIF maintenance method provided in the embodiments of this application. The method includes S501-S512.

[0126] S501, Create device interface.

[0127] S502, applying for the first AC LIF.

[0128] S503 receives AC interface processing commands.

[0129] Specifically, if the AC interface processing instruction is to create an AC interface, then S504-S505 are executed. If the AC interface processing instruction is to modify an AC interface, then S506-S509 are executed. If the AC interface processing instruction is to delete an AC interface, then S510-S511 are executed.

[0130] S504, obtain the first AC LIF of the application.

[0131] S505 calls the hardware program under the chip SDK interface to sequentially create the first AC interface corresponding to the first AC LIF, the software record corresponding to the first AC interface, and the first MEP table entry.

[0132] S506, determine whether the first AC LIF can be obtained after modifying the first AC interface.

[0133] If yes, then execute S507. If no, then execute S508-S509.

[0134] S507: Delete the first AC interface and call the hardware program under the chip SDK interface to create a new second AC interface corresponding to the first AC LIF.

[0135] S508, applying for a second AC LIF.

[0136] S509, sequentially delete the first MEP table entry, the first AC interface, and the first AC LIF, and call the hardware program under the chip SDK interface to sequentially create the second AC interface and the second MEP table entry corresponding to the second AC LIF.

[0137] S510, retrieve the first AC LIF to be deleted.

[0138] S511, delete the software record of the first AC interface corresponding to the first AC LIF.

[0139] S512 calls the hardware program under the chip SDK interface to delete the created MEP table entries, AC interface, AC LIF, and device interface in sequence.

[0140] See Figure 6 This is a flowchart illustrating an AC LIF maintenance method in related technologies, which includes steps S601-S610.

[0141] S601 receives AC interface processing commands.

[0142] Specifically, if the AC interface processing instruction is to create an AC interface, then S602-S603 are executed. If the AC interface processing instruction is to modify an AC interface, then S604-S607 are executed. If the AC interface processing instruction is to delete an AC interface, then S608-S610 are executed.

[0143] S602, applying for the first AC LIF.

[0144] S603 calls the hardware program under the chip SDK interface to sequentially create the first AC interface corresponding to the first AC LIF, the software record corresponding to the first AC interface, and the first MEP table entry.

[0145] S604 determines whether the first AC LIF can be obtained after modifying the first AC interface.

[0146] If yes, then execute S605. If no, then execute S606-S607.

[0147] S605, delete the first AC interface, and call the hardware program under the chip SDK interface to create a new second AC interface corresponding to the first AC LIF.

[0148] S606, applying for a second AC LIF.

[0149] S607, sequentially delete the first MEP table entry, the first AC interface, and the first AC LIF, and call the hardware program under the chip SDK interface to sequentially create the second AC interface and the second MEP table entry corresponding to the second AC LIF.

[0150] S608, retrieve the first AC LIF to be deleted.

[0151] S609 calls the hardware program under the chip SDK interface to delete the first AC interface corresponding to the first AC LIF.

[0152] S610, delete the first AC LIF.

[0153] pass Figure 5 and Figure 6 The comparison shows that in related technologies, the addition or deletion of the first AC LIF is bound to the addition or deletion of the first AC interface, while in the embodiment of this application, the application (or deletion) of the first AC LIF is only related to the creation (or deletion) of the device interface and is not related to the addition or deletion of the first AC interface. This ensures that even if the first AC interface is deleted, as long as the first AC LIF exists, the MEP entry can still be successfully issued.

[0154] Furthermore, if CFM is applied to an aggregation group scenario, MEP entries can only be successfully created if a member interface exists in the aggregation group. If there is no member interface in the aggregation group, the MEP entry issuance will fail. Therefore, the CFM thread needs to respond to changes in the member interface of the aggregation group when creating MEP entries.

[0155] When the number of member interfaces in an aggregation group changes from n to 0, the MEP entry bound to that aggregation group needs to be deleted. When the number of member interfaces in an aggregation group changes from 0 to n, the MEP entry bound to that aggregation group needs to be issued. Here, n is an integer greater than 0.

[0156] See Figure 7 This is an interaction diagram of CFM thread and aggregation group thread in related technologies.

[0157] from Figure 7 It can be seen that during the interaction between the aggregation group thread and the CFM thread, the CFM thread obtains the aggregation group and member interface information and then creates MEP entries.

[0158] After the aggregate group member interface changes, the aggregate group thread sends an aggregate group member interface change notification to the CFM thread. The CFM thread then creates or deletes the MEP table entry based on the received aggregate group member interface change information.

[0159] However, since the creation of MEP entries is tied to the number of member interfaces in the aggregation group, if there are frequent addition and deletion operations on member interfaces in the aggregation group, there may be a situation where the creation of member interfaces in the aggregation group has just been completed, the MEP entries are being created, and then all member interfaces in the aggregation group are deleted.

[0160] Before all member interfaces in an aggregation group are deleted, the MEP entries bound to that aggregation group need to be deleted. However, at this time, the corresponding MEP entries for that aggregation group are being created, and it's impossible to find the corresponding MEP entries in the software records. Therefore, if the corresponding MEP entries are not found, the aggregation group thread does not need to wait for the MEP entries to be deleted and can directly delete all member interfaces in the aggregation group. After all member interfaces in the aggregation group are deleted, the creation of the corresponding MEP entries for that aggregation group is completed. This can lead to a situation where the MEP entries are created, but there are no member interfaces in the aggregation group. In this case, the CFM thread that created the MEPs will return an error.

[0161] Based on this, in one possible embodiment, see [link to relevant documentation]. Figure 8 This is a flowchart illustrating the first MEP entry creation method provided in this application embodiment, the method including S801-S802.

[0162] S801: After creating an aggregation group, if the aggregation group does not contain a member interface, then request and write the target logical port into the aggregation group.

[0163] Among them, the aforementioned target logical port does not perform message forwarding.

[0164] In S801, the target logical port can be a logical port in an ASIC (Application Specific Integrated Circuit) switching chip, and the attribute of the target logical port is configured not to forward packets.

[0165] After creating an aggregation group, if the aggregation group does not contain member interfaces, an ASIC switching chip logic port is requested and written into the aggregation group as the target logic port. This target logic port does not occupy the ASIC switching chip's Serdes (serializer / deserializer) resources.

[0166] The number of target logic ports can be one or more.

[0167] S802, create a third MEP entry based on the aggregation group.

[0168] By using the above embodiments, when the aggregation group does not contain a member interface, applying for and writing a target logical port that does not perform message forwarding to the aggregation group can ensure that the created aggregation group has a member interface, thus preventing the failure of MEP entry issuance.

[0169] In one possible embodiment, see Figure 9 This is a flowchart illustrating the second MEP entry creation method provided in this application embodiment, which is consistent with the aforementioned Figure 8 Compared to the embodiments shown, the above method also includes S901.

[0170] S901: After writing a valid member interface into the aggregation group containing the target logical port, delete the target logical port in the aggregation group.

[0171] Among them, the valid member interface can perform message forwarding.

[0172] For example, suppose that aggregation group M contains interface 0, which is a target logical interface that cannot perform packet forwarding. If interface 1 is written into aggregation group M, which is a valid member interface that can perform packet forwarding, then after writing interface 1 into aggregation group M, interface 0 will be deleted.

[0173] By using the above embodiments, after writing valid member interfaces into the aggregation group containing the target logical port, deleting the target logical port in the aggregation group can reduce the interface resources occupied.

[0174] In one possible embodiment, see Figure 10 This is a flowchart illustrating the third MEP entry creation method provided in this application embodiment, which is consistent with the aforementioned Figure 9 Compared to the embodiments shown, the above method further includes S1001.

[0175] S1001, if all valid member interfaces in the aggregation group are deleted, then write the target logical port into the aggregation group.

[0176] In S1001, if all valid member interfaces in the aggregation group are deleted, in order for the MEP entry to be successfully issued, it is necessary to ensure that there is at least one member interface in the aggregation group. Therefore, the target logical port is written into the aggregation group.

[0177] For example, suppose that the aggregation group M includes interface 1, interface 2 and interface 3, and interface 1 to interface 3 are valid member interfaces. If all interfaces 1 to interface 3 in the aggregation group M are deleted, then an interface 0 is written into the aggregation group M as the target logical port. This target logical port cannot perform packet forwarding.

[0178] Using the above embodiments, if all valid member interfaces in the aggregation group are deleted, writing the target logical port into the aggregation group can ensure that the MEP entry can still be successfully issued even if there are no valid member interfaces in the aggregation group, and the function of the aggregation group will not be affected.

[0179] The following is combined Figure 11 This section provides a detailed explanation of how to create MEP entries. See also... Figure 11 This is a schematic diagram of an aggregated group member interface configuration provided in an embodiment of this application.

[0180] from Figure 11It can be seen that if CFM is applied to the aggregation group scenario, the configuration of the member interface in the aggregation group can be divided into three processes.

[0181] First, based on the maximum supported aggregation group, a target logical port is requested for each aggregation group in a loop, and a fake port attribute is configured. The fake port attribute means that the target logical port cannot forward packets. This process can be called the driver aggregation initialization process.

[0182] Second, obtain the target logical port and set it as a member interface of the aggregation group. This process can be called the driving aggregation group creation process.

[0183] Third, if the number of member interfaces in the aggregation group is 0, then the target logical port is obtained and set as a member interface of the aggregation group. This process can be called the driving aggregation group member interface setting process.

[0184] The following is combined Figures 12-13 The process of applying CFM to L2VPN and aggregation group scenarios will be briefly explained.

[0185] See Figure 12 This is an interaction diagram of a CFM thread, an L2VPN thread, and an aggregation group thread in related technologies.

[0186] from Figure 12 It can be seen that if CFM is applied to an L2VPN scenario, during the interaction between the L2VPN thread and the CFM thread, the CFM thread needs to obtain L2VPN-related information and L2VPN UP / DOWN change notifications.

[0187] If CFM is applied to an aggregation group scenario, during the interaction between the aggregation group thread and the CFM thread, the CFM thread needs to obtain information about the aggregation group and its members' interfaces, as well as notifications of changes to the aggregation group members' interfaces.

[0188] See Figure 13 This is an interaction diagram of a CFM thread, an L2VPN thread, and an aggregation group thread provided in an embodiment of this application.

[0189] from Figure 13 It can be seen that if CFM is applied to an L2VPN scenario, during the interaction between the L2VPN thread and the CFM thread, the CFM thread only needs to obtain L2VPN-related information, and does not need to obtain L2VPN UP / DOWN change notifications.

[0190] If CFM is applied to an aggregation group scenario, during the interaction between the aggregation group thread and the CFM thread, the CFM thread only needs to obtain the aggregation group and member interface information, without needing to obtain notifications of changes to the aggregation group member interfaces.

[0191] use Figure 13The embodiment shown allows CFM to retain only two query interfaces to obtain L2VPN thread-related information and aggregation group and member interface information, simplifying the complexity of the query code.

[0192] Corresponding to the aforementioned AC LIF maintenance method, this application also provides an electronic device, see [link to relevant documentation]. Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device includes a memory 1401, a transceiver 1402, and a processor 1403.

[0193] Memory 1401 is used to store computer programs; transceiver 1402 is used to send and receive data under the control of processor 1403; processor 1403 is used to read the computer program in memory 1401 and perform the following operations:

[0194] After creating the device interface, apply for the first access controller AC logical interface LIF; wherein, the device interface includes a physical interface, a Layer 2 sub-interface, and a Layer 3 sub-interface;

[0195] If there is a need to create an AC interface, after creating the first AC interface corresponding to the first AC LIF, create the first maintenance endpoint MEP entry corresponding to the first AC LIF.

[0196] If there is a need to delete a device interface, delete the first MEP entry, the first AC interface, the first AC LIF, and the device interface in sequence.

[0197] Using the above embodiment, after creating the device interface, a first AC LIF is applied for. If there is a need to create an AC interface, after creating the first AC interface corresponding to the first AC LIF, a first MEP entry corresponding to the first AC LIF is created.

[0198] When there is a need to delete a device interface, the first MEP entry, the first AC interface, the first AC LIF, and the device interface are deleted sequentially. This indicates that the requested AC LIF existed and remained unchanged before the device interface was deleted. The deletion of the AC LIF is unrelated to the AC interface but is related to the deletion of the device interface. Therefore, regardless of whether the AC interface is deleted, the creation of MEP entries by the CFM thread is unaffected, thus decoupling the creation of MEP entries from the AC interface. This avoids the problem of errors in the creation of MEP entries by the CFM thread when the AC interface is frequently added or deleted.

[0199] Among them, Figure 14In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 1403) and memory (memory 1401). The bus architecture can also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 1402 can be multiple elements, including transmitters and receivers, providing a unit for communicating with various other devices over transmission media, including wireless channels, wired channels, optical fibers, etc. The processor 1403 is responsible for managing the bus architecture and general processing, and the memory 1401 can store data used by the processor 1403 during operation.

[0200] The processor 1403 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a complex programmable logic device (CPLD). The processor can also adopt a multi-core architecture.

[0201] It should be noted that the electronic device provided in this application embodiment can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Therefore, the parts that are the same as those in the method embodiment will not be described in detail here.

[0202] In one possible embodiment, processor 1403 is specifically used for:

[0203] If there is a need to create an AC interface, the first AC interface corresponding to the first AC LIF, the software record corresponding to the first AC interface, and the first MEP entry corresponding to the first AC LIF are created sequentially; among them, the software record records the information of the first AC interface.

[0204] Processor 1403 is also used for:

[0205] If there is a need to delete the AC interface, delete the software record corresponding to the first AC interface.

[0206] Using the above embodiment, when there is a need to create an AC interface, the first AC interface corresponding to the first AC LIF, the software record corresponding to the first AC interface, and the first MEP entry corresponding to the first AC LIF are created sequentially, so that the information of the first AC interface can be recorded.

[0207] When there is a need to delete AC interfaces, deleting the software record corresponding to the first AC interface means that the first AC interface is only theoretically deleted, not actually deleted. Therefore, the AC LIF does not need to be deleted, and the MEP entry does not need to be deleted either. Thus, by deleting the software record corresponding to the first AC interface, the coupling between creating MEP entries and AC interfaces can be decoupled, thereby avoiding errors in MEP entry creation by the CFM thread when frequent add / delete operations occur on the AC interface.

[0208] In one possible embodiment, processor 1403 is further configured to:

[0209] If there is a need to modify the AC interface, then determine whether the first ACLIF can be obtained after modifying the first AC interface;

[0210] If the first AC LIF can be obtained, delete the first AC interface and create a new second AC interface corresponding to the first AC LIF;

[0211] If the first AC LIF cannot be obtained, then the second AC LIF is requested, and the first MEP entry, the first AC interface, and the first AC LIF are deleted in sequence. Then, the second AC interface and the second MEP entry corresponding to the second AC LIF are created in sequence.

[0212] Using the above embodiments, if there is a need to modify the AC interface, and the first AC LIF can be obtained after modifying the first AC interface, it means that only a new AC interface needs to be created, without applying for a new AC LIF. The original first AC interface can be deleted directly, and a new second AC interface can be created. Since the AC LIF does not need to be deleted and reapplied, the MEP entries also do not need to be deleted and recreated.

[0213] If the first AC LI cannot be obtained after modifying the first AC interface, it indicates that not only a new AC interface needs to be created, but a new AC LIF also needs to be requested. Therefore, it is necessary to first request the second AC LIF, then delete the first MEP entry, the first AC interface, and the first AC LIF in sequence, and then create the second AC interface and the second MEP entry corresponding to the second AC LIF in sequence, thereby modifying the AC interface. Furthermore, in practical applications, AC interface modifications are infrequent, and the situation of not being able to obtain the AC LIF is almost impossible. Therefore, even if it is necessary to delete and recreate the MEP entry, there is a high probability that the CFM thread for creating the MEP will return an error.

[0214] In one possible embodiment, processor 1403 is further configured to:

[0215] After creating an aggregation group, if the aggregation group does not contain member interfaces, a target logical port is requested and written into the aggregation group. The target logical port does not perform message forwarding.

[0216] Create a third MEP entry based on the aggregation group.

[0217] By using the above embodiments, when the aggregation group does not contain a member interface, applying for and writing a target logical port that does not perform message forwarding to the aggregation group can ensure that there is always a member interface in the created aggregation group, and the MEP table entry will not fail to be issued.

[0218] In one possible embodiment, processor 1403 is further configured to:

[0219] After writing a valid member interface into the aggregation group containing the target logical port, delete the target logical port in the aggregation group; the valid member interface is capable of packet forwarding.

[0220] By using the above embodiments, after writing valid member interfaces into the aggregation group containing the target logical port, deleting the target logical port in the aggregation group can reduce the interface resources occupied.

[0221] In one possible embodiment, processor 1403 is further configured to:

[0222] If all valid member interfaces in the aggregation group are deleted, then the target logical port is written into the aggregation group.

[0223] Using the above embodiments, if all valid member interfaces in the aggregation group are deleted, writing the target logical port into the aggregation group can ensure that the MEP entry can still be successfully issued even if there are no valid member interfaces in the aggregation group, and the function of the aggregation group will not be affected.

[0224] Corresponding to the aforementioned AC LIF maintenance method, this application also provides an AC LIF maintenance device, see [link to relevant documentation]. Figure 15 This is a schematic diagram of the structure of an AC LIF maintenance device provided in an embodiment of this application. The device includes:

[0225] The first application module 1501 is used to apply for the first AC LIF after the device interface is created; wherein, the device interface includes a physical interface, a Layer 2 sub-interface, and a Layer 3 sub-interface.

[0226] The first creation module 1502 is used to create the first AC interface corresponding to the first AC LIF and then create the first MEP entry corresponding to the first AC LIF when there is a need to create an AC interface.

[0227] The first deletion module 1503 is used to delete the first MEP entry, the first AC interface, the first AC LIF, and the device interface in sequence when there is a need to delete the device interface.

[0228] Using the above embodiment, after creating the device interface, a first AC LIF is applied for. If there is a need to create an AC interface, after creating the first AC interface corresponding to the first AC LIF, a first MEP entry corresponding to the first AC LIF is created.

[0229] When there is a need to delete a device interface, the first MEP entry, the first AC interface, the first AC LIF, and the device interface are deleted sequentially. This indicates that the requested AC LIF existed and remained unchanged before the device interface was deleted. The deletion of the AC LIF is unrelated to the AC interface but is related to the deletion of the device interface. Therefore, regardless of whether the AC interface is deleted, the creation of MEP entries by the CFM thread is unaffected, thus decoupling the creation of MEP entries from the AC interface. This avoids the problem of errors in the creation of MEP entries by the CFM thread when the AC interface is frequently added or deleted.

[0230] In one possible embodiment, the first creation module 1502 is specifically used for:

[0231] If there is a need to create an AC interface, the first AC interface corresponding to the first AC LIF, the software record corresponding to the first AC interface, and the first MEP entry corresponding to the first AC LIF are created sequentially; among them, the software record records the information of the first AC interface.

[0232] The above-mentioned device also includes:

[0233] The second deletion module is used to delete the software record corresponding to the first AC interface when there is a need to delete the AC interface.

[0234] Using the above embodiment, when there is a need to create an AC interface, the first AC interface corresponding to the first AC LIF, the software record corresponding to the first AC interface, and the first MEP entry corresponding to the first AC LIF are created sequentially, so that the information of the first AC interface can be recorded.

[0235] When there is a need to delete AC interfaces, deleting the software record corresponding to the first AC interface means that the first AC interface is only theoretically deleted, not actually deleted. Therefore, the AC LIF does not need to be deleted, and the MEP entry does not need to be deleted either. Thus, by deleting the software record corresponding to the first AC interface, the coupling between creating MEP entries and AC interfaces can be decoupled, thereby avoiding errors in MEP entry creation by the CFM thread when frequent add / delete operations occur on the AC interface.

[0236] In one possible embodiment, the above-described apparatus further includes:

[0237] The interface judgment module is used to determine whether the first AC LIF can be obtained after modifying the first AC interface if there is a need to modify the AC interface.

[0238] The second creation module is used to delete the first AC interface and create a new second AC interface corresponding to the first AC interface if the first AC LIF can be obtained.

[0239] The third creation module is used to request a second AC LIF if the first AC LIF cannot be obtained, and then delete the first MEP entry, the first AC interface, and the first AC LIF in sequence. After that, the second AC interface and the second MEP entry corresponding to the second AC LIF are created in sequence.

[0240] Using the above embodiments, if there is a need to modify the AC interface, and the first AC LIF can be obtained after modifying the first AC interface, it means that only a new AC interface needs to be created, without applying for a new AC LIF. The original first AC interface can be deleted directly, and a new second AC interface can be created. Since the AC LIF does not need to be deleted and reapplied, the MEP entries also do not need to be deleted and recreated.

[0241] If the first AC LI cannot be obtained after modifying the first AC interface, it indicates that not only a new AC interface needs to be created, but a new AC LIF also needs to be requested. Therefore, it is necessary to first request the second AC LIF, then delete the first MEP entry, the first AC interface, and the first AC LIF in sequence, and then create the second AC interface and the second MEP entry corresponding to the second AC LIF in sequence, thereby modifying the AC interface. Furthermore, in practical applications, AC interface modifications are infrequent, and the situation of not being able to obtain the AC LIF is almost impossible. Therefore, even if it is necessary to delete and recreate the MEP entry, there is a high probability that the CFM thread for creating the MEP will return an error.

[0242] In one possible embodiment, the above-described apparatus further includes:

[0243] The second application module is used to apply for and write the target logical port into the aggregation group if the aggregation group does not contain a member interface after the aggregation group is created. The target logical port does not perform message forwarding.

[0244] The fourth creation module is used to create the third MEP entry based on the aggregation group.

[0245] By using the above embodiments, when the aggregation group does not contain a member interface, applying for and writing a target logical port that does not perform message forwarding to the aggregation group can ensure that there is always a member interface in the created aggregation group, and the MEP table entry will not fail to be issued.

[0246] In one possible embodiment, the above-described apparatus further includes:

[0247] The third deletion module is used to delete the target logical port in the aggregation group after writing a valid member interface into the aggregation group containing the target logical port; wherein, the valid member interface can perform packet forwarding.

[0248] By using the above embodiments, after writing valid member interfaces into the aggregation group containing the target logical port, deleting the target logical port in the aggregation group can reduce the interface resources occupied.

[0249] In one possible embodiment, the above-described apparatus further includes:

[0250] The logical port writing module is used to write the target logical port into the aggregation group if all valid member interfaces in the aggregation group are deleted.

[0251] Using the above embodiments, if all valid member interfaces in the aggregation group are deleted, writing the target logical port into the aggregation group can ensure that the MEP entry can still be successfully issued even if there are no valid member interfaces in the aggregation group, and the function of the aggregation group will not be affected.

[0252] 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 the steps of any of the above-described AC LIF maintenance methods.

[0253] Using the above embodiment, after creating the device interface, a first AC LIF is applied for. If there is a need to create an AC interface, after creating the first AC interface corresponding to the first AC LIF, a first MEP entry corresponding to the first AC LIF is created.

[0254] When there is a need to delete a device interface, the first MEP entry, the first AC interface, the first AC LIF, and the device interface are deleted sequentially. This indicates that the requested AC LIF existed and remained unchanged before the device interface was deleted. The deletion of the AC LIF is unrelated to the AC interface but is related to the deletion of the device interface. Therefore, regardless of whether the AC interface is deleted, the creation of MEP entries by the CFM thread is unaffected, thus decoupling the creation of MEP entries from the AC interface. This avoids the problem of errors in the creation of MEP entries by the CFM thread when the AC interface is frequently added or deleted.

[0255] 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 AC LIF maintenance methods described above.

[0256] Using the above embodiment, after creating the device interface, a first AC LIF is applied for. If there is a need to create an AC interface, after creating the first AC interface corresponding to the first AC LIF, a first MEP entry corresponding to the first AC LIF is created.

[0257] When there is a need to delete a device interface, the first MEP entry, the first AC interface, the first AC LIF, and the device interface are deleted sequentially. This indicates that the requested AC LIF existed and remained unchanged before the device interface was deleted. The deletion of the AC LIF is unrelated to the AC interface but is related to the deletion of the device interface. Therefore, regardless of whether the AC interface is deleted, the creation of MEP entries by the CFM thread is unaffected, thus decoupling the creation of MEP entries from the AC interface. This avoids the problem of errors in the creation of MEP entries by the CFM thread when the AC interface is frequently added or deleted.

[0258] 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)).

[0259] 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.

[0260] 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 embodiments for electronic devices, apparatuses, and storage media 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.

[0261] 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. An AC LIF maintenance method, characterized in that, The method includes: After creating the device interface, apply for the first access controller AC logical interface LIF; wherein, the device interface includes a physical interface, a Layer 2 sub-interface, and a Layer 3 sub-interface; If there is a need to create an AC interface, after creating the first AC interface corresponding to the first AC LIF, create the first maintenance endpoint MEP entry corresponding to the first AC LIF. If there is a need to delete the device interface, delete the first MEP entry, the first AC interface, the first AC LIF, and the device interface in sequence.

2. The method according to claim 1, characterized in that, When there is a need to create an AC interface, after creating the first AC interface corresponding to the first AC LIF, the first MEP entry corresponding to the first AC LIF is created, including: When there is a need to create an AC interface, the first AC interface corresponding to the first AC LIF, the software record corresponding to the first AC interface, and the first MEP entry corresponding to the first AC LIF are created sequentially; wherein, the software record records the information of the first AC interface. The method further includes: If there is a need to delete the AC interface, delete the software record corresponding to the first AC interface.

3. The method according to claim 1, characterized in that, The method further includes: If there is a need to modify the AC interface, then determine whether the first AC LIF can be obtained after modifying the first AC interface; If the first AC LIF can be obtained, then delete the first AC interface and create a new second AC interface corresponding to the first AC LIF; If the first AC LIF cannot be obtained, then a second AC LIF is requested, and the first MEP entry, the first AC interface, and the first AC LIF are deleted in sequence. Then, the second AC interface and the second MEP entry corresponding to the second AC LIF are created in sequence.

4. The method according to any one of claims 1-3, characterized in that, The method further includes: After creating an aggregation group, if the aggregation group does not contain member interfaces, a target logical port is requested and written into the aggregation group, and the target logical port does not perform message forwarding. A third MEP entry is created based on the aggregate group.

5. The method according to claim 4, characterized in that, The method further includes: After writing a valid member interface into the aggregation group containing the target logical port, the target logical port in the aggregation group is deleted; wherein, the valid member interface is capable of packet forwarding.

6. The method according to claim 5, characterized in that, The method further includes: If all valid member interfaces in the aggregation group are deleted, then the target logical port is written into the aggregation group.

7. An electronic device, characterized in that, Includes memory, transceiver, and processor: A memory for storing computer programs; a transceiver for sending and receiving data under the control of the processor; and a processor for reading the computer programs from the memory and performing the following operations: After creating the device interface, apply for the first access controller AC logical interface LIF; wherein, the device interface includes a physical interface, a Layer 2 sub-interface, and a Layer 3 sub-interface; If there is a need to create an AC interface, after creating the first AC interface corresponding to the first AC LIF, create the first maintenance endpoint MEP entry corresponding to the first AC LIF. If there is a need to delete the device interface, delete the first MEP entry, the first AC interface, the first AC LIF, and the device interface in sequence.

8. The electronic device according to claim 7, characterized in that, The processor is specifically used for: When there is a need to create an AC interface, the first AC interface corresponding to the first AC LIF, the software record corresponding to the first AC interface, and the first MEP entry corresponding to the first AC LIF are created sequentially; wherein, the software record records the information of the first AC interface. The processor is also used for: If there is a need to delete the AC interface, delete the software record corresponding to the first AC interface.

9. An AC LIF maintenance device, characterized in that, The device includes: The first application module is used to apply for a first access controller AC logical interface LIF after creating a device interface; wherein, the device interface includes a physical interface, a Layer 2 sub-interface, and a Layer 3 sub-interface; The first creation module is used to create the first AC interface corresponding to the first AC LIF and then create the first maintenance endpoint MEP table entry corresponding to the first AC LIF when there is a need to create an AC interface. The first deletion module is used to delete the first MEP entry, the first AC interface, the first AC LIF, and the device interface in sequence when there is a need to delete the device interface.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-6.

Citation Information

Patent Citations

  • Forwarding method for multicast message in VPLS, and service provider edge equipment

    CN102045250A

  • Delivery method of connectivity fault detection protocol messages and forwarding equipment

    CN103036793A