AC LIF maintenance method, electronic equipment, device and storage medium

By applying for and managing AC LIF for the device interface in the L2VPN scenario, the problem of MEP entry creation errors caused by frequent addition and deletion of AC interfaces is solved, and the stability of CFM threads and flexibility of AC interface changes are realized.

CN119420713AActive Publication Date: 2025-02-11NEW H3C TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the L2VPN scenario, frequent addition and deletion of AC LIFs may cause errors when CFM threads create MEP table entries, because the creation of MEP table entries depends on the existence of AC LIFs, and frequent addition and deletion of AC interfaces will lead to inconsistency of AC LIFs.

Method used

A method of maintenance of AC LIF is proposed, by applying for AC LIF after creating the device interface and creating the corresponding MEP table entry when creating the AC interface. When deleting the device interface, delete the MEP table entry, AC interface, AC LIF and device interface in turn to ensure that the AC LIF exists until the device interface is deleted.

Benefits of technology

Through this method, the creation error of MEP table entry caused by frequent addition and deletion operations of the AC interface is avoided, and the coupling between the creation of MEP table entry and the AC interface is relieved, ensuring the stability of CFM threads when the AC interface is changed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420713A_ABST
    Figure CN119420713A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an AC LIF maintenance method, electronic equipment, an AC LIF maintenance device and a storage medium, and relates to the technical field of communication, the method comprises the following steps: after creating an equipment interface, applying for a first AC LIF; wherein the equipment interface comprises a physical interface, a two-layer sub-interface and a three-layer sub-interface; under the condition that the requirement for creating the AC interface exists, after a first AC interface corresponding to the first AC LIF is created, a first MEP table item corresponding to the first AC LIF is created; and sequentially deleting the first MEP table item, the first AC interface, the first AC LIF and the equipment interface under the condition that the requirement for deleting the equipment interface exists. By applying the scheme provided by the embodiment of the invention, the problem that an error occurs when an MEP table item is created by a CFM thread when frequent addition and deletion operations occur in an AC interface can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] CFM (Connectivity Fault Management) defines the OAM (Operations Administration and Maintenance) function of connection detection based on Ethernet bearer networks, which can realize functions such as fault detection, packet loss management, and delay evaluation in the network.

[0003] Currently, most mainstream switching chips support CFM. By binding the LIF (LogicalInterface) of the switching chip and issuing MEP (Maintenance Assosiation End Point) entries, the MEP configuration of the interface of the switching chip can be performed to implement the CFM function.

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

[0005] However, since the creation of AC LIF is bound to the creation of AC interface, if AC interface is frequently added or deleted, it is possible that the AC interface is deleted just after the application of AC LIF and the creation of AC interface are completed and the MEP table entry is being created. Since the AC interface is deleted, the corresponding AC LIF also needs to be deleted. At this time, the corresponding MEP table entry is being created, and it is impossible to find the corresponding MEP table entry in the software record. Therefore, if the corresponding MEP table entry is not found, the L2VPN thread can directly delete the AC LIF without waiting for the MEP table entry to be deleted. If the corresponding MEP table entry is created after the L2VPN thread deletes the AC LIF, the MEP table entry is created, but the corresponding AC LIF does not exist, and the CFM thread that creates the MEP will return an error. Summary of the invention

[0006] The purpose of the embodiments of the present application is to provide an AC LIF maintenance method, electronic device, apparatus and storage medium to avoid the problem that errors occur when the CFM thread creates MEP entries when the AC interface is frequently added or deleted. The specific technical solution is as follows:

[0007] In a first aspect of an embodiment of the present application, a method for maintaining an AC LIF is first provided, the method comprising:

[0008] After creating the device interface, applying 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] When there is a need to create an AC interface, after creating a first AC interface corresponding to the first AC LIF, create a first maintenance endpoint MEP table entry corresponding to the first AC LIF;

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

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

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

[0013] The method further comprises:

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

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

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

[0017] If the first AC LIF can be obtained, the first AC interface is deleted, and a new second AC interface corresponding to the first AC LIF is created;

[0018] If the first AC LIF cannot be obtained, apply for a second AC LIF, and delete the first MEP table entry, the first AC interface, and the first AC LIF in sequence. Then, create a second AC interface and a second MEP table entry corresponding to the second AC LIF in sequence.

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

[0020] After the aggregation group is created, if the aggregation group does not contain a member interface, apply for and write a target logical port into the aggregation group, and the target logical port does not forward packets;

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

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

[0023] After writing a valid member interface into an aggregation group including a target logical port, deleting the target logical port in the aggregation group; wherein the valid member interface is capable of message forwarding.

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

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

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

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

[0028] After creating the device interface, applying 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] When there is a need to create an AC interface, after creating a first AC interface corresponding to the first AC LIF, create a first maintenance endpoint MEP table entry corresponding to the first AC LIF;

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

[0031] In a possible embodiment, the processor is specifically configured to:

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

[0033] The processor is further configured to:

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

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

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

[0037] If the first AC LIF can be obtained, the first AC interface is deleted, and a new second AC interface corresponding to the first AC LIF is created;

[0038] If the first AC LIF cannot be obtained, apply for a second AC LIF, and delete the first MEP table entry, the first AC interface, and the first AC LIF in sequence. Then, create a second AC interface and a second MEP table entry corresponding to the second AC LIF in sequence.

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

[0040] After the aggregation group is created, if the aggregation group does not contain a member interface, apply for and write a target logical port into the aggregation group, and the target logical port does not forward packets;

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

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

[0043] After writing a valid member interface into an aggregation group including a target logical port, deleting the target logical port in the aggregation group; wherein the valid member interface is capable of message forwarding.

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

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

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

[0047] A 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] A first creation module, configured to, if there is a need to create an AC interface, create a first maintenance endpoint MEP table entry corresponding to the first AC LIF after creating a first AC interface corresponding to the first AC LIF;

[0049] The first deleting module is used to delete the first MEP table 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 a possible embodiment, the first creation module is specifically used to:

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

[0052] The device also includes:

[0053] The second deleting 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 a possible embodiment, the device further includes:

[0055] an interface determination module, configured to determine whether the first AC LIF can be obtained after the first AC interface is modified if there is a need to modify the AC interface;

[0056] a second creating module, configured 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 apply for a second AC LIF if the first AC LIF cannot be obtained, and to delete the first MEP table entry, the first AC interface, and the first AC LIF in sequence, and then to create a second AC interface and a second MEP table entry corresponding to the second AC LIF in sequence.

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

[0059] A second application module is used for applying for and writing a target logical port into the aggregation group after the aggregation group is created, if the aggregation group does not contain a member interface, and the target logical port does not forward packets;

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

[0061] In a 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 in the aggregation group including the target logical port; wherein the valid member interface can forward packets.

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

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

[0065] In another aspect of the implementation of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0066] Beneficial effects of the embodiments of the present application:

[0067] The AC LIF maintenance method provided in the embodiment of the present application applies for a first AC LIF after creating a device interface. If there is a need to create an AC interface, after creating a first AC interface corresponding to the first AC LIF, a first MEP table entry corresponding to the first ACLIF is created.

[0068] When there is a need to delete the device interface, the first MEP table entry, the first AC interface, the first AC LIF, and the device interface are deleted in sequence, indicating that before the device interface is deleted, the applied AC LIF has always existed and has not changed. The deletion of AC LIF is not related to the AC interface, but is related to the deletion of the device interface. Therefore, regardless of whether the AC interface is deleted, the CFM thread's creation of MEP table entries is not affected, thereby eliminating the problem of coupling between the creation of MEP table entries and the AC interface, thereby avoiding the problem of errors in the CFM thread's creation of MEP table entries when the AC interface is frequently added or deleted.

[0069] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0071] Figure 1 It is an interaction diagram between a CFM thread and an L2VPN thread in the related art;

[0072] Figure 2 A flowchart of a first AC LIF maintenance method provided in an embodiment of the present application;

[0073] Figure 3 A flowchart of a second AC LIF maintenance method provided in an embodiment of the present application;

[0074] Figure 4 A flowchart of a third AC LIF maintenance method provided in an embodiment of the present application;

[0075] Figure 5 A flowchart of a fourth AC LIF maintenance method provided in an embodiment of the present application;

[0076] Figure 6 A flowchart of an AC LIF maintenance method in the related art;

[0077] Figure 7 It is an interaction diagram of a CFM thread and an aggregation group thread in the related art;

[0078] Figure 8 A flowchart of the first MEP creation method provided in an embodiment of the present application;

[0079] Fig. 9 A flowchart of a second MEP creation method provided in an embodiment of the present application;

[0080] Fig.10 A schematic diagram of a process of creating a third MEP provided in an embodiment of the present application;

[0081] Fig.11 A schematic diagram of an aggregation group member interface configuration provided in an embodiment of the present application;

[0082] Fig.12 It is an interaction diagram of a CFM thread, an L2VPN thread, and an aggregation group thread in the related art;

[0083] Fig.13 An interaction diagram of a CFM thread, an L2VPN thread, and an aggregation group thread provided in an embodiment of the present application;

[0084] Fig.14 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0085] Fig.15 A schematic diagram of the structure of an AC LIF maintenance device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0086] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0087] See also Figure 1 , which is an interaction diagram between a CFM thread and an L2VPN thread in the related art.

[0088] from Figure 1 It can be seen that when the L2VPN thread interacts with the CFM thread at the platform layer, the CFM thread obtains information related to the L2VPN thread, and the L2VPN thread sends an L2VPN UP (open) / DOWN (close) notification to the CFM thread. If the L2VPN is UP, the CFM thread sends the MEP table entry. If the L2VPN is DOWN, the CFM thread deletes the MEP table entry.

[0089] When the L2VPN thread interacts with the CFM thread 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, the AC LIF application and AC interface creation may have just been completed, and the AC interface may be deleted while the MEP table entry is being created, causing the CFM thread that creates the MEP to return an error.

[0091] Based on this, the present application embodiment provides an AC LIF maintenance method, see Figure 2 , which is a flow chart and Henan diagram of the first AC LIF maintenance method provided in an embodiment of the present application, the method includes S201-S203.

[0092] S201, after creating a device interface, applying 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, the physical interface is created by the driver layer, and the physical interface can be a network interface for data transmission between devices, or a fiber interface dedicated to fiber communication, or a storage interface for connecting a hard disk and other storage devices, a USB (Universal Serial Bus) interface, etc. The second-layer sub-interface and the third-layer sub-interface are a kind of logical sub-interface relying on the physical interface. The second-layer sub-interface can be a second-layer VLAN (Virtual Local Area Network) sub-interface, and the third-layer sub-interface can be a third-layer routing sub-interface.

[0095] After creating the device interface, the L2VPN thread applies for 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: When there is a need to create an AC interface, after creating a first AC interface corresponding to a first AC LIF, create a first MEP table 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 table entry includes information of the first AC LIF, such as VLAN ID (Virtual Local Area Network Identifier), interface information, etc. A switch or other network device can perform access control and traffic management based on this information.

[0100] After creating the first AC interface corresponding to the first AC LIF, the CFM thread creates the first MEP table entry corresponding to the first AC LIF, wherein the first AC interface and the first MEP table 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 the device interface, delete the first MEP table 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 the device interface, the first MEP table entry is deleted first, then the first AC interface is deleted, and finally the first AC LIF is deleted. This ensures that when the first AC interface is deleted, the first AC LIF always exists and does not change, thereby preventing the CFM thread from affecting the creation of the first MEP table entry.

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

[0104] When there is a need to delete the device interface, the first MEP table entry, the first AC interface, the first AC LIF, and the device interface are deleted in sequence, indicating that before the device interface is deleted, the applied AC LIF has always existed and has not changed. The deletion of AC LIF is not related to the AC interface, but is related to the deletion of the device interface. Therefore, regardless of whether the AC interface is deleted, the CFM thread's creation of MEP table entries is not affected, thereby eliminating the problem of coupling between the creation of MEP table entries and the AC interface, thereby avoiding the problem of errors in the CFM thread's creation of MEP table entries when the AC interface is frequently added or deleted.

[0105] In one possible embodiment, see Figure 3 , is a flow chart of a second AC LIF maintenance method provided in an embodiment of the present application, and Figure 2 Compared with the embodiment shown, the above S202 can be implemented through S202A, and the above method also includes S301.

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

[0107] The software record records information of the first AC interface, and each AC interface maintains its own software record.

[0108] The software record is a software record related to the AC interface maintained by the L2VPN thread. It is also a software record of whether an L2VPN thread considers the AC interface to exist or not. The software record records a lot of information related to the AC interface, such as AC interface statistics, AC Bypass function, etc.

[0109] S301: When there is a need to delete an AC interface, delete a software record corresponding to a first AC interface.

[0110] In S301, the software record corresponding to the first AC interface is deleted, which means that the system no longer maintains the relevant state and configuration of the first AC interface. In theory, the first AC interface no longer exists in the network.

[0111] Among them, S301 needs to be executed before S203.

[0112] By selecting the above embodiment, when there is a need to create an AC interface, a first AC interface corresponding to the first AC LIF, a software record corresponding to the first AC interface, and a first MEP table entry corresponding to the first AC LIF are created in sequence, and information of the first AC interface can be recorded.

[0113] When there is a need to delete the AC interface, deleting the software record corresponding to the first AC interface means that the first AC interface is only deleted in theory, but not actually deleted, so the AC LIF does not need to be deleted, and the MEP table entry does not need to be deleted. Therefore, by deleting the software record corresponding to the first AC interface, the coupling problem between the creation of the MEP table entry and the AC interface can be resolved, thereby avoiding the problem of errors in the CFM thread creating the MEP table entry when the AC interface is frequently added or deleted.

[0114] In one possible embodiment, see Figure 4 , is a flow chart of a third AC LIF maintenance method provided in an embodiment of the present application, and Figure 2 Compared with the embodiment shown, the above method further includes S401-S403.

[0115] S401: If there is a need to modify the AC interface, it is determined whether a first AC LIF can be obtained after the first AC interface is modified.

[0116] In S401, if there is a need to modify the AC interface, the driver layer will query the software record maintained by the first AC interface to determine whether the first AC LIF can be obtained. If yes, S402 is executed. If no, 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 no new AC LIF needs to be applied for.

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

[0120] S403: Apply for a second AC LIF, and delete the first MEP entry, the first AC interface, and the first AC LIF in sequence. Then, create a second AC interface and a 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 also a new AC LIF needs to be applied for.

[0122] Specifically, the driver layer first applies for the second AC LIF (i.e., the new AC LIF), then deletes the first MEP table entry (i.e., the old MEP table entry), then deletes the first AC interface (i.e., the old AC interface), and deletes the first AC LIF (i.e., the old AC LIF). After that, the second AC interface (i.e., the new AC interface) and the second MEP table entry (i.e., the new MEP table entry) corresponding to the second AC LIF (i.e., the new AC LIF) are created in sequence.

[0123] By selecting the above embodiment, if there is a need to modify the AC interface, and the first AC LIF can be obtained after the first AC interface is modified, 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 directly deleted and a new second AC interface can be created. Since the AC LIF does not need to be deleted or reapplied, the MEP table entry does not need to be deleted or recreated.

[0124] If the first AC LIF cannot be obtained after modifying the first AC interface, it means that not only a new AC interface needs to be created, but also a new AC LIF needs to be applied for. Therefore, it is necessary to apply for the second AC LIF first, and then delete the first MEP table entry, the first AC interface, and the first AC LIF in turn, and then create the second AC interface and the second MEP table entry corresponding to the second AC LIF in turn, so as to modify the AC interface. In addition, in actual applications, the frequency of AC interface modification is low, and it is almost impossible to fail to obtain the AC LIF. Therefore, even if the MEP table entry needs to be deleted and recreated, it is very likely that the CFM thread that creates the MEP will not return an error.

[0125] In one possible embodiment, see Figure 5 , which is a flow chart of a fourth AC LIF maintenance method provided in an embodiment of the present application, and the method includes S501-S512.

[0126] S501, creating a device interface.

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

[0128] S503, receiving an AC interface processing instruction.

[0129] 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, obtaining the first AC LIF applied for.

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

[0132] S506: Determine whether the first AC LIF can be obtained after the first AC interface is modified.

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

[0134] S507, deleting the first AC interface, and calling the hardware program under the chip SDK interface to create a new second AC interface corresponding to the first AC LIF.

[0135] S508, apply for the second AC LIF.

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

[0137] S510: Obtain a first AC LIF to be deleted.

[0138] S511: Delete a software record of a first AC interface corresponding to a first AC LIF.

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

[0140] See also Figure 6 , is a flow chart of an AC LIF maintenance method in the related art, the method includes S601-S610.

[0141] S601, receiving an AC interface processing instruction.

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

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

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

[0145] S604: Determine whether the first AC LIF can be obtained after the first AC interface is modified.

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

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

[0148] S606, apply for the second AC LIF.

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

[0150] S608: Obtain the first AC LIF to be deleted.

[0151] S609: Call 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 It can be seen from the comparison that in the related art, the addition and deletion of the first AC LIF are bound to the addition and deletion of the first AC interface, while in the embodiment of the present application, the application (or deletion) of the first AC LIF is only related to the creation (or deletion) of the device interface, and has nothing to do with the addition and deletion of the first AC interface. In this way, even if the first AC interface is deleted, as long as the first AC LIF exists, the MEP table entry can be successfully delivered.

[0154] In addition, if CFM is applied to an aggregation group scenario, the MEP table entry can only be successfully created if there are member interfaces in the aggregation group. If there are no member interfaces in the aggregation group, the MEP table entry delivery fails. Therefore, the CFM thread needs to respond to the changes in the member interfaces in the aggregation group when creating the MEP table entry.

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

[0156] See also Figure 7 , which is an interaction diagram between a CFM thread and an aggregation group thread in the related art.

[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 a MEP entry.

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

[0159] However, since the creation of MEP entries is bound to the number of member interfaces in the aggregation group, if member interfaces in the aggregation group are frequently added or deleted, it is possible that the member interfaces in the aggregation group have just been created and the MEP entries are being created, while all the member interfaces in the aggregation group are deleted.

[0160] Before all member interfaces in the aggregation group are deleted, the MEP table entry bound to the aggregation group needs to be deleted. However, the MEP table entry corresponding to the aggregation group is being created at this time, and it is impossible to find the corresponding MEP table entry in the software record. Therefore, if the corresponding MEP table entry is not found, the aggregation group thread does not need to wait for the MEP table entry 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 MEP table entry corresponding to the aggregation group is created. In this case, the MEP table entry is created, but there are no member interfaces in the aggregation group. In this case, the CFM thread that creates the MEP will return an error.

[0161] Based on this, in a possible embodiment, see Figure 8 , which is a flow chart of the first MEP table entry creation method provided in an embodiment of the present application, and the above method includes S801-S802.

[0162] S801, after creating an aggregation group, if the aggregation group does not contain a member interface, apply for and write a target logical port into the aggregation group.

[0163] The target logical port does not forward messages.

[0164] In S801, the target logical port may 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 messages.

[0165] After the aggregation group is created, if the aggregation group does not contain a member interface, an ASIC switch chip logic port is applied for and written into the aggregation group as the target logic port, and the target logic port does not occupy the Serdes (serializer / deserializer) resources of the ASIC switch chip.

[0166] The number of target logical ports may be one or more.

[0167] S802: Create a third MEP table entry based on the aggregation group.

[0168] By selecting the above embodiment, when the aggregation group does not contain a member interface, applying for and writing a target logical port that does not forward messages into the aggregation group can ensure that there is a member interface in the created aggregation group, and the MEP table entry delivery failure will not occur.

[0169] In one possible embodiment, see Fig. 9 , is a flow chart of a second MEP table entry creation method provided in an embodiment of the present application, which is similar to the aforementioned Figure 8 Compared with the illustrated embodiment, the above method further includes S901.

[0170] S901, after writing a valid member interface into an aggregation group including a target logical port, delete the target logical port in the aggregation group.

[0171] Among them, the valid member interface can forward messages.

[0172] For example, assume that aggregation group M includes interface 0, which is the target logical interface that cannot forward packets. If interface 1 is written into aggregation group M, which is a valid member interface that can forward packets, then after interface 1 is written into aggregation group M, interface 0 will be deleted.

[0173] By selecting the above embodiment, after writing a valid member interface into the aggregation group including the target logical port, deleting the target logical port in the aggregation group, the occupied interface resources can be reduced.

[0174] In one possible embodiment, see Fig.10 , is a flow chart of a third MEP table entry creation method provided in an embodiment of the present application, which is similar to the aforementioned Fig. 9 Compared with the embodiment shown, the above method further includes S1001.

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

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

[0177] For example, assume that aggregation group M includes interface 1, interface 2 and interface 3, and interface 1-interface 3 are valid member interfaces. If interface 1-interface 3 in aggregation group M are all deleted, then an interface 0 is written in aggregation group M as the target logical port, and the target logical port cannot forward packets.

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

[0179] Combine the following Fig.11 This section describes how to create a MEP entry. Fig.11 , which is a schematic diagram of an aggregation group member interface configuration provided in an embodiment of the present application.

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

[0181] First, apply for a target logical port for each aggregation group according to the maximum supported aggregation group cycle, and configure the fake port attribute. Among them, the fake port attribute means that the target logical port cannot forward messages. This process can be called the driver aggregation initialization process.

[0182] The second is to obtain the target logical port and set the target logical port 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 of the aggregation group is 0, the target logical port is obtained and the target logical port is set as the member interface of the aggregation group. This process can be called a process of driving the member interface setting of the aggregation group.

[0184] Combine the following Figure 12-13 The process of applying the above CFM to L2VPN scenarios and aggregation group scenarios is briefly described.

[0185] See also Fig.12 , which is an interaction diagram of a CFM thread, an L2VPN thread, and an aggregation group thread in the related technology.

[0186] from Fig.12 It can be seen that if CFM is applied to the 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 the aggregation group scenario, during the interaction between the aggregation group thread and the CFM thread, the CFM thread needs to obtain the aggregation group and member interface information as well as the aggregation group member interface change notification.

[0188] See also Fig.13 , which is an interaction diagram between a CFM thread, an L2VPN thread, and an aggregation group thread provided in an embodiment of the present application.

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

[0190] If CFM is applied to the 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, but does not need to obtain the aggregation group member interface change notification.

[0191] use Fig.13The illustrated embodiment enables CFM to retain only two query interfaces for obtaining L2VPN thread-related information and aggregation group and member interface information, thereby simplifying the complexity of the query code.

[0192] Corresponding to the aforementioned AC LIF maintenance method, the present application embodiment also provides an electronic device, see Fig.14 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device includes a memory 1401, a transceiver 1402, and a processor 1403:

[0193] The memory 1401 is used to store computer programs; the transceiver 1402 is used to send and receive data under the control of the processor 1403; the processor 1403 is used to read the computer program in the 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] When there is a need to create an AC interface, after creating a first AC interface corresponding to the first AC LIF, a first maintenance endpoint MEP table entry corresponding to the first AC LIF is created;

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

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

[0198] When there is a need to delete the device interface, the first MEP table entry, the first AC interface, the first AC LIF, and the device interface are deleted in sequence, indicating that before the device interface is deleted, the applied AC LIF has always existed and has not changed. The deletion of AC LIF is not related to the AC interface, but is related to the deletion of the device interface. Therefore, regardless of whether the AC interface is deleted, the CFM thread's creation of MEP table entries is not affected, thereby eliminating the problem of coupling between the creation of MEP table entries and the AC interface, thereby avoiding the problem of errors in the CFM thread's creation of MEP table entries when the AC interface is frequently added or deleted.

[0199] Among them, Fig.14In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 1403 and various circuits of memory represented by memory 1401 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 1402 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, which transmission medium may include a wireless channel, a wired channel, an optical cable, and other transmission media. The processor 1403 is responsible for managing the bus architecture and general processing, and the memory 1401 may store data used by the processor 1403 when performing operations.

[0200] The processor 1403 may 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 may also adopt a multi-core architecture.

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

[0202] In a possible embodiment, the processor 1403 is specifically configured to:

[0203] When there is a need to create an AC interface, a first AC interface corresponding to the first AC LIF, a software record corresponding to the first AC interface, and a first MEP table item corresponding to the first AC LIF are sequentially created; wherein the software record records information about the first AC interface;

[0204] The processor 1403 is further configured to:

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

[0206] By selecting the above embodiment, when there is a need to create an AC interface, a first AC interface corresponding to the first AC LIF, a software record corresponding to the first AC interface, and a first MEP table entry corresponding to the first AC LIF are created in sequence, and information of the first AC interface can be recorded.

[0207] When there is a need to delete the AC interface, deleting the software record corresponding to the first AC interface means that the first AC interface is only deleted in theory, but not actually deleted, so the AC LIF does not need to be deleted, and the MEP table entry does not need to be deleted. Therefore, by deleting the software record corresponding to the first AC interface, the coupling problem between the creation of the MEP table entry and the AC interface can be resolved, thereby avoiding the problem of errors in the CFM thread creating the MEP table entry when the AC interface is frequently added or deleted.

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

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

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

[0211] If the first AC LIF cannot be obtained, apply for the second AC LIF, delete the first MEP table entry, the first AC interface, and the first AC LIF in sequence, and then create the second AC interface and the second MEP table entry corresponding to the second AC LIF in sequence.

[0212] By selecting the above embodiment, if there is a need to modify the AC interface, and the first AC LIF can be obtained after the first AC interface is modified, 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 directly deleted and a new second AC interface can be created. Since the AC LIF does not need to be deleted or reapplied, the MEP table entry does not need to be deleted or recreated.

[0213] If the first AC LI cannot be obtained after modifying the first AC interface, it means that not only a new AC interface needs to be created, but also a new AC LIF needs to be applied for. Therefore, it is necessary to apply for the second AC LIF first, and then delete the first MEP table entry, the first AC interface, and the first AC LIF in turn, and then create the second AC interface and the second MEP table entry corresponding to the second AC LIF in turn, so as to modify the AC interface. In addition, in actual applications, the frequency of AC interface modification is low, and it is almost impossible to fail to obtain the AC LIF. Therefore, even if the MEP table entry needs to be deleted and recreated, it is very likely that the CFM thread for creating the MEP will not return an error.

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

[0215] After the aggregation group is created, if the aggregation group does not contain any member interfaces, the target logical port is applied for and written into the aggregation group, and the target logical port does not forward packets.

[0216] A third MEP entry is created based on the aggregation group.

[0217] By selecting the above embodiment, when the aggregation group does not contain a member interface, applying for and writing a target logical port that does not forward messages into the aggregation group can ensure that there is always a member interface in the created aggregation group, and there will be no failure in sending MEP table entries.

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

[0219] After writing a valid member interface into the aggregation group including the target logical port, the target logical port in the aggregation group is deleted; wherein the valid member interface can forward packets.

[0220] By selecting the above embodiment, after writing a valid member interface into the aggregation group including the target logical port, deleting the target logical port in the aggregation group, the occupied interface resources can be reduced.

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

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

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

[0224] Corresponding to the aforementioned AC LIF maintenance method, the present application embodiment also provides an AC LIF maintenance device, see Fig.15 , is a structural diagram of an AC LIF maintenance device provided in an embodiment of the present application, the device comprising:

[0225] The first application module 1501 is used to apply for the first AC 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;

[0226] The first creating module 1502 is configured to create a first MEP table entry corresponding to the first AC LIF after creating a first AC interface corresponding to the first AC LIF when there is a need to create an AC interface;

[0227] The first deleting module 1503 is used to delete the first MEP table 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] According to the above embodiment, after the device interface is created, the first AC LIF is applied for. When there is a need to create an AC interface, after the first AC interface corresponding to the first AC LIF is created, the first MEP table entry corresponding to the first AC LIF is created.

[0229] When there is a need to delete the device interface, the first MEP table entry, the first AC interface, the first AC LIF, and the device interface are deleted in sequence, indicating that before the device interface is deleted, the applied AC LIF has always existed and has not changed. The deletion of AC LIF is not related to the AC interface, but is related to the deletion of the device interface. Therefore, regardless of whether the AC interface is deleted, the CFM thread's creation of MEP table entries is not affected, thereby eliminating the problem of coupling between the creation of MEP table entries and the AC interface, thereby avoiding the problem of errors in the CFM thread's creation of MEP table entries when the AC interface is frequently added or deleted.

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

[0231] When there is a need to create an AC interface, a first AC interface corresponding to the first AC LIF, a software record corresponding to the first AC interface, and a first MEP table item corresponding to the first AC LIF are sequentially created; wherein the software record records information about the first AC interface;

[0232] The above device also includes:

[0233] The second deleting 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] By selecting the above embodiment, when there is a need to create an AC interface, a first AC interface corresponding to the first AC LIF, a software record corresponding to the first AC interface, and a first MEP table entry corresponding to the first AC LIF are created in sequence, and information of the first AC interface can be recorded.

[0235] When there is a need to delete the AC interface, deleting the software record corresponding to the first AC interface means that the first AC interface is only deleted in theory, but not actually deleted, so the AC LIF does not need to be deleted, and the MEP table entry does not need to be deleted. Therefore, by deleting the software record corresponding to the first AC interface, the coupling problem between the creation of the MEP table entry and the AC interface can be resolved, thereby avoiding the problem of errors in the CFM thread creating the MEP table entry when the AC interface is frequently added or deleted.

[0236] In a possible embodiment, the above device further includes:

[0237] An interface determination module, configured to determine whether the first AC LIF can be obtained after the first AC interface is modified if there is a need to modify the AC interface;

[0238] A second creation module is configured 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;

[0239] The third creation module is used to apply for a second AC LIF if the first AC LIF cannot be obtained, and to delete the first MEP table entry, the first AC interface, and the first AC LIF in sequence, and then to create a second AC interface and a second MEP table entry corresponding to the second AC LIF in sequence.

[0240] By selecting the above embodiment, if there is a need to modify the AC interface, and the first AC LIF can be obtained after the first AC interface is modified, 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 directly deleted and a new second AC interface can be created. Since the AC LIF does not need to be deleted or reapplied, the MEP table entry does not need to be deleted or recreated.

[0241] If the first AC LI cannot be obtained after modifying the first AC interface, it means that not only a new AC interface needs to be created, but also a new AC LIF needs to be applied for. Therefore, it is necessary to apply for the second AC LIF first, and then delete the first MEP table entry, the first AC interface, and the first AC LIF in turn, and then create the second AC interface and the second MEP table entry corresponding to the second AC LIF in turn, so as to modify the AC interface. In addition, in actual applications, the frequency of AC interface modification is low, and it is almost impossible to fail to obtain the AC LIF. Therefore, even if the MEP table entry needs to be deleted and recreated, it is very likely that the CFM thread for creating the MEP will not return an error.

[0242] In a possible embodiment, the above device further includes:

[0243] The second application module is used for applying for and writing a target logical port into the aggregation group after the aggregation group is created, if the aggregation group does not contain a member interface, and the target logical port does not forward packets;

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

[0245] By selecting the above embodiment, when the aggregation group does not contain a member interface, applying for and writing a target logical port that does not forward messages into the aggregation group can ensure that there is always a member interface in the created aggregation group, and there will be no failure in sending MEP table entries.

[0246] In a possible embodiment, the above device 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 in the aggregation group including the target logical port; wherein the valid member interface can forward packets.

[0248] By selecting the above embodiment, after writing a valid member interface into the aggregation group including the target logical port, deleting the target logical port in the aggregation group, the occupied interface resources can be reduced.

[0249] In a possible embodiment, the above device further includes:

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

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

[0252] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned AC LIF maintenance methods are implemented.

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

[0254] When there is a need to delete the device interface, the first MEP table entry, the first AC interface, the first AC LIF, and the device interface are deleted in sequence, indicating that before the device interface is deleted, the applied AC LIF has always existed and has not changed. The deletion of AC LIF is not related to the AC interface, but is related to the deletion of the device interface. Therefore, regardless of whether the AC interface is deleted, the CFM thread's creation of MEP table entries is not affected, thereby eliminating the problem of coupling between the creation of MEP table entries and the AC interface, thereby avoiding the problem of errors in the CFM thread's creation of MEP table entries when the AC interface is frequently added or deleted.

[0255] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any one of the AC LIF maintenance methods in the above embodiments.

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

[0257] When there is a need to delete the device interface, the first MEP table entry, the first AC interface, the first AC LIF, and the device interface are deleted in sequence, indicating that before the device interface is deleted, the applied AC LIF has always existed and has not changed. The deletion of AC LIF is not related to the AC interface, but is related to the deletion of the device interface. Therefore, regardless of whether the AC interface is deleted, the CFM thread's creation of MEP table entries is not affected, thereby eliminating the problem of coupling between the creation of MEP table entries and the AC interface, thereby avoiding the problem of errors in the CFM thread's creation of MEP table entries when the AC interface is frequently added or deleted.

[0258] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part 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, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0259] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0260] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the electronic device, device, and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0261] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. An AC LIF maintenance method, characterized in that: The method comprises: After creating the device interface, applying 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; When there is a need to create an AC interface, after creating a first AC interface corresponding to the first AC LIF, create a first maintenance endpoint MEP table entry corresponding to the first AC LIF; When there is a need to delete the device interface, the first MEP table entry, the first AC interface, the first AC LIF, and the device interface are deleted in sequence.

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

3. The method according to claim 1, characterized in that The method further comprises: If there is a need to modify the AC interface, determining whether the first AC LIF can be obtained after the first AC interface is modified; If the first AC LIF can be obtained, the first AC interface is deleted, and a new second AC interface corresponding to the first AC LIF is created; If the first AC LIF cannot be obtained, apply for a second AC LIF, and delete the first MEP table entry, the first AC interface, and the first AC LIF in sequence. Then, create a second AC interface and a second MEP table entry corresponding to the second AC LIF in sequence.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: After the aggregation group is created, if the aggregation group does not contain a member interface, apply for and write a target logical port into the aggregation group, and the target logical port does not forward packets; A third MEP table entry is created based on the aggregation group.

5. The method according to claim 4, characterized in that The method further comprises: After writing a valid member interface into an aggregation group including a target logical port, deleting the target logical port in the aggregation group; wherein the valid member interface is capable of message forwarding.

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

7. An electronic device, characterized in that: Including memory, transceiver, processor: A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations: After creating the device interface, applying 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; When there is a need to create an AC interface, after creating a first AC interface corresponding to the first AC LIF, create a first maintenance endpoint MEP table entry corresponding to the first AC LIF; When there is a need to delete the device interface, the first MEP table entry, the first AC interface, the first AC LIF, and the device interface are deleted 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, a first AC interface corresponding to the first AC LIF, a software record corresponding to the first AC interface, and a first MEP table entry corresponding to the first AC LIF are sequentially created; wherein the software record records information about the first AC interface; The processor is further configured to: When there is a need to delete the AC interface, the software record corresponding to the first AC interface is deleted.

9. An AC LIF maintenance device, characterized in that: The device comprises: A 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; A first creation module, configured to, if there is a need to create an AC interface, create a first AC interface corresponding to the first AC LIF and then create a first maintenance endpoint MEP table entry corresponding to the first AC LIF; The first deleting module is used to delete the first MEP table 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, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.

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

  • Three-layered interface based MPLS-TP (multi-protocol label switching-transport profile) configuration method and device

    CN103634423A

  • Method and device for building an AC port

    CN107888473A

  • Method and equipment for implementing fault processing

    CN108282383A