CN106487679B - Active-standby switching system and switching method of Ethernet switch - Google Patents

Active-standby switching system and switching method of Ethernet switch Download PDF

Info

Publication number
CN106487679B
CN106487679B CN201510556828.XA CN201510556828A CN106487679B CN 106487679 B CN106487679 B CN 106487679B CN 201510556828 A CN201510556828 A CN 201510556828A CN 106487679 B CN106487679 B CN 106487679B
Authority
CN
China
Prior art keywords
link
signal
state
port
detection signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510556828.XA
Other languages
Chinese (zh)
Other versions
CN106487679A (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.)
Beijing BNC Technologies Co Ltd
Original Assignee
Beijing BNC 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 Beijing BNC Technologies Co Ltd filed Critical Beijing BNC Technologies Co Ltd
Priority to CN201510556828.XA priority Critical patent/CN106487679B/en
Publication of CN106487679A publication Critical patent/CN106487679A/en
Application granted granted Critical
Publication of CN106487679B publication Critical patent/CN106487679B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Small-Scale Networks (AREA)

Abstract

本发明实施例涉及一种以太网交换机的主备切换系统和切换方法,所述装置包括:第一链路光信号检测单元,对第一链路的光信号进行检测,并输出第一检测信号;第一链路中断检测单元,对所述第一链路的链路状态进行检测并输出第二检测信号;第二链路光信号检测单元,对第二链路的光信号进行检测,并输出第三检测信号;第二链路中断检测单元,对所述第二链路的链路状态进行检测,并输出第四检测信号;预处理单元,在所述第一检测信号和/或第二检测信号发生状态改变时输出中断触发信号;处理器,根据所述中断触发信号产生链路切换控制信号,用以将所述本地交换机的以太网接入端口由连接第一链路的第一端口切换为连接第二链路的第二端口。

The embodiment of the present invention relates to a master-standby switchover system and a switchover method of an Ethernet switch. The device includes: a first link optical signal detection unit, which detects an optical signal of the first link and outputs a first detection signal ; The first link interruption detection unit detects the link state of the first link and outputs a second detection signal; the second link optical signal detection unit detects the optical signal of the second link, and output a third detection signal; the second link interruption detection unit detects the link state of the second link, and outputs a fourth detection signal; a preprocessing unit, after the first detection signal and/or the second 2. When the state of the detection signal changes, an interrupt trigger signal is output; the processor generates a link switch control signal according to the interrupt trigger signal, so as to switch the Ethernet access port of the local switch from the first link connected to the first link. The port is switched to be connected to the second port of the second link.

Description

以太网交换机的主备切换系统和切换方法Active-standby switching system and switching method of Ethernet switch

技术领域technical field

本发明涉及一种以太网通信技术领域,尤其涉及一种以太网交换机的主备切换系统和切换方法。The invention relates to the technical field of Ethernet communication, in particular to an active-standby switching system and a switching method of an Ethernet switch.

背景技术Background technique

随着网络技术的迅速发展,以太网的网络通信得到了广泛应用。网络通信在追求高速的同时,对通信的可靠性和稳定性也有严格的要求。因此,在某些特定的网络中,要求采用冗余备份网口,即实现通过两条链路与网络相连,其中一条用于工作,另一条用于备份。在当前工作链路断开后,能够自动切换到备份链路上进行网络通信。With the rapid development of network technology, Ethernet network communication has been widely used. While pursuing high speed, network communication also has strict requirements on the reliability and stability of communication. Therefore, in some specific networks, it is required to use redundant backup network ports, that is, to connect to the network through two links, one of which is used for work and the other is used for backup. After the current working link is disconnected, it can automatically switch to the backup link for network communication.

为了不影响通信质量,对切换时间提出了要求,需要在规定的时间范围内完成切换。从目前技术看,交换机设备一般采用以太网操作维护管理(Operation,Administration&Management,OAM)技术(符合Y1731、802.1ag协议),通过CCM消息报文连续性检测机制来探测当前物理通道是否畅通,CCM消息报文时间间隔为最小为3.3ms,如果接收方在连续三个CCM报文接收时间内无法接收到消息报文,则断定该物理连接链路故障,并发送CCM报文通知发送方,启动并触发端口切换,通过这种机制可以从业务层面确保链路的可靠性。In order not to affect the communication quality, the switching time is required, and the switching needs to be completed within the specified time range. From the perspective of current technology, switch devices generally adopt Ethernet Operation, Administration & Management (OAM) technology (in compliance with Y1731, 802.1ag protocol), and detect whether the current physical channel is unblocked through the CCM message message continuity detection mechanism, and the CCM message The minimum message interval is 3.3ms. If the receiver cannot receive the message message within the receiving time of three consecutive CCM messages, it will be concluded that the physical connection link is faulty, and a CCM message will be sent to notify the sender. Trigger port switching, through this mechanism, the reliability of the link can be ensured from the business level.

采用此种技术方案,目前有如下三种选择来实现:Using this technical solution, there are currently three options to implement it:

一是采用特殊的千兆网络交换芯片,在芯片内部会有集成的专用中央处理器(CPU)来进行OAM协议的控制,采用特殊的微码即可以实现千兆以太网链路的主备倒换功能。缺点是采用此方案会加大硬件的研发成本费用。One is to use a special Gigabit network switching chip, and there will be an integrated dedicated central processing unit (CPU) inside the chip to control the OAM protocol. Using a special microcode can realize the active/standby switchover of the Gigabit Ethernet link Function. The disadvantage is that adopting this solution will increase the R&D cost of hardware.

二是采用一个专门外置的用于OAM网络协议控制的CPU,在此CPU上专门运行OAM协议,此方案与上面的方案基本上是一样的,只不过是相比较而言,硬件研发成本会有稍许的降低,但此方案会增加相应的软件研发成本。The second is to use a special external CPU for OAM network protocol control, and run the OAM protocol exclusively on this CPU. This solution is basically the same as the above solution, but in comparison, the cost of hardware development will be lower. There is a slight reduction, but this solution will increase the corresponding software development costs.

三是采用一片外置的现场可编程门阵列(Field-Programmable Gate Array,FPGA)来进行相应的OAM网络协议控制。同样,此方案也要增加软硬件开发成本。The third is to use an external field programmable gate array (Field-Programmable Gate Array, FPGA) to carry out the corresponding OAM network protocol control. Similarly, this solution will also increase the cost of software and hardware development.

因此,无论采用现有的哪种方案,采用以太网OAM方式来保障链路的可靠性,都有其相应的缺陷,包括要求网络上的设备都要支持OAM;要在本地交换机和对端交换机进行相应的网络的设置,如设置相关的维护域、维护集等。Therefore, no matter which existing solution is adopted, the use of Ethernet OAM to ensure the reliability of the link has its corresponding defects, including the requirement that the equipment on the network must support OAM; Perform corresponding network settings, such as setting related maintenance domains and maintenance sets.

发明内容Contents of the invention

本发明的目的是提供一种以太网交换机的主备切换系统和切换方法,无需复杂的链路控制协议来保障链路的可靠性,实现起来简单易行,可缩短产品研发成本和时间,同时也不需要更多的硬件支持,从而节省了硬件成本。The purpose of the present invention is to provide a master/standby switchover system and a switchover method of an Ethernet switch, which does not require complex link control protocols to ensure the reliability of the link, is simple and easy to implement, and can shorten product development costs and time, while Also does not require more hardware support, thereby saving hardware costs.

为实现上述目的,在第一方面,本发明提供了一种以太网交换机的主备切换系统,包括:In order to achieve the above object, in a first aspect, the present invention provides a master/standby switching system of an Ethernet switch, comprising:

第一链路光信号检测单元,对第一链路的光信号进行检测,并输出第一检测信号;其中,所述第一链路为当前状态下的主链路;The first link optical signal detection unit detects the optical signal of the first link, and outputs a first detection signal; wherein, the first link is the main link in the current state;

第一链路中断检测单元,对所述第一链路的链路状态进行检测,并输出第二检测信号;The first link interruption detection unit detects the link status of the first link and outputs a second detection signal;

第二链路光信号检测单元,对第二链路的光信号进行检测,并输出第三检测信号;所述第二链路为当前状态下的备链路;The second link optical signal detection unit detects the optical signal of the second link, and outputs a third detection signal; the second link is a standby link in the current state;

第二链路中断检测单元,对所述第二链路的链路状态进行检测,并输出第四检测信号;The second link interruption detection unit detects the link status of the second link and outputs a fourth detection signal;

预处理单元,接收所述第一检测信号、第二检测信号、第三检测信号和第四检测信号;在当前状态下,当所述第一检测信号和/或第二检测信号发生状态改变时,所述预处理单元输出中断触发信号;A preprocessing unit, receiving the first detection signal, the second detection signal, the third detection signal and the fourth detection signal; in the current state, when the state of the first detection signal and/or the second detection signal changes , the preprocessing unit outputs an interrupt trigger signal;

处理器,接收所述中断触发信号,并根据所述中断触发信号产生链路切换控制信号;a processor, receiving the interrupt trigger signal, and generating a link switching control signal according to the interrupt trigger signal;

本地交换机,接收所述链路切换控制信号,根据所述链路切换控制信号将所述本地交换机的以太网接入端口由连接第一链路的第一端口切换为连接第二链路的第二端口。The local switch receives the link switch control signal, and switches the Ethernet access port of the local switch from the first port connected to the first link to the first port connected to the second link according to the link switch control signal. Two ports.

优选的,所述处理器根据预设时间间隔生成状态查询信号,并将所述状态查询信号发送给所述本地交换机;Preferably, the processor generates a status query signal according to a preset time interval, and sends the status query signal to the local exchange;

所述本地交换机根据所述状态查询信号获取所述第一链路的链路状态的状态信息和所述第二链路的链路状态的状态信息,并将所述第一链路的链路状态的状态信息和第二链路的链路状态的状态信息按照所述预设时间间隔依次发送给所述处理器;The local switch obtains the link state state information of the first link and the link state state information of the second link according to the state query signal, and sends the link state information of the first link The status information of the status and the status information of the link status of the second link are sequentially sent to the processor according to the preset time interval;

所述处理器根据所述第一链路的链路状态的状态信息和第二链路的链路状态的状态信息确定是否进行链路切换;其中,当所述第一链路的链路状态的状态信息发生改变时,所述处理器产生链路切换控制信号。The processor determines whether to perform link switching according to the state information of the link state of the first link and the state information of the link state of the second link; wherein, when the link state of the first link The processor generates a link switching control signal when the status information of the .

进一步优选的,当所述第二链路的链路状态的状态信息发生改变时,所述处理器产生故障信号,用以提示所述备链路出现异常。Further preferably, when the state information of the link state of the second link changes, the processor generates a fault signal to prompt that the standby link is abnormal.

优选的,在产生链路切换控制信号之后,所述处理器生成地址解析协议ARP报文,并将所述ARP报文通过本地交换机的第二端口连接的第二链路发送给上级交换机;其中,所述ARP报文包括第二端口的媒体访问控制MAC地址信息。Preferably, after generating the link switching control signal, the processor generates an address resolution protocol ARP message, and sends the ARP message to the upper-level switch through the second link connected to the second port of the local switch; wherein , the ARP packet includes media access control MAC address information of the second port.

优选的,在产生链路切换控制信号之后,所述处理器在MAC地址表中删除所述第一端口的MAC地址信息,并添加所述第二端口的MAC地址信息。Preferably, after generating the link switching control signal, the processor deletes the MAC address information of the first port in the MAC address table, and adds the MAC address information of the second port.

在第二方面,本发明提供了一种以太网交换机的主备切换方法,包括:In a second aspect, the present invention provides a method for active/standby switching of an Ethernet switch, comprising:

对第一链路的光信号进行检测,输出第一检测信号,并且,对所述第一链路的链路状态进行检测,输出第二检测信号;其中,所述第一链路为当前状态下的主链路;并且Detect the optical signal of the first link, output a first detection signal, and detect the link state of the first link, and output a second detection signal; wherein, the first link is in the current state under the main link; and

对第二链路的光信号进行检测,输出第三检测信号,并且,对所述第二链路的链路状态进行检测,输出第四检测信号;所述第二链路为当前状态下的备链路;Detect the optical signal of the second link, output a third detection signal, and detect the link state of the second link, and output a fourth detection signal; the second link is in the current state standby link;

在当前状态下,当所述第一检测信号和/或第二检测信号发生状态改变时,生成中断触发信号,使得处理器根据所述中断触发信号产生链路切换控制信号,从而将本地交换机的以太网接入端口由连接第一链路的第一端口切换为连接第二链路的第二端口。In the current state, when the state of the first detection signal and/or the second detection signal changes, an interrupt trigger signal is generated, so that the processor generates a link switching control signal according to the interrupt trigger signal, so that the local exchange The Ethernet access port is switched from the first port connected to the first link to the second port connected to the second link.

优选的,在端口切换前,所述方法还包括:Preferably, before port switching, the method further includes:

根据预设时间间隔生成状态查询信号;Generate a status query signal according to a preset time interval;

根据所述状态查询信号,按照所述预设时间间隔依次获取所述第一链路的链路状态的状态信息和所述第二链路的链路状态的状态信息;According to the state query signal, sequentially acquire the state information of the link state of the first link and the state information of the link state of the second link according to the preset time interval;

当所述第一链路的链路状态的状态信息发生改变时,所述处理器产生链路切换控制信号。进一步优选的,所述方法还包括:When the state information of the link state of the first link changes, the processor generates a link switching control signal. Further preferably, the method also includes:

当所述第二链路的链路状态的状态信息发生改变时,生成故障信号,用以提示所述备链路出现异常。When the state information of the link state of the second link changes, a fault signal is generated to prompt that the standby link is abnormal.

优选的,在产生链路切换控制信号之后,所述方法还包括:Preferably, after generating the link switching control signal, the method further includes:

生成地址解析协议ARP报文,并将所述ARP报文通过本地交换机的第二端口连接的第二链路发送给上级交换机;其中,所述ARP报文包括所述第二端口的媒体访问控制MAC地址信息。Generate an address resolution protocol ARP message, and send the ARP message to the upper-level switch through the second link connected to the second port of the local switch; wherein, the ARP message includes the media access control of the second port MAC address information.

优选的,在产生链路切换控制信号之后,所述方法还包括:Preferably, after generating the link switching control signal, the method further includes:

在MAC地址表中删除所述第一端口的MAC地址信息,并添加所述第二端口的MAC地址信息。Delete the MAC address information of the first port in the MAC address table, and add the MAC address information of the second port.

本发明实施例提供的以太网交换机的主备切换系统,无需复杂的链路控制协议来保障链路的可靠性,实现起来简单易行,可缩短产品研发成本和时间,同时也不需要更多的硬件支持,从而节省了硬件成本。The active-standby switchover system of the Ethernet switch provided by the embodiment of the present invention does not require complex link control protocols to ensure the reliability of the link, is simple and easy to implement, can shorten product development costs and time, and does not require more Hardware support, thus saving hardware costs.

附图说明Description of drawings

图1为本发明实施例提供的以太网交换机的主备切换系统的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of an active-standby switching system of an Ethernet switch provided by an embodiment of the present invention;

图2为本发明实施例提供的以太网交换机的主备切换系统的结构框图;Fig. 2 is the structural block diagram of the active-standby switching system of Ethernet switch that the embodiment of the present invention provides;

图3为本发明实施例提供的以太网交换机的主备切换方法流程图。FIG. 3 is a flow chart of a master/standby switchover method for an Ethernet switch provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面通过附图和实施例,对本发明的技术方案做进一步的详细描述。The technical solutions of the present invention will be described in further detail below with reference to the accompanying drawings and embodiments.

本发明实施例提供的以太网交换机的主备切换系统,可以应用于专用网络或者小型控制网络中。具体可以如图1所示。The active-standby switching system of the Ethernet switch provided by the embodiment of the present invention can be applied to a dedicated network or a small control network. Specifically, it can be shown in FIG. 1 .

设备1至设备11连接在主备切换系统的下联端口,通过主备切换系统1接入网络。主备切换系统1包括控制模块101和本地交换机102。本地交换机102中的上联端口P12、P16互为主备冗余端口,分别用于连接到交换机2和交换机3。交换机2和交换机3分别连接路由器1和路由器2。这两台路由器可以作为网关设备,为简单起见,两台路由器也是冗余备份,故采用相同的网络MAC和IP。Devices 1 to 11 are connected to downlink ports of the active/standby switching system, and are connected to the network through the active/standby switching system 1 . The active/standby switching system 1 includes a control module 101 and a local switch 102 . The uplink ports P12 and P16 in the local switch 102 are active and standby redundant ports for connecting to the switch 2 and the switch 3 respectively. Switch 2 and Switch 3 are connected to Router 1 and Router 2 respectively. These two routers can be used as gateway devices. For the sake of simplicity, the two routers are also redundant backups, so they use the same network MAC and IP.

主备切换系统1通过其中的控制模块101选择将P12端口或P16端口接入网络,作为设备1至设备11接入网络的主链路端口,从而选择通过交换机2和路由器1的链路实现网络连接或者通过交换机3和路由器2的链路实现网络连接。The active-standby switching system 1 selects the P12 port or the P16 port to be connected to the network through the control module 101, as the main link port for connecting the device 1 to the device 11 to the network, so as to realize the network through the link of the switch 2 and the router 1. Connect or realize the network connection through the link of the switch 3 and the router 2.

下面,以图2为例,对本发明的以太网交换机的主备切换系统进行说明。Next, taking FIG. 2 as an example, the active-standby switching system of the Ethernet switch of the present invention will be described.

如图所示,本发明实施例的以太网交换机的主备切换系统包括:第一链路光信号检测单元11、第二链路光信号检测单元12、第一链路中断检测单元21、第二链路中断检测单元22、预处理单元3、处理器4和本地交换机5。As shown in the figure, the active-standby switching system of the Ethernet switch in the embodiment of the present invention includes: a first link optical signal detection unit 11, a second link optical signal detection unit 12, a first link interruption detection unit 21, a second link optical signal detection unit Two link interruption detection unit 22 , preprocessing unit 3 , processor 4 and local switch 5 .

第一链路光信号检测单元11,对第一链路的光信号进行检测,并输出第一检测信号P12_SD;The first link optical signal detection unit 11 detects the optical signal of the first link, and outputs a first detection signal P12_SD;

第一链路中断检测单元21,具体可以由PHY芯片来实现,对第一链路的链路状态进行检测,并输出第二检测信号PHY_INT1;The first link interruption detection unit 21 can be implemented specifically by a PHY chip, detects the link state of the first link, and outputs the second detection signal PHY_INT1;

第二链路光信号检测单元12,对第二链路的光信号进行检测,并输出第三检测信号P16_SD;The second link optical signal detection unit 12 detects the optical signal of the second link, and outputs a third detection signal P16_SD;

第二链路中断检测单元22,具体可以由PHY芯片来实现,对第二链路的链路状态进行检测,并输出第四检测信号PHY_INT2;The second link interruption detection unit 22, which can be implemented specifically by a PHY chip, detects the link state of the second link, and outputs a fourth detection signal PHY_INT2;

预处理单元3,接收所述第一检测信号P12_SD、第二检测信号PHY_INT1、第三检测信号P16_SD和第四检测信号PHY_INT2;The preprocessing unit 3 receives the first detection signal P12_SD, the second detection signal PHY_INT1, the third detection signal P16_SD and the fourth detection signal PHY_INT2;

假设在当前状态下第一链路为主链路,第二链路为备链路,则预处理单元3对第一检测信号P12_SD和第三检测信号PHY_INT1的信号状态进行检测,当第一检测信号P12_SD和/或第三检测信号PHY_INT1发生状态改变时,预处理单元3输出中断触发信号;Assuming that in the current state, the first link is the main link and the second link is the standby link, the preprocessing unit 3 detects the signal states of the first detection signal P12_SD and the third detection signal PHY_INT1, when the first detection When the state of the signal P12_SD and/or the third detection signal PHY_INT1 changes, the preprocessing unit 3 outputs an interrupt trigger signal;

假设在当前状态下第二链路为主链路,第一链路为备链路,则预处理单元3对第三检测信号P16_SD和第四检测信号PHY_INT2的信号状态进行检测,当第二检测信号P16_SD和/或第四检测信号PHY_INT2发生状态改变时,预处理单元3输出有效的中断触发信号;Assuming that in the current state, the second link is the main link and the first link is the backup link, the preprocessing unit 3 detects the signal states of the third detection signal P16_SD and the fourth detection signal PHY_INT2, when the second detection When the state of the signal P16_SD and/or the fourth detection signal PHY_INT2 changes, the preprocessing unit 3 outputs a valid interrupt trigger signal;

其中,第一链路光信号检测单元11、第二链路光信号检测单元12可以采用信号检测SFP光模块来实现,第一链路中断检测单元21、第二链路中断检测单元22可以采用检测以太网PHY芯片来实现,预处理单元3可以采用复杂可编程逻辑器件CPLD来实现。Among them, the first link optical signal detection unit 11 and the second link optical signal detection unit 12 can be implemented by using a signal detection SFP optical module, and the first link interruption detection unit 21 and the second link interruption detection unit 22 can be implemented by using It is realized by detecting the Ethernet PHY chip, and the preprocessing unit 3 can be realized by using a complex programmable logic device CPLD.

处理器4,接收中断触发信号INT1,当检测到中断触发信号INT1为有效时,产生链路切换控制信号ctl1;The processor 4 receives the interrupt trigger signal INT1, and generates a link switching control signal ctl1 when detecting that the interrupt trigger signal INT1 is valid;

本地交换机5,接收链路切换控制信号ctl1,根据链路切换控制信号ctl1将本地交换机的以太网接入端口由连接第一链路的第一端口P12切换为连接第二链路的第二端口P16。The local exchange 5 receives the link switching control signal ctl1, and switches the Ethernet access port of the local exchange from the first port P12 connected to the first link to the second port connected to the second link according to the link switching control signal ctl1 P16.

为实现主备切换,在处理器4产生链路切换控制信号ctl1之后,会生成地址解析协议(ARP)报文,并将所述ARP报文通过本地交换机5的第二端口P16连接的第二链路发送给上级交换机;其中,ARP报文包括第二端口P16的媒体访问控制(MAC)地址等信息。由此,结合图1所示,在图1所示的网络中,通过ARP报文,将第二端口P16的MAC地址的信息发送到上级交换机,即图1中的交换机2和交换机3,使得交换机2和交换机3能够快速学习到新端口的MAC地址,从而缩短MAC地址学习时间。In order to realize active-standby switching, after the processor 4 generates the link switching control signal ctl1, an address resolution protocol (ARP) message will be generated, and the ARP message will be connected to the second port P16 of the local switch 5. The link is sent to the upper-level switch; wherein, the ARP message includes information such as the media access control (MAC) address of the second port P16. Thus, in conjunction with what is shown in FIG. 1, in the network shown in FIG. 1, the information of the MAC address of the second port P16 is sent to the upper-level switch, that is, the switch 2 and the switch 3 in FIG. 1, through the ARP message, so that Switch 2 and switch 3 can quickly learn the MAC address of the new port, thereby shortening the MAC address learning time.

此外,处理器4还会在存储的MAC地址表中删除第一端口P12的MAC地址信息,并且在MAC地址表中添加第二端口P16的MAC地址信息。In addition, the processor 4 also deletes the MAC address information of the first port P12 from the stored MAC address table, and adds the MAC address information of the second port P16 to the MAC address table.

如上述所述,本发明的以太网交换机的主备切换系统具有链路光信号检查保障机制和PHY芯片物理链路up/down检测保障机制。As mentioned above, the master-standby switchover system of the Ethernet switch of the present invention has a link optical signal inspection guarantee mechanism and a PHY chip physical link up/down detection guarantee mechanism.

链路光信号检查保障机制,通过探测当前接入端口(active端口)的SFP光模块产生的信号的电平变化来确定有无光信号,例如在SFP光模块接收到光信号时输出高电平的检测信号,在没有接收到光信号时输出低电平的检测信号。因此在没有光信号的时候,可以通过CPLD接收到的低电平的检测信号确定链路中断,从而上报处理器4。链路光信号检查保障机制的优点在于,这种方法效率最高,能最快探测到active端口光纤断开异常,缺点是在远端光模块工作异常,但仍然处于光路连通的情况下无法采用此种方法检测链路中断。The link optical signal inspection guarantee mechanism determines whether there is an optical signal by detecting the level change of the signal generated by the SFP optical module of the current access port (active port), for example, when the SFP optical module receives an optical signal, it outputs a high level detection signal, and output a low-level detection signal when no optical signal is received. Therefore, when there is no optical signal, the low-level detection signal received by the CPLD can be used to determine that the link is interrupted, thereby reporting to the processor 4 . The advantage of the link optical signal inspection guarantee mechanism is that this method has the highest efficiency and can detect the abnormal disconnection of the active port fiber fastest. The disadvantage is that this method cannot be used when the remote optical module is working abnormally but the optical path is still connected. A method to detect link outages.

PHY芯片物理链路up/down检测保障机制,则是通过PHY芯片检测链路的传输码流,在码流传输中断的情况下,PHY芯片的检测信号发生电平转换,如由高电平变为低电平,从而从物理层上避免了光信号恒定时无法对码流中断进行上报的缺点。The PHY chip physical link up/down detection guarantee mechanism is to detect the transmission code stream of the link through the PHY chip. When the code stream transmission is interrupted, the detection signal of the PHY chip undergoes level conversion, such as from high level to It is a low level, thus avoiding the disadvantage that the code stream interruption cannot be reported when the optical signal is constant from the physical layer.

因此,通过链路光信号检查保障机制和PHY芯片物理链路up/down检测保障机制能够有效的对物理链路down掉(包括光信号丢失和码流丢失)的情况进行检测,通过上报处理器4而实现控制主备端口的切换,从而实现从工作链路到备份链路上进行网络通信的切换。Therefore, through the link optical signal inspection guarantee mechanism and the PHY chip physical link up/down detection guarantee mechanism, the physical link down (including optical signal loss and code stream loss) can be effectively detected, and the processor can report the 4. Realize the switching of controlling the active and standby ports, so as to realize the switching of network communication from the working link to the backup link.

以上两种保障机制都是在链路发生异常时通过主备切换系统接收到异常时才会执行切换的被动保障机制。除此之外,本发明实施例提供的以太网交换机的主备切换系统还提供了一种主动查询链路状态的轮询检测保障机制,为主备切换系统的检测有效性提供了双重保障。The above two guarantee mechanisms are passive guarantee mechanisms that switchover will be performed only when an exception is received through the active-standby switchover system when an abnormality occurs in the link. In addition, the active-standby switching system of the Ethernet switch provided by the embodiment of the present invention also provides a polling detection guarantee mechanism for actively querying the link state, which provides double guarantees for the detection effectiveness of the active-standby switching system.

如图2所示,本实施例的以太网交换机的主备切换系统中,处理器4根据预设的时间检测生成状态查询信号,并将状态查询信号发送给本地交换机5。As shown in FIG. 2 , in the active-standby switching system of the Ethernet switch in this embodiment, the processor 4 generates a status query signal according to preset time detection, and sends the status query signal to the local switch 5 .

具体的,处理器4根据预设时间间隔生成状态查询信号,并将状态查询信号发送给所述本地交换机下的物理层设备进行链路的查询。如图所示,具体的查询信号路径为处理器4通过控制端口发送查询信号到本地交换机5的控制端口后,本地交换机5通过SMI_PHY接口对物理层设备(图中的PHY芯片21和PHY芯片22)的相应状态寄存器进行查询,并通过相同的路径将查询到的信息进行反馈。Specifically, the processor 4 generates a status query signal according to a preset time interval, and sends the status query signal to the physical layer device under the local switch for link query. As shown in the figure, the specific query signal path is that after the processor 4 sends the query signal to the control port of the local exchange 5 through the control port, the local exchange 5 communicates with the physical layer device (the PHY chip 21 and the PHY chip 22 in the figure) through the SMI_PHY interface. ) to query the corresponding status register, and feed back the queried information through the same path.

处理器4按照预设时间间隔依次获取第一链路中断检测单元21检测到的第一链路的链路状态的状态信息和第二链路中断检测单元22检测到的第二链路的链路状态的状态信息;The processor 4 sequentially acquires the link status information of the first link detected by the first link interruption detection unit 21 and the link status information of the second link detected by the second link interruption detection unit 22 at preset time intervals. State information of road state;

在第一链路为工作链路,第二链路为备链路的情况下:When the first link is the working link and the second link is the standby link:

当轮询检测到第一链路的链路状态发生改变时,说明工作链路发生异常,此时处理器4产生链路切换控制信号ctl1,控制切换本地交换机5的接入端口由连接第一链路的第一端口P12切换为连接第二链路的第二端口P16。When polling detects that the link state of the first link changes, it indicates that the working link is abnormal, and at this time, the processor 4 generates a link switching control signal ctl1 to control switching of the access port of the local exchange 5 by connecting the first The first port P12 of the link is switched to be connected to the second port P16 of the second link.

此外,通过轮询检测也会监控备用链路的状态。当轮询检测到第二链路的链路状态发生改变时,说明备链路发生了故障,此时处理器4会产生故障信号,用以提示相关工作人员备链路出现异常,以便工作人员对备链路进行及时的检查和维修,使得在需要进行主备链路切换的时候不会影响正常的通信传输。In addition, the status of the standby link is also monitored through polling detection. When the polling detects that the link state of the second link changes, it means that the standby link has failed, and at this time, the processor 4 will generate a fault signal to prompt the relevant staff that the standby link is abnormal, so that the staff can Check and repair the standby link in time, so that the normal communication transmission will not be affected when the active and standby links need to be switched.

轮询周期可以根据处理器4的性能进行设定,优选可以采用5ms至10ms的轮询周期。The polling cycle can be set according to the performance of the processor 4, preferably a polling cycle of 5 ms to 10 ms can be used.

通常情况下,链路光信号检查保障机制和PHY芯片物理链路up/down检测保障机制的触发都会早于轮询检测保障机制。即在发生异常的时候,会先被链路光信号检查保障机制和PHY芯片物理链路up/down检测保障机制检测出。但是加入轮询检测保障机制,可以为本发明的主备切换系统提供双重保障。Usually, the link optical signal inspection guarantee mechanism and the physical link up/down detection guarantee mechanism of the PHY chip are triggered earlier than the polling detection guarantee mechanism. That is, when an abnormality occurs, it will first be detected by the link optical signal inspection guarantee mechanism and the physical link up/down detection guarantee mechanism of the PHY chip. However, adding the polling detection protection mechanism can provide double protection for the active/standby switching system of the present invention.

本发明实施例提供的以太网交换机的主备切换系统,无需复杂的链路控制协议来保障链路的可靠性,实现起来简单易行,也不需要更多的硬件支持,极大的节省了成本。The active-standby switchover system of the Ethernet switch provided by the embodiment of the present invention does not require complex link control protocols to ensure the reliability of the link, is simple and easy to implement, and does not require more hardware support, which greatly saves cost.

相应的,本发明实施例还提供了一种以太网交换机的主备切换方法,执行在上述实施例的主备切换系统中。Correspondingly, the embodiment of the present invention also provides a master-standby switchover method of an Ethernet switch, which is implemented in the master-standby switchover system of the above-mentioned embodiment.

如图3所示,该方法包括如下步骤:As shown in Figure 3, the method includes the following steps:

步骤310,主备切换系统初始化;Step 310, initialization of the active/standby switching system;

具体的,在系统上电启动后,首先通过处理器中配置命令行进行主用接口的配置。结合图2所示,如果2个端口P12、P16都有光纤插入,即2个端口都为链路up状态的情况下,会根据配置来决定哪个端口为主用端口,同时根据配置信息将备用以太网接口Link down掉,通过配置命令行将接口下发的配置数据都保存在查询配置模块中。在本例中,首先设置P12端口接入的第一链路为工作链路,即P12端口为主用端口。Specifically, after the system is powered on and started, the main interface is firstly configured through the configuration command line in the processor. As shown in Figure 2, if the two ports P12 and P16 have optical fibers inserted, that is, when both ports are in the link up state, it will determine which port is the active port according to the configuration, and at the same time set the standby port according to the configuration information. The link of the Ethernet interface is down, and the configuration data sent by the interface is saved in the query configuration module through the configuration command line. In this example, first set the first link connected to the P12 port as the working link, that is, the P12 port is the active port.

随后,进行中断处理函数的挂接初始化,主要用于产生光信号检测的中断和PHYLink UP/DOWN的中断。之后启动定时轮询主备链路状态,设置轮询时间间隔。Subsequently, the hook initialization of the interrupt processing function is carried out, which is mainly used to generate interrupts for optical signal detection and PHYLink UP/DOWN interrupts. Then start regular polling of the active and standby link status, and set the polling interval.

步骤320,对第一链路的光信号进行检测,输出第一检测信号,并且,对所述第一链路的链路状态进行检测,输出第二检测信号;对第二链路的光信号进行检测,输出第三检测信号,并且,对所述第二链路的链路状态进行检测,输出第四检测信号;Step 320: Detect the optical signal of the first link, output a first detection signal, and detect the link status of the first link, and output a second detection signal; performing detection, outputting a third detection signal, and detecting the link state of the second link, and outputting a fourth detection signal;

具体的,对光信号的检测是通过探测与当前接入端口连接的SFP光模块产生的信号的电平变化来确定有无光信号,例如在SFP光模块接收到光信号时输出高电平的检测信号,在没有接收到光信号时输出低电平的检测信号。因此如果发生光路传输异常,SFP光模块的信号输出就会由高电平转为低电平。Specifically, the detection of the optical signal is to determine whether there is an optical signal by detecting the level change of the signal generated by the SFP optical module connected to the current access port, for example, when the SFP optical module receives the optical signal, it outputs a high level The detection signal outputs a low-level detection signal when no optical signal is received. Therefore, if the optical path transmission is abnormal, the signal output of the SFP optical module will change from high level to low level.

对链路状态的检测时通过PHY芯片检测链路的传输码流,在码流传输中断的情况下,PHY芯片的检测信号发生电平转换,如由高电平变为低电平。When detecting the link state, the transmission code stream of the link is detected by the PHY chip. When the transmission of the code stream is interrupted, the detection signal of the PHY chip undergoes level conversion, such as changing from high level to low level.

步骤330,根据预设时间间隔生成状态查询信号,根据所述状态查询信号,按照所述预设时间间隔依次获取所述第一链路的链路状态的状态信息和所述第二链路的链路状态的状态信息。Step 330: Generate a status query signal according to a preset time interval, and according to the status query signal, sequentially acquire the status information of the link status of the first link and the status information of the second link according to the preset time interval. Status information for link status.

具体的,当轮询检测到第一链路的链路状态发生改变时,说明工作链路发生异常。Specifically, when the polling detects that the link state of the first link changes, it indicates that the working link is abnormal.

上述步骤320和步骤330可以是同步执行的。The above step 320 and step 330 may be executed synchronously.

步骤340,当第一检测信号和/或第二检测信号发生状态改变时,或者当检测到第一链路的链路状态的状态信息发生改变时,产生链路切换控制信号,从而将本地交换机的以太网接入端口由连接第一链路的第一端口切换为连接第二链路的第二端口。Step 340, when the state of the first detection signal and/or the second detection signal changes, or when it is detected that the state information of the link state of the first link changes, generate a link switching control signal, thereby switching the local switch to The Ethernet access port is switched from the first port connected to the first link to the second port connected to the second link.

具体的,在第一检测信号或者第二检测信号任一个或两个都发生改变时,如由高电平变为低电平时,说明当前工作链路的光信号或码流传输出现了异常;当轮询检测到第一链路的链路状态发生改变时,也说明工作链路发生异常;上述任一情况发生时处理器都会产生链路切换控制信号,控制切换主备链路的接入。Specifically, when either or both of the first detection signal or the second detection signal changes, such as changing from a high level to a low level, it indicates that the optical signal or code stream transmission of the current working link is abnormal; When polling detects that the link state of the first link changes, it also indicates that the working link is abnormal; when any of the above situations occurs, the processor will generate a link switching control signal to control the access of switching the active and standby links .

步骤350,生成地址解析协议ARP报文,并将ARP报文通过本地交换机的第二端口连接的第二链路发送给上级交换机。Step 350, generate an address resolution protocol ARP message, and send the ARP message to the upper-level switch through the second link connected to the second port of the local switch.

具体的,所述ARP报文包括所述第二端口的媒体访问控制MAC地址信息。由此使得上级交换机能够快速学习到新端口的MAC地址,从而缩短MAC地址学习时间。Specifically, the ARP packet includes media access control MAC address information of the second port. As a result, the upper-level switch can quickly learn the MAC address of the new port, thereby shortening the time for learning the MAC address.

此外,还需要在MAC地址表中删除所述第一端口的MAC地址信息,并添加所述第二端口的MAC地址信息。In addition, it is also necessary to delete the MAC address information of the first port and add the MAC address information of the second port in the MAC address table.

为了保证不影响通信质量,主备链路切换过程,需要在规定的时间范围内完成。In order to ensure that the communication quality is not affected, the switching process of the active and standby links needs to be completed within the specified time range.

下面以一个具体的例子,对切换时间进行说明。The following uses a specific example to describe the switching time.

假设系统内与本地交换机相连的设备的MAC地址数量不超过20个,按照每1ms向上级交换机传一个MAC地址计算,共需20ms将主备倒换激活端口的MAC地址表通知到上级交换机。端口物理切换时间不超过10ms。Assuming that the number of MAC addresses of the devices connected to the local switch in the system does not exceed 20, based on the calculation of transmitting a MAC address to the upper-level switch every 1ms, it takes 20ms to notify the upper-level switch of the MAC address table of the active port for active/standby switching. Port physical switching time does not exceed 10ms.

MAC地址表动态配置时,可通过一条指令删除老化端口的MAC地址表。动态配置优点是MAC地址靠交换机自动学习获取的,缺点是如果某主机或主机板为特殊装置,只接收报文,则交换机无法获取其MAC地址,也就无法与该装置通信。When the MAC address table is dynamically configured, the MAC address table of the aging port can be deleted through a command. The advantage of dynamic configuration is that the MAC address is automatically learned by the switch. The disadvantage is that if a host or motherboard is a special device that only receives messages, the switch cannot obtain its MAC address and cannot communicate with the device.

静态配置则需要逐条删除MAC地址表项。静态配置是指交换机初始化以后通过命令,手动将系统内各主机板和主机MAC地址添加到MAC地址表项中,这样就可以解决特殊主机板卡与交换机之间的通信问题,缺点是主机板和主机的MAC地址必须固定,不支持系统内各主机板卡动态添加或更改MAC地址,且端口切换老化地址表项需要逐条删除,需要时间比较长。交换机P12和P16端口必须记录网关的MAC地址表且必须为静态配置,一般网关地址表为一条或两条。因此一共有2条地址表项需要删除和添加。For static configuration, MAC address entries need to be deleted one by one. Static configuration means that after the switch is initialized, manually add the MAC addresses of each motherboard and host in the system to the MAC address table through commands, so that the communication problem between the special motherboard and the switch can be solved. The disadvantage is that the motherboard and the host The MAC address of the host must be fixed. Dynamic addition or change of the MAC address of each host board in the system is not supported, and the port switching aging address entries need to be deleted one by one, which takes a long time. The P12 and P16 ports of the switch must record the MAC address table of the gateway and must be statically configured. Generally, there are one or two gateway address tables. Therefore, a total of 2 address entries need to be deleted and added.

按照静态配置时删除和添加2条地址表项需要大概12ms时间,再加上以上分析的其他时间消耗,总切换时间为42ms。以上仅为一个实际例子的举例分析,并不用于限定本发明的以太网交换机的主备切换方法在实际应用中的切换时间。According to the static configuration, it takes about 12ms to delete and add two address entries, plus other time consumptions analyzed above, the total switching time is 42ms. The above is only an example analysis of a practical example, and is not used to limit the switching time of the master-standby switchover method of the Ethernet switch in the present invention in practical applications.

本发明实施例提供的以太网交换机的主备切换方法,无需复杂的链路控制协议来保障链路的可靠性,实现起来简单易行,可缩短产品研发成本和时间,同时也不需要更多的硬件支持,从而节省了硬件成本。The active-standby switchover method of the Ethernet switch provided by the embodiment of the present invention does not require complex link control protocols to ensure the reliability of the link, is simple and easy to implement, can shorten product development costs and time, and does not require more Hardware support, thus saving hardware costs.

专业人员应该还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Professionals should further realize that the units and algorithm steps described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the relationship between hardware and software Interchangeability. In the above description, the composition and steps of each example have been generally described according to their functions. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.

结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be implemented by hardware, software modules executed by a processor, or a combination of both. Software modules can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other Any other known storage medium.

以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The specific embodiments described above have further described the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above descriptions are only specific embodiments of the present invention and are not intended to limit the scope of the present invention. Protection scope, within the spirit and principles of the present invention, any modification, equivalent replacement, improvement, etc., shall be included in the protection scope of the present invention.

Claims (8)

1.一种以太网交换机的主备切换系统,其特征在于,所述主备切换系统包括:1. an active-standby switching system of an Ethernet switch, characterized in that, the active-standby switching system comprises: 第一链路光信号检测单元,对第一链路的光信号进行检测,并输出第一检测信号;其中,所述第一链路为当前状态下的主链路;The first link optical signal detection unit detects the optical signal of the first link, and outputs a first detection signal; wherein, the first link is the main link in the current state; 第一链路中断检测单元,对所述第一链路的链路状态进行检测,并输出第二检测信号;The first link interruption detection unit detects the link status of the first link and outputs a second detection signal; 第二链路光信号检测单元,对第二链路的光信号进行检测,并输出第三检测信号;所述第二链路为当前状态下的备链路;The second link optical signal detection unit detects the optical signal of the second link, and outputs a third detection signal; the second link is a standby link in the current state; 第二链路中断检测单元,对所述第二链路的链路状态进行检测,并输出第四检测信号;The second link interruption detection unit detects the link status of the second link and outputs a fourth detection signal; 预处理单元,接收所述第一检测信号、第二检测信号、第三检测信号和第四检测信号;在当前状态下,当所述第一检测信号和/或第二检测信号发生状态改变时,所述预处理单元输出中断触发信号;A preprocessing unit, receiving the first detection signal, the second detection signal, the third detection signal and the fourth detection signal; in the current state, when the state of the first detection signal and/or the second detection signal changes , the preprocessing unit outputs an interrupt trigger signal; 处理器,接收所述中断触发信号,并根据所述中断触发信号产生链路切换控制信号;所述处理器根据预设时间间隔生成状态查询信号,并将所述状态查询信号发送给所述本地交换机;所述本地交换机根据所述状态查询信号获取所述第一链路的链路状态的状态信息和所述第二链路的链路状态的状态信息,并将所述第一链路的链路状态的状态信息和第二链路的链路状态的状态信息按照所述预设时间间隔依次发送给所述处理器;所述处理器根据所述第一链路的链路状态的状态信息和第二链路的链路状态的状态信息确定是否进行链路切换;其中,当所述第一链路的链路状态的状态信息发生改变时,所述处理器产生链路切换控制信号;a processor, receiving the interrupt trigger signal, and generating a link switching control signal according to the interrupt trigger signal; the processor generates a status query signal according to a preset time interval, and sends the status query signal to the local switch; the local switch obtains the state information of the link state of the first link and the state information of the link state of the second link according to the state query signal, and transfers the state information of the link state of the first link The state information of the link state and the state information of the link state of the second link are sequentially sent to the processor according to the preset time interval; information and the state information of the link state of the second link to determine whether to perform link switching; wherein, when the state information of the link state of the first link changes, the processor generates a link switching control signal ; 本地交换机,接收所述链路切换控制信号,根据所述链路切换控制信号将所述本地交换机的以太网接入端口由连接第一链路的第一端口切换为连接第二链路的第二端口。The local switch receives the link switch control signal, and switches the Ethernet access port of the local switch from the first port connected to the first link to the first port connected to the second link according to the link switch control signal. Two ports. 2.根据权利要求1所述的以太网交换机的主备切换系统,其特征在于,当所述第二链路的链路状态的状态信息发生改变时,所述处理器产生故障信号,用以提示所述备链路出现异常。2. The active-standby switching system of the Ethernet switch according to claim 1, wherein when the state information of the link state of the second link changes, the processor generates a fault signal for It indicates that the standby link is abnormal. 3.根据权利要求1所述的以太网交换机的主备切换系统,其特征在于,在产生链路切换控制信号之后,所述处理器生成地址解析协议ARP报文,并将所述ARP报文通过本地交换机的第二端口连接的第二链路发送给上级交换机;其中,所述ARP报文包括第二端口的媒体访问控制MAC地址信息。3. the active/standby switching system of Ethernet exchange according to claim 1, is characterized in that, after generating link switching control signal, described processor generates Address Resolution Protocol ARP message, and described ARP message The second link connected through the second port of the local switch is sent to the upper-level switch; wherein, the ARP message includes the media access control MAC address information of the second port. 4.根据权利要求1所述的以太网交换机的主备切换系统,其特征在于,在产生链路切换控制信号之后,所述处理器在MAC地址表中删除所述第一端口的MAC地址信息,并添加所述第二端口的MAC地址信息。4. the active/standby switching system of Ethernet exchange according to claim 1, is characterized in that, after generating link switching control signal, described processor deletes the MAC address information of described first port in MAC address table , and add the MAC address information of the second port. 5.一种以太网交换机的主备切换方法,其特征在于,所述方法包括:5. a method for active-standby switching of an Ethernet switch, characterized in that the method comprises: 对第一链路的光信号进行检测,输出第一检测信号,并且,对所述第一链路的链路状态进行检测,输出第二检测信号;其中,所述第一链路为当前状态下的主链路;并且Detect the optical signal of the first link, output a first detection signal, and detect the link state of the first link, and output a second detection signal; wherein, the first link is in the current state under the main link; and 对第二链路的光信号进行检测,输出第三检测信号,并且,对所述第二链路的链路状态进行检测,输出第四检测信号;所述第二链路为当前状态下的备链路;Detect the optical signal of the second link, output a third detection signal, and detect the link state of the second link, and output a fourth detection signal; the second link is in the current state standby link; 在当前状态下,当所述第一检测信号和/或第二检测信号发生状态改变时,生成中断触发信号,使得处理器根据所述中断触发信号产生链路切换控制信号,从而将本地交换机的以太网接入端口由连接第一链路的第一端口切换为连接第二链路的第二端口;In the current state, when the state of the first detection signal and/or the second detection signal changes, an interrupt trigger signal is generated, so that the processor generates a link switching control signal according to the interrupt trigger signal, so that the local exchange The Ethernet access port is switched from the first port connected to the first link to the second port connected to the second link; 在端口切换前,所述方法还包括:Before port switching, the method also includes: 根据预设时间间隔生成状态查询信号;Generate a status query signal according to a preset time interval; 根据所述状态查询信号,按照所述预设时间间隔依次获取所述第一链路的链路状态的状态信息和所述第二链路的链路状态的状态信息;According to the state query signal, sequentially acquire the state information of the link state of the first link and the state information of the link state of the second link according to the preset time interval; 当所述第一链路的链路状态的状态信息发生改变时,所述处理器产生链路切换控制信号。When the state information of the link state of the first link changes, the processor generates a link switching control signal. 6.根据权利要求5所述的方法,其特征在于,所述方法还包括:6. The method according to claim 5, further comprising: 当所述第二链路的链路状态的状态信息发生改变时,生成故障信号,用以提示所述备链路出现异常。When the state information of the link state of the second link changes, a fault signal is generated to prompt that the standby link is abnormal. 7.根据权利要求5所述的方法,其特征在于,在产生链路切换控制信号之后,所述方法还包括:7. The method according to claim 5, characterized in that, after generating the link switching control signal, the method further comprises: 生成地址解析协议ARP报文,并将所述ARP报文通过本地交换机的第二端口连接的第二链路发送给上级交换机;其中,所述ARP报文包括所述第二端口的媒体访问控制MAC地址信息。Generate an address resolution protocol ARP message, and send the ARP message to the upper-level switch through the second link connected to the second port of the local switch; wherein, the ARP message includes the media access control of the second port MAC address information. 8.根据权利要求5所述的方法,其特征在于,在产生链路切换控制信号之后,所述方法还包括:8. The method according to claim 5, characterized in that, after generating the link switching control signal, the method further comprises: 在MAC地址表中删除所述第一端口的MAC地址信息,并添加所述第二端口的MAC地址信息。Deleting the MAC address information of the first port in the MAC address table, and adding the MAC address information of the second port.
CN201510556828.XA 2015-09-02 2015-09-02 Active-standby switching system and switching method of Ethernet switch Active CN106487679B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510556828.XA CN106487679B (en) 2015-09-02 2015-09-02 Active-standby switching system and switching method of Ethernet switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510556828.XA CN106487679B (en) 2015-09-02 2015-09-02 Active-standby switching system and switching method of Ethernet switch

Publications (2)

Publication Number Publication Date
CN106487679A CN106487679A (en) 2017-03-08
CN106487679B true CN106487679B (en) 2019-11-08

Family

ID=58237947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510556828.XA Active CN106487679B (en) 2015-09-02 2015-09-02 Active-standby switching system and switching method of Ethernet switch

Country Status (1)

Country Link
CN (1) CN106487679B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106992812A (en) * 2017-05-25 2017-07-28 成都优博创通信技术股份有限公司 A kind of unglazed monitoring method, optical module and controller
CN107547260B (en) * 2017-07-24 2020-12-22 杭州沃趣科技股份有限公司 Long-distance infiniband link detection, switching and repair method
CN110177058B (en) * 2019-05-31 2021-04-20 中国电子科技集团公司第五十四研究所 Ethernet switch board state monitoring transceiver based on FPGA
CN111083198B (en) * 2019-11-22 2022-07-05 浙江中控技术股份有限公司 Communication link switching method, master domain server, slave domain server and system
CN111682989B (en) * 2020-07-01 2022-06-28 迈普通信技术股份有限公司 Method, device and system for detecting port link state
TWI801758B (en) * 2020-09-30 2023-05-11 神雲科技股份有限公司 Method of controlling connection on network controller sideband interface
CN112350853B (en) * 2020-10-21 2022-09-30 杭州迪普科技股份有限公司 Method, device, storage medium and equipment for switching master and standby network equipment
CN112954722B (en) * 2021-01-26 2023-02-03 深圳震有科技股份有限公司 System and method for quickly switching 5G UPF (unified power flow) main link and standby link
CN113612652B (en) * 2021-06-25 2023-07-18 苏州浪潮智能科技有限公司 A port physical link state detection method and system with an external PHY chip
CN115209502B (en) * 2022-07-11 2023-08-22 北京国基科技股份有限公司 Wireless network roaming switching method and device
CN115473792B (en) * 2022-08-01 2023-09-22 上海微波技术研究所(中国电子科技集团公司第五十研究所) Dual-channel communication control system and method based on flow table
CN115801666A (en) * 2022-11-29 2023-03-14 中国建设银行股份有限公司 Transaction link switching method and device, electronic equipment and computer storage medium
CN116506349A (en) * 2023-04-27 2023-07-28 湖南智领通信科技有限公司 Network link dual-backup method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1547330A (en) * 2003-12-01 2004-11-17 中兴通讯股份有限公司 Multi-port multi-link communication network backup control method and device
CN101350636A (en) * 2008-09-04 2009-01-21 北京星网锐捷网络技术有限公司 Method and system for link redundant backup base on photoelectric multiplexing port
CN101378359A (en) * 2008-10-06 2009-03-04 中兴通讯股份有限公司 Method and apparatus for switching of primary and secondary compulsion links
CN101605079A (en) * 2009-07-01 2009-12-16 中兴通讯股份有限公司 Method, system and device for Ethernet link protection
CN102984059A (en) * 2012-11-22 2013-03-20 中国电子科技集团公司第三十二研究所 Gigabit Ethernet redundant network card and link switching condition determination result control method thereof
CN103491459A (en) * 2013-09-30 2014-01-01 北京星网锐捷网络技术有限公司 Electronic distributing frame system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212254A (en) * 2006-12-27 2008-07-02 华为技术有限公司 A light source link transmission device and method
CN101902317B (en) * 2010-06-17 2013-02-13 烽火通信科技股份有限公司 Protection method of active/standby TRUNK changeover in broadband access device
CN103346915B (en) * 2013-07-05 2018-05-25 上海斐讯数据通信技术有限公司 A kind of device of the quick recovery network port

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1547330A (en) * 2003-12-01 2004-11-17 中兴通讯股份有限公司 Multi-port multi-link communication network backup control method and device
CN101350636A (en) * 2008-09-04 2009-01-21 北京星网锐捷网络技术有限公司 Method and system for link redundant backup base on photoelectric multiplexing port
CN101378359A (en) * 2008-10-06 2009-03-04 中兴通讯股份有限公司 Method and apparatus for switching of primary and secondary compulsion links
CN101605079A (en) * 2009-07-01 2009-12-16 中兴通讯股份有限公司 Method, system and device for Ethernet link protection
CN102984059A (en) * 2012-11-22 2013-03-20 中国电子科技集团公司第三十二研究所 Gigabit Ethernet redundant network card and link switching condition determination result control method thereof
CN103491459A (en) * 2013-09-30 2014-01-01 北京星网锐捷网络技术有限公司 Electronic distributing frame system

Also Published As

Publication number Publication date
CN106487679A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
CN106487679B (en) Active-standby switching system and switching method of Ethernet switch
CN110572275B (en) Network card switching method and device, server and computer readable storage medium
CN105024855B (en) Distributed type assemblies manage system and method
FI115271B (en) Procedure and system for implementing a rapid rescue process in a local area network
US20200267069A1 (en) Link switching method, link switching device, network communication system, and computer-readable storage medium
CN102710457B (en) A kind of N+1 backup method of cross-network segment and device
CN103825766B (en) Device and method for detecting BFD links
CN101951345B (en) Message transmitting method and equipment
WO2013120340A1 (en) Port configuration method, device and frame-type communication apparatus for network interface module
CN103036702B (en) A kind of N+1 backup method of cross-network segment and device
CN104796329B (en) A kind of link automatic switching method and device
CN101212287A (en) Port-Based Redundant Backup Method
US9384102B2 (en) Redundant, fault-tolerant management fabric for multipartition servers
CN100407646C (en) A method for realizing data service backup
CN101488101A (en) CPCI redundancy stand-by system
CN105634848B (en) A kind of virtual router monitoring method and device
CN103036701B (en) The N+1 alternative mean of a kind of cross-network segment and device
CN101227324A (en) Method for collecting fault information of communication equipment, communication equipment and system
US20090110399A1 (en) Storage system and optical module switching method for storage system
CN101072088A (en) Data backup system, main board and data backup method
US8965993B2 (en) Entrusted management method for a plurality of rack systems
CN104394012A (en) Cluster router, MPU (microprocessor unit), determining method for faults of MPU and sensing controller
CN101465762B (en) Method, equipment and system for detecting error connection between protection set ports
CN101399673A (en) Micro TCA system, Micro TCA system management method
CN101510890B (en) Method and communication equipment for holding protocol state

Legal Events

Date Code Title Description
C06 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
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20170308

Assignee: CHINA TECHNOLOGY EXCHANGE Co.,Ltd.

Assignor: BNC TECHNOLOGIES CO.,LTD.

Contract record no.: X2023110000140

Denomination of invention: The main and backup switching system and switching methods of Ethernet switches

Granted publication date: 20191108

License type: Exclusive License

Record date: 20231201

EE01 Entry into force of recordation of patent licensing contract
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: The main and backup switching system and switching methods of Ethernet switches

Effective date of registration: 20231206

Granted publication date: 20191108

Pledgee: CHINA TECHNOLOGY EXCHANGE Co.,Ltd.

Pledgor: BNC TECHNOLOGIES CO.,LTD.

Registration number: Y2023110000513

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Granted publication date: 20191108

Pledgee: CHINA TECHNOLOGY EXCHANGE Co.,Ltd.

Pledgor: BNC TECHNOLOGIES CO.,LTD.

Registration number: Y2023110000513

EC01 Cancellation of recordation of patent licensing contract
EC01 Cancellation of recordation of patent licensing contract

Assignee: CHINA TECHNOLOGY EXCHANGE Co.,Ltd.

Assignor: BNC TECHNOLOGIES CO.,LTD.

Contract record no.: X2023110000140

Date of cancellation: 20250403