Search

CN-113918324-B - Port redundancy-based fault self-healing method and device

CN113918324BCN 113918324 BCN113918324 BCN 113918324BCN-113918324-B

Abstract

The invention discloses a fault self-healing method and device based on port redundancy, wherein the method comprises the steps of creating a redundant port group, carrying out logic resource allocation, triggering service self-healing switching action when port faults occur, scanning other ports in the same port group, arranging ports which are not started with VLAN from large to small according to bandwidth, taking the largest port for service switching, searching the first port which is not started with VLAN from the upper limit value of VLAN planning in an inverted order if the VLAN is started, arranging the largest port according to the bandwidth from large to small if the ports are scanned, and triggering service self-healing rewinding work to carry out service rewinding when the ports are recovered. The method and the device realize service configuration backup through port-level redundancy and rapidly switch when faults occur.

Inventors

  • WANG JIN

Assignees

  • 中盈优创资讯科技有限公司

Dates

Publication Date
20260508
Application Date
20210927

Claims (12)

  1. 1. A fault self-healing method based on port redundancy is characterized by comprising the following steps: Creating a redundant port group and performing logic resource allocation, namely directly allocating and recording a VLAN when a certain VLAN is allocated for a certain port member, if the VLAN is not used by the port members of the same group, firstly skipping the VLAN when the VLAN is used by the port members of the same group, preferentially selecting other available VLANs for allocation and recording the VLAN; When a port fault occurs, triggering a service self-healing switching action, migrating by taking a user, namely a VLAN as a unit, scanning other ports in the same port group, arranging ports which are not started with the VLAN from large to small according to the bandwidth, taking the largest port for service switching, if the VLAN is started, starting from the VLAN planning upper limit value, searching the first port which is not started with the VLAN on any other port in reverse order, and if a plurality of ports are scanned, arranging the ports from large to small according to the bandwidth, and taking the largest port for service switching; and when the port fault is recovered, triggering the self-healing service switching back work to switch back the service.
  2. 2. The method for self-healing a fault based on port redundancy according to claim 1, wherein the redundant port group includes a redundant port group unique identifier and a same group of port members, and the same group of port members includes devices where a plurality of ports are located, port names, port bandwidths, and port unique identifiers.
  3. 3. The port redundancy-based fault self-healing method according to claim 1, wherein the logical resource allocation includes: Inquiring port resource allocation conditions, and judging whether an associated port group exists or not; if the port group is not associated, inquiring the single-port resource allocation condition, and allocating resources according to the ports; if the associated port group exists, inquiring the resource allocation condition of the port group, and judging whether the logic resources in the same group conflict; If the conflict exists, the remaining available resources of the port are inquired, whether the available resources exist or not is judged, if the available resources do not exist, the maximum available resources are allocated, if the available resources exist, the conflict resources of the port are marked, and the resources are allocated according to the port; If not, the resources are allocated per port.
  4. 4. A port redundancy based fault self-healing method according to claim 3, wherein VLAN allocation in the logical resource allocation comprises: when a VLAN is allocated to a certain port member, if the VLAN is not used by the port members of the same group, the VLAN is directly allocated and recorded; If the VLAN is used by the members of the same group of ports, skipping the VLAN, preferentially selecting other available VLANs for distribution, and recording the VLAN; If the same group of port members have used the VLAN and no other VLAN is available, a distinct record is made at the time of allocation.
  5. 5. The port redundancy-based fault self-healing method according to claim 1, wherein the service self-healing rollback comprises: Scanning other port members in the same group, and finding VLAN records after service switching; and taking the new VLAN in the VLAN record as a sub-interface identifier on the backup equipment, and deleting the corresponding sub-interface configuration.
  6. 6. A port redundancy-based fault self-healing apparatus, comprising: The system comprises a redundant port group configuration module, a virtual machine interface module and a virtual machine interface module, wherein the redundant port group configuration module is used for creating a redundant port group and performing logic resource allocation, wherein when a certain VLAN is allocated for a certain port member, if the VLAN is not used by the same group of port members, the VLAN is directly allocated and recorded; The service self-healing switching module is used for triggering service self-healing switching action when port faults occur, migrating by taking a user, namely VLAN as a unit, scanning other ports in the same port group, arranging ports which are not started with the VLAN from large to small according to bandwidth, taking the largest port for service switching, if the VLAN is started, starting from the VLAN planning upper limit value, searching the first port which is not started with the VLAN on any other port in reverse order, and if a plurality of ports are scanned, arranging the ports from large to small according to bandwidth, and taking the largest port for service switching; And the service self-healing back-off module is used for triggering the service self-healing back-off work to carry out service back-off when the port fault is recovered.
  7. 7. The port redundancy-based fault self-healing apparatus of claim 6, wherein the redundant port group includes a redundant port group unique identifier and a same group of port members, the same group of port members including a device in which a plurality of ports are located, a port name, a port bandwidth, and a port unique identifier.
  8. 8. The port redundancy-based fault self-healing apparatus according to claim 6, wherein the logical resource allocation includes: Inquiring port resource allocation conditions, and judging whether an associated port group exists or not; if the port group is not associated, inquiring the single-port resource allocation condition, and allocating resources according to the ports; if the associated port group exists, inquiring the resource allocation condition of the port group, and judging whether the logic resources in the same group conflict; If the conflict exists, the remaining available resources of the port are inquired, whether the available resources exist or not is judged, if the available resources do not exist, the maximum available resources are allocated, if the available resources exist, the conflict resources of the port are marked, and the resources are allocated according to the port; If not, the resources are allocated per port.
  9. 9. The port redundancy-based fault self-healing apparatus according to claim 8, wherein VLAN assignment in the logical resource assignment includes: when a VLAN is allocated to a certain port member, if the VLAN is not used by the port members of the same group, the VLAN is directly allocated and recorded; If the VLAN is used by the members of the same group of ports, skipping the VLAN, preferentially selecting other available VLANs for distribution, and recording the VLAN; If the same group of port members have used the VLAN and no other VLAN is available, a distinct record is made at the time of allocation.
  10. 10. The port redundancy-based fault self-healing apparatus according to claim 6, wherein the service self-healing rollback comprises: Scanning other port members in the same group, and finding VLAN records after service switching; and taking the new VLAN in the VLAN record as a sub-interface identifier on the backup equipment, and deleting the corresponding sub-interface configuration.
  11. 11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1-5 when executing the computer program.
  12. 12. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program for performing the method of any one of claims 1-5.

Description

Port redundancy-based fault self-healing method and device Technical Field The invention relates to the field of port level faults, in particular to a fault self-healing method and device based on port redundancy. Background Port level failures of typical devices can cause large-area disconnection of traffic for normal users (not subscribed to SLA (SERVICE LEVEL AGREEMENT, service level agreement) multi-line access), with failure repair based on manual configuration switching. Disclosure of Invention In order to solve the problems in the prior art, the invention provides a fault self-healing method and device based on port redundancy, wherein the port redundancy realizes service configuration backup and is switched rapidly when a fault occurs. In order to achieve the above purpose, the present invention adopts the following technical scheme: In an embodiment of the present invention, a method for self-healing a fault based on port redundancy is provided, where the method includes: creating a redundant port group and performing logic resource allocation; When a port fault occurs, triggering a service self-healing switching action, scanning other ports in the same port group, arranging ports which do not enable the VLAN from large to small according to bandwidth, taking the largest port for service switching, if the VLAN is enabled, searching the first port which does not enable the VLAN on any other port in reverse order from the VLAN planning upper limit value, and if a plurality of ports are scanned, arranging the ports from large to small according to bandwidth, and taking the largest port for service switching; and when the port fault is recovered, triggering the self-healing service switching back work to switch back the service. Further, the redundant port group includes a redundant port group unique identifier and a same group of port members, the same group of port members including devices where the plurality of ports are located, port names, port bandwidths, and port unique identifiers. Further, the logic resource allocation includes: Inquiring port resource allocation conditions, and judging whether an associated port group exists or not; if the port group is not associated, inquiring the single-port resource allocation condition, and allocating resources according to the ports; if the associated port group exists, inquiring the resource allocation condition of the port group, and judging whether the logic resources in the same group conflict; If the conflict exists, the remaining available resources of the port are inquired, whether the available resources exist or not is judged, if the available resources do not exist, the maximum available resources are allocated, if the available resources exist, the conflict resources of the port are marked, and the resources are allocated according to the port; If not, the resources are allocated per port. Further, VLAN allocation in logical resource allocation includes: when a VLAN is allocated to a certain port member, if the VLAN is not used by the port members of the same group, the VLAN is directly allocated and recorded; If the VLAN is used by the members of the same group of ports, skipping the VLAN, preferentially selecting other available VLANs for distribution, and recording the VLAN; If the same group of port members have used the VLAN and no other VLAN is available, a distinct record is made at the time of allocation. Further, the self-healing of the business is reversed, including: Scanning other port members in the same group, and finding VLAN records after service switching; and taking the new VLAN in the VLAN record as a sub-interface identifier on the backup equipment, and deleting the corresponding sub-interface configuration. In an embodiment of the present invention, a device for self-healing a fault based on port redundancy is further provided, where the device includes: The redundant port group configuration module is used for creating a redundant port group and distributing logic resources; The service self-healing switching module is used for triggering a service self-healing switching action when a port fault occurs, scanning other ports in the same port group, arranging ports which are not started with the VLAN from large to small according to the bandwidth, taking the largest port for service switching, if the VLAN is started, searching the first port which is not started with the VLAN on any other port in reverse order from the upper limit value of VLAN planning, and if a plurality of ports are scanned, arranging the ports from large to small according to the bandwidth, and taking the largest port for service switching; And the service self-healing back-off module is used for triggering the service self-healing back-off work to carry out service back-off when the port fault is recovered. Further, the redundant port group includes a redundant port group unique identifier and a same group of port members, the same group of port memb