CN108123830B - Port state control method and device - Google Patents

Port state control method and device Download PDF

Info

Publication number
CN108123830B
CN108123830B CN201711346500.0A CN201711346500A CN108123830B CN 108123830 B CN108123830 B CN 108123830B CN 201711346500 A CN201711346500 A CN 201711346500A CN 108123830 B CN108123830 B CN 108123830B
Authority
CN
China
Prior art keywords
port
mesh
target
belongs
opposite
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711346500.0A
Other languages
Chinese (zh)
Other versions
CN108123830A (en
Inventor
谢龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201711346500.0A priority Critical patent/CN108123830B/en
Publication of CN108123830A publication Critical patent/CN108123830A/en
Application granted granted Critical
Publication of CN108123830B publication Critical patent/CN108123830B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Optical Communication System (AREA)
  • Mechanical Coupling Of Light Guides (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a port state control method and a device, wherein the method comprises the following steps: when a hardware interrupt signal reported by a mesh is detected, a target port of which the state on the mesh is a working UP state is obtained; acquiring port information of the target port and port information of an opposite port connected with the target port; and when the working mode of the mesh to which the target port belongs is the same as that of the mesh to which the opposite port belongs, enabling the target port or the opposite port according to a preset strategy. The embodiment of the invention can avoid the situations of routing topology disorder and flow cutoff and ensure the normal forwarding of data flow.

Description

Port state control method and device
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method and an apparatus for controlling a port state.
Background
In the trunking forwarding system, the trunking frame data planes are fully connected by using standard optical fibers through a Multi-Switching Fabric Unit (MSFU), which is a Multi-frame Switching Fabric Unit, in order to ensure correct forwarding of data traffic between frames (line card frames). One or more screens are arranged in one wire clamp frame, and data channel connection between the cluster frames needs to ensure that two interconnected meshes (namely chips on the screens) are in different working modes.
Taking the back-to-back cluster shown in fig. 1 as an example, the operation mode of the mesh on the side of the line Card frame LCC (line Card sessions) 1 is Multi _ FE13, and the operation mode of the mesh of the line Card frame LCC2 connected to the mesh must be Multi _ FE 2.
However, practice has found that since there are many optical interfaces of the cluster network board, in an actual operation process, there are often optical fiber misconnections, such as an optical interface misconnection corresponding to an MPO (Multi-fiber Push On) port On a same mesh (i.e., an optical interface of an onboard optical fiber module, hereinafter referred to as an optical interface), an optical interface misconnection corresponding to a port On a different mesh On the same network board, or an optical interface misconnection corresponding to a port On a mesh in the same working mode On the same frame/different frames, and the like.
Disclosure of Invention
The invention provides a port state control method and a port state control device, which are used for solving the problems of routing topology disorder and flow cutoff caused by optical interface connection errors in the prior art.
According to a first aspect of the embodiments of the present invention, a method for controlling a port state is provided, which is applied to a mesh board in a multi-frame cluster routing device, and the method includes:
when a hardware interrupt signal reported by a mesh is detected, a target port of which the state on the mesh is a working UP state is obtained; wherein the hardware interrupt signal is triggered by a port on the mesh from a non-working Down state change to an UP state;
acquiring port information of the target port and port information of an opposite port connected with the target port; the port information comprises the working mode of the mesh to which the port belongs;
and when the working mode of the mesh to which the target port belongs is the same as that of the mesh to which the opposite port belongs, disabling the target port or the opposite port according to a preset strategy.
According to a second aspect of the embodiments of the present invention, there is provided a port state control device, applied to a mesh board in a multi-frame cluster routing device, the device including:
a detection unit for detecting a hardware interrupt signal;
the acquisition unit is used for acquiring a target port of which the state on the mesh is a working UP state when the detection unit detects a hardware interrupt signal reported by the mesh; wherein the hardware interrupt signal is triggered by a port on the mesh from a non-working Down state change to an UP state;
the acquiring unit is further configured to acquire port information of the target port and port information of an opposite port to which the target port is connected; the port information comprises the working mode of the mesh to which the port belongs;
and the control unit is used for disabling the target port or the opposite end port according to a preset strategy when the working mode of the mesh to which the target port belongs is the same as that of the mesh to which the opposite end port belongs.
By applying the embodiment of the invention, when the hardware interrupt signal reported by the mesh is detected, the target port with the UP state on the mesh is obtained, the port information of the target port and the port information of the opposite port connected with the target port are obtained, and further, when the working mode of the mesh to which the target port belongs is the same as that of the mesh to which the opposite port belongs, the target port or the opposite port is enabled according to the preset strategy, thereby shielding the influence of the connection error of the optical interface on the service operation, avoiding the situations of routing topology disorder and flow cutoff and ensuring the normal forwarding of data flow.
Drawings
FIG. 1 is a schematic diagram of data channel connections between cluster frames in a multi-frame cluster routing device;
fig. 2 is a schematic flowchart of a port state control method according to an embodiment of the present invention;
FIGS. 3A-3B are schematic diagrams of specific application scenarios provided by embodiments of the present invention;
fig. 4 is a schematic structural diagram of a port state control device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another port state control device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another port state control device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions in the embodiments of the present invention better understood and make the above objects, features and advantages of the embodiments of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in further detail below with reference to the accompanying drawings.
Referring to fig. 2, a flow chart of a port state control method according to an embodiment of the present invention is shown, and as shown in fig. 2, the port state control method may include the following steps:
it should be noted that the execution subject of steps 201 to 203 may be any network board (referred to as a target network board herein) in the multi-chassis cluster routing device.
Step 201, when a hardware interrupt signal reported by a mesh is detected, a target port in an UP state on the mesh is obtained.
In the embodiment of the present invention, when the same optical fiber is inserted into any optical interface and another optical interface on the target screen, the state of the port on the mesh corresponding to the optical interface changes from a Down (non-operating) state to an UP (operating) state, and at this time, the mesh reports a hardware interrupt signal.
It should be noted that, in the embodiment of the present invention, unless otherwise specified, the hardware interrupt signal mentioned herein refers to a hardware interrupt signal triggered when the state of the port on the mesh changes from the Down state to the UP state, and the following description of the embodiment of the present invention is not repeated.
When the target network board detects a hardware interrupt signal reported by the mesh, the target network board may read the port state register of the mesh and obtain a port (referred to as a target port herein) with a port state of UP from the port state register.
Step 202, obtaining port information of the target port and port information of an opposite port connected with the target port.
In the embodiment of the invention, after the target screen plate acquires the target port in the UP state on the mesh, the target screen plate can acquire the port information of the target port and the port information of an opposite port connected with the target port for any target port; the port information includes an operation mode of the mesh to which the port belongs (e.g., Multi _ FE13 or Multi _ FE 2).
And 203, when the working mode of the mesh to which the target port belongs is the same as that of the mesh to which the opposite end port belongs, enabling the target port or the opposite end port according to a preset strategy.
In the embodiment of the present invention, after the target mesh board obtains the port information of the target port and the opposite port, it may be determined whether the working mode of the mesh to which the target port belongs and the working mode of the mesh to which the opposite port belongs are the same.
If the working mode of the mesh to which the target port belongs is the same as that of the mesh to which the opposite port belongs, the target mesh board can determine that an optical interface connection error occurs, and at the moment, the target mesh board can enable the target port or the opposite port according to a preset strategy.
For example, the target network board may issue a disable command, such as a shut down command, to the target port or the peer port through software to disable the target port or the peer port.
When the port is disabled, the port does not receive or send signals any more, and the port is not enabled again in response to plugging and unplugging of the optical fiber.
It should be noted that, in the embodiment of the present invention, if the working mode of the mesh to which the target port belongs is different from the working mode of the mesh to which the opposite port belongs, it is determined that the optical interface connection is normal, and the optical interface connection may be processed according to the existing flow, which is not described in detail in this embodiment of the present invention.
As can be seen, in the method flow shown in fig. 2, by disabling one of the ports corresponding to the optical interface with the connection error, the influence of the connection error of the optical interface on the service operation is shielded, the situations of routing topology confusion and flow cutoff are avoided, and the normal forwarding of the data flow is ensured.
In one embodiment of the present invention, the port information may further include a device number of a mesh to which the port belongs;
correspondingly, the disabling the target port or the opposite port according to the preset policy may include:
when the equipment number of the mesh to which the target port belongs is different from that of the mesh to which the opposite port belongs, the port with the smaller equipment number of the mesh in the target port and the opposite port is disabled;
or the like, or, alternatively,
and when the equipment number of the mesh sheet of the target port is different from that of the mesh sheet of the opposite port, disabling the port with the larger equipment number of the mesh sheet of the target port and the opposite port.
In this embodiment, a port with a smaller Module Identity (MODID) of the mesh to which the disable belongs is taken as an example.
In this embodiment, when the target mesh board determines that the working mode of the mesh to which the target port belongs is the same as the working mode of the mesh to which the opposite port belongs, the target mesh board may compare the MODID of the mesh to which the target port belongs and the MODID of the mesh to which the opposite port belongs.
When the MODID of the mesh to which the target port belongs is larger than the MODID of the mesh to which the opposite port belongs, the target mesh board can disable the opposite port;
when the MODID of the mesh to which the target port belongs is smaller than the MODID of the mesh to which the opposite port belongs, the target mesh may disable the target port.
Further, in an implementation manner of this embodiment, the port information may further include a port ID;
correspondingly, the disabling the target port or the opposite port according to the preset policy may further include:
when the equipment number of the mesh sheet to which the target port belongs is the same as that of the mesh sheet to which the opposite port belongs, the port with smaller port ID in the target port and the opposite port is disabled;
or the like, or, alternatively,
and when the equipment number of the mesh sheet to which the target port belongs is the same as that of the mesh sheet to which the opposite port belongs, disabling the port with the larger port ID in the target port and the opposite port.
In this embodiment, a port with a smaller port ID is disabled as an example.
In this embodiment, when the target mesh board determines that the working mode of the mesh to which the target port belongs is the same as the working mode of the mesh to which the opposite port belongs, and the device number of the mesh to which the target port belongs is the same as the device number of the mesh to which the opposite port belongs, the target mesh board may compare the port ID of the target port with the port ID of the opposite port.
If the port ID of the target port is greater than the port ID of the opposite port, the target mesh board can enable the opposite port.
If the port ID of the destination port is smaller than the port ID of the opposite port, the destination network board can disable the destination port.
It should be appreciated that the policy for disabling the target port or the peer port described in the foregoing method embodiments is merely a specific example of the implementation manner of selecting the disabled port in the embodiment of the present invention, and does not belong to the limitation of the protection scope of the present invention.
In addition, in the embodiment of the present invention, when the target mesh board determines that the port that needs to be disabled is the opposite port, if the opposite port is not the port on the mesh board, the target mesh board may not perform the disabling process, but perform the disabling process on the port by the mesh board to which the opposite port belongs according to the method described in the above method flow, which will not be described again in the following.
Further, in the embodiment of the present invention, in consideration that the port cannot be automatically restored after being disabled, it is necessary to provide a mechanism for restoring the port to be enabled, so as to avoid wasting the port resource of the device.
In an embodiment of the present invention, after the disabling the target port or the peer port according to the preset policy, the method may further include:
setting a designated mark for an optical interface corresponding to the disabled port;
correspondingly, the port state control method provided by the embodiment of the invention may further include:
polling each optical interface on the screen regularly;
and for any optical interface provided with the specified mark, when the los signal exists in the optical interface, restoring the port enabling corresponding to the optical interface, and deleting the specified mark set for the optical interface.
In this embodiment, a flag (referred to as a designated flag herein) may be added to indicate that the port corresponding to the optical interface is in the disabled state, and after the target board disables the port, the designated flag may be set for the optical interface corresponding to the disabled port.
Accordingly, in this embodiment, the target screen may time-cycle each optical interface on the screen to determine whether there is an optical interface provided with the above-mentioned designation mark.
When the target network board determines that the optical interface provided with the specified mark exists, the target network board can judge whether a los (light loss) signal exists in any optical interface provided with the specified mark, and when the optical interface has the light loss los signal, namely when an optical fiber pulling event occurs in the optical interface or/and the optical interface corresponding to the optical interface, the target network board can recover the port enabling corresponding to the optical interface and delete the specified mark set by the optical interface.
It should be noted that, in the embodiment of the present invention, the specified flag may be a field whose value is a first flag value, and accordingly, when the specified flag set by the optical interface is deleted, the value of the field may be set to a second flag value.
In addition, in the embodiment of the present invention, for any optical interface provided with the designated mark, when the optical interface does not have a los signal, the target screen board may continue to poll other optical interfaces, and the specific implementation thereof is not described herein again.
Therefore, in the embodiment of the invention, the target network board can recover the corresponding port enabling after the optical fiber with the wrong connection is pulled out, and further, the port can be normally used for receiving and sending the flow, thereby avoiding the waste of equipment port resources.
Further, in one embodiment of the present invention, when the target mesh board determines that the working mode of the mesh to which the target port belongs is the same as the working mode of the mesh to which the opposite port belongs, an alarm message may be generated, where the alarm message is used to prompt that an optical interface connection error exists, and the alarm message may carry an optical interface index of an optical interface where the optical interface connection error exists.
In order to enable those skilled in the art to better understand the technical solution provided by the embodiment of the present invention, the technical solution provided by the embodiment of the present invention is described below with reference to a specific application scenario.
Example one
Referring to fig. 3A, for a schematic architecture diagram of a specific application scenario provided by the embodiment of the present invention, as shown in fig. 3A, a chip 311 (hereinafter referred to as a mesh 311, assuming a MODID is 311) is disposed on a mesh plate MSFU310, the mesh 311 includes ports 3111 to 3113 (port IDs are 1 to 3, respectively), and the ports 3111 to 3113 on the mesh 311 are connected to MPO3101 to 3103 on the mesh plate MSFU310, respectively; the operation mode of the mesh 311 is Multi _ FE 2.
Wherein, assuming that the MPO3101 and the MPO3103 are connected by the optical fiber, based on the scenario shown in fig. 3A, the port state control scheme provided in the embodiment of the present invention is implemented as follows (assuming that the port de-enabling policy is to preferentially select the port with the smaller device number of the mesh, and if the device numbers of the meshes are the same, select the port with the smaller port ID):
1. when optical fibers are inserted into both the MPO3101 and the MPO3103, the mesh 311 may detect that the states of the port 3111 and the port 3113 are changed from a Down state to an UP state, and at this time, the mesh 311 may report a hardware interrupt signal;
2. the network board MSFU310 detects a hardware interrupt signal reported by the network board 311, reads a port state register of the network board 311, and obtains ports (port 3111 and port 3113) in an UP state on the network board 311;
port 3111 is taken as an example below;
3. the network board MSFU310 acquires port information of the port 3111 and port information of an opposite port (i.e., port 3113) to which the port 3111 is connected;
the working mode of the mesh to which the port 3111 belongs is Multi _ FE2, the MODID of the mesh to which the port 3111 belongs is 311, and the port ID is 1; the working mode of the mesh to which the port 3113 belongs is Multi _ FE2, the MODID of the mesh to which the port 3113 belongs is 311, and the port ID is 3;
4. the network board MSFU310 compares the working mode of the mesh to which the port 3111 belongs with the working mode of the mesh to which the port 3113 belongs, and finds that both are Multi _ FE2, that is, an optical interface connection error occurs;
5. the mesh plate MSFU310 compares the MODID of the mesh plate to which the port 3111 belongs and the MODID of the mesh plate to which the port 3113 belongs, and finds that both are 311, that is, the optical interfaces corresponding to the ports on the same mesh plate are connected;
6. the otter board MSFU310 further compares the port ID of the port 3111 with the port ID of the port 3113, and finds that the port ID (1) of the port 3111 is smaller than the port ID (3) of the port 3113, at this time, the otter board MSFU310 may disable the port 3111, set a shutdown flag for the optical interface (i.e., MPO3101) corresponding to the port 3111, and generate an alarm message for prompting that a connection error occurs between the MPO3101 and the MPO 3103;
7. the screen plate MSFU310 polls each optical interface on the screen plate (namely the screen plate MSFU310) at regular time, finds that MPO3101 is provided with a shutdown flag, the screen plate MSFU310 can read the state of a los register of the MPO3101, if the register is set, namely a los signal exists (an optical fiber of the MPO3101 is pulled out), the screen plate MSFU310 can restore the enabling of a port 3111 and delete the shutdown flag of the MPO 3101; otherwise, i.e., there is no los signal, the port 3111 is kept disabled, the shutdown flag of the MPO3101 is kept, and the optical interface polling is continued.
Example two
Referring to fig. 3B, for an architecture schematic diagram of a specific application scenario provided by the embodiment of the present invention, as shown in fig. 3B, a chip 321 (hereinafter referred to as a mesh 321, MODID is 321) and a chip 322 (hereinafter referred to as a mesh 322, MODID is 322) are deployed on the screen MSFU320, the mesh 321 includes ports 3211 to 3212 (port IDs are 1 to 2, respectively), and the ports 3211 to 3212 on the mesh 321 are connected to MPO3201 to 3202 on the screen MSFU320, respectively; the screen plate MSFU330 is provided with a chip 331 (hereinafter referred to as a screen 331, MODID is 331) and a chip 332 (hereinafter referred to as a screen 332, MODID is 332), the screen 332 comprises ports 3321-3322 (port IDs are 1-2 respectively), and the ports 3321-3322 on the screen 332 are connected with MPOs 3303-3304 on the screen plate MSFU330 respectively; the operation mode of each mesh is Multi _ FE 2.
Wherein, assuming that MPO3202 and MPO3303 are connected by optical fibers, based on the scenario shown in fig. 3B, the port state control scheme provided in the embodiment of the present invention is implemented as follows (assuming that the port disabling policy is to preferentially select a port with a larger device number of the mesh to which the port belongs, and if the device numbers of the mesh to which the port belongs are the same, select a port with a larger port ID):
1. when optical fibers are inserted into both MPO3202 and MPO3303, the mesh 321 (mesh 332) may detect that the state of the port 3212 (port 3321) changes from the Down state to the UP state, and at this time, the mesh 321 (mesh 332) may report a hardware interrupt signal;
the following takes the processing of the mesh 321 as an example;
2. the network board MSFU320 detects a hardware interrupt signal reported by the network board 321, reads a port state register of the network board 321, and obtains a port (port 3212) in an UP state on the network board 321;
3. the network board MSFU320 acquires the port information of the port 3212 and the port information of the opposite port (namely, the port 3321) connected with the port 3212;
the working mode of the mesh to which the port 3212 belongs is Multi _ FE2, the MODID of the mesh to which the port belongs is 321, and the port ID is 2; the working mode of the mesh to which the port 3321 belongs is Multi _ FE2, the MODID of the mesh to which the port 3321 belongs is 332, and the port ID is 1;
4. the network board MSFU320 compares the working mode of the mesh to which the port 3212 belongs with the working mode of the mesh to which the port 3321 belongs, and finds that both are Multi _ FE2, that is, an optical interface connection error occurs;
5. the mesh board MSFU320 compares the MODID of the mesh board to which the port 3212 belongs with the MODID of the mesh board to which the port 3321 belongs, finds that the MODID (321) of the mesh board to which the port 3212 belongs is smaller than the MODID (332) of the mesh board to which the port 3321 belongs, and at this time, the mesh board MSFU320 can enable the port 3321, set a shutdown flag for an optical interface (namely MPO3303) corresponding to the port 3321, and generate alarm information for prompting that MPO3202 and 3303 has a connection error;
6. the screen plate MSFU330 polls each optical interface on the screen plate MSFU330 regularly, finds that MPO3303 is provided with a shutdown mark, the screen plate MSFU330 can read the los register state of the MPO3303, if the register is set, namely a los signal exists (the optical fiber of the MPO3303 is pulled out), the screen plate MSFU330 can recover the port 3321 to enable, and the shutdown mark of the MPO3303 is deleted; otherwise, i.e. there is no los signal, the port 3321 is kept disabled, and the shutdown flag of the MPO3303 is kept, and the optical interface polling is continued.
As can be seen from the above description, in the technical solution provided in the embodiment of the present invention, when a hardware interrupt signal reported by a mesh is detected, a target port in an UP state on the mesh is obtained, and port information of the target port and port information of an opposite port connected to the target port are obtained, and further, when a working mode of a mesh to which the target port belongs is the same as a working mode of a mesh to which the opposite port belongs, the target port or the opposite port is disabled according to a preset policy, so that an influence of an optical interface connection error on service operation is shielded, situations of routing topology confusion and flow cutoff are avoided, and normal forwarding of data flow is ensured.
Referring to fig. 4, a schematic structural diagram of a port state control device according to an embodiment of the present invention is shown, where the device may be applied to a target board in the foregoing method embodiment, and as shown in fig. 4, the port state control device may include:
a detection unit 410 for detecting a hardware interrupt signal;
an obtaining unit 420, configured to obtain, when the detecting unit 410 detects a hardware interrupt signal reported by a mesh, a target port on the mesh in a working UP state; wherein the hardware interrupt signal is triggered by a port on the mesh from a non-working Down state change to an UP state;
the obtaining unit 420 is further configured to obtain port information of the target port and port information of an opposite port connected to the target port; the port information comprises the working mode of the mesh to which the port belongs;
a control unit 430, configured to disable the target port or the opposite port according to a preset policy when a working mode of the mesh to which the target port belongs is the same as a working mode of the mesh to which the opposite port belongs.
In an optional embodiment, the port information further includes a device number of a mesh to which the port belongs;
the control unit 430 is specifically configured to disable a port with a smaller device number in the target port and the opposite port when the device number of the mesh to which the target port belongs is different from the device number of the mesh to which the opposite port belongs;
or the like, or, alternatively,
the control unit 430 is specifically configured to disable a port with a larger device number of the mesh in the target port and the opposite port when the device number of the mesh to which the target port belongs is different from the device number of the mesh to which the opposite port belongs.
In an optional embodiment, the port information further comprises a port ID;
the control unit 430 is further configured to disable a port with a smaller port ID in the target port and the peer port when the device number of the mesh to which the target port belongs is the same as the device number of the mesh to which the peer port belongs;
or the like, or, alternatively,
the control unit 430 is further configured to disable a port with a larger port ID in the target port and the opposite port when the device number of the mesh to which the target port belongs is the same as the device number of the mesh to which the opposite port belongs.
In an optional embodiment, the control unit 430 is further configured to set a specific flag for an optical interface corresponding to the disabled port after disabling the target port or the peer port according to a preset policy; the specified mark is used for indicating that a port corresponding to the optical interface is in a de-enabling state;
accordingly, referring to fig. 5 together, a schematic structural diagram of another port state control device according to an embodiment of the present invention is shown in fig. 5, where, on the basis of the port state control device shown in fig. 4, the port state control device shown in fig. 5 further includes:
a polling unit 440, configured to poll each optical interface on the web board at regular time;
the control unit 430 is further configured to, for any optical interface provided with the designation flag, when there is an optical loss los signal at the optical interface, restore the port enable corresponding to the optical interface, and delete the designation flag set for the optical interface.
Referring to fig. 6 together, a schematic structural diagram of another port state control device according to an embodiment of the present invention is shown in fig. 6, where, on the basis of the port state control device shown in fig. 4 or fig. 5 (in this embodiment, an example is performed on the basis of the port state control device shown in fig. 4), the port state control device shown in fig. 6 further includes:
a generating unit 450, configured to generate alarm information when the working mode of the mesh to which the target port belongs is the same as the working mode of the mesh to which the opposite port belongs, where the alarm information is used to prompt that an optical interface connection error exists, and the alarm information carries an optical interface index of an optical interface that has the optical interface connection error.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
It can be seen from the above embodiments that, when a hardware interrupt signal reported by a mesh is detected, a target port in an UP state on the mesh is acquired, and port information of the target port and port information of an opposite port connected to the target port are acquired, and further, when a working mode of the mesh to which the target port belongs is the same as a working mode of the mesh to which the opposite port belongs, the target port or the opposite port is disabled according to a preset policy, thereby shielding an influence of an optical interface connection error on service operation, avoiding situations of routing topology confusion and flow cutoff, and ensuring normal forwarding of data flow.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A port state control method is applied to a network board in multi-frame cluster routing equipment, and is characterized by comprising the following steps:
when a hardware interrupt signal reported by a mesh is detected, a target port of which the state on the mesh is a working UP state is obtained; wherein the hardware interrupt signal is triggered by a port on the mesh from a non-working Down state change to an UP state; wherein the mesh is a chip on the mesh plate;
acquiring port information of the target port and port information of an opposite port connected with the target port; the port information comprises the working mode of the mesh to which the port belongs;
and when the working mode of the mesh to which the target port belongs is the same as that of the mesh to which the opposite port belongs, disabling the target port or the opposite port according to a preset strategy.
2. The method according to claim 1, wherein the port information further includes a device number of a mesh to which the port belongs;
the disabling the target port or the opposite port according to a preset strategy includes:
when the equipment number of the mesh to which the target port belongs is different from the equipment number of the mesh to which the opposite port belongs, disabling the port with the smaller equipment number of the mesh in the target port and the opposite port;
or the like, or, alternatively,
when the device number of the mesh to which the target port belongs is different from the device number of the mesh to which the opposite port belongs, the port with the larger device number of the mesh in the target port and the opposite port is disabled.
3. The method of claim 2, wherein the port information further comprises a port ID;
the disabling the target port or the opposite port according to a preset strategy further comprises:
when the equipment number of the mesh sheet to which the target port belongs is the same as that of the mesh sheet to which the opposite port belongs, disabling the port with the smaller port ID in the target port and the opposite port;
or the like, or, alternatively,
and when the equipment number of the mesh sheet to which the target port belongs is the same as that of the mesh sheet to which the opposite port belongs, disabling the port with the larger port ID in the target port and the opposite port.
4. The method of claim 1, wherein after the disabling the target port or the peer port according to a predetermined policy, further comprising:
setting a designated mark for an optical interface corresponding to the disabled port; the specified mark is used for indicating that a port corresponding to the optical interface is in a de-enabling state;
the method further comprises the following steps:
polling each optical interface on the screen regularly;
and for any optical interface provided with the specified mark, when the optical interface has an optical loss los signal, restoring the port enabling corresponding to the optical interface, and deleting the specified mark set for the optical interface.
5. The method of claim 1, wherein when the mode of operation of the mesh to which the target port belongs is the same as the mode of operation of the mesh to which the peer port belongs, the method further comprises:
and generating alarm information, wherein the alarm information is used for prompting that the optical interface connection error exists, and the alarm information carries the optical interface index of the optical interface with the optical interface connection error.
6. A port state control device is applied to a screen plate in multi-frame cluster routing equipment, and is characterized by comprising:
a detection unit for detecting a hardware interrupt signal;
the acquisition unit is used for acquiring a target port of which the state on the mesh is a working UP state when the detection unit detects a hardware interrupt signal reported by the mesh; wherein the hardware interrupt signal is triggered by a port on the mesh from a non-working Down state change to an UP state; wherein the mesh is a chip on the mesh plate;
the acquiring unit is further configured to acquire port information of the target port and port information of an opposite port to which the target port is connected; the port information comprises the working mode of the mesh to which the port belongs;
and the control unit is used for disabling the target port or the opposite end port according to a preset strategy when the working mode of the mesh to which the target port belongs is the same as that of the mesh to which the opposite end port belongs.
7. The apparatus according to claim 6, wherein the port information further includes a device number of a mesh to which the port belongs;
the control unit is specifically configured to disable a port with a smaller device number of the mesh of the target port and the opposite port when the device number of the mesh of the target port is different from the device number of the mesh of the opposite port;
or the like, or, alternatively,
the control unit is specifically configured to disable a port with a larger device number of the mesh of the target port and the opposite port when the device number of the mesh of the target port is different from the device number of the mesh of the opposite port.
8. The apparatus of claim 7, wherein the port information further comprises a port ID;
the control unit is further configured to disable a port with a smaller port ID of the target port and the opposite port when the device number of the mesh to which the target port belongs is the same as the device number of the mesh to which the opposite port belongs;
or the like, or, alternatively,
the control unit is further configured to disable a port with a larger port ID in the target port and the opposite port when the device number of the mesh to which the target port belongs is the same as the device number of the mesh to which the opposite port belongs.
9. The apparatus of claim 6,
the control unit is further configured to set a designation flag for an optical interface corresponding to the disabled port after disabling the target port or the opposite port according to a preset policy; the specified mark is used for indicating that a port corresponding to the optical interface is in a de-enabling state;
the device further comprises:
the polling unit is used for polling each optical interface on the screen plate at regular time;
the control unit is further configured to, for any optical interface provided with the designation flag, restore the port enable corresponding to the optical interface when the optical interface has an optical loss los signal, and delete the designation flag set for the optical interface.
10. The apparatus of claim 6, further comprising:
and the generating unit is used for generating alarm information when the working mode of the mesh to which the target port belongs is the same as that of the mesh to which the opposite port belongs, wherein the alarm information is used for prompting that an optical interface connection error exists, and the alarm information carries an optical interface index of an optical interface with the optical interface connection error.
CN201711346500.0A 2017-12-15 2017-12-15 Port state control method and device Active CN108123830B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711346500.0A CN108123830B (en) 2017-12-15 2017-12-15 Port state control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711346500.0A CN108123830B (en) 2017-12-15 2017-12-15 Port state control method and device

Publications (2)

Publication Number Publication Date
CN108123830A CN108123830A (en) 2018-06-05
CN108123830B true CN108123830B (en) 2021-02-26

Family

ID=62230071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711346500.0A Active CN108123830B (en) 2017-12-15 2017-12-15 Port state control method and device

Country Status (1)

Country Link
CN (1) CN108123830B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110838933B (en) * 2018-08-17 2022-08-09 上海华为技术有限公司 Configuration method of Ethernet optical port and Ethernet equipment
CN114157350B (en) * 2021-10-26 2023-02-03 武汉光迅信息技术有限公司 Optical fiber misconnection detection method and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047712B (en) * 2006-06-19 2010-04-21 华为技术有限公司 Device and method for detecting Ethernet interface configuration
CN101557343B (en) * 2009-04-03 2011-06-08 联想天工网络(深圳)有限公司 Detecting and protecting method of double-layer loop in VRRP topological network
CN103166868B (en) * 2013-03-04 2015-09-16 杭州华三通信技术有限公司 For the method and apparatus that anti-neighbours are shaken
CN104518936B (en) * 2013-09-27 2019-02-19 新华三技术有限公司 Link dynamic aggregation method and apparatus
WO2017177377A1 (en) * 2016-04-12 2017-10-19 华为技术有限公司 Method, apparatus and system for identifying peer device by usb type-c port device

Also Published As

Publication number Publication date
CN108123830A (en) 2018-06-05

Similar Documents

Publication Publication Date Title
JP4818768B2 (en) Information processing system, failure notification method, and failure notification program
CN106789386B (en) Wrong method and the error detector for network system on detection communication bus
CN108123830B (en) Port state control method and device
CN101640818B (en) Protection device and protection method of optical network
US11196482B2 (en) Monitoring device and monitoring method
CN103986604A (en) Method and device for locating network fault
CN108804260B (en) SRIO system switching method and device
CN109120386A (en) Wireless communication device, system and method
RU2458471C2 (en) Device and method for pipeline transmission of data having device-built in alarm suppression function
CN105323104A (en) Alarm management method and apparatus and packet transmission equipment
CN105472055A (en) Port processing method and device
JP2009290706A (en) Transmission apparatus, path testing method, and computer program
WO2009097768A1 (en) Configuration migration method and device
CN101945413B (en) Alarm information processing method and device
JP2010245589A (en) Communication system, communication device, method for specifying suspect portion, and program
CN109587409B (en) Video processor self-adaptive cascade method, device and system
CN107547255A (en) Upgrade method, main control board and the group system of group system
CN114020670A (en) PCIE card management method, system, equipment and storage medium
CN112929197A (en) Network communication method, device, equipment and storage medium
CN112219373A (en) Submarine cable fault judgment method and device
CN110971436A (en) Service processing method and device and electronic equipment
CN106656661A (en) Method, device and system for achieving interdevice linear protection mechanism interworking
CN112540884B (en) Hot backup effect detection method, device, system and computer readable medium
CN112866834B (en) Optical network unit and processing method and system for long light-emitting fault thereof
CN117201415A (en) Communication system, communication transmission rate determining method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant