Nothing Special   »   [go: up one dir, main page]

WO2020238848A1 - Method and device for managing port configuration mode - Google Patents

Method and device for managing port configuration mode Download PDF

Info

Publication number
WO2020238848A1
WO2020238848A1 PCT/CN2020/092097 CN2020092097W WO2020238848A1 WO 2020238848 A1 WO2020238848 A1 WO 2020238848A1 CN 2020092097 W CN2020092097 W CN 2020092097W WO 2020238848 A1 WO2020238848 A1 WO 2020238848A1
Authority
WO
WIPO (PCT)
Prior art keywords
local port
port
configuration mode
local
physical state
Prior art date
Application number
PCT/CN2020/092097
Other languages
French (fr)
Chinese (zh)
Inventor
余辰东
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2020238848A1 publication Critical patent/WO2020238848A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4604LAN interconnection over a backbone network, e.g. Internet, Frame Relay
    • H04L12/462LAN interconnection over a bridge based backbone
    • H04L12/4625Single bridge functionality, e.g. connection of two networks over a single bridge
    • 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/08Configuration management of networks or network elements
    • H04L41/0866Checking the configuration
    • H04L41/0873Checking configuration conflicts between network elements
    • 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/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • 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/14Network analysis or design
    • H04L41/147Network analysis or design for predicting network behaviour

Definitions

  • the embodiments herein relate to, but are not limited to, Ethernet technology, and in particular to a method and device for managing port configuration modes.
  • the local device In practical applications, it often happens that after a docking device restarts due to some reasons (such as device power failure or active operation, etc.), the physical status of the device docking port is DOWN (hereinafter the device is referred to as the local device). This situation will cause the service and management carried on the port to be interrupted. After processing, it is often found that the cause of the failure is the inconsistent configuration modes of the two pairs. Therefore, in some cases, it is necessary to modify the port configuration modes of the two parties to keep the ports connected to the device consistent. However, the local device cannot modify the port configuration mode remotely due to the disconnection, which makes modification difficult.
  • the docking equipment may belong to different operation and maintenance parties and cannot be monitored through a unified operation and maintenance platform, it is impossible to ensure that the port configuration mode of the docking equipment remains consistent, and it also leads to increased maintenance costs.
  • situations such as device replacement and configuration modification may also cause the docking port configuration mode to be modified, which may result in inconsistent docking port configuration modes.
  • a link may be established when the docking port configuration mode is inconsistent, when the network device has operations that change the behavior of the device such as software update, the docking port may not be able to establish a link.
  • the embodiment of this document provides a method for managing port configuration mode, including: comparing the consistency of the local port configuration mode with the predicted counterpart port configuration mode; according to the physical state of the local port and the Consistency, set the local port configuration mode.
  • the embodiment of this document also provides an apparatus for managing port configuration mode, including: a comparing unit, configured to compare the consistency of the local port configuration mode with the predicted counterpart port configuration mode; and a setting unit, configured according to the local end The physical state of the port is consistent with the consistency, and the local port configuration mode is set.
  • the embodiments herein also provide a computer-readable storage medium having an information processing program stored on the computer-readable storage medium, and when the information processing program is executed by a processor, the steps of the method for managing the port configuration mode described above are implemented.
  • FIG. 1 is a schematic flowchart of a method for managing port configuration mode provided by an embodiment of this document
  • FIG. 2 is a schematic flowchart of a method for managing port configuration modes according to another embodiment of this document;
  • FIG. 3 is a schematic flowchart of a method for managing port configuration modes according to another embodiment of this document;
  • FIG. 4 is a schematic structural diagram of an apparatus for managing port configuration mode provided by an embodiment of this document.
  • port negotiation is performed according to their respective port configuration modes.
  • the port mode negotiation at both ends depends on the respective port configuration.
  • the port mode (adaptive/mandatory) configuration on both ends is inconsistent, the port may not work normally (even if the port works normally, there are hidden dangers).
  • the network docking device may be independently managed and maintained in terms of physical location and logical relationship, there are difficulties in the unified management and query of the above-mentioned port configuration at both ends, that is, it is difficult to handle problems when problems occur.
  • Fig. 1 is a schematic flow chart of a method for managing port configuration mode according to an embodiment of this paper. As shown in Fig. 1, the method includes: Step 101, comparing the local port configuration mode with the predicted counterpart port configuration mode. ⁇ ; Step 102, according to the physical state of the local port and the consistency, set the local port configuration mode.
  • the local port configuration mode is adaptive or mandatory; the opposite port configuration mode is unknown, adaptive or mandatory; the physical state of the local port is normal UP or fault DOWN.
  • the setting the local port configuration mode according to the physical state of the local port and the consistency includes: when the physical state of the local port is UP, regardless of the consistency The local port configuration mode remains unchanged when the performance is consistent or inconsistent, or the opposite port configuration mode is unknown; or, when the physical state of the local port is DOWN, the opposite port configuration mode When it is unknown, reversely modify the local port configuration mode, including: when the local port configuration mode is adaptive, modify it to mandatory; when the local port configuration mode is mandatory, modify it to adaptive ; Or, when the physical status of the local port is DOWN and the consistency is inconsistent, modify the local port configuration mode to the opposite port configuration mode; or, when the local port’s When the physical state is DOWN and the consistency is consistent, the local port configuration mode remains unchanged.
  • the method further includes: starting a timer T3, and monitoring The physical state of the local port; when the physical state of the local port remains UP before the T3 timeout, a first notification message is sent to notify the local port configuration mode and the opposite end The port configuration mode is inconsistent; or, when the physical state of the local port jitters before the T3 timeout, a first alarm message is sent to alert that the physical state of the local port is unstable and the local port The configuration mode is inconsistent with the configuration mode of the opposite port; or, when the physical status of the local port changes to DOWN before the T3 timeout, the setting is again based on the physical status of the local port and the consistency The local port configuration mode.
  • the method further includes: starting a timer T3: monitor the physical state of the local port; when the physical state of the local port remains DOWN before the T3 times out, modify the local port configuration mode in the reverse direction again, and send a second alarm message , Used to warn that the physical state of the local port is abnormal and the local port configuration mode is inconsistent with the opposite port configuration mode; or, when the physical state of the local port jitters before the T3 timeout, again Reversely modify the local port configuration mode, and send a third alarm message to warn that the physical state of the local port is unstable and that the local port configuration mode is inconsistent with the peer port configuration mode; or when Before the T3 timeout, when the physical state of the local port changes to UP, a second notification message is sent to notify that the local port configuration mode has been modified, and it is consistent with the local port configuration mode and the opposite end.
  • the port configuration mode is
  • the method before comparing the consistency of the local port configuration mode with the predicted counterpart port configuration mode, the method further includes: detecting the feature code stream sent by the opposite port received by the local port; When the feature code stream value is /C/frame, predict that the opposite port configuration mode is adaptive; when the feature code stream value is /I/frame, predict that the opposite port configuration mode is mandatory ; When the detection is invalid, predict that the opposite port configuration mode is unknown.
  • the method before detecting the feature code stream sent by the opposite port and received by the local port, the method further includes: starting a timer T2; before the timer T2 expires, the feature code stream When the value remains stable, predict the configuration mode of the opposite port according to the characteristic code stream value; when the characteristic code stream value is unstable, it indicates that the detection is invalid; after the timer T2 expires, restart the timer T2, Re-detect the feature code stream.
  • the number of times of detecting the feature code stream is greater than or equal to 3.
  • the method before setting the local port configuration mode according to the physical state of the local port and the consistency, the method further includes: detecting the effective state of the local port; The effective state of the local port determines the physical state of the local port, including: when the effective state of the local port is UP, then determining that the physical state of the local port is UP, and when the local port’s physical state is UP, If the effective state is DOWN, it is determined that the physical state of the local port is DOWN.
  • the method before detecting the effective state of the local port, the method further includes: starting a timer T1; before the timer T1 expires, when the effective state of the local port remains stable, then The effective state of the local port determines the physical state of the local port; when the effective state of the local port is unstable, the detection is invalid.
  • the number of times of detecting the valid state of the local port is greater than or equal to 3.
  • the notification message or the alarm message carries the geographic location of the local port and/or the geographic location of the opposite port.
  • Fig. 2 is a schematic flow chart of a method for managing port configuration mode according to another embodiment of this document.
  • the method includes: step 201, detecting the physical state of the local port in real time; in an embodiment, The physical state of the local port can be determined by detecting the effective state of the local port. For example, the effective status of the port is UP or DOWN. When it is detected that the effective state of the local port is UP, the physical state of the port is determined to be UP, and when the effective state of the local port is detected to be DOWN, the physical state of the port is determined to be DOWN.
  • the timer T1 can be started to detect the physical state of the local port at a certain frequency. Through the timer T1, it can also detect whether the physical state of the port is stable, so as to avoid misjudgment caused by the unstable physical state of the port due to certain factors. Before the timer T1 expires, if the physical state of the monitoring port remains stable, the judgment result is valid, otherwise the result in this cycle is invalid. For example, in T1, if the physical status of the detected port is always DOWN or UP, it means that the status remains stable. If the physical status of the detected port is DOWN once, and UP the other time, it means the status is unstable. After the T1 timer expires, restart the T1 timer to recheck the physical status of the port.
  • the detection frequency value in T1 that is, the number of sampling detections
  • the detection frequency value in T1 can be selected according to a certain strategy to ensure that the number of sampling detections is at least ⁇ 3 in the T1 period.
  • Step 202 Detect in real time the feature code stream sent by the opposite port received by the local port, and predict the configuration mode of the opposite port based on the value of the feature code stream; in one embodiment, the local port can be detected by The feature code stream received by the Rx port is received, whether it is /C/ or /I/ frame, to predict the configuration mode of the opposite port. For example, the predicted effective state of the peer port configuration mode is adaptive or mandatory. When the detected feature code stream value is /C/frame, it is judged as adaptive; when the detected feature code stream is /I/frame and there is no /C/frame, it is judged that the port mode of the opposite end is mandatory.
  • the timer T2 can be started to directly detect the feature code stream received by the Rx port at the physical layer.
  • the timer T2 is used to detect whether the port receiving feature code stream is stable, so as to avoid misjudgment caused by the instability of the receiving feature due to certain factors.
  • the timer T2 expires, monitor that the status of the characteristic value of the received code stream on the local port remains stable, and then predict the configuration mode of the opposite port according to the characteristic value of the code stream; otherwise, the detection in this period is invalid, and it is judged that the mode of the opposite port is unknown.
  • the detected code stream feature value is always /C/, it means that the code stream feature value remains stable, and the peer port configuration mode is judged to be adaptive; for example, if the detected code stream feature value once is / C/, the other time is /I/frame, etc., it means that the characteristic value of the code stream is unstable, the detection is invalid, and the prediction of the peer port mode is unknown.
  • the T2 timer expires, restart the T2 timer to recheck the physical status of the port.
  • the value of the detection frequency within T2 that is, the number of sampling inspections, can be selected according to a certain strategy to ensure that the number of sampling inspections is at least ⁇ 3 in the T2 period.
  • Step 203 Compare the consistency of the local port configuration mode with the predicted counterpart port configuration mode; and set the local port configuration mode according to the physical state of the local port and the consistency.
  • the local physical port status is: UP or DOWN;
  • the predicted peer port configuration mode is: unknown, adaptive, and mandatory;
  • the local port configuration mode is: adaptive, mandatory.
  • both the predicted peer port configuration mode and the local port configuration mode can be displayed through the operation and maintenance interface.
  • the local port mode is reversed according to the current value (adaptive or mandatory) of the local port configuration mode. For example, if the local port configuration mode is currently adaptive, it is changed to mandatory , If it is currently mandatory, modify it to adaptive.
  • the local port configuration mode is modified according to the current value (adaptive or mandatory) of the predicted peer port configuration mode. For example, if the peer port configuration mode is currently adaptive, the local port configuration mode is modified to adaptive. The remote port configuration mode is currently mandatory, so modify the local port configuration mode to mandatory.
  • Start timer T3 to monitor the physical status of the local port, and provide notification or alarm messages based on the detection result: the physical status of the local port is: UP or DOWN; 1) If T3 expires, the physical status of the local port The status remains UP, and a notification message is generated (Notification 1: Used to notify that the configuration mode of the opposite port is inconsistent with the configuration mode of the local port); 2) If the physical state of the port jitters before T3 times out, an alarm message is generated (Alarm 1: Used to notify that the physical status of the local port is unstable and that the configuration mode of the opposite port is inconsistent with the configuration mode of the local port); 3) If the physical status of the local port changes to DOWN before T3 times out, then go to 1.2.
  • a log is also recorded.
  • the log content includes the current configuration mode of the local port, whether the configuration mode is modified, if it is modified, the modification record and reason, etc.
  • Start timer T3 monitor the physical status of the local port, and provide notification or alarm messages based on the detection result: the physical status of the local port is: UP or DOWN; 1) If T3 expires, the physical status of the local port If the status remains DOWN, the local port mode will be reversed again, that is, the original configuration mode will be restored; and an alarm message will be generated (Alarm 2: Used to notify that the physical status of the local port is abnormal, as well as the configuration mode of the peer port and the local port The port configuration mode is inconsistent); 2) If the physical state of the local port is jittered before T3 times out, the local port mode will be reversed again to restore the original configuration mode; and an alarm message (alarm 1: used to notify the local The physical state of the end port is unstable, and the configuration mode of the peer port is inconsistent with the configuration mode of the local port); 3) If T3 times out and the physical state of the local port becomes UP, the current port configuration mode is not modified and a notification message is generated (Notice 2: Used to
  • a log is also recorded.
  • the log content includes the current configuration mode of the local port, whether the configuration mode is modified, if it is modified, the modification record and reason, etc.
  • N is initialized to 0
  • the threshold may be artificially set according to certain rules.
  • a log is also recorded, and the log content includes but is not limited to port configuration/status, restart reason/number of times, etc.
  • the notification messages or alarm messages in 2.1 and 2.2 above may be reported to the network management or other operation and maintenance platforms.
  • the notification message or the alarm message may also carry information such as the physical location of the local/opposite port, which is convenient for operation and maintenance personnel to perform on-site operations.
  • the technical solution provided in this embodiment directly receives the code stream by detecting the port, judges the port configuration mode of the peer device according to the port mode characteristic code stream, and then according to the physical state of the local port, and the local port configuration mode and the opposite port configuration mode Compare and adjust the configuration mode of the local port; in this way, on the basis of the existing equipment negotiation standards, there is no need to make any changes to the docking device, which has good compatibility; in addition, for the port of the docking device in the prior art
  • the configuration method relies on the negotiation between the two parties, and the local and opposite device ports need to be managed and maintained separately, which leads to problems such as the port mode negotiation relying on the configuration of the docking parties and low positioning efficiency.
  • the solution of this embodiment uses timer detection and counter processing methods for port status and related fault processing to smoothly handle possible jitter in port docking negotiation.
  • the configuration mode of the peer port is judged based on the port protocol interaction, and the judgment and processing are combined with the state of the local port and the configuration method.
  • the solution is simple and flexible, and it is easy to deploy applications on a large scale.
  • FIG. 3 is a schematic flowchart of a method for managing port configuration modes according to another embodiment of this document.
  • the local device is provided with n ports, and automatic detection and recovery of the port configuration mode need to be implemented for these n ports.
  • the method includes: step 301, the network device maintains a port status table; the format of the port status table is as follows: ⁇ port serial number 1, physical location 1, local port configuration mode 1, local port physical status 1. Predicted peer port configuration mode 1; port number 2, physical location 2, local port configuration mode 2, local port physical state 2, predicted peer port configuration mode 2; hence; port number n , Physical location n, local port configuration mode n, local port physical state n, predicted peer port configuration mode n; ⁇ Or, it can be as shown in Table 1:
  • the port status table can be initialized according to the port configuration mode, physical location and other information, and the port status table can be updated in real time according to a certain strategy.
  • the physical location n and mode configuration n of the state table are initialized according to the physical port and configuration of the network device.
  • Triggering real-time updates includes, but is not limited to, changes in the physical status of the local port, detection or change of the port physical status/port mode triggered by man-machine commands or other operation and maintenance systems, and alarms that may cause the physical status of the port to change.
  • the port configuration mode has two modes: self-adaptive and mandatory (half-duplex, full-duplex).
  • Adaptive mode The docking parties negotiate the docking parameters after the port is connected to match the best state.
  • the sending port tx direction continuously sends /C/frames, that is, configuration (configuration) code stream, if the receiving port rx direction continuously receives /C/frames, it will return to the opposite end with ack response /C/frame, the port establishes a link after the opposite end receives it; 2.
  • Mandatory mode the port uses the parameters specified by the configuration for docking, divided into half-duplex and full-duplex.
  • forced mode as long as the hardware is connected, the sending port tx direction will send /C/frames (ie idle frames) at a certain frequency. If the receiving port rx direction can receive /C/frames related to its own frequency, it is considered correct If the end attribute is consistent with the local end, the local port will establish a link.
  • Adaptive mode and mandatory mode can be used in different scenarios.
  • the basic principle is that the port configuration modes of the connected devices must be consistent.
  • the port configurations of the devices on both sides of the interconnection are inconsistent (mandatory at one end and adaptive at the other end), the port of the interconnected device may fail to establish a link.
  • Step 302 Detect the physical status of each port at the local end; in one embodiment, a timer T1 can be started to detect the actual link establishment status of each port at the local end at a certain frequency, and update the port state table according to the detection result. After the timer T1 expires, restart T1 to re-check the physical state of the port; use the timer T1 to detect whether the physical state of the port is stable, so as to avoid misjudgments caused by the unstable port physical state due to certain factors.
  • the effective status of the port is UP or DOWN.
  • the detection frequency value is the number of sampling inspections according to a certain strategy , Ensure that the number of sampling inspections is at least ⁇ 3 in the T1 period.
  • the specific detection process includes: 1) Before T1 times out, the physical state n of the local port always remains UP (DOWN is not detected before T1 times out), then the physical state of the port is judged to be UP, and the state table is updated The physical state of the local port is n. And restart the T1 timer to re-check the physical state of the port; 2) Before T1 times out, the physical state n of the local port always remains DOWN (up is not detected before T1 times out), then the physical state of the port is judged to be DOWN and the state is updated Physical state n of the local port of the table.
  • Step 303 predict the configuration mode of each port of the opposite end; in one embodiment, the timer T2 can be started to directly detect at the physical layer whether the characteristic code stream received by the receiving Rx port of each port of the local end is /C/ Or /I/frame, and judge the peer port mode according to the detection result and update the predicted peer port configuration mode n in the port state table. After the T2 timer expires, restart the T2 timer to re-check the port receiving the Rx code stream; use the timer T2 to check whether the port receiving feature code stream is stable, so as to avoid misjudgment caused by the instability of the receiving feature due to certain factors. .
  • the effective state of the configuration mode of the peer port is adaptive or mandatory.
  • the effective detection feature value is /C/frame, it is judged as adaptive; when the effective detection value is /I/frame and there is no /C/frame, it is judged that the port mode of the opposite end is mandatory.
  • the detection frequency value is the number of sampling tests according to a certain strategy to ensure that the number of sampling tests is at least ⁇ 3 within the T2 period.
  • the specific prediction process includes: 1) Before T2 times out, port n continuously detects /C/frames, then judges that the peer port configuration mode n is adaptive, and updates the predicted peer port configuration in the state table Mode n. And restart the T2 timer to re-check that the port receives the Rx code stream; 2) Before T2 times out, port n continues to detect /I/frames, and /C/frames are not detected, then it is judged that the configuration mode of the opposite port is mandatory, and Update the predicted peer port configuration mode n in the status table.
  • Step 304 Compare the consistency between the local port configuration mode n in the port state table and the predicted counterpart port configuration mode n, and perform a configuration operation on the local port configuration mode n according to the physical state n of the local port.
  • the physical state of the local port is: UP or DOWN;
  • the predicted configuration mode of the opposite port is: unknown, adaptive, mandatory;
  • the local port configuration mode is: adaptive, mandatory.
  • both the predicted peer port configuration mode and the local port configuration mode can be displayed in real time through the operation and maintenance interface.
  • the local port configuration mode n is modified according to the current value (adaptive or mandatory) of the predicted peer port configuration mode n. For example, if the peer port configuration mode n is currently adaptive, the local port The configuration mode n is changed to adaptive, and the peer port configuration mode n is currently mandatory, then the local port configuration mode n is changed to mandatory.
  • Start timer T3 monitor the physical state n of the local port, and provide notification or alarm messages based on the detection result: the physical state of the local port is: UP or DOWN; 1) If T3 expires, the physical state of the local port State n remains UP, and a notification message is generated (Notification 1: Used to notify that the configuration mode of the opposite port is inconsistent with the configuration mode of the local port); 2) If the port physical state n is jittered before T3 times out, an alarm message (alarm) 1: Used to notify that the physical status of the local port is unstable, and that the configuration mode of the peer port is inconsistent with the configuration mode of the local port); 3) If the physical status n of the local port changes to DOWN before T3 times out, go to 3.2 for processing .
  • a log is also recorded.
  • the log content includes the current configuration mode of the local port, whether the configuration mode is modified, if it is modified, the modification record and reason, etc.
  • Start timer T3 monitor the physical state n of the local port, and provide notification or alarm messages based on the detection result: the physical state of the local port is: UP or DOWN; 1) If T3 expires, the local port If the physical status n remains DOWN, the local port mode n will be reversely modified again, that is, the original configuration mode will be restored; and an alarm message will be generated (Alarm 2: Used to notify the local port of abnormal physical status and the configuration mode of the opposite port Inconsistent with the configuration mode of the local port); 2) If the physical state n of the local port jitters before T3 times out, the local port mode n is modified in the reverse direction again, that is, the original configuration mode is restored; an alarm message (alarm 1 : Used to notify that the physical status of the local port is unstable, and that the configuration mode of the peer port is inconsistent with the local port configuration mode); 3) If T3 times out and the physical state of the local port becomes UP, the current port configuration mode is not modified , And generate a notification
  • a log is also recorded.
  • the log content includes the current configuration mode of the local port, whether the configuration mode is modified, if it is modified, the modification record and reason, etc.
  • the threshold may be artificially set according to certain rules.
  • a log is also recorded, and the log content includes but is not limited to port configuration/status, restart reason/number of times, etc.
  • the notification message or alarm message in 4.1 and 4.2 above may be reported to the network management or other operation and maintenance platform.
  • the notification message or the alarm message can also carry and carry information in the corresponding port status table, and according to a certain strategy and combined with user account information, the specific location of the local/opposite port can be found and processed on site.
  • the technical solution provided in the embodiments of this article combines the actual working status of the local port and sets the local port configuration mode according to a certain strategy, so as to realize the automatic detection and recovery of the network device port mode, eliminate potential hidden dangers, and overcome the inefficiency of traditional methods. High question.
  • FIG. 4 is a schematic structural diagram of an apparatus for managing port configuration modes provided by an embodiment of this document.
  • the apparatus includes: a comparing unit for comparing the local port configuration mode with the predicted peer port configuration mode
  • the setting unit is configured to set the local port configuration mode according to the physical state of the local port and the consistency.
  • the local port configuration mode is adaptive or mandatory; the opposite port configuration mode is unknown, adaptive or mandatory; the physical state of the local port is normal UP or fault DOWN.
  • the setting unit is specifically configured to maintain all the information when the physical state of the local port is UP, regardless of whether the consistency is consistent or inconsistent, or the configuration mode of the opposite port is unknown.
  • the local port configuration mode remains unchanged; or, when the physical state of the local port is DOWN and the opposite port configuration mode is unknown, the local port configuration mode is modified in the reverse direction, including: When the local port configuration mode is self-adaptive, modify it to mandatory; when the local port configuration mode is mandatory, modify it to self-adaptive; or, when the physical state of the local port is DOWN, the consistency is When they are inconsistent, modify the local port configuration mode to the opposite port configuration mode; or, when the physical state of the local port is DOWN and the consistency is consistent, keep the local port configuration The mode remains unchanged.
  • the setting unit is further configured to start a timer after keeping the local port configuration mode unchanged when the physical state of the local port is UP and the consistency is inconsistent T3: monitor the physical state of the local port; when the physical state of the local port remains UP before the T3 times out, send a first notification message for notifying the local port configuration mode and all The configuration mode of the opposite port is inconsistent; or, when the physical state of the local port jitters before the T3 timeout, a first alarm message is sent to alert that the physical state of the local port is unstable and the The local port configuration mode is inconsistent with the opposite port configuration mode; or, when the physical state of the local port changes to DOWN before the T3 timeout, the physical state of the local port is again consistent with the , Set the local port configuration mode.
  • the setting unit is further configured to, when the physical state of the local port is DOWN and the configuration mode of the opposite port is unknown, after the local port configuration mode is reversed modified,
  • the method further includes: starting a timer T3 to monitor the physical state of the local port; when the physical state of the local port remains DOWN before the T3 times out, modifying the local port configuration in the reverse direction again Mode, and send a second alarm message to alert that the physical state of the local port is abnormal and the local port configuration mode is inconsistent with the opposite port configuration mode; or, before the T3 timeout, the local port
  • the local port configuration mode is modified again in the reverse direction, and a third alarm message is sent to warn that the physical state of the local port is unstable and the local port configuration mode and the opposite The port configuration mode is inconsistent; or, when the physical state of the local port becomes UP before the T3 timeout, a second notification message is sent to notify that the local port configuration mode has been modified and is consistent with the The configuration mode of the local port is
  • the setting unit is further configured to start the counter N after keeping the local port configuration mode unchanged when the physical state of the local port is DOWN and the consistency is consistent.
  • the device further includes: a prediction unit, configured to detect that the local port receives the transmission from the opposite port before comparing the local port configuration mode with the predicted counterpart port configuration mode.
  • a prediction unit configured to detect that the local port receives the transmission from the opposite port before comparing the local port configuration mode with the predicted counterpart port configuration mode.
  • the prediction unit is further configured to start a timer T2 before detecting the feature code stream sent by the opposite port received by the local port; before the timer T2 expires, the When the characteristic code stream value remains stable, predict the configuration mode of the opposite port according to the characteristic code stream value; when the characteristic code stream value is unstable, it indicates that the detection is invalid; after the timer T2 expires, restart the timing T2, re-detect the feature code stream.
  • the number of times of detecting the feature code stream is greater than or equal to 3.
  • the device further includes a judging unit configured to detect the local port before setting the local port configuration mode according to the physical state of the local port and the consistency.
  • the effective state of the end port judging the physical state of the local port according to the effective state of the local port, including: when the effective state of the local port is UP, then judging the physical state of the local port as UP: When the effective state of the local port is DOWN, it is determined that the physical state of the local port is DOWN.
  • the judgment unit is further configured to start a timer T1 before detecting the effective state of the local port; before the timer T1 expires, when the effective state of the local port remains stable, Then the physical state of the local port is judged according to the effective state of the local port; when the effective state of the local port is unstable, the detection is invalid.
  • the number of times of detecting the valid state of the local port is greater than or equal to 3.
  • the notification message or the alarm message carries the geographic location of the local port and/or the geographic location of the opposite port.
  • the embodiments herein also provide a computer-readable storage medium having an information processing program stored on the computer-readable storage medium, and the method for managing port configuration mode described in any of the above items when the information processing program is executed by a processor A step of.
  • the technical solution provided by the embodiments of this document can automatically set the local port configuration mode to ensure the stability of the network equipment service.
  • Such software may be distributed on a computer-readable medium
  • the computer-readable medium may include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium).
  • the term computer storage medium includes volatile and non-volatile memory implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data).
  • Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, tape, magnetic disk storage or other magnetic storage device, or Any other medium used to store desired information and that can be accessed by a computer.
  • communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed in embodiments of the present invention are a method and device for managing a port configuration mode. The method comprises: comparing consistency between a configuration mode of a local port and a predicted configuration mode of a peer port; and setting the configuration mode of the local port according to a physical state of the local port and the consistency.

Description

一种管理端口配置模式的方法及装置Method and device for managing port configuration mode
本文要求享有2019年05月24日提交的名称为“一种管理端口配置模式的方法及装置”的中国专利申请CN201910440079.2的优先权,其全部内容通过引用并入本文中。This article claims the priority of the Chinese patent application CN201910440079.2 named "A method and device for managing port configuration mode" filed on May 24, 2019, the entire content of which is incorporated herein by reference.
技术领域Technical field
本文实施例涉及但不限于以太网技术,尤其涉及一种管理端口配置模式的方法及装置。The embodiments herein relate to, but are not limited to, Ethernet technology, and in particular to a method and device for managing port configuration modes.
背景技术Background technique
在以太网设备对接过程中,除需要保证物理连接正常外,一般还要求对接双方端口配置模式必须保持一致,否则可能出现故障。In the process of interconnecting Ethernet devices, in addition to ensuring the normal physical connection, it is generally required that the port configuration modes of the two interconnected parties must be consistent, otherwise a malfunction may occur.
实际应用中,经常出现对接设备在由于某种原因(如设备断电或主动操作等)重启后,设备对接端口物理状态为故障DOWN(以下该设备称为本端设备)。这种情况会导致承载于该端口上的业务及管理中断。经处理往往发现故障原因是两个对配置模式不一致,因此在一些情况下需要对接双方进行端口配置模式修改以保持接设备的端口双方一致。而本端设备由于脱管,无法远程修改端口配置模式,导致修改困难。In practical applications, it often happens that after a docking device restarts due to some reasons (such as device power failure or active operation, etc.), the physical status of the device docking port is DOWN (hereinafter the device is referred to as the local device). This situation will cause the service and management carried on the port to be interrupted. After processing, it is often found that the cause of the failure is the inconsistent configuration modes of the two pairs. Therefore, in some cases, it is necessary to modify the port configuration modes of the two parties to keep the ports connected to the device consistent. However, the local device cannot modify the port configuration mode remotely due to the disconnection, which makes modification difficult.
在网络建设中,由于对接设备可能属于不同运维方,无法通过统一运维平台进行监控,因此无法保证对接设备端口配置模式保持一致,同时还导致维护成本上升。在网络设备长期运维过程中,设备更换、配置修改等情形,也可能导致对接端口配置模式被修改,从而可能导致对接端口配置模式不一致。在一实施方式中,虽然在对接端口配置模式不一致时也可能建链,但当网络设备存在软件更新等改变设备行为的操作时,就可能导致对接端口无法建链。In the network construction, because the docking equipment may belong to different operation and maintenance parties and cannot be monitored through a unified operation and maintenance platform, it is impossible to ensure that the port configuration mode of the docking equipment remains consistent, and it also leads to increased maintenance costs. During the long-term operation and maintenance of network equipment, situations such as device replacement and configuration modification may also cause the docking port configuration mode to be modified, which may result in inconsistent docking port configuration modes. In one embodiment, although a link may be established when the docking port configuration mode is inconsistent, when the network device has operations that change the behavior of the device such as software update, the docking port may not be able to establish a link.
发明内容Summary of the invention
有鉴于此,本文实施例提供了一种管理端口配置模式的方法,包括:比较本端端口配置模式与预测的对端端口配置模式的一致性;根据所述本端端口的物理状态和所述一致性,设置所述本端端口配置模式。In view of this, the embodiment of this document provides a method for managing port configuration mode, including: comparing the consistency of the local port configuration mode with the predicted counterpart port configuration mode; according to the physical state of the local port and the Consistency, set the local port configuration mode.
本文实施例还提供了一种管理端口配置模式的装置,包括:比较单元,用于比较本端端口配置模式与预测的对端端口配置模式的一致性;设置单元,用于根据所述本端端口的物理状态和所述一致性,设置所述本端端口配置模式。The embodiment of this document also provides an apparatus for managing port configuration mode, including: a comparing unit, configured to compare the consistency of the local port configuration mode with the predicted counterpart port configuration mode; and a setting unit, configured according to the local end The physical state of the port is consistent with the consistency, and the local port configuration mode is set.
本文实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有信息处理程序,所述信息处理程序被处理器执行时实现上述管理端口配置模式的方法的步骤。The embodiments herein also provide a computer-readable storage medium having an information processing program stored on the computer-readable storage medium, and when the information processing program is executed by a processor, the steps of the method for managing the port configuration mode described above are implemented.
附图说明Description of the drawings
附图用来提供对本文技术方案的进一步理解,并且构成说明书的一部分,与本文的实施例一起用于解释本文的技术方案,并不构成对本文技术方案的限制。The accompanying drawings are used to provide a further understanding of the technical solutions herein, and constitute a part of the specification. Together with the embodiments herein, they are used to explain the technical solutions herein, and do not constitute a limitation on the technical solutions herein.
图1为本文一实施例提供的一种管理端口配置模式的方法的流程示意图FIG. 1 is a schematic flowchart of a method for managing port configuration mode provided by an embodiment of this document
图2为本文另一实施例提供的一种管理端口配置模式的方法的流程示意图;2 is a schematic flowchart of a method for managing port configuration modes according to another embodiment of this document;
图3为本文另一实施例提供的一种管理端口配置模式的方法的流程示意图;FIG. 3 is a schematic flowchart of a method for managing port configuration modes according to another embodiment of this document;
图4为本文一实施例提供的一种管理端口配置模式的装置的结构示意图。FIG. 4 is a schematic structural diagram of an apparatus for managing port configuration mode provided by an embodiment of this document.
具体实施方式Detailed ways
为使本文的目的、技术方案和优点更加清楚明白,下文中将结合附图对本文的实施例进行详细说明。需要说明的是,在不冲突的情况下,本文中的实施例及实施例中的特征可以相互任意组合。In order to make the purpose, technical solutions and advantages of this document clearer, the embodiments of this document will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the embodiments herein and the features in the embodiments can be combined with each other arbitrarily.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical sequence is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than here.
在一些情况下,网络设备对接时,根据各自端口配置模式进行端口协商。当两端端口模式协商依赖于各自端口配置。当两端端口模式(自适应/强制)配置不一致时,将可能导致端口无法正常工作(即使端口正常工作,也存在隐患)。In some cases, when network devices are connected, port negotiation is performed according to their respective port configuration modes. When the port mode negotiation at both ends depends on the respective port configuration. When the port mode (adaptive/mandatory) configuration on both ends is inconsistent, the port may not work normally (even if the port works normally, there are hidden dangers).
另外,由于网络对接设备可能在物理位置和逻辑关系上分别独立进行管理维护,因此对上述两端端口配置的统一管理和查询存在困难,即在出现问题时进行处理也存在困难。In addition, since the network docking device may be independently managed and maintained in terms of physical location and logical relationship, there are difficulties in the unified management and query of the above-mentioned port configuration at both ends, that is, it is difficult to handle problems when problems occur.
为此,本文实施例针对上述问题提出了如下技术方案。To this end, the embodiments herein propose the following technical solutions to address the above-mentioned problems.
图1为本文一实施例提供的一种管理端口配置模式的方法的流程示意图,如图1所示,该方法包括:步骤101,比较本端端口配置模式与预测的对端端口配置模式的一致性;步骤102,根据所述本端端口的物理状态和所述一致性,设置所述本端端口配置模式。Fig. 1 is a schematic flow chart of a method for managing port configuration mode according to an embodiment of this paper. As shown in Fig. 1, the method includes: Step 101, comparing the local port configuration mode with the predicted counterpart port configuration mode.性; Step 102, according to the physical state of the local port and the consistency, set the local port configuration mode.
在一实施方式中,所述本端端口配置模式为自适应或强制;所述对端端口配置模式为未知、自适应或强制;所述本端端口的物理状态为正常UP或故障DOWN。In one embodiment, the local port configuration mode is adaptive or mandatory; the opposite port configuration mode is unknown, adaptive or mandatory; the physical state of the local port is normal UP or fault DOWN.
在一实施方式中,所述根据所述本端端口的物理状态和所述一致性,设置所述本端端口配置模式,包括:当所述本端端口的物理状态为UP,无论所述一致性为一致或不一致,或所述对端端口配置模式为未知时,保持所述本端端口配置模式不变;或者,当所述本端端口的物理状态为DOWN,所述对端端口配置模式为未知时,反向修改所述本端端口配置模式,包括:当所述本端端口配置模式为自适应时,修改为强制,当所述本端端口配置模式为强制时,修改为自适应;或者,当所述本端端口的物理状态为DOWN,所述一致性为不一致时,将所述本端端口配置模式修改为所述对端端口配置模式;或者,当所述本端端口的物理状态为DOWN且所述一致性为一致时,保持所述本端端口配置模式不变。In one embodiment, the setting the local port configuration mode according to the physical state of the local port and the consistency includes: when the physical state of the local port is UP, regardless of the consistency The local port configuration mode remains unchanged when the performance is consistent or inconsistent, or the opposite port configuration mode is unknown; or, when the physical state of the local port is DOWN, the opposite port configuration mode When it is unknown, reversely modify the local port configuration mode, including: when the local port configuration mode is adaptive, modify it to mandatory; when the local port configuration mode is mandatory, modify it to adaptive ; Or, when the physical status of the local port is DOWN and the consistency is inconsistent, modify the local port configuration mode to the opposite port configuration mode; or, when the local port’s When the physical state is DOWN and the consistency is consistent, the local port configuration mode remains unchanged.
在一实施方式中,当所述本端端口的物理状态为UP、所述一致性为不一致时,在保持所述本端端口配置模式不变之后,该方法还包括:启动定时器T3,监控所述本端端口的物理状态;当所述T3超时前,所述本端端口的物理状态保持为UP时,发送第一通知消息,用于通知所述本端端口配置模式与所述对端端口配置模式不一致;或者,当所述T3超时前,所述本端端口的物理状态抖动时,发送第一告警消息,用于告警所述本端端口的物理状态不稳定且所述本端端口配置模式与对端端口配置模式不一致;或者,当所述T3超时前,所述本端端口的物理状态变为DOWN时,则再次根据所述本端端口的物理状态和所述一致性,设置所述本端端口配置模式。In an embodiment, when the physical state of the local port is UP and the consistency is inconsistent, after keeping the local port configuration mode unchanged, the method further includes: starting a timer T3, and monitoring The physical state of the local port; when the physical state of the local port remains UP before the T3 timeout, a first notification message is sent to notify the local port configuration mode and the opposite end The port configuration mode is inconsistent; or, when the physical state of the local port jitters before the T3 timeout, a first alarm message is sent to alert that the physical state of the local port is unstable and the local port The configuration mode is inconsistent with the configuration mode of the opposite port; or, when the physical status of the local port changes to DOWN before the T3 timeout, the setting is again based on the physical status of the local port and the consistency The local port configuration mode.
在一实施方式中,当所述本端端口的物理状态为DOWN,所述对端端口配置模式为未知时,在反向修改所述本端端口配置模式之后,该方法还包括:启动定时器T3,监控所述本端端口的物理状态;当所述T3超时前,所述本端端口的物理状态保持为DOWN时,再次反向修改所述本端端口配置模式,并发送第二告警消息,用于告警所述本端端口的物理状态异常且所述本端端口配置模式与对端端口配置模式不一致;或者,当所述T3超时前,所述本端端口的物理状态抖动时,再次反向修改所述本端端口配置模式,并发送第三告警消息,用于告警所述本端端口的物理状态不稳定且所述本端端口配置模式与对端端口配置模式不一致;或者,当所述T3超时前,所述本端端口的物理状态变为 UP时,发送第二通知消息,用于通知所述本端端口配置模式已修改,且与所述本端端口配置模式与对端端口配置模式不一致。In an embodiment, when the physical state of the local port is DOWN and the configuration mode of the opposite port is unknown, after the local port configuration mode is modified in the reverse direction, the method further includes: starting a timer T3: monitor the physical state of the local port; when the physical state of the local port remains DOWN before the T3 times out, modify the local port configuration mode in the reverse direction again, and send a second alarm message , Used to warn that the physical state of the local port is abnormal and the local port configuration mode is inconsistent with the opposite port configuration mode; or, when the physical state of the local port jitters before the T3 timeout, again Reversely modify the local port configuration mode, and send a third alarm message to warn that the physical state of the local port is unstable and that the local port configuration mode is inconsistent with the peer port configuration mode; or when Before the T3 timeout, when the physical state of the local port changes to UP, a second notification message is sent to notify that the local port configuration mode has been modified, and it is consistent with the local port configuration mode and the opposite end. The port configuration mode is inconsistent.
在一实施方式中,当所述本端端口的物理状态为DOWN且所述一致性为一致时,在保持所述本端端口配置模式不变之后,该方法还包括:启动计数器N,N初始化为0,重启所述本端端口,并启动定时器T4,检测所述本端端口的物理状态;若所述本端端口的物理状态为UP,则停止对所述本端端口的操作;若所述本端端口的物理状态为DOWN,T4超期后,再次重启所述本端端口,检测所述本端端口的物理状态,且N=N+1;当N达到阈值后,停止对所述本端端口的操作。In one embodiment, when the physical state of the local port is DOWN and the consistency is consistent, after keeping the local port configuration mode unchanged, the method further includes: starting a counter N, and initializing N If it is 0, restart the local port and start the timer T4 to detect the physical status of the local port; if the physical status of the local port is UP, stop the operation on the local port; if The physical status of the local port is DOWN. After T4 expires, the local port is restarted again, and the physical status of the local port is detected, and N=N+1; when N reaches the threshold, stop the Operation of the local port.
在一实施方式中,在比较本端端口配置模式与预测的对端端口配置模式的一致性之前,该方法还包括:检测所述本端端口接收的所述对端端口发送的特征码流;当所述特征码流值为/C/帧时,预测所述对端端口配置模式为自适应;当所述特征码流值为/I/帧时,预测所述对端端口配置模式为强制;当所述检测无效时,预测所述对端端口配置模式为未知。In an embodiment, before comparing the consistency of the local port configuration mode with the predicted counterpart port configuration mode, the method further includes: detecting the feature code stream sent by the opposite port received by the local port; When the feature code stream value is /C/frame, predict that the opposite port configuration mode is adaptive; when the feature code stream value is /I/frame, predict that the opposite port configuration mode is mandatory ; When the detection is invalid, predict that the opposite port configuration mode is unknown.
在一实施方式中,在检测所述本端端口接收的所述对端端口发送的特征码流之前,该方法还包括:启动定时器T2;所述定时器T2超时前,所述特征码流值保持稳定时,根据所述特征码流值预测所述对端端口配置模式;所述特征码流值不稳定时,表示检测无效;所述定时器T2超时后,重启所述定时器T2,重新检测所述特征码流。In an embodiment, before detecting the feature code stream sent by the opposite port and received by the local port, the method further includes: starting a timer T2; before the timer T2 expires, the feature code stream When the value remains stable, predict the configuration mode of the opposite port according to the characteristic code stream value; when the characteristic code stream value is unstable, it indicates that the detection is invalid; after the timer T2 expires, restart the timer T2, Re-detect the feature code stream.
在一实施方式中,在所述T2内,检测所述特征码流的次数大于等于3。In one embodiment, in the T2, the number of times of detecting the feature code stream is greater than or equal to 3.
在一实施方式中,在根据所述本端端口的物理状态和所述一致性,设置所述本端端口配置模式之前,该方法还包括:检测所述本端端口的有效状态;根据所述本端端口的有效状态判断所述本端端口的物理状态,包括:当所述本端端口的有效状态为UP,则判断所述本端端口的物理状态为UP,当所述本端端口的有效状态为DOWN,则判断所述本端端口的物理状态为DOWN。In an embodiment, before setting the local port configuration mode according to the physical state of the local port and the consistency, the method further includes: detecting the effective state of the local port; The effective state of the local port determines the physical state of the local port, including: when the effective state of the local port is UP, then determining that the physical state of the local port is UP, and when the local port’s physical state is UP, If the effective state is DOWN, it is determined that the physical state of the local port is DOWN.
在一实施方式中,在检测所述本端端口的有效状态之前,该方法还包括:启动定时器T1;在定时器T1超时前,所述本端端口的有效状态保持稳定时,则根据所述本端端口的有效状态判断所述本端端口的物理状态;所述述本端端口的有效状态不稳定时,检测无效。In one embodiment, before detecting the effective state of the local port, the method further includes: starting a timer T1; before the timer T1 expires, when the effective state of the local port remains stable, then The effective state of the local port determines the physical state of the local port; when the effective state of the local port is unstable, the detection is invalid.
在一实施方式中,在所述T1内,检测所述本端端口的有效状态的次数大于等于3。In an embodiment, in the T1, the number of times of detecting the valid state of the local port is greater than or equal to 3.
在一实施方式中,所述通知消息或告警消息中,携带所述本端端口的地理位置和/或所述对端端口的地理位置。In an embodiment, the notification message or the alarm message carries the geographic location of the local port and/or the geographic location of the opposite port.
图2为本文另一实施例提供的一种管理端口配置模式的方法的流程示意图,如图2所示,该方法包括:步骤201,实时检测本端端口的物理状态;在一实施方式中,可以通过检测所述本端端口的有效状态判断所述本端端口到的物理状态。例如,端口有效状态为UP或DOWN。当检测到本端端口有效状态为UP,则判断端口物理状态为UP,当检测到本端端口有效状态为DOWN,则判断端口物理状态为DOWN。Fig. 2 is a schematic flow chart of a method for managing port configuration mode according to another embodiment of this document. As shown in Fig. 2, the method includes: step 201, detecting the physical state of the local port in real time; in an embodiment, The physical state of the local port can be determined by detecting the effective state of the local port. For example, the effective status of the port is UP or DOWN. When it is detected that the effective state of the local port is UP, the physical state of the port is determined to be UP, and when the effective state of the local port is detected to be DOWN, the physical state of the port is determined to be DOWN.
在一实施方式中,可以启动定时器T1,以一定频率检测本端端口的物理状态。通过定时器T1,还可以检测端口物理状态是否稳定,以避免由于某些因素的端口物理状态不稳定导致的误判。在定时器T1超时前,监测端口物理状态保持稳定,则判断结果有效,否则本周期内结果无效。例如在T1内,检测的端口物理状态一直为DOWN或UP,则说明状态保持稳定,检测的端口物理状态一次为DOWN,另一次为UP等,则说明状态不稳定。T1定时器超时后,重启T1定时器,重新检测端口物理状态。In an embodiment, the timer T1 can be started to detect the physical state of the local port at a certain frequency. Through the timer T1, it can also detect whether the physical state of the port is stable, so as to avoid misjudgment caused by the unstable physical state of the port due to certain factors. Before the timer T1 expires, if the physical state of the monitoring port remains stable, the judgment result is valid, otherwise the result in this cycle is invalid. For example, in T1, if the physical status of the detected port is always DOWN or UP, it means that the status remains stable. If the physical status of the detected port is DOWN once, and UP the other time, it means the status is unstable. After the T1 timer expires, restart the T1 timer to recheck the physical status of the port.
在一实施方式中,T1内的检测频率值即抽样检测次数可以根据一定策略取值,保证T1周期内,抽样检测次数至少≥3。In an embodiment, the detection frequency value in T1, that is, the number of sampling detections, can be selected according to a certain strategy to ensure that the number of sampling detections is at least ≥3 in the T1 period.
步骤202,实时检测所述本端端口接收的对端端口发送的特征码流,根据所述特征码流值预测所述对端端口配置模式;在一实施方式中,可以通过检测本端端口的接收Rx端口接收到的特征码流,是否是/C/或/I/帧,来预测所述对端端口配置模式。例如,预测的对端端口配置模式有效状态为自适应或强制。当检测特征码流值为/C/帧,则判断为自适应;当检测特征码流为/I/帧,且无/C/帧,则判断对端端口模式为强制。Step 202: Detect in real time the feature code stream sent by the opposite port received by the local port, and predict the configuration mode of the opposite port based on the value of the feature code stream; in one embodiment, the local port can be detected by The feature code stream received by the Rx port is received, whether it is /C/ or /I/ frame, to predict the configuration mode of the opposite port. For example, the predicted effective state of the peer port configuration mode is adaptive or mandatory. When the detected feature code stream value is /C/frame, it is judged as adaptive; when the detected feature code stream is /I/frame and there is no /C/frame, it is judged that the port mode of the opposite end is mandatory.
在一实施方式中,可以启动定时器T2,在物理层直接检测Rx端口接收到的特征码流。通过定时器T2,检测端口接收特征码流是否稳定,以避免由于某些因素的接收特征骂你不稳定导致的误判。在定时器T2超时前,监测本端端口接收码流特征值状态保持稳定,则根据码流特征值预测对端端口配置模式;否则本周期内检测无效,判断对端端口模式为未知。例如,例如在T2内,检测的码流特征值一直为/C/,则说明码流特征值保持稳定,判断对端端口配置模式为自适应;例如,如果检测的码流特征值一次为/C/,另一次为/I/帧等,则说明码流特征值不稳定,检测无效,预测对端端口模式为未知。T2定时器超时后,重启T2定时器,重新检测端口物理状态。In an embodiment, the timer T2 can be started to directly detect the feature code stream received by the Rx port at the physical layer. The timer T2 is used to detect whether the port receiving feature code stream is stable, so as to avoid misjudgment caused by the instability of the receiving feature due to certain factors. Before the timer T2 expires, monitor that the status of the characteristic value of the received code stream on the local port remains stable, and then predict the configuration mode of the opposite port according to the characteristic value of the code stream; otherwise, the detection in this period is invalid, and it is judged that the mode of the opposite port is unknown. For example, in T2, the detected code stream feature value is always /C/, it means that the code stream feature value remains stable, and the peer port configuration mode is judged to be adaptive; for example, if the detected code stream feature value once is / C/, the other time is /I/frame, etc., it means that the characteristic value of the code stream is unstable, the detection is invalid, and the prediction of the peer port mode is unknown. After the T2 timer expires, restart the T2 timer to recheck the physical status of the port.
在一实施方式中,T2内的检测频率值即抽样检测次数可以根据一定策略取值,保证T2周期内,抽样检测次数至少≥3。In one embodiment, the value of the detection frequency within T2, that is, the number of sampling inspections, can be selected according to a certain strategy to ensure that the number of sampling inspections is at least ≥3 in the T2 period.
步骤203,比较本端端口配置模式与预测的对端端口配置模式的一致性;并根据所 述本端端口的物理状态和所述一致性,设置所述本端端口配置模式。Step 203: Compare the consistency of the local port configuration mode with the predicted counterpart port configuration mode; and set the local port configuration mode according to the physical state of the local port and the consistency.
在一实施方式中,本端物理端口状态为:UP或DOWN;预测的对端端口配置模式为:未知,自适应,强制;本端端口配置模式为:自适应,强制。In an embodiment, the local physical port status is: UP or DOWN; the predicted peer port configuration mode is: unknown, adaptive, and mandatory; the local port configuration mode is: adaptive, mandatory.
在本端端口物理状态分别为UP或DOWN两种场景下,包括下述内容。When the physical status of the local port is UP or DOWN, the following contents are included.
1.1,当本端端口物理状态为UP,比较本端端口配置模式与预测的对端端口配置模式的一致性:1)当预测的对端端口配置模式与本端端口配置模式一致时,保持本端端口当前配置模式不变;2)当预测的对端端口配置模式为未知时,保持本端端口当前配置模式不变;3)当预测的对端端口配置模式与本端端口配置模式不一致时,保持本端端口当前配置模式不变,并转2.1处理。1.1. When the physical status of the local port is UP, compare the consistency between the local port configuration mode and the predicted peer port configuration mode: 1) When the predicted peer port configuration mode is consistent with the local port configuration mode, keep this The current configuration mode of the end port remains unchanged; 2) When the predicted peer port configuration mode is unknown, keep the current configuration mode of the local port unchanged; 3) When the predicted peer port configuration mode is inconsistent with the local port configuration mode , Keep the current configuration mode of the local port unchanged, and turn to 2.1 for processing.
在一实施方式中,预测的对端端口配置模式与本端端口配置模式都可以通过运维界面显示。In one embodiment, both the predicted peer port configuration mode and the local port configuration mode can be displayed through the operation and maintenance interface.
1.2,当本端端口物理状态为DOWN,比较本端端口配置模式与预测的对端端口配置模式的一致性:1)当预测的对端端口配置模式为未知时,反向修改本端端口配置模式,并转2.2处理;在一实施方式中,根据本端端口配置模式当前值(自适应或强制)反向修改本端端口模式,例如,本端端口配置模式当前为自适应则修改为强制,当前为强制则修改为自适应。1.2. When the physical status of the local port is DOWN, compare the consistency between the local port configuration mode and the predicted peer port configuration mode: 1) When the predicted peer port configuration mode is unknown, reverse modify the local port configuration Mode, and transfer to 2.2 processing; in one embodiment, the local port mode is reversed according to the current value (adaptive or mandatory) of the local port configuration mode. For example, if the local port configuration mode is currently adaptive, it is changed to mandatory , If it is currently mandatory, modify it to adaptive.
2)当预测的对端端口配置模式明确(自适应或强制)且与本端端口配置模式不一致时,将本端端口配置模式修改为所述对端端口配置模式,并转2.2处理;在一实施方式中,根据预测对端端口配置模式当前值(自适应或强制)修改本端端口配置模式,例如,对端端口配置模式当前为自适应,则将本端端口配置模式修改为自适应,对端端口配置模式当前为强制,则将本端端口配置模式修改为强制。2) When the predicted peer port configuration mode is clear (adaptive or mandatory) and is inconsistent with the local port configuration mode, modify the local port configuration mode to the peer port configuration mode, and transfer to 2.2 processing; In the implementation manner, the local port configuration mode is modified according to the current value (adaptive or mandatory) of the predicted peer port configuration mode. For example, if the peer port configuration mode is currently adaptive, the local port configuration mode is modified to adaptive. The remote port configuration mode is currently mandatory, so modify the local port configuration mode to mandatory.
3)当预测的对端端口配置模式明确(自适应或强制)且与本端端口配置模式一致时,保持当前本端端口配置模式不变,并转2.3处理。3) When the predicted peer port configuration mode is clear (adaptive or mandatory) and consistent with the local port configuration mode, keep the current local port configuration mode unchanged, and proceed to 2.3.
2.1,启动定时器T3,监控所述本端端口的物理状态,并根据检测结果,提供通知或告警消息:本端端口物理状态为:UP或DOWN;1)若T3超时前,本端端口物理状态保持为UP,产生一条通知消息(通知1:用于通知对端端口配置模式与本端端口配置模式不一致);2)若T3超时前,端口物理状态抖动,产生一条告警消息(告警1:用于通知本端端口物理状态不稳定,以及对端端口配置模式与本端端口配置模式不一致);3)若T3超时前,本端端口物理状态变为DOWN,则转到1.2处理。2.1. Start timer T3 to monitor the physical status of the local port, and provide notification or alarm messages based on the detection result: the physical status of the local port is: UP or DOWN; 1) If T3 expires, the physical status of the local port The status remains UP, and a notification message is generated (Notification 1: Used to notify that the configuration mode of the opposite port is inconsistent with the configuration mode of the local port); 2) If the physical state of the port jitters before T3 times out, an alarm message is generated (Alarm 1: Used to notify that the physical status of the local port is unstable and that the configuration mode of the opposite port is inconsistent with the configuration mode of the local port); 3) If the physical status of the local port changes to DOWN before T3 times out, then go to 1.2.
在一实施方式中,提供通知或告警消息的同时,还会记录日志,日志内容包括本端端口当前配置模式、配置模式是否修改、如果修改,修改的记录和原因等。In one embodiment, when a notification or alarm message is provided, a log is also recorded. The log content includes the current configuration mode of the local port, whether the configuration mode is modified, if it is modified, the modification record and reason, etc.
2.2,启动定时器T3,监控所述本端端口的物理状态,并根据检测结果,提供通知或告警消息:本端端口物理状态为:UP或DOWN;1)若T3超时前,本端端口物理状态保持为DOWN,则再次反向修改本端端口模式,即恢复原有配置模式;并产生一条告警消息(告警2:用于通知本端端口物理状态异常,以及对端端口配置模式与本端端口配置模式不一致);2)若T3超时前,本端端口物理状态抖动,则再次反向修改本端端口模式,即恢复原有配置模式;并产生一条告警消息(告警1:用于通知本端端口物理状态不稳定,以及对端端口配置模式与本端端口配置模式不一致);3)若T3超时,本端端口物理状态变为UP,则不修改当前端口配置模式,并产生一条通知消息(通知2:用于通知本端端口配置模式已修改,以及对端端口配置模式与本端端口配置模式不一致)。2.2. Start timer T3, monitor the physical status of the local port, and provide notification or alarm messages based on the detection result: the physical status of the local port is: UP or DOWN; 1) If T3 expires, the physical status of the local port If the status remains DOWN, the local port mode will be reversed again, that is, the original configuration mode will be restored; and an alarm message will be generated (Alarm 2: Used to notify that the physical status of the local port is abnormal, as well as the configuration mode of the peer port and the local port The port configuration mode is inconsistent); 2) If the physical state of the local port is jittered before T3 times out, the local port mode will be reversed again to restore the original configuration mode; and an alarm message (alarm 1: used to notify the local The physical state of the end port is unstable, and the configuration mode of the peer port is inconsistent with the configuration mode of the local port); 3) If T3 times out and the physical state of the local port becomes UP, the current port configuration mode is not modified and a notification message is generated (Notice 2: Used to notify that the local port configuration mode has been modified, and the opposite port configuration mode is inconsistent with the local port configuration mode).
在一实施方式中,提供通知或告警消息的同时,还会记录日志,日志内容包括本端端口当前配置模式、配置模式是否修改、如果修改,修改的记录和原因等。In one embodiment, when a notification or alarm message is provided, a log is also recorded. The log content includes the current configuration mode of the local port, whether the configuration mode is modified, if it is modified, the modification record and reason, etc.
2.3,启动计数器N(N初始化为0),重启所述本端端口,并启动定时器T4,检测端口物理状态:1)若端口物理状态为UP,则结束,即停止对端口的操作;2)若端口物理状态为DOWN,T4超期后,再次重启端口,检测端口物理状态,且N=N+1;当N达到阈值后,停止对端口的操作。2.3. Start the counter N (N is initialized to 0), restart the local port, and start the timer T4 to detect the physical state of the port: 1) If the physical state of the port is UP, it ends, that is, the operation of the port is stopped; 2 ) If the physical status of the port is DOWN, after T4 expires, the port is restarted again, and the physical status of the port is detected, and N=N+1; when N reaches the threshold, the operation of the port is stopped.
在一实施方式中,所述阈值可以根据一定的规则人为设置。In an embodiment, the threshold may be artificially set according to certain rules.
在一实施方式中,还会记录日志,日志内容包括但不限于端口配置/状态、重启原因/次数等。In one embodiment, a log is also recorded, and the log content includes but is not limited to port configuration/status, restart reason/number of times, etc.
在一实施方式中,上述2.1、2.2中的通知消息或告警消息,可以上报给网管或其他运维平台。所述通知消息或告警消息中还可以携带本端/对端端口物理位置等信息,方便运维人员到现场操作。In one embodiment, the notification messages or alarm messages in 2.1 and 2.2 above may be reported to the network management or other operation and maintenance platforms. The notification message or the alarm message may also carry information such as the physical location of the local/opposite port, which is convenient for operation and maintenance personnel to perform on-site operations.
本实施例提供的技术方案,直接通过检测端口接收码流,根据端口模式特征码流判断对端设备端口配置模式,然后根据本端端口物理状态,以及本端端口配置方式与对端端口配置方式进行比对,对本端端口配置方式进行调整设置;如此,在现有设备协商标准基础上,不需要对对接设备的进行任何变化,具有良好的兼容性;另外,针对现有技术中对接设备端口配置方式依赖于双方协商,且针对本端与对端设备端口需要分别管理维护,导致端口模式协商依赖于对接双方配置以及定位效率低等问题。本实施例的方案 通过对端口状态和相关故障处理采用定时器检测和计数器处理的方法,平滑处理端口对接协商中可能的抖动。依据端口协议交互判断对端端口配置模式,并结合本端端口状态、配置方式等进行判断和处理,方案简单与灵活,容易规模部署应用。The technical solution provided in this embodiment directly receives the code stream by detecting the port, judges the port configuration mode of the peer device according to the port mode characteristic code stream, and then according to the physical state of the local port, and the local port configuration mode and the opposite port configuration mode Compare and adjust the configuration mode of the local port; in this way, on the basis of the existing equipment negotiation standards, there is no need to make any changes to the docking device, which has good compatibility; in addition, for the port of the docking device in the prior art The configuration method relies on the negotiation between the two parties, and the local and opposite device ports need to be managed and maintained separately, which leads to problems such as the port mode negotiation relying on the configuration of the docking parties and low positioning efficiency. The solution of this embodiment uses timer detection and counter processing methods for port status and related fault processing to smoothly handle possible jitter in port docking negotiation. The configuration mode of the peer port is judged based on the port protocol interaction, and the judgment and processing are combined with the state of the local port and the configuration method. The solution is simple and flexible, and it is easy to deploy applications on a large scale.
图3为本文另一实施例提供的一种管理端口配置模式的方法的流程示意图。FIG. 3 is a schematic flowchart of a method for managing port configuration modes according to another embodiment of this document.
本实施例中,本端设备设置有n个端口,需要对这n个端口实现端口配置模式的自动检测与恢复。In this embodiment, the local device is provided with n ports, and automatic detection and recovery of the port configuration mode need to be implemented for these n ports.
如图3所示,该方法包括:步骤301,网络设备维护端口状态表;所述端口状态表的格式如下:{端口序号1,物理位置1,本端端口配置模式1,本端端口物理状态1,预测对端端口配置模式1;端口序号2,物理位置2,本端端口配置模式2,本端端口物理状态2,预测对端端口配置模式2;......;端口序号n,物理位置n,本端端口配置模式n,本端端口物理状态n,预测对端端口配置模式n;}或者,可以如表1所示:As shown in Figure 3, the method includes: step 301, the network device maintains a port status table; the format of the port status table is as follows: {port serial number 1, physical location 1, local port configuration mode 1, local port physical status 1. Predicted peer port configuration mode 1; port number 2, physical location 2, local port configuration mode 2, local port physical state 2, predicted peer port configuration mode 2;......; port number n , Physical location n, local port configuration mode n, local port physical state n, predicted peer port configuration mode n;} Or, it can be as shown in Table 1:
Figure PCTCN2020092097-appb-000001
Figure PCTCN2020092097-appb-000001
其中,在设备启动过程中可以根据端口配置方式、物理位置等信息完成端口状态表的初始化,并根据一定策略完成对该端口状态表的实时更新。Among them, in the device startup process, the port status table can be initialized according to the port configuration mode, physical location and other information, and the port status table can be updated in real time according to a certain strategy.
本实施例中,初始化端口状态表时,根据网络设备物理端口及配置,初始化状态表的物理位置n与模式配置n。In this embodiment, when the port state table is initialized, the physical location n and mode configuration n of the state table are initialized according to the physical port and configuration of the network device.
触发实时更新包括但不限于本端端口物理状态出现变化,人机命令或其他运维系统触发的端口物理状态/端口模式检测或变更,可能引起端口物理状态变化的告警等。Triggering real-time updates includes, but is not limited to, changes in the physical status of the local port, detection or change of the port physical status/port mode triggered by man-machine commands or other operation and maintenance systems, and alarms that may cause the physical status of the port to change.
其中,端口配置模式有:自适应、强制(半双工、全双工)两种模式。Among them, the port configuration mode has two modes: self-adaptive and mandatory (half-duplex, full-duplex).
1、自适应模式:对接双方在端口连接后协商对接参数,以匹配到最佳状态。自适应模式下只要硬件连接后,发送端口tx方向连续发送/C/帧,即配置(configuration)码流,若接收端口rx方向连续接收到/C/帧,则返回对端带有ack应答的/C/帧,对端接收到后端口建链;2、强制模式,端口采用配置指定的参数进行对接,分为半双工、全双工。强制模式下只要硬件连接后,发送端口tx方向就会以一定频率发送/C/帧(即空闲idle帧),若接收端口rx方向能收到与自己频率相关的/C/帧,则认为对端属性与本端一致,本端端口就会建链。1. Adaptive mode: The docking parties negotiate the docking parameters after the port is connected to match the best state. In the adaptive mode, as long as the hardware is connected, the sending port tx direction continuously sends /C/frames, that is, configuration (configuration) code stream, if the receiving port rx direction continuously receives /C/frames, it will return to the opposite end with ack response /C/frame, the port establishes a link after the opposite end receives it; 2. Mandatory mode, the port uses the parameters specified by the configuration for docking, divided into half-duplex and full-duplex. In forced mode, as long as the hardware is connected, the sending port tx direction will send /C/frames (ie idle frames) at a certain frequency. If the receiving port rx direction can receive /C/frames related to its own frequency, it is considered correct If the end attribute is consistent with the local end, the local port will establish a link.
自适应模式、强制模式可用于不同的的场景下,在以太网设备(包括不同速率的电口、光口)对接时,基本原则是对接双方设备端口配置模式必须保持一致。当对接双方设备端口配置不一致时(一端强制、一端自适应),可能导致对接设备端口无法建链。Adaptive mode and mandatory mode can be used in different scenarios. When interconnecting Ethernet devices (including electrical ports and optical ports of different speeds), the basic principle is that the port configuration modes of the connected devices must be consistent. When the port configurations of the devices on both sides of the interconnection are inconsistent (mandatory at one end and adaptive at the other end), the port of the interconnected device may fail to establish a link.
步骤302,检测本端各个端口的物理状态;在一实施方式中,可以启动定时器T1,以一定频率检测本端各个端口的实际建链状态,并根据检测结果更新端口状态表。定时器T1超时后,重启T1,重新检测端口物理状态;通过定时器T1,检测端口物理状态是否稳定,以避免由于某些因素的端口物理状态不稳定导致的误判。在定时器T1超时前,监测端口物理状态保持稳定,则判断结果有效,并更新状态表中的本端端口物理状态n;否则本周期内结果无效,维持状态表中的本端端口物理状态n不变。Step 302: Detect the physical status of each port at the local end; in one embodiment, a timer T1 can be started to detect the actual link establishment status of each port at the local end at a certain frequency, and update the port state table according to the detection result. After the timer T1 expires, restart T1 to re-check the physical state of the port; use the timer T1 to detect whether the physical state of the port is stable, so as to avoid misjudgments caused by the unstable port physical state due to certain factors. Before the timer T1 expires, if the physical state of the monitored port remains stable, the judgment result is valid, and the physical state n of the local port in the state table is updated; otherwise the result in this period is invalid, and the physical state n of the local port in the state table is maintained constant.
端口有效状态为UP或DOWN。当检测到本端端口有效状态为UP,则判断端口物理状态为UP,当检测到本端端口有效状态为DOWN,则判断端口物理状态为DOWN;检测频率值即抽样检测次数根据一定策略取值,保证T1周期内,抽样检测次数至少≥3。The effective status of the port is UP or DOWN. When the effective state of the local port is detected as UP, the physical state of the port is judged to be UP, and when the effective state of the local port is detected as DOWN, the physical state of the port is judged to be DOWN; the detection frequency value is the number of sampling inspections according to a certain strategy , Ensure that the number of sampling inspections is at least ≥3 in the T1 period.
在一实施方式中,具体检测过程包括:1)当T1超时前,本端端口物理状态n始终保持为UP(T1超时前未检测到DOWN),则判断端口物理状态为UP,并更新状态表的本端端口物理状态n。并重启T1定时器,重新检测端口物理状态;2)当T1超时前,本端端口物理状态n始终保持为DOWN(T1超时前未检测到UP),则判断端口物理状态为DOWN,并更新状态表的本端端口物理状态n。并重启T1定时器,重新检测端口物理状态n;3)当T1超时前,本端端口物理状态n在UP与DOWN之间出现变化(T1超时前同时检测到UP与DOWN),则保持状态表中本端端口物理状态n维持上一周期状态值不变。并重启T1定时器,重新检测端口物理状态n。In one embodiment, the specific detection process includes: 1) Before T1 times out, the physical state n of the local port always remains UP (DOWN is not detected before T1 times out), then the physical state of the port is judged to be UP, and the state table is updated The physical state of the local port is n. And restart the T1 timer to re-check the physical state of the port; 2) Before T1 times out, the physical state n of the local port always remains DOWN (up is not detected before T1 times out), then the physical state of the port is judged to be DOWN and the state is updated Physical state n of the local port of the table. And restart the T1 timer to recheck the port physical state n; 3) Before T1 times out, the local port physical state n changes between UP and DOWN (up and DOWN are detected at the same time before T1 times out), then the state table is maintained The physical state n of the local port remains unchanged in the previous cycle. And restart the T1 timer to recheck the physical state of the port n.
步骤303,预测对端各个端口的配置方式;在一实施方式中,可以启动定时器T2,通过在物理层直接检测本端各个端口的接收Rx端口接收到的特征码流,是否是/C/或/I/帧,并根据检测结果判断对端端口模式并更新端口状态表的预测的对端端口配置模式n。T2定时器超时后,重启T2定时器,重新检测端口接收Rx码流;通过定时器T2,检测端口接收特征码流是否稳定,以避免由于某些因素的接收特征骂你不稳定导致的误判。在定时器T2超时前,监测本端端口n接收码流特征值状态保持稳定,则根据有效特征值判断对端端口模式;否则本周期内检测无效,判断对端端口模式为未知。使用本周期判断的端口模式更新状态表中的预测对端端口配置模式n。 Step 303, predict the configuration mode of each port of the opposite end; in one embodiment, the timer T2 can be started to directly detect at the physical layer whether the characteristic code stream received by the receiving Rx port of each port of the local end is /C/ Or /I/frame, and judge the peer port mode according to the detection result and update the predicted peer port configuration mode n in the port state table. After the T2 timer expires, restart the T2 timer to re-check the port receiving the Rx code stream; use the timer T2 to check whether the port receiving feature code stream is stable, so as to avoid misjudgment caused by the instability of the receiving feature due to certain factors. . Before the timer T2 expires, monitor that the status of the characteristic value of the received code stream at the local port n remains stable, and then judge the opposite port mode according to the valid characteristic value; otherwise, the detection in this cycle is invalid and the opposite port mode is judged to be unknown. Use the port mode judged in this cycle to update the predicted peer port configuration mode n in the state table.
预测对端端口配置模式有效状态为自适应或强制。当检测有效特征值为/C/帧,则判断为自适应;当检测有效值为/I/帧,且无/C/帧,则判断对端端口模式为强制。It is predicted that the effective state of the configuration mode of the peer port is adaptive or mandatory. When the effective detection feature value is /C/frame, it is judged as adaptive; when the effective detection value is /I/frame and there is no /C/frame, it is judged that the port mode of the opposite end is mandatory.
检测频率值即抽样检测次数根据一定策略取值,保证T2周期内,抽样检测次数至少≥3。The detection frequency value is the number of sampling tests according to a certain strategy to ensure that the number of sampling tests is at least ≥3 within the T2 period.
在一实施方式中,具体预测过程包括:1)当T2超时前,端口n持续检测到/C/帧,则判断对端端口配置模式n为自适应,并更新状态表中预测对端端口配置模式n。并重启T2定时器,重新检测端口接收Rx码流;2)当T2超时前,端口n持续检测到/I/帧,未检测到/C/帧,则判断对端端口配置模式为强制,并更新状态表中预测对端端口配置模式n。并重启T2定时器,重新检测接收端口Rx码流;3)当T2超时前,端口n检测情况与上述两种情况不同时,则判断对端端口配置模式为未知,并更新状态表中预测对端端口配置模式n。并重启T2定时器,重启检测接收端口Rx码流。步骤304,比较端口状态表中的本端端口配置模式n与预测的对端端口配置模式n的一致性,并根据本端端口物理状态n对本端端口配置模式n进行配置操作。在一实施方式中,本端端口物理状态为:UP或DOWN;预测的对端端口配置模式为:未知,自适应,强制;本端端口配置模式为:自适应,强制。In one embodiment, the specific prediction process includes: 1) Before T2 times out, port n continuously detects /C/frames, then judges that the peer port configuration mode n is adaptive, and updates the predicted peer port configuration in the state table Mode n. And restart the T2 timer to re-check that the port receives the Rx code stream; 2) Before T2 times out, port n continues to detect /I/frames, and /C/frames are not detected, then it is judged that the configuration mode of the opposite port is mandatory, and Update the predicted peer port configuration mode n in the status table. And restart the T2 timer to re-check the Rx code stream of the receiving port; 3) When the detection condition of port n is different from the above two conditions before T2 times out, it is judged that the configuration mode of the opposite port is unknown, and the prediction pair in the status table is updated. End port configuration mode n. And restart the T2 timer, restart to detect the Rx code stream of the receiving port. Step 304: Compare the consistency between the local port configuration mode n in the port state table and the predicted counterpart port configuration mode n, and perform a configuration operation on the local port configuration mode n according to the physical state n of the local port. In an embodiment, the physical state of the local port is: UP or DOWN; the predicted configuration mode of the opposite port is: unknown, adaptive, mandatory; the local port configuration mode is: adaptive, mandatory.
在本端端口n物理状态分别为UP或DOWN两种场景下,包括以下内容。When the physical status of the local port n is UP or DOWN, the following contents are included.
3.1,当本端端口物理状态判断为UP,比较预测的对端端口配置模式n与本端端口配置模式n:1)当预测的对端端口配置模式n与本端端口配置模式n一致时,保持本端端口当前配置模式n不变;2)当预测的对端端口n配置模式为未知时,保持本端端口当前配置模式n不变;3)当预测的对端端口配置模式n与本端端口配置模式n不一致时,保持本端端口当前配置模式n不变,并转4.1处理。3.1. When the physical status of the local port is judged to be UP, compare the predicted peer port configuration mode n with the local port configuration mode n: 1) When the predicted peer port configuration mode n is consistent with the local port configuration mode n, Keep the current configuration mode n of the local port unchanged; 2) When the predicted configuration mode of the opposite port n is unknown, keep the current configuration mode n of the local port unchanged; 3) When the predicted configuration mode n of the opposite port is the same as the local When the configuration mode n of the end port is inconsistent, keep the current configuration mode n of the local port unchanged, and proceed to 4.1.
在一实施方式中,预测的对端端口配置模式与本端端口配置模式都可以通过运维界 面实时显示。In one embodiment, both the predicted peer port configuration mode and the local port configuration mode can be displayed in real time through the operation and maintenance interface.
3.2,当本端端口物理状态为DOWN,比较本端端口配置模式n与预测的对端端口配置模式n的一致性:1)当预测的对端端口配置模式n为未知时,反向修改本端端口配置模式n,并转4.2处理;在一实施方式中,根据本端端口配置模式n当前值(自适应或强制)反向修改本端端口模式n,例如,本端端口配置模式n当前为自适应则修改为强制,当前为强制则修改为自适应。3.2. When the physical status of the local port is DOWN, compare the consistency between the local port configuration mode n and the predicted peer port configuration mode n: 1) When the predicted peer port configuration mode n is unknown, modify the local End port configuration mode n, and transfer to 4.2 processing; in one embodiment, according to the current value of the local port configuration mode n (adaptive or mandatory), modify the local port mode n in the reverse direction, for example, the local port configuration mode n is current If it is self-adaptive, change it to mandatory, and if it is currently mandatory, change it to adaptive.
2)当预测的对端端口配置模式n明确(自适应或强制)且与本端端口配置模式n不一致时,将本端端口配置模式n修改为所述对端端口配置模式n,并转4.2处理;在一实施方式中,根据预测对端端口配置模式n当前值(自适应或强制)修改本端端口配置模式n,例如,对端端口配置模式n当前为自适应,则将本端端口配置模式n修改为自适应,对端端口配置模式n当前为强制,则将本端端口配置模式n修改为强制。2) When the predicted peer port configuration mode n is clear (adaptive or mandatory) and is inconsistent with the local port configuration mode n, modify the local port configuration mode n to the peer port configuration mode n, and go to 4.2 Processing; In one embodiment, the local port configuration mode n is modified according to the current value (adaptive or mandatory) of the predicted peer port configuration mode n. For example, if the peer port configuration mode n is currently adaptive, the local port The configuration mode n is changed to adaptive, and the peer port configuration mode n is currently mandatory, then the local port configuration mode n is changed to mandatory.
3)当预测的对端端口配置模式n明确(自适应或强制)且与本端端口配置模式n一致时,保持当前本端端口配置模式n不变,并转4.3处理。3) When the predicted peer port configuration mode n is clear (adaptive or mandatory) and consistent with the local port configuration mode n, keep the current local port configuration mode n unchanged, and proceed to 4.3.
4.1,启动定时器T3,监控所述本端端口物理状态n,并根据检测结果,提供通知或告警消息:本端端口物理状态为:UP或DOWN;1)若T3超时前,本端端口物理状态n保持为UP,产生一条通知消息(通知1:用于通知对端端口配置模式与本端端口配置模式不一致);2)若T3超时前,端口物理状态n抖动,产生一条告警消息(告警1:用于通知本端端口物理状态不稳定,以及对端端口配置模式与本端端口配置模式不一致);3)若T3超时前,本端端口物理状态n变为DOWN,则转到3.2处理。4.1. Start timer T3, monitor the physical state n of the local port, and provide notification or alarm messages based on the detection result: the physical state of the local port is: UP or DOWN; 1) If T3 expires, the physical state of the local port State n remains UP, and a notification message is generated (Notification 1: Used to notify that the configuration mode of the opposite port is inconsistent with the configuration mode of the local port); 2) If the port physical state n is jittered before T3 times out, an alarm message (alarm) 1: Used to notify that the physical status of the local port is unstable, and that the configuration mode of the peer port is inconsistent with the configuration mode of the local port); 3) If the physical status n of the local port changes to DOWN before T3 times out, go to 3.2 for processing .
在一实施方式中,提供通知或告警消息的同时,还会记录日志,日志内容包括本端端口当前配置模式、配置模式是否修改、如果修改,修改的记录和原因等。In one embodiment, when a notification or alarm message is provided, a log is also recorded. The log content includes the current configuration mode of the local port, whether the configuration mode is modified, if it is modified, the modification record and reason, etc.
4.2,启动定时器T3,监控所述本端端口的物理状态n,并根据检测结果,提供通知或告警消息:本端端口物理状态为:UP或DOWN;1)若T3超时前,本端端口物理状态n保持为DOWN,则再次反向修改本端端口模式n,即恢复原有配置模式;并产生一条告警消息(告警2:用于通知本端端口物理状态异常,以及对端端口配置模式与本端端口配置模式不一致);2)若T3超时前,本端端口物理状态n抖动,则再次反向修改本端端口模式n,即恢复原有配置模式;并产生一条告警消息(告警1:用于通知本端端口物理状态不稳定,以及对端端口配置模式与本端端口配置模式不一致);3)若T3超时,本端端口物理状态n变为UP,则不修改当前端口配置模式,并产生一条通知消息(通知2:用于通知本端端口配置模式已修改,以及对端端口配置模式与本端端口配置模式不一 致)。4.2. Start timer T3, monitor the physical state n of the local port, and provide notification or alarm messages based on the detection result: the physical state of the local port is: UP or DOWN; 1) If T3 expires, the local port If the physical status n remains DOWN, the local port mode n will be reversely modified again, that is, the original configuration mode will be restored; and an alarm message will be generated (Alarm 2: Used to notify the local port of abnormal physical status and the configuration mode of the opposite port Inconsistent with the configuration mode of the local port); 2) If the physical state n of the local port jitters before T3 times out, the local port mode n is modified in the reverse direction again, that is, the original configuration mode is restored; an alarm message (alarm 1 : Used to notify that the physical status of the local port is unstable, and that the configuration mode of the peer port is inconsistent with the local port configuration mode); 3) If T3 times out and the physical state of the local port becomes UP, the current port configuration mode is not modified , And generate a notification message (Notification 2: Used to notify that the local port configuration mode has been modified, and the opposite port configuration mode is inconsistent with the local port configuration mode).
在一实施方式中,提供通知或告警消息的同时,还会记录日志,日志内容包括本端端口当前配置模式、配置模式是否修改、如果修改,修改的记录和原因等。In one embodiment, when a notification or alarm message is provided, a log is also recorded. The log content includes the current configuration mode of the local port, whether the configuration mode is modified, if it is modified, the modification record and reason, etc.
4.3,启动计数器N(N初始化为0),重启所述本端端口n,并启动定时器T4,检测端口物理状态n:1)若端口物理状态n为UP,则结束,即停止对端口n的操作;2)若端口物理状态n为DOWN,T4超期后,再次重启端口n,检测端口物理状态n,且N=N+1;当N达到阈值后,停止对端口n的操作。4.3. Start the counter N (N is initialized to 0), restart the local port n, and start the timer T4 to detect the physical state of the port n: 1) If the physical state of the port n is UP, it ends, that is, the port n is stopped. 2) If the port physical state n is DOWN, after T4 expires, restart port n again, check the port physical state n, and N=N+1; when N reaches the threshold, stop the operation on port n.
在一实施方式中,所述阈值可以根据一定的规则人为设置。In an embodiment, the threshold may be artificially set according to certain rules.
在一实施方式中,还会记录日志,日志内容包括但不限于端口配置/状态、重启原因/次数等。In one embodiment, a log is also recorded, and the log content includes but is not limited to port configuration/status, restart reason/number of times, etc.
在一实施方式中,上述4.1、4.2中的通知消息或告警消息,可以上报给网管或其他运维平台。所述通知消息或告警消息中还可以携带并携带其对应端口状态表中的信息,根据一定策略并结合用户台帐信息,查找本端/对端端口具体位置并现场处理。In an embodiment, the notification message or alarm message in 4.1 and 4.2 above may be reported to the network management or other operation and maintenance platform. The notification message or the alarm message can also carry and carry information in the corresponding port status table, and according to a certain strategy and combined with user account information, the specific location of the local/opposite port can be found and processed on site.
本文实施例提供的技术方案,结合本端端口实际工作状态、依据一定策略对本端端口配置方式进行设置,从而实现网络设备端口模式的自动检测与恢复,消除潜在隐患,并克服了传统方法效率不高的问题。The technical solution provided in the embodiments of this article combines the actual working status of the local port and sets the local port configuration mode according to a certain strategy, so as to realize the automatic detection and recovery of the network device port mode, eliminate potential hidden dangers, and overcome the inefficiency of traditional methods. High question.
图4为本文一实施例提供的一种管理端口配置模式的装置的结构示意图,如图4所示,该装置包括:比较单元,用于比较本端端口配置模式与预测的对端端口配置模式的一致性;设置单元,用于根据所述本端端口的物理状态和所述一致性,设置所述本端端口配置模式。FIG. 4 is a schematic structural diagram of an apparatus for managing port configuration modes provided by an embodiment of this document. As shown in FIG. 4, the apparatus includes: a comparing unit for comparing the local port configuration mode with the predicted peer port configuration mode The setting unit is configured to set the local port configuration mode according to the physical state of the local port and the consistency.
在一实施方式中,所述本端端口配置模式为自适应或强制;所述对端端口配置模式为未知、自适应或强制;所述本端端口的物理状态为正常UP或故障DOWN。In one embodiment, the local port configuration mode is adaptive or mandatory; the opposite port configuration mode is unknown, adaptive or mandatory; the physical state of the local port is normal UP or fault DOWN.
在一实施方式中,所述设置单元,具体用于当所述本端端口的物理状态为UP,无论所述一致性为一致或不一致,或所述对端端口配置模式为未知时,保持所述本端端口配置模式不变;或者,当所述本端端口的物理状态为DOWN,所述对端端口配置模式为未知时,反向修改所述本端端口配置模式,包括:当所述本端端口配置模式为自适应时,修改为强制,当所述本端端口配置模式为强制时,修改为自适应;或者,当所述本端端口的物理状态为DOWN,所述一致性为不一致时,将所述本端端口配置模式修改为所述 对端端口配置模式;或者,当所述本端端口的物理状态为DOWN且所述一致性为一致时,保持所述本端端口配置模式不变。In one embodiment, the setting unit is specifically configured to maintain all the information when the physical state of the local port is UP, regardless of whether the consistency is consistent or inconsistent, or the configuration mode of the opposite port is unknown. The local port configuration mode remains unchanged; or, when the physical state of the local port is DOWN and the opposite port configuration mode is unknown, the local port configuration mode is modified in the reverse direction, including: When the local port configuration mode is self-adaptive, modify it to mandatory; when the local port configuration mode is mandatory, modify it to self-adaptive; or, when the physical state of the local port is DOWN, the consistency is When they are inconsistent, modify the local port configuration mode to the opposite port configuration mode; or, when the physical state of the local port is DOWN and the consistency is consistent, keep the local port configuration The mode remains unchanged.
在一实施方式中,所述设置单元,还用于当所述本端端口的物理状态为UP、所述一致性为不一致时,在保持所述本端端口配置模式不变之后,启动定时器T3,监控所述本端端口的物理状态;当所述T3超时前,所述本端端口的物理状态保持为UP时,发送第一通知消息,用于通知所述本端端口配置模式与所述对端端口配置模式不一致;或者,当所述T3超时前,所述本端端口的物理状态抖动时,发送第一告警消息,用于告警所述本端端口的物理状态不稳定且所述本端端口配置模式与对端端口配置模式不一致;或者,当所述T3超时前,所述本端端口的物理状态变为DOWN时,则再次根据所述本端端口的物理状态和所述一致性,设置所述本端端口配置模式。In one embodiment, the setting unit is further configured to start a timer after keeping the local port configuration mode unchanged when the physical state of the local port is UP and the consistency is inconsistent T3: monitor the physical state of the local port; when the physical state of the local port remains UP before the T3 times out, send a first notification message for notifying the local port configuration mode and all The configuration mode of the opposite port is inconsistent; or, when the physical state of the local port jitters before the T3 timeout, a first alarm message is sent to alert that the physical state of the local port is unstable and the The local port configuration mode is inconsistent with the opposite port configuration mode; or, when the physical state of the local port changes to DOWN before the T3 timeout, the physical state of the local port is again consistent with the , Set the local port configuration mode.
在一实施方式中,所述设置单元,还用于当所述本端端口的物理状态为DOWN,所述对端端口配置模式为未知时,在反向修改所述本端端口配置模式之后,该方法还包括:启动定时器T3,监控所述本端端口的物理状态;当所述T3超时前,所述本端端口的物理状态保持为DOWN时,再次反向修改所述本端端口配置模式,并发送第二告警消息,用于告警所述本端端口的物理状态异常且所述本端端口配置模式与对端端口配置模式不一致;或者,当所述T3超时前,所述本端端口的物理状态抖动时,再次反向修改所述本端端口配置模式,并发送第三告警消息,用于告警所述本端端口的物理状态不稳定且所述本端端口配置模式与对端端口配置模式不一致;或者,当所述T3超时前,所述本端端口的物理状态变为UP时,发送第二通知消息,用于通知所述本端端口配置模式已修改,且与所述本端端口配置模式与对端端口配置模式不一致。In an embodiment, the setting unit is further configured to, when the physical state of the local port is DOWN and the configuration mode of the opposite port is unknown, after the local port configuration mode is reversed modified, The method further includes: starting a timer T3 to monitor the physical state of the local port; when the physical state of the local port remains DOWN before the T3 times out, modifying the local port configuration in the reverse direction again Mode, and send a second alarm message to alert that the physical state of the local port is abnormal and the local port configuration mode is inconsistent with the opposite port configuration mode; or, before the T3 timeout, the local port When the physical state of the port jitters, the local port configuration mode is modified again in the reverse direction, and a third alarm message is sent to warn that the physical state of the local port is unstable and the local port configuration mode and the opposite The port configuration mode is inconsistent; or, when the physical state of the local port becomes UP before the T3 timeout, a second notification message is sent to notify that the local port configuration mode has been modified and is consistent with the The configuration mode of the local port is inconsistent with the configuration mode of the opposite port.
在一实施方式中,所述设置单元,还用于当所述本端端口的物理状态为DOWN且所述一致性为一致时,在保持所述本端端口配置模式不变之后,启动计数器N,N初始化为0,重启所述本端端口,并启动定时器T4,检测所述本端端口的物理状态;若所述本端端口的物理状态为UP,则停止对所述本端端口的操作;若所述本端端口的物理状态为DOWN,T4超期后,再次重启所述本端端口,检测所述本端端口的物理状态,且N=N+1;当N达到阈值后,停止对所述本端端口的操作。In an embodiment, the setting unit is further configured to start the counter N after keeping the local port configuration mode unchanged when the physical state of the local port is DOWN and the consistency is consistent. , N is initialized to 0, restart the local port, and start timer T4 to detect the physical state of the local port; if the physical state of the local port is UP, stop the local port Operation; if the physical status of the local port is DOWN, after T4 expires, restart the local port again, detect the physical state of the local port, and N=N+1; when N reaches the threshold, stop Operations on the local port.
在一实施方式中,该装置还包括:预测单元,用于在比较本端端口配置模式与预测的对端端口配置模式的一致性之前,检测所述本端端口接收的所述对端端口发送的特征码流;当所述特征码流值为/C/帧时,预测所述对端端口配置模式为自适应;当所述特征码流值为/I/帧时,预测所述对端端口配置模式为强制;当所述检测无效时,预测所述对 端端口配置模式为未知。In an embodiment, the device further includes: a prediction unit, configured to detect that the local port receives the transmission from the opposite port before comparing the local port configuration mode with the predicted counterpart port configuration mode. When the characteristic code stream value is /C/frame, predict that the opposite port configuration mode is adaptive; when the characteristic code stream value is /I/frame, predict the opposite end The port configuration mode is mandatory; when the detection is invalid, it is predicted that the peer port configuration mode is unknown.
在一实施方式中,所述预测单元,还用于在检测所述本端端口接收的所述对端端口发送的特征码流之前,启动定时器T2;所述定时器T2超时前,所述特征码流值保持稳定时,根据所述特征码流值预测所述对端端口配置模式;所述特征码流值不稳定时,表示检测无效;所述定时器T2超时后,重启所述定时器T2,重新检测所述特征码流。In an embodiment, the prediction unit is further configured to start a timer T2 before detecting the feature code stream sent by the opposite port received by the local port; before the timer T2 expires, the When the characteristic code stream value remains stable, predict the configuration mode of the opposite port according to the characteristic code stream value; when the characteristic code stream value is unstable, it indicates that the detection is invalid; after the timer T2 expires, restart the timing T2, re-detect the feature code stream.
在一实施方式中,在所述T2内,检测所述特征码流的次数大于等于3。In one embodiment, in the T2, the number of times of detecting the feature code stream is greater than or equal to 3.
在一实施方式中,该装置还包括判断单元,所述判断单元,用于在根据所述本端端口的物理状态和所述一致性,设置所述本端端口配置模式之前,检测所述本端端口的有效状态;根据所述本端端口的有效状态判断所述本端端口的物理状态,包括:当所述本端端口的有效状态为UP,则判断所述本端端口的物理状态为UP,当所述本端端口的有效状态为DOWN,则判断所述本端端口的物理状态为DOWN。In an embodiment, the device further includes a judging unit configured to detect the local port before setting the local port configuration mode according to the physical state of the local port and the consistency. The effective state of the end port; judging the physical state of the local port according to the effective state of the local port, including: when the effective state of the local port is UP, then judging the physical state of the local port as UP: When the effective state of the local port is DOWN, it is determined that the physical state of the local port is DOWN.
在一实施方式中,所述判断单元,还用于在检测所述本端端口的有效状态之前,启动定时器T1;在定时器T1超时前,所述本端端口的有效状态保持稳定时,则根据所述本端端口的有效状态判断所述本端端口的物理状态;所述述本端端口的有效状态不稳定时,检测无效。In an embodiment, the judgment unit is further configured to start a timer T1 before detecting the effective state of the local port; before the timer T1 expires, when the effective state of the local port remains stable, Then the physical state of the local port is judged according to the effective state of the local port; when the effective state of the local port is unstable, the detection is invalid.
在一实施方式中,在所述T1内,检测所述本端端口的有效状态的次数大于等于3。In an embodiment, in the T1, the number of times of detecting the valid state of the local port is greater than or equal to 3.
在一实施方式中,所述通知消息或告警消息中携带所述本端端口的地理位置和/或所述对端端口的地理位置。In an embodiment, the notification message or the alarm message carries the geographic location of the local port and/or the geographic location of the opposite port.
本文实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有信息处理程序,所述信息处理程序被处理器执行时上述任一项所述管理端口配置模式的方法的步骤。The embodiments herein also provide a computer-readable storage medium having an information processing program stored on the computer-readable storage medium, and the method for managing port configuration mode described in any of the above items when the information processing program is executed by a processor A step of.
与现有技术相比,本文实施例提供的技术方案,能够对本端端口配置模式进行自动设置,保证网络设备业务的稳定。Compared with the prior art, the technical solution provided by the embodiments of this document can automatically set the local port configuration mode to ensure the stability of the network equipment service.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信 介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。A person of ordinary skill in the art can understand that all or some of the steps, functional modules/units in the system, and apparatus in the methods disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may consist of several physical components. The components are executed cooperatively. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, and the computer-readable medium may include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile memory implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Flexible, removable and non-removable media. Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, tape, magnetic disk storage or other magnetic storage device, or Any other medium used to store desired information and that can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media .

Claims (15)

  1. 一种管理端口配置模式的方法,包括:A method for managing port configuration mode, including:
    比较本端端口配置模式与预测的对端端口配置模式的一致性;Compare the consistency between the local port configuration mode and the predicted peer port configuration mode;
    根据所述本端端口的物理状态和所述一致性,设置所述本端端口配置模式。Set the local port configuration mode according to the physical state of the local port and the consistency.
  2. 根据权利要求1所述的方法,其中,The method of claim 1, wherein:
    所述本端端口配置模式为自适应或强制;所述对端端口配置模式为未知、自适应或强制;所述本端端口的物理状态为正常UP或故障DOWN。The local port configuration mode is adaptive or mandatory; the opposite port configuration mode is unknown, adaptive or mandatory; the physical state of the local port is normal UP or failure DOWN.
  3. 根据权利要求2所述的方法,其中,所述根据所述本端端口的物理状态和所述一致性,设置所述本端端口配置模式,包括:The method according to claim 2, wherein the setting the local port configuration mode according to the physical state of the local port and the consistency comprises:
    当所述本端端口的物理状态为UP,无论所述一致性为一致或不一致,或所述对端端口配置模式为未知时,保持所述本端端口配置模式不变;When the physical state of the local port is UP, regardless of whether the consistency is consistent or inconsistent, or the opposite port configuration mode is unknown, keep the local port configuration mode unchanged;
    或者,当所述本端端口的物理状态为DOWN,所述对端端口配置模式为未知时,反向修改所述本端端口配置模式,包括:当所述本端端口配置模式为自适应时,修改为强制,当所述本端端口配置模式为强制时,修改为自适应;Alternatively, when the physical state of the local port is DOWN and the configuration mode of the opposite port is unknown, the reverse modification of the local port configuration mode includes: when the local port configuration mode is adaptive , Modify to mandatory, when the local port configuration mode is mandatory, modify to adaptive;
    或者,当所述本端端口的物理状态为DOWN,所述一致性为不一致时,将所述本端端口配置模式修改为所述对端端口配置模式;Or, when the physical state of the local port is DOWN and the consistency is inconsistent, modify the local port configuration mode to the opposite port configuration mode;
    或者,当所述本端端口的物理状态为DOWN且所述一致性为一致时,保持所述本端端口配置模式不变。Or, when the physical state of the local port is DOWN and the consistency is consistent, the local port configuration mode is kept unchanged.
  4. 根据权利要求3所述的方法,其中,The method of claim 3, wherein:
    当所述本端端口的物理状态为UP、所述一致性为不一致时,在保持所述本端端口配置模式不变之后,该方法还包括:When the physical state of the local port is UP and the consistency is inconsistent, after keeping the local port configuration mode unchanged, the method further includes:
    启动定时器T3,监控所述本端端口的物理状态;以及Start timer T3 to monitor the physical state of the local port; and
    当所述T3超时前,所述本端端口的物理状态保持为UP时,发送第一通知消息,用于通知所述本端端口配置模式与所述对端端口配置模式不一致;When the physical state of the local port remains UP before the T3 timeout, a first notification message is sent to notify that the local port configuration mode is inconsistent with the opposite port configuration mode;
    或者,当所述T3超时前,所述本端端口的物理状态抖动时,发送第一告警消息,用于告警所述本端端口的物理状态不稳定且所述本端端口配置模式与对端端口配置模式不一致;Or, when the physical state of the local port jitters before the T3 timeout, a first alarm message is sent to alert that the physical state of the local port is unstable and the local port configuration mode is different from that of the opposite end. The port configuration mode is inconsistent;
    或者,当所述T3超时前,所述本端端口的物理状态变为DOWN时,则再次根据所 述本端端口的物理状态和所述一致性,设置所述本端端口配置模式。Or, when the physical state of the local port becomes DOWN before the T3 timeout, the local port configuration mode is set again according to the physical state of the local port and the consistency.
  5. 根据权利要求3所述的方法,其中,The method of claim 3, wherein:
    当所述本端端口的物理状态为DOWN,所述对端端口配置模式为未知时,在反向修改所述本端端口配置模式之后,该方法还包括:When the physical state of the local port is DOWN and the configuration mode of the opposite port is unknown, after the local port configuration mode is modified in the reverse direction, the method further includes:
    启动定时器T3,监控所述本端端口的物理状态;以及Start timer T3 to monitor the physical state of the local port; and
    当所述T3超时前,所述本端端口的物理状态保持为DOWN时,再次反向修改所述本端端口配置模式,并发送第二告警消息,用于告警所述本端端口的物理状态异常且所述本端端口配置模式与对端端口配置模式不一致;When the physical state of the local port remains DOWN before the T3 timeout, the configuration mode of the local port is modified again in the reverse direction, and a second alarm message is sent to alert the physical state of the local port Abnormal and the local port configuration mode is inconsistent with the opposite port configuration mode;
    或者,当所述T3超时前,所述本端端口的物理状态抖动时,再次反向修改所述本端端口配置模式,并发送第三告警消息,用于告警所述本端端口的物理状态不稳定且所述本端端口配置模式与对端端口配置模式不一致;Or, when the physical state of the local port jitters before the T3 timeout, the local port configuration mode is modified again in the reverse direction, and a third alarm message is sent to alert the physical state of the local port Unstable and the local port configuration mode is inconsistent with the opposite port configuration mode;
    或者,当所述T3超时前,所述本端端口的物理状态变为UP时,发送第二通知消息,用于通知所述本端端口配置模式已修改,且与所述本端端口配置模式与对端端口配置模式不一致。Or, when the physical state of the local port changes to UP before the T3 timeout, a second notification message is sent to notify that the local port configuration mode has been modified, and is consistent with the local port configuration mode Inconsistent with the configuration mode of the opposite port.
  6. 根据权利要求3所述的方法,其中,The method of claim 3, wherein:
    当所述本端端口的物理状态为DOWN且所述一致性为一致时,在保持所述本端端口配置模式不变之后,该方法还包括:When the physical state of the local port is DOWN and the consistency is consistent, after keeping the local port configuration mode unchanged, the method further includes:
    启动计数器N,N初始化为0,重启所述本端端口,并启动定时器T4,检测所述本端端口的物理状态:Start the counter N, initialize N to 0, restart the local port, and start the timer T4 to detect the physical state of the local port:
    若所述本端端口的物理状态为UP,则停止对所述本端端口的操作;If the physical status of the local port is UP, stop operations on the local port;
    若所述本端端口的物理状态为DOWN,T4超期后,再次重启所述本端端口,检测所述本端端口的物理状态,且N=N+1;当N达到阈值后,停止对所述本端端口的操作。If the physical status of the local port is DOWN, after T4 expires, restart the local port again, detect the physical status of the local port, and N=N+1; when N reaches the threshold, stop the communication Describe the operation of the local port.
  7. 根据权利要求1所述的方法,其中,在比较本端端口配置模式与预测的对端端口配置模式的一致性之前,该方法还包括:The method according to claim 1, wherein, before comparing the consistency of the local port configuration mode with the predicted counterpart port configuration mode, the method further comprises:
    检测所述本端端口接收的所述对端端口发送的特征码流;Detecting the feature code stream sent by the opposite port received by the local port;
    当所述特征码流值为/C/帧时,预测所述对端端口配置模式为自适应;When the characteristic code stream value is /C/frame, predict that the opposite port configuration mode is adaptive;
    当所述特征码流值为/I/帧时,预测所述对端端口配置模式为强制;When the characteristic code stream value is /I/frame, predict that the opposite port configuration mode is mandatory;
    当所述检测无效时,预测所述对端端口配置模式为未知。When the detection is invalid, it is predicted that the opposite port configuration mode is unknown.
  8. 根据权利要求7所述的方法,其中,The method according to claim 7, wherein:
    在检测所述本端端口接收的所述对端端口发送的特征码流之前,该方法还包括:启动定时器T2;Before detecting the feature code stream sent by the opposite port and received by the local port, the method further includes: starting a timer T2;
    在所述定时器T2超时前,所述特征码流值保持稳定时,根据所述特征码流值预测所述对端端口配置模式;所述特征码流值不稳定时,表示检测无效;Before the timer T2 expires, when the characteristic code stream value remains stable, predict the peer port configuration mode according to the characteristic code stream value; when the characteristic code stream value is unstable, it indicates that the detection is invalid;
    在所述定时器T2超时后,重启所述定时器T2,重新检测所述特征码流。After the timer T2 expires, the timer T2 is restarted, and the signature stream is detected again.
  9. 根据权利要求8所述的方法,其中,The method according to claim 8, wherein:
    在所述T2内,检测所述特征码流的次数大于等于3。In the T2, the number of times of detecting the feature code stream is greater than or equal to 3.
  10. 根据权利要求1所述的方法,其中,在根据所述本端端口的物理状态和所述一致性,设置所述本端端口配置模式之前,该方法还包括:The method according to claim 1, wherein, before setting the local port configuration mode according to the physical state of the local port and the consistency, the method further comprises:
    检测所述本端端口的有效状态;Detecting the effective state of the local port;
    根据所述本端端口的有效状态判断所述本端端口的物理状态,包括:当所述本端端口的有效状态为UP,则判断所述本端端口的物理状态为UP,当所述本端端口的有效状态为DOWN,则判断所述本端端口的物理状态为DOWN。Judging the physical state of the local port according to the effective state of the local port includes: when the effective state of the local port is UP, judging that the physical state of the local port is UP, when the local port If the effective state of the end port is DOWN, it is determined that the physical state of the local port is DOWN.
  11. 根据权利要求10所述的方法,其中,在检测所述本端端口的有效状态之前,该方法还包括:启动定时器T1;The method according to claim 10, wherein before detecting the valid state of the local port, the method further comprises: starting a timer T1;
    在定时器T1超时前,所述本端端口的有效状态保持稳定时,则根据所述本端端口的有效状态判断所述本端端口的物理状态;所述述本端端口的有效状态不稳定时,检测无效。Before the timer T1 expires, when the effective state of the local port remains stable, the physical state of the local port is determined according to the effective state of the local port; the effective state of the local port is unstable When the test is invalid.
  12. 根据权利要求11所述的方法,其中,The method of claim 11, wherein:
    在所述T1内,检测所述本端端口的有效状态的次数大于等于3。In the T1, the number of times of detecting the valid state of the local port is greater than or equal to 3.
  13. 根据权利要求4或5所述的方法,其中,The method of claim 4 or 5, wherein:
    所述通知消息或告警消息中携带所述本端端口的地理位置和/或所述对端端口的地理位置。The notification message or the alarm message carries the geographic location of the local port and/or the geographic location of the opposite port.
  14. 一种管理端口配置模式的装置,其中,包括:A device for managing port configuration mode, including:
    比较单元,用于比较本端端口配置模式与预测的对端端口配置模式的一致性;The comparison unit is used to compare the consistency of the local port configuration mode with the predicted counterpart port configuration mode;
    设置单元,用于根据所述本端端口的物理状态和所述一致性,设置所述本端端口配置模式。The setting unit is configured to set the local port configuration mode according to the physical state of the local port and the consistency.
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有信息处理程序,所述信息处理程序被处理器执行时实现如权利要求1至13中任一项所述管理端口配置模式的方法的步骤。A computer-readable storage medium, wherein an information processing program is stored on the computer-readable storage medium, and when the information processing program is executed by a processor, the management port configuration according to any one of claims 1 to 13 is realized Pattern method steps.
PCT/CN2020/092097 2019-05-24 2020-05-25 Method and device for managing port configuration mode WO2020238848A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910440079.2 2019-05-24
CN201910440079.2A CN111988162B (en) 2019-05-24 2019-05-24 Method and device for managing port configuration mode

Publications (1)

Publication Number Publication Date
WO2020238848A1 true WO2020238848A1 (en) 2020-12-03

Family

ID=73436710

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/092097 WO2020238848A1 (en) 2019-05-24 2020-05-25 Method and device for managing port configuration mode

Country Status (2)

Country Link
CN (1) CN111988162B (en)
WO (1) WO2020238848A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110838933A (en) * 2018-08-17 2020-02-25 上海华为技术有限公司 Configuration method of Ethernet optical port and Ethernet equipment
CN116300780A (en) * 2022-09-07 2023-06-23 广州汽车集团股份有限公司 Component configuration method, device, electronic equipment and storage medium
EP4216500A1 (en) * 2022-01-20 2023-07-26 Nvidia Corporation Mechanism to identify link down reasons

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112491632A (en) * 2020-12-15 2021-03-12 安徽皖通邮电股份有限公司 System and method for automatically adjusting Ethernet port negotiation mode

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1835466A (en) * 2005-03-16 2006-09-20 华为技术有限公司 Kilomega Ethernet port butt method
CN1893420A (en) * 2005-07-06 2007-01-10 华为技术有限公司 Ethernet interface butt-jointing method
US9172602B1 (en) * 2012-11-15 2015-10-27 Qlogic, Corporation Method and system for auto-negotiation

Family Cites Families (4)

* 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
CN101252532B (en) * 2008-03-18 2010-08-25 华为技术有限公司 Equipment and method for collocating Ethernet link polymerization terminal port
CN104796306B (en) * 2015-03-26 2018-11-27 新华三技术有限公司 A kind of port mode machinery of consultation and equipment
CN109714276A (en) * 2019-03-11 2019-05-03 盛科网络(苏州)有限公司 A kind of method of adaptive remote equipment negotiation mode

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1835466A (en) * 2005-03-16 2006-09-20 华为技术有限公司 Kilomega Ethernet port butt method
CN1893420A (en) * 2005-07-06 2007-01-10 华为技术有限公司 Ethernet interface butt-jointing method
US9172602B1 (en) * 2012-11-15 2015-10-27 Qlogic, Corporation Method and system for auto-negotiation

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110838933A (en) * 2018-08-17 2020-02-25 上海华为技术有限公司 Configuration method of Ethernet optical port and Ethernet equipment
EP4216500A1 (en) * 2022-01-20 2023-07-26 Nvidia Corporation Mechanism to identify link down reasons
US11799953B2 (en) 2022-01-20 2023-10-24 Nvidia Corporation Mechanism to identify link down reasons
CN116300780A (en) * 2022-09-07 2023-06-23 广州汽车集团股份有限公司 Component configuration method, device, electronic equipment and storage medium
CN116300780B (en) * 2022-09-07 2024-01-23 广州汽车集团股份有限公司 Component configuration method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111988162B (en) 2022-11-29
CN111988162A (en) 2020-11-24

Similar Documents

Publication Publication Date Title
WO2020238848A1 (en) Method and device for managing port configuration mode
US8576698B2 (en) Connectivity fault management timeout period control
CN101345663B (en) Heartbeat detection method and heartbeat detection apparatus
CN106330475B (en) Method and device for managing main and standby nodes in communication system and high-availability cluster
CN109413612A (en) A kind of communication connection method for building up and equipment
CN103812675A (en) Method and system for realizing allopatric disaster recovery switching of service delivery platform
WO2008031347A1 (en) Method and apparatus for realizing protection switching in the ring ethernet
US11582706B2 (en) Determine abnormal clock
CN110351127B (en) Graceful restart method, device and system
WO2016095344A1 (en) Link switching method and device, and line card
CN110912815B (en) Network element ring formation preventing method, device, equipment and readable storage medium
WO2020119400A1 (en) Failure processing method and apparatus, and storage medium
US10721135B1 (en) Edge computing system for monitoring and maintaining data center operations
WO2017036165A1 (en) Link fault detection method and apparatus
WO2016065751A1 (en) Method for recovering link communication, service line card and system
WO2016184222A1 (en) Failure detecting method and device
CN114567536B (en) Abnormal data processing method, device, electronic equipment and storage medium
CN106330537B (en) SDN network equipment control surface management device and method
CN111224803B (en) Multi-master detection method in stacking system and stacking system
WO2021098477A1 (en) Signal degradation processing method, apparatus and system
JP6057470B2 (en) Network alarm processing system
CN108206823A (en) A kind of method and the network equipment for handling message
US9608719B2 (en) Optical network connection termination on client facility failure
WO2012022150A1 (en) Method, system and apparatus for fault alarm
JP6591828B2 (en) Relay device and relay system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20813080

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20813080

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20813080

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24.05.22)

122 Ep: pct application non-entry in european phase

Ref document number: 20813080

Country of ref document: EP

Kind code of ref document: A1