CN115361306A - Port state reporting method and switch - Google Patents

Port state reporting method and switch Download PDF

Info

Publication number
CN115361306A
CN115361306A CN202210939929.5A CN202210939929A CN115361306A CN 115361306 A CN115361306 A CN 115361306A CN 202210939929 A CN202210939929 A CN 202210939929A CN 115361306 A CN115361306 A CN 115361306A
Authority
CN
China
Prior art keywords
port
switch
state
processor
ports
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210939929.5A
Other languages
Chinese (zh)
Other versions
CN115361306B (en
Inventor
许丹
陈勇
齐达
陈海粟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202210939929.5A priority Critical patent/CN115361306B/en
Publication of CN115361306A publication Critical patent/CN115361306A/en
Application granted granted Critical
Publication of CN115361306B publication Critical patent/CN115361306B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Small-Scale Networks (AREA)

Abstract

The embodiment of the application provides a port state reporting method and a switch, wherein the switch comprises a first processor, a second processor and a plurality of switch ports, the designated switch port is connected with a chip port of the second processor, other switch ports are used for being connected with other equipment, and the designated switch port is a destination port of the other switch ports; other switch ports guide the received code stream to the appointed switch port; appointing a switch port to guide the code stream to a second processor; the second processor trains the chip port by using the code stream to obtain the port state of the chip port, takes the port state of the chip port as the port state of the other switch ports, and reports the port state of the other switch ports to the first processor; the first processor performs the corresponding processing operation. By applying the technical scheme provided by the embodiment of the application, the automatic reporting of the port state can be realized, and the application range of the ultra-low delay switch is expanded.

Description

Port state reporting method and switch
Technical Field
The present application relates to the field of communications technologies, and in particular, to a port state reporting method and a switch.
Background
The ultra-low delay switch has only one layer of forwarding function, and can realize the ultra-low delay forwarding function of the message. However, the ultra-low delay switch has the advantages of extremely simple function and extremely low delay, and also has the defect that the switch cannot process messages, which causes that when the port is connected or disconnected with a tester or other equipment, the port of the ultra-low delay switch cannot report the port state, such as on (Up) and off (Down), so that the use of the ultra-low delay switch is limited.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method for reporting a port state and a switch, so as to implement automatic reporting of a port state and expand a use range of an ultra-low latency switch. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a switch, where the switch includes a first processor, a second processor, and a plurality of switch ports, a designated switch port of the plurality of switch ports is connected to a chip port of the second processor, other switch ports except the designated switch port are used for being connected to other devices, and the designated switch port is a destination port of the other switch ports;
the other switch ports are used for guiding the received code stream to the appointed switch ports according to the appointed switch ports as the destination ports of the other switch ports;
the appointed switch port is used for guiding the code stream to the second processor by being connected with the chip port;
the second processor is configured to train the chip port by using the code stream to obtain a port state of the chip port, use the port state of the chip port as a port state of the other switch ports, and report the port state of the other switch ports to the first processor;
the first processor is configured to execute a processing operation corresponding to a port state of the other switch port.
In some embodiments, the switch further comprises indicator lights in one-to-one correspondence with the plurality of switch ports;
the first processor is specifically configured to:
if the port state of the other switch ports is an Up state, lightening indicator lamps corresponding to the other switch ports;
and if the port states of the other switch ports are the Down state, turning off the indicating lamps corresponding to the other switch ports.
In some embodiments, the first processor is further configured to:
selecting the appointed switch port from the plurality of switch ports, and connecting the appointed switch port with a chip port of the second processor;
and connecting the specified switch port with the chip port to perform software recording.
In some embodiments, the first processor is further configured to:
polling and detecting whether each port of the other switches meets an automatic state reporting condition; if yes, configuring a destination port of the other switch ports as a designated switch port; if not, the other switch ports are set to the Down state.
In some embodiments, the automatic status reporting condition includes one or more of no cancellation of port shutdown configuration, optical module in place, and port type configured;
the first processor is specifically configured to:
when the automatic state reporting condition comprises that the port closing configuration is not cancelled, polling and detecting whether each other switch port has the port closing configuration cancellation or not; if not, configuring a destination port of the other switch ports as a designated switch port; if yes, setting the other switch ports to be in a Down state;
when the automatic state reporting condition comprises that the optical module is in place, polling and detecting whether the optical module of each other switch port is in place; if the switch is in place, configuring a destination port of the other switch ports as the appointed switch port; if not, setting the other switch ports to be in a Down state;
when the automatic state reporting condition comprises a configured port type, polling and detecting whether each port of the other switches is configured with the port type; if the port type is configured, configuring a destination port of the other switch ports as the appointed switch port; if the port type is not configured, the other switch ports are set to a Down state.
In some embodiments, the first processor is further configured to:
before setting the ports of the other switches to be in a Down state, detecting whether the ports of the other switches in the software record are in an Up state; and if the state is in the Up state, executing the step of setting the other switch ports to be in the Down state, and recording the software of the other switch ports in the Down state.
In a second aspect, an embodiment of the present application provides a port status reporting method, which is applied to a switch, where the switch includes a first processor, a second processor, and multiple switch ports, a designated switch port of the multiple switch ports is connected to a chip port of the second processor, and other switch ports except the designated switch port are used for being connected to other devices, and the designated switch port is a destination port of the other switch ports; the method comprises the following steps:
the other switch ports guide the received code stream to the appointed switch port according to the software record of the appointed switch port as the destination port of the other switch ports;
the appointed switch port is connected with the chip port to guide the code stream to the second processor;
the second processor trains the chip port by using the code stream to obtain the port state of the chip port, takes the port state of the chip port as the port state of the other switch ports, and reports the port state of the other switch ports to the first processor;
the first processor performs processing operations corresponding to port states of the other switch ports.
In some embodiments, the switch further comprises indicator lights in one-to-one correspondence with the plurality of switch ports;
the step of executing the processing operation corresponding to the port state of the other switch port includes:
if the port state of the other switch ports is an Up state, lightening indicator lamps corresponding to the other switch ports;
and if the port states of the other switch ports are the Down state, turning off the indicating lamps corresponding to the other switch ports.
In some embodiments, the method further comprises:
selecting the appointed switch port from the plurality of switch ports, and connecting the appointed switch port with a chip port of the second processor;
and connecting the specified switch port with the chip port to perform software recording.
In some embodiments, the method further comprises:
the first processor polls and detects whether each port of the other switches meets an automatic state reporting condition or not; and if so, configuring one destination port of the other switch ports as the designated switch port.
In some embodiments, the automatic status reporting condition includes one or more of no cancellation of port shutdown configuration, optical module in place, and port type configured;
the step of polling and detecting whether each of the other switch ports meets the automatic status reporting condition includes:
when the automatic state reporting condition comprises that the port closing configuration is not cancelled, polling and detecting whether each other switch port has the port closing configuration cancellation or not; if not, determining that the other switch ports meet the automatic state reporting condition; if yes, determining that the other switch ports do not meet the automatic state reporting condition;
when the automatic state reporting condition comprises that the optical module is in place, polling and detecting whether the optical module of each other switch port is in place; if the switch is in place, determining that the other switch ports meet the automatic state reporting condition; if not, determining that the other switch ports do not meet the automatic state reporting condition;
when the automatic state reporting condition comprises a configured port type, polling and detecting whether each port of the other switches is configured with the port type; if the port type is configured, determining that the other switch ports meet the automatic state reporting condition; if the port type is not configured, determining that the other switch ports do not meet the automatic state reporting condition.
In some embodiments, the method further comprises:
the first processor detects whether the other switch ports in the software record are in an Up state or not; and if the state is in the Up state, executing the step of setting the other switch ports to be in the Down state, and recording the software of the other switch ports in the Down state.
The embodiment of the application has the following beneficial effects:
in the technical solution provided in the embodiment of the present application, a second processor is introduced into a switch, a designated switch port of the switch is fixedly connected to a chip port of the second processor, and destination ports of other switch ports except the designated switch port are all configured with a port to the designated switch port. Therefore, after one switch port receives the code stream, the designated switch port is the destination port of the switch port, so that the code stream received by the switch port can be introduced into the designated switch port, and the designated switch port is fixedly connected with the chip port, so that the code stream received by the switch port can enter the second processor through the designated switch port and the chip port. The second processor trains the chip port based on the entered code stream, so that the port state of the chip port can be obtained, and the code stream for training the chip port comes from one switch port, so that the port state of the chip port indirectly reflects the port state of the switch port. At this time, the second processor reports the port state of the switch port to the first processor, which realizes the automatic reporting of the port state, and further facilitates the first processor to execute corresponding processing operation, thus, when the switch is an ultra-low-delay switch, the application range of the ultra-low-delay switch is expanded.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the description below are only some embodiments of the present application, and other embodiments can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic diagram of an ultra-low latency switch in the related art;
fig. 2 is a schematic structural diagram of a switch according to an embodiment of the present application;
fig. 3 is a schematic diagram of an automatic port status reporting process according to an embodiment of the present application;
fig. 4 is a schematic diagram of a port status reporting method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application are within the scope of protection of the present application.
At present, the demand of high-frequency trading in the financial security industry is increasingly strong, and the well-blowout type demand of an extremely-fast trading system consisting of ultra-low time delay switches is increased. Under the background of the demand, the ultra-low delay switch is developed by the advantages of extremely low delay, extremely simple function and the like. The ultra-low time delay exchanger only has a layer of forwarding function and can realize ultra-low time delay forwarding. The structure of the ultra-low latency switch is shown in fig. 1, and includes a plurality of switch ports, such as Small Form-factor plug (SFP) + ports.
The ultra-low delay switch has the advantages of extremely simple function and extremely low delay, and simultaneously has the defect that messages cannot be processed, so that when the port is connected with a tester or other equipment, the port of the ultra-low delay switch cannot report Up, and when the port is disconnected with the tester or other equipment, the port of the ultra-low delay switch cannot report Down, so that a user cannot judge whether the port of the ultra-low delay switch is normally connected or not and is normally used, and the use of the ultra-low delay switch is limited.
In order to solve the technical problems in the related art, implement automatic reporting of a port state, and expand the application range of an ultra-low latency switch, an embodiment of the present application provides a switch, as shown in fig. 2. The switch comprises a first processor 21, a second processor 22 and a plurality of switch ports 23, wherein a designated switch port in the switch ports 23 is connected with a chip port of the second processor 22, other switch ports except the designated switch port are used for being connected with other equipment, and the designated switch port is a destination port of the other switch ports.
In the embodiment of the present application, the switch port may be implemented by an SPF port or an SFP + port. The switch port is designated as any one, and for the convenience of understanding, other switch ports are simply referred to as panel ports. The switch provided by the embodiment of the application can be an ultra-low time delay switch, and the switch comprises a plurality of panel ports. The switch stores a software record, and the software record may include a destination port that designates the switch port as a panel port, that is, records that the designated switch port is connected to a chip port of the second processor 22. The software record may also include, without limitation, the port status of each panel port. The port state includes an Up state, a Down state, and the like.
The first processor 21 may be the same as the processor in the ultra low latency switch in the related art. The second Processor 22 may be implemented by a Pipe chip or a Network Processor (NP) chip, or other chips, which is not limited in this respect. The second processor 22 and the first processor 21 may be installed on the same switch or different switches, which is not limited to this, and the second processor 22 and the first processor 21 may directly communicate via a serial bus or may communicate via a parallel bus, which is not limited to this.
Each panel port is used for guiding the received code stream to the appointed switch port according to the appointed switch port as the destination port of the panel port.
And the appointed switch port is used for guiding the code stream to the second processor by being connected with the chip port.
The second processor 22 is configured to train the chip port by using the code stream to obtain a port state of the chip port, use the port state of the chip port as a port state of the panel port, and report the port state of the panel port to the first processor 21.
The first processor 21 is configured to perform a processing operation corresponding to a port state of the panel port.
In the technical solution provided in the embodiment of the present application, a second processor is introduced into a switch, a designated switch port of the switch is fixedly connected to a chip port of the second processor, and a destination port of a panel port other than the designated switch port is configured to the designated switch port. Therefore, after a panel port receives the code stream, the code stream received by the panel port is introduced to the designated switch port because the designated switch port is the destination port of the panel port. The code stream received by the panel port may be a code stream sent by a tester or other equipment connected to the panel port.
The appointed switch port is fixedly connected with the chip port of the second processor, so that after the appointed switch end receives the code stream from the panel port, the code stream can be sent to the second processor through the fixed connection between the appointed switch port and the chip port of the second processor.
The second processor trains the chip port based on the entered code stream, and the port state of the chip port can be obtained. Here, if the second processor successfully trains the chip port, the chip port Up obtains that the port state of the chip port is Up. The state is Up; if the second processor fails to train the chip port, the chip port cannot be Up, the chip port keeps Down, the panel port is considered to have no code stream, and the port state of the chip port is obtained as Down.
The code stream for training the chip port comes from the panel port, so the port state of the chip port indirectly reflects the port state of the panel port. At this time, the second processor may use the port state of the chip port as the port state of the panel port, and report the port state of the panel port to the first processor, which realizes automatic reporting of the port state of the panel port, and is further convenient for the first processor to execute corresponding processing operations, and when the switch is an ultra-low latency switch, the application range of the ultra-low latency switch is expanded.
In some embodiments, the switch may further include indicator lights in one-to-one correspondence with the plurality of switch ports. In this case, the first processor 21 may be specifically configured to: if the port state of the panel port is an Up state, an indicator lamp corresponding to the panel port is lightened; if the port state of the panel port is the Down state, the indicator light corresponding to the panel port is turned off.
In the embodiment of the present application, the first processor 21, under the condition of the panel port Up, lights the indicator light corresponding to the panel port; under the condition of the panel port Down, the indicator light corresponding to the panel port is turned off, the visibility of the port state is increased, and a user can visually judge whether the panel port is normally connected or not and whether the panel port is normally used or not, so that the ultra-low time delay switchboard is wider in orientation and has higher competitiveness.
In some embodiments, the first processor may be further configured to select a designated switch port from the plurality of switch ports, and connect the designated switch port with a chip port of the second processor; and connecting the appointed switch port with the chip port to perform software recording. Here, the information recorded by the software is that the switch port fixedly connected with the chip port of the second processor is a designated switch port.
In the embodiment of the application, before the code stream received by the panel port is introduced into the second processor and the port state is automatically reported to the first processor, the first processor selects any switch port as an appointed switch port, the appointed switch port is fixedly connected with the chip port of the second processor, in addition, the switch port fixedly connected with the chip port of the second processor is recorded as the appointed switch port by software, the purpose port of each panel port is conveniently configured with one part to the appointed switch port in a follow-up manner, the automatic reporting of the port state of the panel port is conveniently realized in the follow-up manner, and when the switch is an ultra-low-delay switch, the application range of the ultra-low-delay switch can be expanded.
In some embodiments, the first processor is further configured to poll to detect whether each panel port satisfies an automatic status reporting condition; if yes, configuring a destination port of the panel port as a designated switch port; if not, the panel port is set to the Down state.
In the embodiment of the application, the switch is preconfigured with an automatic state reporting condition and a monitoring task aiming at the port state. The automatic status reporting condition may include one or more of a lack of cancellation of port Down (Shut Down) configuration, an optical module presence, and a configuration of a port type. The port type may be a source port or a destination port.
The first processor executes a monitoring task to poll and detect each panel port, determine a port state of each panel port, and perform software recording on the port state of each panel port, which specifically may be: polling and detecting whether each panel port meets the automatic state reporting condition; if the automatic state reporting condition is met, configuring a destination port of the panel port to a designated switch port. If the polled panel port does not satisfy the automatic state reporting condition, the first processor can set the other switch ports to be in a Down state, and continuously poll and detect whether each panel port satisfies the automatic state reporting condition.
In this embodiment of the application, the first processor may start the monitoring task when the switch is initialized, or may start the monitoring task after receiving a monitoring instruction input by a user or sent by another device, which is not limited herein.
By applying the technical scheme provided by the embodiment of the application, the first processor can determine the port state of each panel port meeting the automatic state reporting condition in time, so as to realize the automatic reporting of the port state of the panel port, and when the switch is an ultra-low delay switch, the application range of the ultra-low delay switch is expanded.
In some embodiments, the automatic status reporting condition may include one or more of no Shut Down configuration, optical module presence, and port type configuration. In this case, the first processor 21 may specifically be configured to:
when the automatic state reporting condition comprises that the Shut Down configuration does not exist, polling and detecting whether each panel port has the Shut Down configuration or not; if the Shut Down configuration does not exist, configuring a destination port of the panel port as a specified switch port; if the Shut Down configuration exists, setting the panel port to the Down state;
when the automatic state reporting condition comprises that the optical module is in place, polling and detecting whether the optical module of each panel port is in place or not; if the optical module is in place, configuring a destination port of the panel port as a designated switch port; if the optical module is not in place, setting the panel port to be in a Down state;
when the automatic state reporting condition comprises a configured port type, polling and detecting whether each panel port is configured with the port type; if the port type is configured, configuring a destination port of the panel port as a specified switch port; if no port type is configured, the panel port is set to the Down state.
In the embodiment of the application, when the automatic state reporting condition only includes that the Shut Down configuration does not exist, the first processor polls and detects whether each panel port has the Shut Down configuration or not; if it is detected that a panel port is not configured with the Shut Down, it indicates that the panel port meets the automatic status reporting condition, and the first processor configures a destination port of the panel port as a designated switch port. If it is detected that one panel port has the Shut Down configuration, it indicates that the panel port does not satisfy the automatic status reporting condition, and the first processor may set the panel port to the Down state, and continue to poll to detect whether the next panel port has the Shut Down configuration.
In the embodiment of the application, the Shut Down configuration is added. By adding the Shut Down configuration, a user can more conveniently control the port, for example, for different ports, based on the Shut Down configuration, the user can control the port state Down through a command line, and the flexibility of a port state reporting scheme is improved.
In the embodiment of the present application, when the automatic status reporting condition only includes that the optical module is in place, the first processor 21 polls to detect whether the optical module of each panel port is in place; if the optical module of a panel port is detected to be in place, the panel port meets the automatic state reporting condition, and a first processor configures a destination port of the panel port as a designated switch port; if it is detected that an optical module of a panel port is not in place, it indicates that the panel port does not satisfy the automatic status reporting condition, and the first processor may set the panel port to a Down state and continue to poll to detect whether the optical module of the next panel port is in place.
In the embodiment of the present application, when the automatic status reporting condition only includes the configured port type, the first processor 21 polls to detect whether each panel port is configured with the port type; if the panel port is detected to be configured with the port type, the panel port meets the automatic state reporting condition, and the first processor configures a destination port of the panel port as a designated switch port.
If it is detected that one panel port is not configured with a port type, it indicates that the panel port does not satisfy the automatic status reporting condition, and the first processor may set the panel port to a Down state, and continue to poll to detect whether the next panel port is configured with a port type.
In the embodiment of the application, one or more automatic state reporting conditions can be flexibly configured on the switch, so that the flexibility of port state automatic reporting is improved.
When the switch is configured with a plurality of automatic status reporting conditions, such as 3 conditions of not canceling port closing configuration, optical module being in place, and port type being configured, the first processor 21 detects that a panel port simultaneously satisfies the 3 conditions, and then considers that the panel port satisfies the automatic status reporting conditions, and configures a destination port of the panel port as a designated switch port. Otherwise, setting the panel port to be in a Down state, and continuously polling to detect whether the next panel port meets the automatic state reporting condition. This can improve the reliability of port status automatic reporting. The sequence of the first processor for detecting that the panel port meets the reporting conditions of each automatic state is not limited.
In some embodiments, the first processor 21 may be specifically configured to:
before setting the panel port to the Down state, detecting whether the panel port is in the Up state in the software record; and if the state is Up, executing the step of setting the panel port to be Down state, and recording the software when the panel port is Down state. If the state is not Up, that is, down, no other processing is performed on the panel port.
In this embodiment, when it is determined that a panel port does not satisfy the automatic reporting condition, before the panel port is set to the Down state, the first processor 21 detects whether the panel port is in the Up state in the software record. If the panel port is in the Up state, the first processor 21 sets the panel port to the Down state, performs software recording on the panel port in the Down state, and continues to poll and detect the next panel port. If the panel port is in the Down state, the first processor 21 may keep the panel port in the Down state and perform no other processing on the panel port.
In the embodiment of the application, when the switch is provided with the indicator light, when the first processor detects that the panel port does not meet the automatic reporting condition, or the port state of the panel port reported by the second processor is Down, the panel port is set to be in the Down state, or the panel port is kept in the Down state, and meanwhile, the indicator light corresponding to the panel port can be turned off, so that the visibility of the port state is increased, and a user can intuitively judge whether the panel port is normally connected or not and normally used, so that the ultra-low delay switch is wider in face and has stronger competitiveness.
Taking the switch as an ultra-low latency switch as an example, the following describes in detail the flow for completing the automatic reporting of the port state by the switch according to the embodiment of the present application, with reference to the automatic reporting flow of the port state shown in fig. 3. In fig. 3, the first processor includes a plurality of ultra-low latency switch ports and the second processor includes a plurality of chip ports B.
The first processor selects one ultra-low-delay switch port, such as a port A, selects one chip port, such as a port B, and fixedly connects the port A with the port B. Here, port a is used in diversion. The first processor may record in software that port a is fixedly connected to port B. The ultra-low latency switch ports other than port a are referred to herein as panel ports.
Step S31, when the ultra-low latency switch is initialized, the first processor starts a monitoring task, polls all panel ports, and is configured to monitor port states of all panel ports, and records the port states of all panel ports by software.
Step S32, the first processor judges whether the polled panel port has a Shut Down configuration; if yes, the port Shut Down state is considered, and step S33 is executed; if not, step S35 is performed.
In the embodiment of the application, the increase of the Shut Down configuration judgment can facilitate the control of the port by a user, and for the unused port, the user can control the state of the port through a command line.
Step S33, the first processor judges whether the panel port recorded by the software is in an Up state; if it is Up state, go to step S34; if the state is not Up, that is, the panel port is Down, no other processing is performed on the panel port. Subsequently, the first processor may return to perform step S31, and poll and detect the next panel port.
And step S34, the first processor reports the panel port Down, turns off the light and records software. The method specifically comprises the following steps: the first processor sets the panel port to be in a Down state, performs software recording on the panel port in the Down state, and turns off the indicator lamp corresponding to the panel port. Subsequently, the first processor may return to perform step S31, and poll and detect the next panel port.
Step S35, the first processor judges whether the panel port has an optical module in place; if yes, executing step S36; if not, step S33 is executed.
Step S36, the first processor judges whether the panel port is configured with a port type; if the port type is not configured, step S33 is performed. And reporting the panel port without the configured port type. If the port type is configured, step S37 is performed.
In step S37, the first processor allocates a destination port of the panel port to port a. Thus, the code stream entering the panel port is introduced into the port A; and introducing the code stream into the second processor through the fixed connection of the port A and the port B.
And step S38, the second processor trains the port B by using the code stream. If the training is successful, the port B is in an Up state; if training fails, port B is in the Down state.
Step S39, the first processor judges whether the port B is in an Up state; if the port B is in the Up state, executing the step S310; if the port B is not in the Up state, i.e., the port B is in the Down state, step S33 is performed.
Step S310, the first processor reports the panel port Up and lights Up. The method specifically comprises the following steps: the first processor sets the panel port to be in an Up state, performs software recording on the panel port in the Up state, and turns on an indicator lamp corresponding to the panel port. Subsequently, the first processor may continue to perform step S31 of polling to detect a next panel port.
According to the technical scheme, the automatic reporting of the port state of the ultra-low time delay switch can be achieved, the visibility of the port state is improved, and a user can visually judge whether the panel port is normally connected or not and whether the panel port is normally used or not, so that the ultra-low time delay switch is wider in face and more competitive.
Corresponding to the foregoing switch embodiment, an embodiment of the present application further provides a port state reporting method, as shown in fig. 4, where the method is applied to a switch, the switch includes a first processor, a second processor, and a plurality of switch ports, a designated switch port of the plurality of switch ports is connected to a chip port of the second processor, other switch ports except the designated switch port are used for being connected to other devices, and the designated switch port is a destination port of the other switch ports. The port state reporting method comprises the following steps:
step S41, other switch ports guide the received code stream to the appointed switch port according to the software record of the appointed switch port as the destination port of other switch ports;
step S42, the port of the appointed exchanger is connected with the port of the chip, and the code stream is guided to a second processor;
step S43, the second processor trains the chip port by using the code stream to obtain the port state of the chip port, takes the port state of the chip port as the port state of other switch ports, and reports the port state of the other switch ports to the first processor;
in step S44, the first processor performs a processing operation corresponding to the port state of the other switch port.
In the technical solution provided in the embodiment of the present application, a second processor is introduced into a switch, a designated switch port of the switch is fixedly connected to a chip port of the second processor, and destination ports of other switch ports except the designated switch port are all configured with a port to the designated switch port. Therefore, after one switch port receives the code stream, the designated switch port is the destination port of the switch port, the code stream received by the switch port can be introduced into the designated switch port, and the designated switch port is fixedly connected with the chip port, so that the code stream received by the switch port can enter the second processor through the designated switch port and the chip port. The second processor trains the chip port based on the entered code stream, so that the port state of the chip port can be obtained, and the code stream for training the chip port comes from one switch port, so that the port state of the chip port indirectly reflects the port state of the switch port. At this time, the second processor reports the port state of the switch port to the first processor, which realizes the automatic reporting of the port state, and further facilitates the first processor to execute corresponding processing operation, thus, when the switch is an ultra-low-delay switch, the application range of the ultra-low-delay switch is expanded.
In some embodiments, the switch may further include indicator lights in one-to-one correspondence with the plurality of switch ports;
the step of executing the processing operation corresponding to the port state of the other switch port may include:
if the port state of the other switch ports is the Up state, lightening indicator lamps corresponding to the other switch ports; and if the port states of the other switch ports are Down states, turning off the indicator lamps corresponding to the other switch ports.
In some embodiments, the method for reporting a port status may further include:
selecting a designated switch port from the plurality of switch ports, and connecting the designated switch port with a chip port of the second processor;
and connecting the appointed switch port with the chip port to perform software recording.
In some embodiments, the method for reporting a port status may further include:
the first processor polls and detects whether each other switch port meets the automatic state reporting condition; if yes, configuring one destination port of the other switch ports as the appointed switch port.
In some embodiments, the automatic status reporting condition includes that one or more of port shutdown configuration is not cancelled, an optical module is in place, and a configured port type is not cancelled;
the step of polling and detecting whether each other switch port satisfies the automatic status reporting condition may include:
when the automatic state reporting condition comprises that the port closing configuration is not cancelled, polling and detecting whether each other switch port has the port closing configuration cancellation or not; if not, determining that the other switch ports meet the automatic state reporting condition; if yes, determining that the other switch ports do not meet the automatic state reporting condition;
when the automatic state reporting condition comprises that the optical module is in place, polling and detecting whether the optical module of each other switch port is in place or not; if the switch is in place, determining that the other switch ports meet the automatic state reporting condition; if not, determining that the other switch ports do not meet the automatic state reporting condition;
when the automatic state reporting condition comprises a configured port type, polling and detecting whether each other switch port is configured with the port type; if the port type is configured, determining that the other switch ports meet the automatic state reporting condition; if the port type is not configured, determining that the other switch ports do not meet the automatic state reporting condition.
In some embodiments, the method for reporting a port status may further include: the first processor detects whether the other switch ports in the software record are in an Up state or not; and if the state is Up, executing the step of setting the other switch ports to be Down state, and recording the software of the other switch ports in the Down state.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, for the method embodiment, since it is basically similar to the switch embodiment, the description is simple, and reference may be made to the partial description of the switch embodiment for relevant points.
The above description is only for the preferred embodiment of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (12)

1. A switch, comprising a first processor, a second processor and a plurality of switch ports, wherein a designated switch port of the plurality of switch ports is connected to a chip port of the second processor, and other switch ports except the designated switch port are used for connecting to other devices, and the designated switch port is a destination port of the other switch ports;
the other switch ports are used for guiding the received code stream to the appointed switch port according to the appointed switch port as the destination port of the other switch ports;
the appointed switch port is used for guiding the code stream to the second processor by being connected with the chip port;
the second processor is configured to train the chip port by using the code stream to obtain a port state of the chip port, use the port state of the chip port as a port state of the other switch ports, and report the port state of the other switch ports to the first processor;
the first processor is configured to execute a processing operation corresponding to a port state of the other switch port.
2. The switch of claim 1, further comprising indicator lights in one-to-one correspondence with the plurality of switch ports;
the first processor is specifically configured to:
if the port state of the other switch ports is the Up starting state, lightening indicator lamps corresponding to the other switch ports;
and if the port states of the other switch ports are closing Down states, closing the indicating lamps corresponding to the other switch ports.
3. The switch of claim 1, wherein the first processor is further configured to:
selecting the appointed switch port from the plurality of switch ports, and connecting the appointed switch port with a chip port of the second processor;
and connecting the specified switch port with the chip port to perform software recording.
4. The switch of claim 1, wherein the first processor is further configured to:
polling and detecting whether each port of the other switches meets an automatic state reporting condition; if yes, configuring a destination port of the other switch ports as a designated switch port; if not, the other switch ports are set to the Down state.
5. The switch of claim 4, wherein the automatic status reporting condition comprises one or more of no cancellation of port shutdown configuration, optical module presence, and port type configuration;
the first processor is specifically configured to:
when the automatic state reporting condition comprises that the port closing configuration is not cancelled, polling and detecting whether each other switch port has the port closing configuration cancellation or not; if not, configuring a destination port of the other switch ports as a designated switch port; if yes, setting the other switch ports to be in a Down state;
when the automatic state reporting condition comprises that the optical module is in place, polling and detecting whether the optical module of each other switch port is in place or not; if the switch is in place, configuring a destination port of the other switch ports as the appointed switch port; if not, setting the other exchanger ports to be a Down state;
when the automatic state reporting condition comprises a configured port type, polling and detecting whether each port of the other switches is configured with the port type; if the port type is configured, configuring a destination port of the other switch ports as the appointed switch port; if the port type is not configured, the other switch ports are set to the Down state.
6. The switch of claim 4 or 5, wherein the first processor is further configured to:
before setting the ports of the other switches to be in a Down state, detecting whether the ports of the other switches in the software records are in an Up state; and if the state is Up, executing the step of setting the other switch ports to be Down state, and recording the software of the other switch ports in the Down state.
7. A port state reporting method is characterized in that the method is applied to a switch, the switch comprises a first processor, a second processor and a plurality of switch ports, a designated switch port in the switch ports is connected with a chip port of the second processor, other switch ports except the designated switch port are used for being connected with other equipment, and the designated switch port is a destination port of the other switch ports; the method comprises the following steps:
the other switch ports guide the received code stream to the appointed switch port according to the software record of the appointed switch port as the destination port of the other switch port;
the appointed switch port leads the code stream to the second processor by being connected with the chip port;
the second processor trains the chip port by using the code stream to obtain the port state of the chip port, takes the port state of the chip port as the port state of the other switch ports, and reports the port state of the other switch ports to the first processor;
the first processor performs processing operations corresponding to port states of the other switch ports.
8. The method of claim 7, wherein the switch further comprises indicator lights in one-to-one correspondence with the plurality of switch ports;
the step of executing the processing operation corresponding to the port state of the other switch port includes:
if the port state of the other switch ports is the Up starting state, lightening indicator lamps corresponding to the other switch ports;
and if the port states of the other switch ports are closing Down states, closing the indicating lamps corresponding to the other switch ports.
9. The method of claim 7, further comprising:
selecting the appointed switch port from the plurality of switch ports, and connecting the appointed switch port with a chip port of the second processor;
and connecting the specified switch port with the chip port to perform software recording.
10. The method of claim 7, further comprising:
the first processor polls and detects whether each port of the other switches meets an automatic state reporting condition; and if so, configuring one destination port of the other switch ports as the designated switch port.
11. The method of claim 10, wherein the automatic status reporting condition comprises one or more of no cancellation of port shutdown configuration, optical module presence, and port type configuration;
the step of polling and detecting whether each of the other switch ports meets the automatic status reporting condition includes:
when the automatic state reporting condition comprises that the port closing configuration is not cancelled, polling and detecting whether each other switch port has the port closing configuration cancellation or not; if not, determining that the other switch ports meet the automatic state reporting condition; if yes, determining that the other switch ports do not meet the automatic state reporting condition;
when the automatic state reporting condition comprises that the optical module is in place, polling and detecting whether the optical module of each other switch port is in place; if the switch is in place, determining that the other switch ports meet the automatic state reporting condition; if not, determining that the other switch ports do not meet the automatic state reporting condition;
when the automatic state reporting condition comprises the configuration of the port type, polling and detecting whether each port of the other switches is configured with the port type or not; if the port type is configured, determining that the other switch ports meet the automatic state reporting condition; if the port type is not configured, determining that the other switch ports do not meet the automatic state reporting condition.
12. The method of claim 11, further comprising:
the first processor detects whether the other switch ports in the software record are in an Up starting state or not; and if the state is in the Up state, executing the step of setting the other switch ports to be in the Down state, and recording the software of the other switch ports in the Down state.
CN202210939929.5A 2022-08-05 2022-08-05 Port state reporting method and switch Active CN115361306B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210939929.5A CN115361306B (en) 2022-08-05 2022-08-05 Port state reporting method and switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210939929.5A CN115361306B (en) 2022-08-05 2022-08-05 Port state reporting method and switch

Publications (2)

Publication Number Publication Date
CN115361306A true CN115361306A (en) 2022-11-18
CN115361306B CN115361306B (en) 2023-10-24

Family

ID=84033548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210939929.5A Active CN115361306B (en) 2022-08-05 2022-08-05 Port state reporting method and switch

Country Status (1)

Country Link
CN (1) CN115361306B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000045117A (en) * 1998-12-30 2000-07-15 김영환 Method for alerting processor alarm in communication system
US20100077067A1 (en) * 2008-09-23 2010-03-25 International Business Machines Corporation Method and apparatus for redirecting data traffic based on external switch port status
CN101877631A (en) * 2010-06-28 2010-11-03 中兴通讯股份有限公司 Server and business switching method thereof
US20210243070A1 (en) * 2020-01-31 2021-08-05 Hewlett Packard Enterprise Development Lp Switch port protection mechanism
US20210366092A1 (en) * 2020-05-20 2021-11-25 Verizon Patent And Licensing Inc. Systems and methods for managing physical connections of a connector panel
CN114579499A (en) * 2022-01-20 2022-06-03 飞腾信息技术有限公司 Control method, device, equipment and storage medium of processor communication interface

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000045117A (en) * 1998-12-30 2000-07-15 김영환 Method for alerting processor alarm in communication system
US20100077067A1 (en) * 2008-09-23 2010-03-25 International Business Machines Corporation Method and apparatus for redirecting data traffic based on external switch port status
CN101877631A (en) * 2010-06-28 2010-11-03 中兴通讯股份有限公司 Server and business switching method thereof
US20210243070A1 (en) * 2020-01-31 2021-08-05 Hewlett Packard Enterprise Development Lp Switch port protection mechanism
US20210366092A1 (en) * 2020-05-20 2021-11-25 Verizon Patent And Licensing Inc. Systems and methods for managing physical connections of a connector panel
CN114579499A (en) * 2022-01-20 2022-06-03 飞腾信息技术有限公司 Control method, device, equipment and storage medium of processor communication interface

Also Published As

Publication number Publication date
CN115361306B (en) 2023-10-24

Similar Documents

Publication Publication Date Title
US7020089B2 (en) Information processing apparatus and method of controlling the information processing apparatus
CN100401246C (en) Apparatus, system, and method for an alternate lock facility connection path
US8996778B2 (en) Cable adapter correlation in a cluster
CN102567180A (en) Method and system for relevant alert delivery in a distributed processing system
US9729265B2 (en) Network based onsite support
CN108959031B (en) NVME backboard lighting control method, system, medium and equipment
US20110173504A1 (en) Communication system, a communication method and a program thereof
CN105183575A (en) Processor fault diagnosis method, device and system
CN104065526A (en) Server fault alarming method and device thereof
CN113064748A (en) Process succession method, device, electronic equipment and storage medium
CN102664755B (en) Control channel fault determining method and device
US7836208B2 (en) Dedicated redundant links in a communicaton system
CN111026585A (en) Storage server hot standby switching method in recording and broadcasting system
CN108460160B (en) Off-line method, device, terminal and storage medium of database instance
CN104683486A (en) Method and device for processing synchronous messages in distributed system and distributed system
US10075330B1 (en) Systems and methods for statuses of communication links
CN112181880B (en) Method and device for controlling USB channel switching
CN115361306A (en) Port state reporting method and switch
CN112527678A (en) Method, apparatus, device and storage medium for testing protocol
CN115543893B (en) Server and interface expansion method, device and system thereof, and storage medium
CN105389233A (en) Dual-system state parameter storage method, first system and dual-system terminal
US9246848B2 (en) Relay apparatus, storage system, and method of controlling relay apparatus
US10528339B2 (en) Cognitive feature based code level update
CN109885519B (en) Connection switching method for serial port of main control board and main control board
CN100490343C (en) A method and device for realizing switching between main and backup units in communication equipment

Legal Events

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