WO2016206635A1 - Lacp-based forwarding detection method and system - Google Patents

Lacp-based forwarding detection method and system Download PDF

Info

Publication number
WO2016206635A1
WO2016206635A1 PCT/CN2016/087097 CN2016087097W WO2016206635A1 WO 2016206635 A1 WO2016206635 A1 WO 2016206635A1 CN 2016087097 W CN2016087097 W CN 2016087097W WO 2016206635 A1 WO2016206635 A1 WO 2016206635A1
Authority
WO
WIPO (PCT)
Prior art keywords
switch
forwarding detection
member port
line card
packet
Prior art date
Application number
PCT/CN2016/087097
Other languages
French (fr)
Chinese (zh)
Inventor
李建国
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016206635A1 publication Critical patent/WO2016206635A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • 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
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/55Prevention, detection or correction of errors
    • 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/34Signalling channels for network management communication
    • H04L41/344Out-of-band transfers

Definitions

  • This document relates to but not limited to data communication technology, especially a forwarding detection method and system based on LCP (Link Aggregation Control Protocol).
  • LCP Link Aggregation Control Protocol
  • bidirectional forwarding detection One of the functions of bidirectional forwarding detection is to provide a low-load, short-detection period failure detection method by establishing a path between adjacent forwarding engines (including interfaces, data links, and some possible extension engines). Another role is to provide an independent detection mechanism that can run on any medium at any protocol level.
  • the centralized control method for the main control board to process all bidirectional forwarding detection messages. That is, the negotiation packet, the detection packet, and the transmission packet are all processed by the main control board.
  • the advantage of this control method is that all messages are processed only by the main control board, supporting bidirectional forwarding detection of any Layer 3 link, including LCP-based bidirectional forwarding detection.
  • LCP-based bidirectional forwarding detection it is because all the packets must pass through the main control board, and a large number of bidirectional forwarding detection packets are sent to the main control board, which causes the central processing unit (cpu, Central Processing Unit) to be too busy, resulting in each Business modules are not working properly.
  • the message exchanged between the main control board and the line card is fast asynchronous message, the performance requirement of processing related message information within 10 milliseconds (ms) is still not achieved.
  • the main control board processes only the negotiation packets. After the negotiation succeeds, the line card detects the packets and sends the packets. Because the negotiation message has low real-time requirements, the requirements for real-time performance of the detection message and the transmission message are very high. Therefore, in the control processing mode, the negotiation packet is processed separately from the detection packet and the transmission packet, and the negotiation packet is processed centrally by the main control board, and the detection packet and the transmission packet are processed by a line card itself.
  • the negotiation packet is processed separately from the detection packet and the transmission packet, and the negotiation packet is processed centrally by the main control board, and the detection packet and the transmission packet are processed by a line card itself.
  • the Bidirectional forwarding detection false positives down (representation chain The road is blocked or abnormal.) If the two-way forwarding detection packet does not pass the abnormal member port, the two-way forwarding detection does not report the down, which causes a large number of data packets to be lost and cannot meet the performance requirements.
  • the embodiment of the present invention provides a method for forwarding detection based on LCP.
  • the function of forwarding detection can be implemented on the LACP interface, and the member port of the LCP can support forwarding detection without affecting the function implementation of other member ports.
  • the embodiment of the invention provides a method for forwarding detection based on lacp, comprising:
  • the first switch negotiates with the second switch and establishes a lacp link, and the first switch periodically sends a forwarding detection packet to the second switch by using the LACP link;
  • the second switch detects the packet receiving status of the member port that receives the forwarding detection packet, and modifies the port status of the member port that has timed out the forwarding detection packet, and performs port switching processing.
  • the step of the first switch periodically sending the forwarding detection packet to the second switch by using the LACP link includes:
  • Each of the first switches of the first switch encapsulates the forwarding detection packet, and the member port whose status is active periodically sends the forwarding detection packet to the second switch.
  • the step of detecting, by the second switch, the packet receiving status of the member port that receives the forwarding detection packet includes:
  • the second switch line card determines, according to the packet receiving time of each member port, whether the packet received by the member port times out.
  • the step of modifying the port status of the member port that receives the timeout of the received packet and performing the handover process includes:
  • the status of the member port that has timed out is changed from active to inactive, the member port is identified as down, and the down notification of the member port is established. If the member port of the member port is reported to the other line card, the member port that has timed out is reported to the main control board to switch the member port that has timed out.
  • the LCP link of the line card of the main control board is down.
  • the line card in the second switch sends the down notification message of the member port to each of the other line cards in the second switch; the other line card parses the down notification message.
  • the member port information that has timed out in the second switch is obtained, and the status of the line card is updated.
  • the other line card after receiving the downlink packet, further includes sending to the first switch.
  • the first switch line card parses the down advertisement packet to obtain information about a member port that has timed out in the second switch;
  • the first switch determines, according to the parsed member port information, a member port corresponding to the first switch, and changes the state of the member port in the first switch from active to inactive.
  • the down advertisement message includes: a line card mac address for sending a message, a line card mac address for receiving a message, a packet type, a length of the advertisement packet, and specific data of the member port down.
  • the embodiment of the present invention further provides a LACP-based forwarding detection system, including at least one first switch configured to send a forwarding detection message and at least one second switch configured to receive a forwarding detection message, the first switch Negotiating with the second switch and establishing a lacp link;
  • the first switch is configured to periodically send a forwarding detection packet to the second switch by using the LACP link;
  • the second switch is configured to detect a packet receiving condition of the member port that receives the forwarding detection packet, and modify a port state of the member port that receives the forwarding detection packet that has timed out, and perform port switching processing.
  • the LCP-based forwarding detection method provided by the embodiment of the present invention implements the forwarding detection on the LACP interface, and ensures that each member port in the LCP can also implement forwarding detection, and the second switch line card detects the line card. If the member port of the member board receives the forwarding detection packet, if the member port is not received within the specified detection time, the physical link of the member port is abnormal and is reported to the member of the main control board. The port is down, and the down notification message of the member port is sent to other line cards of the second switch. For the member ports that are down, check whether all the member ports of the line card are timed out, or only some member ports of the line card time out. If they all time out, report the lacp link down on the main control board.
  • the state of the member port is switched, and the abnormal member port in the lacp link is removed.
  • the forwarding detection detection of the member port is not performed in the related art. Only when the entire lacp link is enabled, the LACP link is simultaneously implemented.
  • the forwarding detection and the forwarding detection of the member port link can prevent the packet loss of the member port from being reported down or not down, causing packet loss, and also satisfying the lacp link to implement multiple service modules simultaneously. , thereby improving the accuracy of forwarding detection and the utilization of resources.
  • FIG. 1 is a structural diagram of a packet of a line card lac notification message of a line card according to an embodiment of the present invention
  • FIG. 2 is a general flowchart of detecting a lacp on a line card according to an embodiment of the present invention
  • FIG. 3 is a flowchart of detecting a partial member port down of a lacp in a line card according to an embodiment of the present invention
  • FIG. 5 is a flowchart of sending and receiving a transmission detection packet of a lacp according to an embodiment of the present invention.
  • each member port in the process of implementing the LACP link interface and each member port forwarding detection, each member port sends and receives a forwarding detection packet, and detects whether the time of receiving the packet by the member port in the second switch is greater than the forwarding detection.
  • the detection time is further reported to the main control board of the member switch in the second switch, and the switching process is performed, or the lacp link is reported, and the other line cards and the first switch of the second switch are advertised.
  • the other line cards of the second switch and the first switch recalculate the member port entries of the second switch, and the member ports of the down node no longer send the forwarding detection message. Avoid the problem of false positives or no downs on the forwarding detection of lacp, resulting in a large number of packets being lost.
  • the present invention will be further described in detail below by way of specific embodiments.
  • the detection time of the forwarding detection is a pre-configured timeout period. If the time of receiving the packet on the member port of the second switch is greater than the pre-configured timeout period, or the packet is not received within the pre-configured timeout period, The link of the member port is abnormal.
  • the embodiment of the present invention provides a LCP-based forwarding detection method and system, including at least one first switch configured to send a forwarding detection message and at least one second switch configured to receive a forwarding detection message, the first The switch negotiates with the second switch and establishes a lacp link;
  • the first switch is configured to periodically send a forwarding detection packet to the second switch by using the LACP link;
  • the second switch is configured to detect a packet receiving condition of the member port that receives the forwarding detection packet, and modify a port state of the member port that receives the forwarding detection packet that has timed out, and perform port switching processing.
  • the first switch and the second switch of the LCP-based forwarding detection system implement packet transmission by using a lacp-based forwarding detection method, and detection of link member ports of the first switch and the second switch.
  • FIG. 1 is a structural diagram of a lacp member port down notification message according to an embodiment of the present invention.
  • the down notification message includes: DMC (Dest Media Access Control), Source Media Access Control (SMAC), Type (TYPE), Length (LENGTH), and Data (DATA).
  • DMC Dense Media Access Control
  • SMAC Source Media Access Control
  • TYPE Type
  • LENGTH Length
  • DATA Data
  • DMAC Line card media access control (mac, Media Access Control) address for sending packets, a total of 6 bytes.
  • SMAC The line card mac address of the received message, a total of 6 bytes.
  • TYPE Packet type, two bytes, defined here as 0xeefe, indicating the type of the advertisement packet for the lcp member port down.
  • LENGTH The length of the advertisement message, specifically the data length of the following DATA.
  • FIG. 2 is a schematic flowchart of detecting LCP according to an embodiment of the present invention, in which the LCP and the member port are detected to be down, and the transmission and reception processing of the LCP forwarding detection message is detected.
  • each line card of the first switch periodically sends a forwarding detection packet to the corresponding member port of the second switch, and the member port corresponding to the second switch receives the forwarding detection packet, and then the second switch Detecting and finding the line card where the corresponding member port is located, determining the processing line card for forwarding the detection session, and the line card processing the received forwarding detection message again, as follows:
  • Step 201 Each line card of the second switch detects whether all member ports of the line card all time out. If yes, the main control board is notified that the lacp link is down, and the other line cards of the second switch are notified to update the member port status. If not, the next step 202 is performed.
  • Step 202 Each line card of the second switch detects whether a member port times out. If yes, the member port is abnormal, and the member ports that are reported to the main control board are down-processed, and the other line cards of the second switch are notified to update the member port status. If not, the process ends.
  • each line card of the second switch detects the status of the member port corresponding to the line card for receiving the forwarding detection message.
  • the status of the member port that times out occurs. Change from active to inactive to identify the member port as down.
  • the forwarding detection time of the line card 23 arrives, all active member ports on the line card 23 are found, and the receiving time of each member port of the line card 23 is detected, if the line If the member port 35 of the card 23 detects the received forwarding detection packet within the detection time specified by the lacp, the member port 35 is used normally, and the next member port is continuously detected without processing. If the member port 35 of the line card 23 does not detect the received forwarding detection packet within the specified detection time, the physical link of the member port 35 of the line card 23 is abnormal, and the member port 35 is The status is updated, from active to inactive, and the main control board 12 is notified, and the member port 35 of the line card 23 is down, and the next step is performed.
  • the line card 23 of the second switch reports the member port 35down to the main control board 12 on the switch, and performs switching processing.
  • the member port 35 of the line card 23 is down, the member port 35down of the line card 23 of the main control board 12 is reported, and the status of the member port 35 is updated, and the status is updated.
  • the control board 12 controls switching.
  • the line card 23 constructs a member port 35down to announce the message and sends it to the line card 24.
  • the method includes: for the line card 23, if the member port 35 of the line card 23lacp is down, the member port is sent to notify the message, and the message is advertised according to the packet format group of FIG.
  • the content of the down notification message includes: the mac address of the DMAC fill-in card 24, the mac address of the SMAC fill-in card 23, the TYPE field filled with 0xeefe, the LENGTH fills in the length of the DATA part data, and the DATA fills in the data of the member port 35down of the line card 23 .
  • the line card 24 parses the information of the member port 35down of the line card 23, and performs state switching.
  • the method includes: for the line card 24, receiving the down notification message sent by the line card 23, and parsing out the member port 35down of the line card 23, and finding the member port 35 of the line card 23 from the member port table of the local record, The status of the member port 35 of the line card 23 is changed from active to inactive.
  • the line card 24 of the second switch receives the down notification message sent by the line card 23
  • the line card 24 forwards the down notification message to the first switch, and then the first switch
  • the downlink advertisement packet is parsed and the status of the corresponding member port is updated.
  • the board 12 is configured to detect the local member port list, and all member ports are down. If yes, the main control board 12 is reported, and the lacp link is down. In the same manner, the line card 24 receives the down notification message of the line card 23, and finds that the member ports 37 and 38 are both down, detecting whether the other member ports are all down. If yes, reporting the lacp link down on the main control board 12.
  • the main control board 12 it is detected whether all member ports of at least one line card of the second switch are timed out. If it times out, the main control board 12 is notified that the lacp link is down, and the other line cards of the second switch are advertised. Please refer to FIG. 4 for details, the process includes:
  • each line card of the second switch detects whether the member ports of the line card receive the forwarding detection message all times out. If all the timeouts occur, the member ports of the other line cards of the second switch are also detected. All down, if yes, and reported to the main control board and advertise other line cards, the lacp link is down. For example, for the second switch line card 23, it is detected whether the member ports 35 and 36 on the line card 23 receive all the packets. If it is timed out, it is detected whether all the member ports of the other line cards in the second switch are down. For example, the line card 23 detects whether the member ports of the line card 24 are all down. If yes, the main control board 12 is notified that the lacp link is down. And inform other line cards to perform the next step.
  • the line card 23 of the second switch sends a line card 23lacp link down to the main control board 12 of the switch.
  • the step includes: for the line card 23, if the line card 23 and the other line cards of the lacp are detected, such as all the member ports of the line card 24 are down, the main control board reports that the lacp link is down.
  • the second switch line card constructs a member port down advertisement packet and sends it to other line cards of the switch.
  • the packet is sent according to the packet format group of FIG.
  • the down message is specifically: the mac address of the DMAC fill-in card 24, the mac address of the SMAC fill-in card 23, the TYPE field filled with 0xeefe, the LENGTH fills in the length of the DATA part of the data, and the DATA fills in the data of the port 35, 36.
  • the line card 24 of the second switch parses the line card 24 to find the corresponding down port and modifies the port status.
  • the downlink notification message of the line card 23 is received, and the member ports 35 and 36down of the line card 23 are parsed. From the member port table recorded locally, the member ports 35 and 36 of the line card 23 are found. Changed from active to inactive. The line card 24 detects whether all the member ports of the lacp are down. If yes, the line card 23 of the second switch sends a line card to the main control board 12 of the switch. 23lacp link down.
  • FIG. 5 is a flowchart of sending and receiving a forwarding detection packet of a LCP member port according to an embodiment of the present invention.
  • the transmission and reception of a forwarding detection packet are clearly depicted in the figure, wherein the line card 21 sends and receives the line. Forwarding detection packet of the member port of the card.
  • the line card 22 sends and receives the forwarding detection message of the member port of the line card;
  • the line card 23 sends and receives the forwarding detection message of the member port of the line card;
  • the line card 24 sends and receives the forwarding detection message of the member port of the line card. .
  • the process of sending a packet detection packet for each line card of the first switch includes: when the line card needs to send a forwarding detection packet, firstly, all the active member ports of the lacp local line card need to be found, for example, for the line card.
  • the member ports 31 and 32 are found, and the member ports 33 and 34 are found for the line card 22; then, the packets are encapsulated according to the forwarding detection format, and are sent once for each active member port 31 and 32 of the lacp. Similarly, the member port 33, 34 is also sent once.
  • the process for receiving the packet forwarding detection packet for each line card of the second switch includes: the member ports 35 and 36 of the line card 23 respectively receive the forwarding detection packet sent by the first switch, and the line card 23 searches for the local forwarding detection session.
  • the forwarding detection packet of the LCP For the forwarding detection packet of the LCP, the forwarding detection packet received by the member port 35, the receiving time of the member port 35, the forwarding detection packet received by the member port 36, and the forwarding detection receiving time of the member port 36 are updated.
  • the member ports 37, 38 of the line card 24 are processed the same as the member ports 35, 36 of the line card 23.
  • the first switch and the second switch are switches having the function of transmitting and forwarding detection messages, and are also switches that receive and send detection messages, and can simultaneously have the function of transmitting and forwarding detection messages and receiving. Forward the switch that detects the packet.
  • bidirectional forwarding detection processing may also be performed between at least two switches having both a function of transmitting and forwarding detection messages and receiving a forwarding detection message. The above processing procedures are all within the scope of the present invention.
  • Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions for performing any of the methods described above.
  • each module/unit in the above embodiment may be implemented in the form of hardware, for example, by an integrated circuit to implement its corresponding function, It can be implemented in the form of a software function module, for example, by a processor executing a program/instruction in the memory and memory to implement its corresponding function.
  • the invention is not limited to any specific form of combination of hardware and software.
  • the listed technical solution avoids the false alarm of the member port or does not report the down, resulting in packet loss, and also satisfies the simultaneous use of multiple service modules of the lacp link, thereby improving the accuracy and resources of the forwarding detection. use.

Abstract

A link aggregation control protocol (lacp)-based forwarding detection method and system. During the process of realizing forwarding detection of various member ports, a first switch sends a forwarding detection packet to a second switch through an lacp link; and a line card of the second switch detects a condition where a member port thereof receives the forwarding detection packet; if it is detected that the member port receiving the forwarding detection packet has timed out, the member port has gone down, and it is reported to a main control board that the port has gone down; if all member ports of the line card of the second switch have timed out, it is reported to the main control board that the lacp link goes down, and a down notification packet is also sent to other line cards of the second switch at the same time, so that the main control board controls to conduct switching processing on corresponding ports. The line card of the second switch receives the down notification packet, parses same and finds a corresponding port from a locally recorded member port list, and switches the state of the port thereof.

Description

一种基于lacp的转发检测方法及系统Lacp-based forwarding detection method and system 技术领域Technical field
本文涉及但不限于数据通信技术,尤指一种基于lacp(链路汇聚控制协议,Link Aggregation Control Protocol)的转发检测方法及系统。This document relates to but not limited to data communication technology, especially a forwarding detection method and system based on LCP (Link Aggregation Control Protocol).
背景技术Background technique
双向转发检测的一个作用是在相邻的转发引擎(包括接口,数据链路和一些可能的扩展引擎)之间,通过建立路径,提供一种低负载,短侦测周期的失效侦测方法。另外一个作用是提供一种可以在任何协议层面,任何媒质上进行运行的独立的侦测机制。One of the functions of bidirectional forwarding detection is to provide a low-load, short-detection period failure detection method by establishing a path between adjacent forwarding engines (including interfaces, data links, and some possible extension engines). Another role is to provide an independent detection mechanism that can run on any medium at any protocol level.
目前的双向转发检测有两种软件实现机制:There are two software implementation mechanisms for current two-way forwarding detection:
一、主控板处理所有双向转发检测报文的集中式方法。即协商报文、检测报文及发送报文都由主控板来处理。这种控制方式的好处在于所有报文都只由主控板处理,支持任何三层链路的双向转发检测,包括基于lacp的双向转发检测。但是,正是由于所有的报文都必须通过主控板,大量的双向转发检测报文上送主控板,会导致主控板中央处理器(cpu,Central Processing Unit)过于繁忙,造成每一个业务模块都无法正常使用。虽然主控板和线卡之间交换报文采用的是快速异步消息,但仍达不到在10毫秒(ms)内处理相关报文信息的性能要求。1. The centralized control method for the main control board to process all bidirectional forwarding detection messages. That is, the negotiation packet, the detection packet, and the transmission packet are all processed by the main control board. The advantage of this control method is that all messages are processed only by the main control board, supporting bidirectional forwarding detection of any Layer 3 link, including LCP-based bidirectional forwarding detection. However, it is because all the packets must pass through the main control board, and a large number of bidirectional forwarding detection packets are sent to the main control board, which causes the central processing unit (cpu, Central Processing Unit) to be too busy, resulting in each Business modules are not working properly. Although the message exchanged between the main control board and the line card is fast asynchronous message, the performance requirement of processing related message information within 10 milliseconds (ms) is still not achieved.
为了解决方式一的问题,在相关技术中一般采用下述控制方式实现的双向转发检测。具体实现方案如下:In order to solve the problem of the first method, the bidirectional forwarding detection implemented by the following control method is generally adopted in the related art. The specific implementation plan is as follows:
主控板只处理协商报文,协商成功后会话由线卡来检测报文、发送报文。因为协商报文对实时性要求不高,而检测报文和发送报文对实时性能的要求是非常高的。因此在所述控制处理方式中,协商报文与检测报文及发送报文分开处理,协商报文由主控板集中处理,检测报文和发送报文则由某一个线卡自己处理。但是,随着通信技术的不断发展,在基于lacp的双向转发检测中,成员端口非常多,如果某一个成员端口的链路发生异常,如果双向转发检测走链路发生异常的成员端口,可能导致双向转发检测误报down(表示链 路不通或异常)。如果双向转发检测报文不走链路发生异常的成员端口,双向转发检测不报down,会造成大量的数据包丢失,不能满足性能要求。The main control board processes only the negotiation packets. After the negotiation succeeds, the line card detects the packets and sends the packets. Because the negotiation message has low real-time requirements, the requirements for real-time performance of the detection message and the transmission message are very high. Therefore, in the control processing mode, the negotiation packet is processed separately from the detection packet and the transmission packet, and the negotiation packet is processed centrally by the main control board, and the detection packet and the transmission packet are processed by a line card itself. However, with the continuous development of the communication technology, there are many member ports in the LCP-based bidirectional forwarding detection. If the link of a member port is abnormal, if the bidirectional forwarding detects the abnormal member port of the link, the Bidirectional forwarding detection false positives down (representation chain The road is blocked or abnormal.) If the two-way forwarding detection packet does not pass the abnormal member port, the two-way forwarding detection does not report the down, which causes a large number of data packets to be lost and cannot meet the performance requirements.
因此,在目前的lacp的双向转发检测实现方案,在对lacp的链路使能双向转发检测时,既要支持基于lacp链路的双向转发检测需求,同时又需要对lacp的每个成员链路实现双向转发检测的需求,而目前的lacp的双向转发检测实现方案并无法满足这两个需求,目前也没有有效的解决方案。Therefore, in the current bicp bidirectional forwarding detection implementation, when bidirectional forwarding detection is enabled for the link of the lacp, both the bidirectional forwarding detection requirement based on the lacp link and the member link of the lacp are required. The need for bidirectional forwarding detection is realized, and the current two-way forwarding detection implementation of lacp cannot meet these two requirements, and there is currently no effective solution.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供一种基于lacp的转发检测方法,在基于lacp接口上既能实现转发检测功能,又能保证lacp某成员端口支持转发检测,而不影响其它成员端口的功能实现。The embodiment of the present invention provides a method for forwarding detection based on LCP. The function of forwarding detection can be implemented on the LACP interface, and the member port of the LCP can support forwarding detection without affecting the function implementation of other member ports.
本发明实施例提供了一种基于lacp的转发检测方法,包括:The embodiment of the invention provides a method for forwarding detection based on lacp, comprising:
第一交换机与第二交换机协商并建立lacp链路,第一交换机通过所述lacp链路向第二交换机定时发送转发检测报文;The first switch negotiates with the second switch and establishes a lacp link, and the first switch periodically sends a forwarding detection packet to the second switch by using the LACP link;
所述第二交换机检测接收所述转发检测报文的成员端口的报文接收情况;对于接收所述转发检测报文出现超时的成员端口,修改其端口状态,并进行端口切换处理。The second switch detects the packet receiving status of the member port that receives the forwarding detection packet, and modifies the port status of the member port that has timed out the forwarding detection packet, and performs port switching processing.
可选的,所述第一交换机通过所述lacp链路向第二交换机定时发送转发检测报文的步骤包括:Optionally, the step of the first switch periodically sending the forwarding detection packet to the second switch by using the LACP link includes:
确定所述第一交换机每一个线卡中状态为active的成员端口;Determining a member port of an active state in each line card of the first switch;
所述第一交换机每一个线卡分别封装转发检测报文,并由其状态为active的成员端口分别定时向所述第二交换机发送所述转发检测报文。Each of the first switches of the first switch encapsulates the forwarding detection packet, and the member port whose status is active periodically sends the forwarding detection packet to the second switch.
可选的,所述第二交换机检测接收所述转发检测报文的成员端口的报文接收情况的步骤包括:Optionally, the step of detecting, by the second switch, the packet receiving status of the member port that receives the forwarding detection packet includes:
所述第二交换机线卡的每一个成员端口接收到所述转发检测报文,并更新该成员端口的报文接收时间; Receiving, by the member port of the second switch line card, the forwarding detection packet, and updating the packet receiving time of the member port;
所述第二交换机线卡根据所述每一个成员端口的报文接收时间判断该成员端口接收报文是否超时。The second switch line card determines, according to the packet receiving time of each member port, whether the packet received by the member port times out.
可选的,所述对于接收报文出现超时的成员端口,修改其端口状态,并进行切换处理的步骤包括:Optionally, the step of modifying the port status of the member port that receives the timeout of the received packet and performing the handover process includes:
当第二交换机线卡中有至少一个成员端口接收转发检测报文出现超时,将出现超时的成员端口的状态由active改为inactive,将该成员端口标识为down,并构建成员端口的down通告报文;将所述成员端口的down通告报文上报给其他线卡,并对出现超时的成员端口上报给主控板对所述出现超时的成员端口进行切换处理。When at least one member port of the second switch line card receives the forwarding detection packet, the status of the member port that has timed out is changed from active to inactive, the member port is identified as down, and the down notification of the member port is established. If the member port of the member port is reported to the other line card, the member port that has timed out is reported to the main control board to switch the member port that has timed out.
可选的,如果第二交换机中至少一个线卡的所有成员端口接收转发检测报文都出现超时,上报主控板该线卡的lacp链路down。Optionally, if all the member ports of the at least one line card of the second switch receive the forwarding detection packet, the LCP link of the line card of the main control board is down.
可选的,还包括:第二交换机中的线卡将成员端口的down通告报文发送给所述第二交换机中的其它每一个线卡;其它线卡对所述down通告报文进行解析,得到第二交换机中出现超时的成员端口信息,并将更新所述线卡的状态。Optionally, the line card in the second switch sends the down notification message of the member port to each of the other line cards in the second switch; the other line card parses the down notification message. The member port information that has timed out in the second switch is obtained, and the status of the line card is updated.
可选的,其它线卡在收到收到down报文后,还包括向第一交换机进行发送。Optionally, after receiving the downlink packet, the other line card further includes sending to the first switch.
可选的,向第一交换机发送之后,还包括以下步骤:Optionally, after sending to the first switch, the following steps are further included:
所述第一交换机线卡对所述down通告报文进行解析,得到第二交换机中出现超时的成员端口的信息;The first switch line card parses the down advertisement packet to obtain information about a member port that has timed out in the second switch;
第一交换机根据解析得到的成员端口信息确定对应于第一交换机中的成员端口,并将所述第一交换机中的成员端口的状态由active改为inactive。The first switch determines, according to the parsed member port information, a member port corresponding to the first switch, and changes the state of the member port in the first switch from active to inactive.
在本发明实施例中,所述down通告报文包括:发送报文的线卡mac地址,接收报文的线卡mac地址,报文类型,通告报文的长度和成员端口down的具体数据。In the embodiment of the present invention, the down advertisement message includes: a line card mac address for sending a message, a line card mac address for receiving a message, a packet type, a length of the advertisement packet, and specific data of the member port down.
本发明实施例还提供了一种基于lacp的转发检测系统,包括至少一个设置为发送转发检测报文的第一交换机和至少一个设置为接收转发检测报文的第二交换机,所述第一交换机与所述第二交换机协商并建立了lacp链路; The embodiment of the present invention further provides a LACP-based forwarding detection system, including at least one first switch configured to send a forwarding detection message and at least one second switch configured to receive a forwarding detection message, the first switch Negotiating with the second switch and establishing a lacp link;
所述第一交换机,设置为通过所述lacp链路向第二交换机定时发送转发检测报文;The first switch is configured to periodically send a forwarding detection packet to the second switch by using the LACP link;
所述第二交换机,设置为检测接收所述转发检测报文的成员端口的报文接收情况;对于接收所述转发检测报文出现超时的成员端口,修改其端口状态,并进行端口切换处理。The second switch is configured to detect a packet receiving condition of the member port that receives the forwarding detection packet, and modify a port state of the member port that receives the forwarding detection packet that has timed out, and perform port switching processing.
本发明实施例的有益效果:Advantageous effects of embodiments of the present invention:
本发明实施例提供的基于lacp的转发检测方法,在lacp接口实现转发检测的同时,也保证所述lacp中每一个成员端口也能实现转发检测,第二交换机线卡检测出所述线卡中的每个成员端口是否有接收到转发检测报文,若所述成员端口在规定的检测时间内没有接收到,则说明所述成员端口的物理链路发生异常,同时上报主控板所述成员端口down,并发送所述成员端口的down通告报文给所述第二交换机的其他线卡。对于down的成员端口,判断是否是线卡的所有成员端口都超时,或者是线卡只有部分成员端口超时,若是都超时,上报主控板lacp链路down,如果不是都超时,则将对相应的成员端口的状态进行切换,进而剔除lacp链路中的异常成员端口,并非像相关技术中对成员端口进行转发检测检测,只有在对整个lacp链路使能时,才同时实现lacp链路的转发检测和成员端口链路的转发检测,可避免了相关技术出现对成员端口的误报down或者不报down,造成丢包的情况,同时也可满足了lacp链路实现多个业务模块同时使用,进而提高了转发检测的准确率和资源的利用。The LCP-based forwarding detection method provided by the embodiment of the present invention implements the forwarding detection on the LACP interface, and ensures that each member port in the LCP can also implement forwarding detection, and the second switch line card detects the line card. If the member port of the member board receives the forwarding detection packet, if the member port is not received within the specified detection time, the physical link of the member port is abnormal and is reported to the member of the main control board. The port is down, and the down notification message of the member port is sent to other line cards of the second switch. For the member ports that are down, check whether all the member ports of the line card are timed out, or only some member ports of the line card time out. If they all time out, report the lacp link down on the main control board. If they are not timed out, they will be corresponding. The state of the member port is switched, and the abnormal member port in the lacp link is removed. The forwarding detection detection of the member port is not performed in the related art. Only when the entire lacp link is enabled, the LACP link is simultaneously implemented. The forwarding detection and the forwarding detection of the member port link can prevent the packet loss of the member port from being reported down or not down, causing packet loss, and also satisfying the lacp link to implement multiple service modules simultaneously. , thereby improving the accuracy of forwarding detection and the utilization of resources.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1为本发明实施例线卡lacp成员端口down通告报文的报文结构图;FIG. 1 is a structural diagram of a packet of a line card lac notification message of a line card according to an embodiment of the present invention;
图2为本发明实施例检测线卡上lacp的总流程图;2 is a general flowchart of detecting a lacp on a line card according to an embodiment of the present invention;
图3为本发明实施例检测线卡内lacp的部分成员端口down的流程图;3 is a flowchart of detecting a partial member port down of a lacp in a line card according to an embodiment of the present invention;
图4为本发明实施例检测线卡上lacp的所有成员端口down的流程图;4 is a flowchart of detecting all member ports of lacp on a line card according to an embodiment of the present invention;
图5为本发明实施例发送和接收lacp的转发检测报文流程图。 FIG. 5 is a flowchart of sending and receiving a transmission detection packet of a lacp according to an embodiment of the present invention.
本发明的实施方式Embodiments of the invention
本发明实施例在实现lacp链路接口和每一个成员端口转发检测过程中,每一个成员端口都发送和接收转发检测报文,检测第二交换机中的成员端口接收报文的时间是否大于转发检测的检测时间,进而将所述第二交换机中的成员端口down的信息上报主控板,并进行切换处理,或者上报lacp链路down,并通告所述第二交换机的其他线卡和第一交换机,让所述第二交换机的其他线卡和第一交换机重新计算好更新其成员端口表项,且所述down的成员端口不再发送所述转发检测报文。避免对于lacp的转发检测出现误报或不报down,导致大量数据包丢失的问题。下面通过具体实施方式结合本发明做进一步详细说明。In the embodiment of the present invention, in the process of implementing the LACP link interface and each member port forwarding detection, each member port sends and receives a forwarding detection packet, and detects whether the time of receiving the packet by the member port in the second switch is greater than the forwarding detection. The detection time is further reported to the main control board of the member switch in the second switch, and the switching process is performed, or the lacp link is reported, and the other line cards and the first switch of the second switch are advertised. The other line cards of the second switch and the first switch recalculate the member port entries of the second switch, and the member ports of the down node no longer send the forwarding detection message. Avoid the problem of false positives or no downs on the forwarding detection of lacp, resulting in a large number of packets being lost. The present invention will be further described in detail below by way of specific embodiments.
其中,转发检测的检测时间是指预先配置的超时时间,如果第二交换机中的成员端口接收报文的时间大于预先配置的超时时间,或者在预先配置的超时时间内没有接收到报文,则说明该成员端口所在的链路异常。The detection time of the forwarding detection is a pre-configured timeout period. If the time of receiving the packet on the member port of the second switch is greater than the pre-configured timeout period, or the packet is not received within the pre-configured timeout period, The link of the member port is abnormal.
本发明实施例提供了一种基于lacp的转发检测方法及系统,包括至少一个设置为发送转发检测报文的第一交换机和至少一个设置为接收转发检测报文的第二交换机,所述第一交换机与所述第二交换机协商并建立了lacp链路;The embodiment of the present invention provides a LCP-based forwarding detection method and system, including at least one first switch configured to send a forwarding detection message and at least one second switch configured to receive a forwarding detection message, the first The switch negotiates with the second switch and establishes a lacp link;
所述第一交换机,设置为通过所述lacp链路向第二交换机定时发送转发检测报文;The first switch is configured to periodically send a forwarding detection packet to the second switch by using the LACP link;
所述第二交换机,设置为检测接收所述转发检测报文的成员端口的报文接收情况;对于接收所述转发检测报文出现超时的成员端口,修改其端口状态,并进行端口切换处理。The second switch is configured to detect a packet receiving condition of the member port that receives the forwarding detection packet, and modify a port state of the member port that receives the forwarding detection packet that has timed out, and perform port switching processing.
所述基于lacp的转发检测系统的第一交换机与第二交换机之间是通过基于lacp的转发检测方法来实现报文的发送,以及第一交换机和第二交换机的链路成员端口的检测。The first switch and the second switch of the LCP-based forwarding detection system implement packet transmission by using a lacp-based forwarding detection method, and detection of link member ports of the first switch and the second switch.
请参照图1,如图1所示为本发明实施例lacp成员端口down通告报文的结构图。所述down通告报文包括:目的介质访问控制(DMAC,Dest Media Access Control)、源介质访问控制(SMAC,Source Media Access Control)、类型(TYPE)、长度(LENGTH)、数据(DATA)。 Referring to FIG. 1, FIG. 1 is a structural diagram of a lacp member port down notification message according to an embodiment of the present invention. The down notification message includes: DMC (Dest Media Access Control), Source Media Access Control (SMAC), Type (TYPE), Length (LENGTH), and Data (DATA).
DMAC:发送报文的线卡媒体访问控制(mac,Media Access Control)地址,共6个字节。DMAC: Line card media access control (mac, Media Access Control) address for sending packets, a total of 6 bytes.
SMAC:接收报文的线卡mac地址,共6个字节。SMAC: The line card mac address of the received message, a total of 6 bytes.
TYPE:报文类型,两个字节,这里定义为0xeefe,表示板间lacp成员端口down的通告报文类型。TYPE: Packet type, two bytes, defined here as 0xeefe, indicating the type of the advertisement packet for the lcp member port down.
LENGTH:通告报文的长度,具体是指下面的DATA的数据长度。LENGTH: The length of the advertisement message, specifically the data length of the following DATA.
DATA:成员端口down的具体数据。DATA: Specific data of the member port down.
如图2所示为本发明实施例检测lacp的总流程图,在所述图中检测lacp及成员端口是否down,以及lacp的转发检测报文的发送和接收处理。FIG. 2 is a schematic flowchart of detecting LCP according to an embodiment of the present invention, in which the LCP and the member port are detected to be down, and the transmission and reception processing of the LCP forwarding detection message is detected.
所述第一交换机每一个线卡的成员端口定时向所述第二交换机中对应的成员端口发送转发检测报文,第二交换机对应的成员端口接收到所述转发检测报文,然后第二交换机检测并找出对应的成员端口所在的线卡,确定转发检测会话的处理线卡,所述线卡再对接收到的所述转发检测报文进行处理,具体步骤如下:The member port of each line card of the first switch periodically sends a forwarding detection packet to the corresponding member port of the second switch, and the member port corresponding to the second switch receives the forwarding detection packet, and then the second switch Detecting and finding the line card where the corresponding member port is located, determining the processing line card for forwarding the detection session, and the line card processing the received forwarding detection message again, as follows:
步骤201:第二交换机的每一个线卡检测该线卡的所有成员端口是否全部超时。如果是,通知主控板所述lacp链路down,并通告给所述第二交换机的其它线卡更新成员端口状态,如果不是,则执行下一步骤202。Step 201: Each line card of the second switch detects whether all member ports of the line card all time out. If yes, the main control board is notified that the lacp link is down, and the other line cards of the second switch are notified to update the member port status. If not, the next step 202 is performed.
步骤202:第二交换机的每一个线卡检测是否有成员端口超时。如果是,所述成员端口出现异常,并对异常成员端口上报给主控板对成员端口进行down处理,并通告给第二交换机的其他线卡更新成员端口状态,如果不是,则结束本流程。Step 202: Each line card of the second switch detects whether a member port times out. If yes, the member port is abnormal, and the member ports that are reported to the main control board are down-processed, and the other line cards of the second switch are notified to update the member port status. If not, the process ends.
在本发明的实施例中,检测第二交换机线卡中至少有一个成员端口超时。如果超时,则通告给第二交换机的其他显卡更新成员端口状态。请参照图3,其过程具体如下:In an embodiment of the invention, detecting that at least one member port in the second switch line card times out. If it times out, it is advertised to the other switch of the second switch to update the member port status. Please refer to Figure 3, the process is as follows:
首先,第二交换机的每一个线卡检测该线卡对应的成员端口对于接收转发检测报文的情况,当至少有一个成员端口的转发检测报文接收出现超时,将出现超时的成员端口的状态由active改为inactive,将该成员端口标识为down。 First, each line card of the second switch detects the status of the member port corresponding to the line card for receiving the forwarding detection message. When the receiving of the forwarding detection packet of at least one member port times out, the status of the member port that times out occurs. Change from active to inactive to identify the member port as down.
例如,图3中,对于线卡23,线卡23的转发检测时间到达,找出线卡23上所有active的成员端口,检测线卡23的每个成员端口的收包时间,如果所述线卡23的成员端口35在lacp规定的检测时间内有检测到接收的转发检测报文,则说明所述成员端口35使用正常,不做处理,继续检测下一个成员端口。如果所述线卡23的成员端口35在规定的检测时间内没有检测到接收的转发检测报文,则说明所述线卡23的成员端口35的物理链路出现异常,将所述成员端口35的状态进行更新,由active改为inactive,并通知主控板12,所述线卡23的成员端口35down,执行下一步骤。For example, in FIG. 3, for the line card 23, the forwarding detection time of the line card 23 arrives, all active member ports on the line card 23 are found, and the receiving time of each member port of the line card 23 is detected, if the line If the member port 35 of the card 23 detects the received forwarding detection packet within the detection time specified by the lacp, the member port 35 is used normally, and the next member port is continuously detected without processing. If the member port 35 of the line card 23 does not detect the received forwarding detection packet within the specified detection time, the physical link of the member port 35 of the line card 23 is abnormal, and the member port 35 is The status is updated, from active to inactive, and the main control board 12 is notified, and the member port 35 of the line card 23 is down, and the next step is performed.
然后,第二交换机的线卡23向本交换机上的主控板12上报成员端口35down,并进行切换处理。Then, the line card 23 of the second switch reports the member port 35down to the main control board 12 on the switch, and performs switching processing.
对于线卡23,如果检测到lacp有成员端口出现异常,如线卡23的成员端口35down,则上报主控板12所述线卡23的成员端口35down,更新成员端口35的状态,并由主控板12控制进行切换。For the line card 23, if it is detected that the member port of the lacp is abnormal, for example, the member port 35 of the line card 23 is down, the member port 35down of the line card 23 of the main control board 12 is reported, and the status of the member port 35 is updated, and the status is updated. The control board 12 controls switching.
可选的,线卡23构建成员端口35down通告报文,并发送给线卡24。包括:对于线卡23,如果线卡23lacp的成员端口35down后,则发送成员端口down通告报文,按照图1的报文格式组down通告报文。down通告报文的内容包括:DMAC填线卡24的mac地址,SMAC填线卡23的mac地址,TYPE字段填0xeefe,LENGTH填写DATA部分数据的长度,DATA填写线卡23的成员端口35down的数据。Optionally, the line card 23 constructs a member port 35down to announce the message and sends it to the line card 24. The method includes: for the line card 23, if the member port 35 of the line card 23lacp is down, the member port is sent to notify the message, and the message is advertised according to the packet format group of FIG. The content of the down notification message includes: the mac address of the DMAC fill-in card 24, the mac address of the SMAC fill-in card 23, the TYPE field filled with 0xeefe, the LENGTH fills in the length of the DATA part data, and the DATA fills in the data of the member port 35down of the line card 23 .
可选的,线卡24接收到线卡23成员端口35的down通告报文后,由线卡24进行解析出线卡23成员端口35down的信息,并进行状态切换。包括:对于线卡24,接收到线卡23发送过来的down通告报文,并解析出线卡23的成员端口35down,从本地记录的成员端口表中,找出线卡23的成员端口35,将线卡23的成员端口35的状态由active修改为inactive。Optionally, after the line card 24 receives the down notification message of the member port 35 of the line card 23, the line card 24 parses the information of the member port 35down of the line card 23, and performs state switching. The method includes: for the line card 24, receiving the down notification message sent by the line card 23, and parsing out the member port 35down of the line card 23, and finding the member port 35 of the line card 23 from the member port table of the local record, The status of the member port 35 of the line card 23 is changed from active to inactive.
可选的,第二交换机的线卡24接收到线卡23所发送过来的down通告报文后,所述线卡24将所述down通告报文转发给第一交换机,然后所述第一交换机将所述down通告报文进行解析并更新对应成员端口的状态。Optionally, after the line card 24 of the second switch receives the down notification message sent by the line card 23, the line card 24 forwards the down notification message to the first switch, and then the first switch The downlink advertisement packet is parsed and the status of the corresponding member port is updated.
最后,检测第二交换机线卡的所有成员端口是否都down。包括:对于线卡23,如果发现成员端口35、36都down,除了需要将端口down上报主控 板12,并进行切换处理外,还需要检测本地成员端口列表,是否所有成员端口down,如果是,上报主控板12,所述lacp链路down。同理,线卡24接收到线卡23的down通告报文,发现成员端口37、38都down,检测其他成员端口是否都down,如果是,上报主控板12所述lacp链路down。Finally, it is detected whether all member ports of the second switch line card are down. Including: for the line card 23, if the member ports 35 and 36 are found to be down, in addition to reporting the port down to the main control The board 12 is configured to detect the local member port list, and all member ports are down. If yes, the main control board 12 is reported, and the lacp link is down. In the same manner, the line card 24 receives the down notification message of the line card 23, and finds that the member ports 37 and 38 are both down, detecting whether the other member ports are all down. If yes, reporting the lacp link down on the main control board 12.
在本发明的实施例中,检测所述第二交换机至少有一个线卡的所有成员端口是否全部超时。如果超时,通知主控板12所述lacp链路down,并通告所述第二交换机的其它线卡。具体请参照图4,其过程包括:In an embodiment of the invention, it is detected whether all member ports of at least one line card of the second switch are timed out. If it times out, the main control board 12 is notified that the lacp link is down, and the other line cards of the second switch are advertised. Please refer to FIG. 4 for details, the process includes:
首先,所述第二交换机的每一个线卡检测该线卡的成员端口接收转发检测报文是否全部出现超时,如果全部出现超时,则检测所述第二交换机的其他线卡的成员端口是否也全部down,如果是,并上报主控板和通告其他线卡所述lacp链路down。如:对于第二交换机线卡23,检测线卡23上的成员端口35、36接收报文是否全部超时。如果超时,则检测第二交换机中的其它线卡的成员端口是否全部down,如:线卡23检测线卡24的成员端口是否全部down,如果是,通知主控板12所述lacp链路down,并通告其它线卡,执行下一步骤。First, each line card of the second switch detects whether the member ports of the line card receive the forwarding detection message all times out. If all the timeouts occur, the member ports of the other line cards of the second switch are also detected. All down, if yes, and reported to the main control board and advertise other line cards, the lacp link is down. For example, for the second switch line card 23, it is detected whether the member ports 35 and 36 on the line card 23 receive all the packets. If it is timed out, it is detected whether all the member ports of the other line cards in the second switch are down. For example, the line card 23 detects whether the member ports of the line card 24 are all down. If yes, the main control board 12 is notified that the lacp link is down. And inform other line cards to perform the next step.
然后,第二交换机的线卡23向本交换机的主控板12发送线卡23lacp链路down。该步骤包括:对于线卡23,如果检测线卡23和所述lacp的其它线卡,如线卡24所有成员端口都down后,给主控板报所述lacp链路down。Then, the line card 23 of the second switch sends a line card 23lacp link down to the main control board 12 of the switch. The step includes: for the line card 23, if the line card 23 and the other line cards of the lacp are detected, such as all the member ports of the line card 24 are down, the main control board reports that the lacp link is down.
可选的,第二交换机线卡构建其成员端口down通告报文,并发送给本交换机的其他线卡。例如:对于线卡23,如果lacp的成员端口35、6down后,按照图1的报文格式组down报文。down报文具体为:DMAC填线卡24的mac地址,SMAC填线卡23的mac地址,TYPE字段填0xeefe,LENGTH填写DATA部分数据的长度,DATA填写端口35、36的数据。Optionally, the second switch line card constructs a member port down advertisement packet and sends it to other line cards of the switch. For example, for the line card 23, if the member ports 35 and 6 of the lacp are down, the packet is sent according to the packet format group of FIG. The down message is specifically: the mac address of the DMAC fill-in card 24, the mac address of the SMAC fill-in card 23, the TYPE field filled with 0xeefe, the LENGTH fills in the length of the DATA part of the data, and the DATA fills in the data of the port 35, 36.
最后,第二交换机的线卡24接收到down通告报文后,由线卡24进行解析找出相应的down端口,并修改端口状态。Finally, after receiving the down notification message, the line card 24 of the second switch parses the line card 24 to find the corresponding down port and modifies the port status.
对于线卡24,接收到线卡23的down通告报文,并解析线卡23的成员端口35、36down,从本地记录的成员端口表中,找出线卡23的成员端口35、36,状态由active修改为inactive。并线卡24检测所述lacp是否所有成员端口都down,如果是,第二交换机的线卡23向本交换机的主控板12发送线卡 23lacp链路down。For the line card 24, the downlink notification message of the line card 23 is received, and the member ports 35 and 36down of the line card 23 are parsed. From the member port table recorded locally, the member ports 35 and 36 of the line card 23 are found. Changed from active to inactive. The line card 24 detects whether all the member ports of the lacp are down. If yes, the line card 23 of the second switch sends a line card to the main control board 12 of the switch. 23lacp link down.
如图5所示为本发明实施例lacp成员端口发送和接收转发检测报文的流程图,在该图中清晰的描绘了转发检测报文的发送和接收,其中线卡21发送和接收本线卡成员端口的转发检测报文。线卡22发送和接收本线卡成员端口的转发检测报文;线卡23发送和接收本线卡成员端口的转发检测报文;线卡24发送和接收本线卡成员端口的转发检测报文。FIG. 5 is a flowchart of sending and receiving a forwarding detection packet of a LCP member port according to an embodiment of the present invention. The transmission and reception of a forwarding detection packet are clearly depicted in the figure, wherein the line card 21 sends and receives the line. Forwarding detection packet of the member port of the card. The line card 22 sends and receives the forwarding detection message of the member port of the line card; the line card 23 sends and receives the forwarding detection message of the member port of the line card; the line card 24 sends and receives the forwarding detection message of the member port of the line card. .
对于第一交换机的每一个线卡lacp成员端口转发检测报文发送处理过程包括:当线卡需要发送转发检测报文时,首先需要找到lacp本线卡所有active的成员端口,如:对于线卡21找到成员端口31、32,对于线卡22找到成员端口33、34;然后按照转发检测格式封装报文,在lacp的每个active成员端口31、32各送一次,同理,成员端口33、34也各发送一次。The process of sending a packet detection packet for each line card of the first switch includes: when the line card needs to send a forwarding detection packet, firstly, all the active member ports of the lacp local line card need to be found, for example, for the line card. The member ports 31 and 32 are found, and the member ports 33 and 34 are found for the line card 22; then, the packets are encapsulated according to the forwarding detection format, and are sent once for each active member port 31 and 32 of the lacp. Similarly, the member port 33, 34 is also sent once.
对于第二交换机每一个线卡lacp成员端口转发检测报文接收处理过程包括:线卡23的成员端口35、36分别接收到第一交换机发送的转发检测报文,线卡23查找本地转发检测session,对于lacp的转发检测报文,成员端口35接收的转发检测报文,更新成员端口35的接收时间,成员端口36接收的转发检测报文,更新成员端口36的转发检测接收时间。线卡24的成员端口37、38处理过程与线卡23的成员端口35、36的相同。The process for receiving the packet forwarding detection packet for each line card of the second switch includes: the member ports 35 and 36 of the line card 23 respectively receive the forwarding detection packet sent by the first switch, and the line card 23 searches for the local forwarding detection session. For the forwarding detection packet of the LCP, the forwarding detection packet received by the member port 35, the receiving time of the member port 35, the forwarding detection packet received by the member port 36, and the forwarding detection receiving time of the member port 36 are updated. The member ports 37, 38 of the line card 24 are processed the same as the member ports 35, 36 of the line card 23.
在本发明的上述实施例中,第一交换机和所述第二交换机即是具有发送转发检测报文功能的交换机,也是接收转发检测报文的交换机,可以同时具有发送转发检测报文功能和接收转发检测报文的交换机。此外,对于至少两个同时具有发送转发检测报文功能和接收转发检测报文的交换机之间还可以进行双向转发检测处理。上述的处理过程都属于本发明的保护范围。In the foregoing embodiment of the present invention, the first switch and the second switch are switches having the function of transmitting and forwarding detection messages, and are also switches that receive and send detection messages, and can simultaneously have the function of transmitting and forwarding detection messages and receiving. Forward the switch that detects the packet. In addition, bidirectional forwarding detection processing may also be performed between at least two switches having both a function of transmitting and forwarding detection messages and receiving a forwarding detection message. The above processing procedures are all within the scope of the present invention.
本发明实施例还提出了一种计算机可读存储介质,存储有计算机可执行指令,计算机可执行指令用于执行上述描述的任意一个方法。Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions for performing any of the methods described above.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也 可以采用软件功能模块的形式实现,例如通过处理器执行存储与存储器中的程序/指令来实现其相应功能。本发明不限于任何特定形式的硬件和软件的结合。One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct related hardware, such as a processor, which may be stored in a computer readable storage medium, such as a read only memory, disk or optical disk. Wait. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the above embodiment may be implemented in the form of hardware, for example, by an integrated circuit to implement its corresponding function, It can be implemented in the form of a software function module, for example, by a processor executing a program/instruction in the memory and memory to implement its corresponding function. The invention is not limited to any specific form of combination of hardware and software.
以上内容是结合具体的实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above is a further detailed description of the present invention in connection with the specific embodiments, and the specific embodiments of the present invention are not limited to the description. It will be apparent to those skilled in the art that the present invention may be made without departing from the spirit and scope of the invention.
工业实用性Industrial applicability
上市技术方案避免了对成员端口的误报down或不报down,造成丢包的情况,同时也可满足了lacp链路实现多个业务模块同时使用,进而提高了转发检测的准确率和资源的利用。 The listed technical solution avoids the false alarm of the member port or does not report the down, resulting in packet loss, and also satisfies the simultaneous use of multiple service modules of the lacp link, thereby improving the accuracy and resources of the forwarding detection. use.

Claims (10)

  1. 一种基于链路汇聚控制协议lacp的转发检测方法,包括:A forwarding detection method based on the link aggregation control protocol lacp, comprising:
    第一交换机与第二交换机协商并建立lacp链路,第一交换机通过所述lacp链路向第二交换机定时发送转发检测报文;The first switch negotiates with the second switch and establishes a lacp link, and the first switch periodically sends a forwarding detection packet to the second switch by using the LACP link;
    所述第二交换机检测接收所述转发检测报文的成员端口的报文接收情况;对于接收所述转发检测报文出现超时的成员端口,修改其端口状态,并进行端口切换处理。The second switch detects the packet receiving status of the member port that receives the forwarding detection packet, and modifies the port status of the member port that has timed out the forwarding detection packet, and performs port switching processing.
  2. 根据权利要求1所述的基于lacp的转发检测方法,其中,所述第一交换机通过所述lacp链路向第二交换机定时发送转发检测报文的步骤包括:The LACP-based forwarding detection method according to claim 1, wherein the step of the first switch transmitting the forwarding detection packet to the second switch through the LACP link comprises:
    确定所述第一交换机每一个线卡中状态为active的成员端口;Determining a member port of an active state in each line card of the first switch;
    所述第一交换机每一个线卡分别封装转发检测报文,并由其状态为active的成员端口分别定时向所述第二交换机发送所述转发检测报文。Each of the first switches of the first switch encapsulates the forwarding detection packet, and the member port whose status is active periodically sends the forwarding detection packet to the second switch.
  3. 根据权利要求1所述的基于lacp的转发检测方法,其中,所述第二交换机检测接收所述转发检测报文的成员端口的报文接收情况的步骤包括:The LACP-based forwarding detection method according to claim 1, wherein the step of detecting, by the second switch, the packet receiving status of the member port that receives the forwarding detection packet comprises:
    所述第二交换机线卡的每一个成员端口接收到所述转发检测报文,更新该成员端口的报文接收时间;Receiving, by the member switch port of the second switch line card, the forwarding detection packet, and updating the packet receiving time of the member port;
    所述第二交换机线卡根据所述每一个成员端口的报文接收时间判断该成员端口接收报文是否超时。The second switch line card determines, according to the packet receiving time of each member port, whether the packet received by the member port times out.
  4. 根据权利要求1-3任一项所述的基于lacp的转发检测方法,其中,所述对于接收报文出现超时的成员端口,修改其端口状态,并进行切换处理的步骤包括:The LCP-based forwarding detection method according to any one of claims 1 to 3, wherein the step of modifying the port state of the member port that receives the timeout of the received message and performing the handover process comprises:
    当第二交换机线卡中有至少一个成员端口接收转发检测报文出现超时,将出现超时的成员端口的状态由active改为inactive,将该成员端口标识为down,并构建成员端口的down通告报文;将所述成员端口的down通告报文上报给其他线卡,并对出现超时的成员端口上报给主控板对所述出现超时的成员端口进行切换处理。When at least one member port of the second switch line card receives the forwarding detection packet, the status of the member port that has timed out is changed from active to inactive, the member port is identified as down, and the down notification of the member port is established. If the member port of the member port is reported to the other line card, the member port that has timed out is reported to the main control board to switch the member port that has timed out.
  5. 根据权利要求4所述的基于lacp的转发检测方法,其中,如果第二交 换机中至少一个线卡的所有成员端口接收转发检测报文都出现超时,上报主控板该线卡的lacp链路down。The LACP-based forwarding detection method according to claim 4, wherein if the second intersection All the member ports of at least one line card in the switch are timed out and the LCP link of the line card is down.
  6. 根据权利要求4所述的基于lacp的转发检测方法,还包括:所述第二交换机中的线卡将成员端口的down通告报文发送给所述第二交换机中的其它每一个线卡;其它线卡对所述down通告报文进行解析,得到第二交换机中出现超时的成员端口信息,并将更新所述线卡的状态。The LCP-based forwarding detection method of claim 4, further comprising: the line card in the second switch sending the down notification message of the member port to each of the other line cards in the second switch; The line card parses the down advertisement packet to obtain member port information that has timed out in the second switch, and updates the status of the line card.
  7. 根据权利要求6所述的基于lacp的转发检测方法,其它线卡在收到down报文后,还包括向第一交换机进行发送。The LCP-based forwarding detection method according to claim 6, after the other line cards receive the down message, the line card further includes sending to the first switch.
  8. 根据权利要求7所述的基于lacp的转发检测方法,向第一交换机发送之后,还包括以下步骤:The LACP-based forwarding detection method according to claim 7, after being sent to the first switch, further comprising the following steps:
    所述第一交换机线卡对所述down通告报文进行解析,得到第二交换机中出现超时的成员端口的信息;The first switch line card parses the down advertisement packet to obtain information about a member port that has timed out in the second switch;
    所述第一交换机根据解析得到的成员端口信息确定对应于第一交换机中的成员端口,并将所述第一交换机中的成员端口的状态由active改为inactive。The first switch determines, according to the parsed member port information, a member port corresponding to the first switch, and changes the state of the member port in the first switch from active to inactive.
  9. 根据权利要求4所述的基于lacp的转发检测方法,其中,所述down通告报文包括:发送报文的线卡媒体访问控制mac地址,接收报文的线卡mac地址,报文类型,通告报文的长度和成员端口down的具体数据。The LCP-based forwarding detection method according to claim 4, wherein the down notification message includes: a line card medium access control mac address for sending a message, a line card mac address for receiving a message, a message type, and an advertisement. The length of the packet and the specific data of the member port down.
  10. 一种基于链路汇聚控制协议lacp的转发检测系统,包括至少一个设置为发送转发检测报文的第一交换机和至少一个设置为接收转发检测报文的第二交换机,所述第一交换机与所述第二交换机协商并建立了lacp链路;A forwarding detection system based on the link aggregation control protocol lacp includes at least one first switch configured to send a forwarding detection message and at least one second switch configured to receive a forwarding detection message, the first switch and the second switch Said second switch negotiates and establishes a lacp link;
    所述第一交换机,设置为通过所述lacp链路向第二交换机定时发送转发检测报文;The first switch is configured to periodically send a forwarding detection packet to the second switch by using the LACP link;
    所述第二交换机,设置为检测接收所述转发检测报文的成员端口的报文接收情况;对于接收所述转发检测报文出现超时的成员端口,修改其端口状态,并进行端口切换处理。 The second switch is configured to detect a packet receiving condition of the member port that receives the forwarding detection packet, and modify a port state of the member port that receives the forwarding detection packet that has timed out, and perform port switching processing.
PCT/CN2016/087097 2015-06-25 2016-06-24 Lacp-based forwarding detection method and system WO2016206635A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510357570.0 2015-06-25
CN201510357570.0A CN106301871A (en) 2015-06-25 2015-06-25 A kind of forwarding detection (BFD) method based on lacp and system

Publications (1)

Publication Number Publication Date
WO2016206635A1 true WO2016206635A1 (en) 2016-12-29

Family

ID=57584547

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/087097 WO2016206635A1 (en) 2015-06-25 2016-06-24 Lacp-based forwarding detection method and system

Country Status (2)

Country Link
CN (1) CN106301871A (en)
WO (1) WO2016206635A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107547452A (en) * 2017-07-11 2018-01-05 新华三技术有限公司 A kind of distributed communication equipment and its message forwarding method and device
CN113411254A (en) * 2021-05-13 2021-09-17 新华三大数据技术有限公司 Link processing method and device
CN113872827A (en) * 2021-09-10 2021-12-31 苏州浪潮智能科技有限公司 Method and device for analyzing snakelike test failure of switch and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116366536A (en) * 2019-02-18 2023-06-30 中兴通讯股份有限公司 Link aggregation port switching method, network equipment and computer storage medium
CN111030877A (en) * 2019-12-26 2020-04-17 杭州迪普科技股份有限公司 Main/standby equipment switching method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436938A (en) * 2007-11-13 2009-05-20 华为技术有限公司 Method, system and switching equipment for halting/recovering port transmitting and receiving service
CN102025616A (en) * 2010-11-25 2011-04-20 中兴通讯股份有限公司 Method, device and switch for realizing BFD (Bidirectional Forwarding Detection)
US20150117188A1 (en) * 2012-05-08 2015-04-30 Cisco Technology, Inc. Method and apparatus for adaptive fast start in link aggregation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436938A (en) * 2007-11-13 2009-05-20 华为技术有限公司 Method, system and switching equipment for halting/recovering port transmitting and receiving service
CN102025616A (en) * 2010-11-25 2011-04-20 中兴通讯股份有限公司 Method, device and switch for realizing BFD (Bidirectional Forwarding Detection)
US20150117188A1 (en) * 2012-05-08 2015-04-30 Cisco Technology, Inc. Method and apparatus for adaptive fast start in link aggregation

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107547452A (en) * 2017-07-11 2018-01-05 新华三技术有限公司 A kind of distributed communication equipment and its message forwarding method and device
CN107547452B (en) * 2017-07-11 2020-09-25 新华三技术有限公司 Distributed communication equipment and message forwarding method and device thereof
CN113411254A (en) * 2021-05-13 2021-09-17 新华三大数据技术有限公司 Link processing method and device
CN113872827A (en) * 2021-09-10 2021-12-31 苏州浪潮智能科技有限公司 Method and device for analyzing snakelike test failure of switch and storage medium

Also Published As

Publication number Publication date
CN106301871A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
WO2016206635A1 (en) Lacp-based forwarding detection method and system
US9742663B2 (en) System and method for reducing information loss in an aggregated information handling system
US8971295B2 (en) Soft handoffs in networks
US9948575B2 (en) Issuing method for forwarding adjacency link
US7969989B2 (en) High performance ethernet networking utilizing existing fibre channel arbitrated loop HBA technology
EP2536066A1 (en) Link detecting method, apparatus and system
EP3691205B1 (en) Traffic forwarding method and traffic forwarding apparatus
WO2021135468A1 (en) Segment identifier determining method and device
CN111682927B (en) Message synchronization method, device, equipment and medium based on MLAG environment
WO2020135395A1 (en) Notification method and device for prefix identifier of cross-interior gateway protocol
US9450856B2 (en) Expanding member ports of a link aggregation group between clusters
WO2017054547A1 (en) Bidirectional forwarding detection method and apparatus
JP2013507879A (en) Reliable communication in on-chip network
KR20150007623A (en) Method and appratus for protection switching in packet transport system
US20160205033A1 (en) Pool element status information synchronization method, pool register, and pool element
US20210289578A1 (en) Controlling method for coexistence of dual modes, wi-fi chip, and communication device
WO2016095322A1 (en) Vrrp-based data transmission method and apparatus
US20140050092A1 (en) Load sharing method and apparatus
US9608897B2 (en) Method and device for transferring bootstrap message
US20150032815A1 (en) Message forwarding in data center network
CN103036815B (en) A kind of information technology and communication technology ICT emerging system
US7852753B2 (en) Method and apparatus for centralized selection of a control network
US11570073B1 (en) Service status notification
US10003469B2 (en) Multicast forwarding method and apparatus in transparent interconnection of lots of link network, and routing bridge
WO2020103718A1 (en) Connection establishment method, packet transmission method, device, and storage medium

Legal Events

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

Ref document number: 16813751

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16813751

Country of ref document: EP

Kind code of ref document: A1