WO2023273838A1 - Method and apparatus for establishing session on basis of bfd technology, and network device and computer storage medium - Google Patents

Method and apparatus for establishing session on basis of bfd technology, and network device and computer storage medium Download PDF

Info

Publication number
WO2023273838A1
WO2023273838A1 PCT/CN2022/098219 CN2022098219W WO2023273838A1 WO 2023273838 A1 WO2023273838 A1 WO 2023273838A1 CN 2022098219 W CN2022098219 W CN 2022098219W WO 2023273838 A1 WO2023273838 A1 WO 2023273838A1
Authority
WO
WIPO (PCT)
Prior art keywords
session
bfd
queue
link establishment
bfd session
Prior art date
Application number
PCT/CN2022/098219
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 WO2023273838A1 publication Critical patent/WO2023273838A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • 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/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Definitions

  • the embodiments of the present application relate to the technical field of IP network communication, and in particular, relate to a method, device, network device, and computer storage medium for establishing a session based on the BFD technology.
  • the configuration check is usually performed before the session enters the link establishment queue. Only the sessions that pass the check can enter the link establishment queue, so as to avoid sessions with missing basic configurations entering the link establishment queue, which wastes Link building resources.
  • the concurrent establishment mechanism is usually used when establishing a session, that is, there will be multiple sessions established at the same time. For example, 10 sessions can be established at the same time. If all 10 sessions are established at the same time, start from the link establishment queue Move out, and then establish the last 10 sessions in the queue. Configuration checking, concurrent establishment, and faster message exchange can all speed up the establishment of BFD sessions on the device.
  • Embodiments of the present application provide a method, device, network device, and computer storage medium for establishing a session based on the BFD technology.
  • the embodiment of the present application provides a method for establishing a session based on BFD technology, including: performing basic configuration detection on the BFD session, and adding the BFD session that passes the detection to the link establishment queue; when the BFD session in the link establishment queue If the establishment fails, move the failed BFD session to the delayed link-building queue; start a delay timer for the BFD session that failed to establish, and when the delay timer expires, the BFD session that failed to establish Move to the link establishment queue.
  • the embodiment of the present application provides a device for establishing a session based on BFD technology, including: a detection module configured to perform basic configuration detection on the BFD session, and add the BFD session that passes the detection to the link establishment queue; session establishment The module is configured to attempt to establish BFD sessions in the order of the BFD sessions in the link-building queue.
  • a detection module configured to perform basic configuration detection on the BFD session, and add the BFD session that passes the detection to the link establishment queue
  • session establishment The module is configured to attempt to establish BFD sessions in the order of the BFD sessions in the link-building queue.
  • the failed BFD sessions will be moved to the delayed link-building queue, and at the same time, the The BFD session that fails to be established starts a delay timer, and when the delay timer expires, the BFD session that fails to be established is moved to the link establishment queue.
  • the embodiment of the present application provides a network device, including a processor, a memory, and a communication bus; the communication bus is configured to realize connection and communication between the processor and the memory; the processor is configured to be It is configured to execute one or more computer programs stored in the memory, so as to implement the method for establishing a session based on the BFD technology as described in the first aspect.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to make a computer execute the A method for establishing a session based on BFD technology.
  • Fig. 1 is a schematic diagram of routing deployment of the communication network involved in this application;
  • Fig. 2 is a schematic diagram of BFD session establishment in one embodiment of the present application.
  • FIG. 3 is a flowchart of a method for establishing a session based on BFD technology provided by an embodiment of the present application
  • FIG. 4 is a flowchart of a method for processing BFD session oscillation in a method for establishing a session based on BFD technology provided by an embodiment of the present application;
  • FIG. 5A is a schematic diagram of an initial session queue in a method for establishing a session based on BFD technology provided by an embodiment of the present application;
  • FIG. 5B is a schematic diagram of queue changes during link establishment in a method for establishing a session based on BFD technology provided by an embodiment of the present application;
  • FIG. 5C is a schematic diagram of a new session queue change in a method for establishing a session based on BFD technology provided by an embodiment of the present application;
  • FIG. 5D is a schematic diagram of queue changes when the timer expires in the method for establishing a session based on the BFD technology provided by an embodiment of the present application;
  • FIG. 6A is a schematic diagram of a queue in which there are a large number of failed session establishments in the prior art
  • FIG. 6B is a schematic diagram of a queue in which there are a large number of failed session establishments in one embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a device for establishing a session based on BFD technology provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a device for establishing a session based on BFD technology provided by an embodiment of the present application.
  • Fig. 9 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • router devices in the communication network
  • one device can communicate with multiple devices.
  • BFD sessions can be manually configured on the device, or BFD sessions can be dynamically created through the routing protocols supported by the router device (such as open shortest path first ⁇ border network management protocol, etc.), so that when the link fails , BFD can quickly detect, and then trigger the routing (communication path) switching in the network (for example, the path of 5->7 can be 5->6->7, or 5->9>10->7, if the default It is the former, when a link failure between 5-6 is detected, the communication path can be switched to the latter), reducing packet loss caused by link failure and speeding up network stability.
  • BFD is a technology for link detection by sending detection packets quickly (in milliseconds). Before link detection, a session needs to be established, which is usually called session state negotiation. Link detection is performed after the session state is up. .
  • the process of BFD session state negotiation is shown in Figure 2. There are four states: down, init, up, and admindown. The first three states are commonly used, and down is the initial state.
  • the process of session establishment (link establishment) is as follows: the BFD sessions on device A and device B send mutual BFD down packets; after receiving the down packets from the peer, they switch the state to the init state.
  • the state of the message remains unchanged, and continue to send down messages; the session in the init state sends the init message of BFD; the session in the init state switches to up (established successfully) after receiving the init message, and if the init message is not received after the timeout After the session state is switched, it is down (failure to establish); after the session state is switched to up, the establishment process ends, and then the link detection is performed.
  • a BFD session that has been successfully established originally jumps to a failure (down) state due to a fault, and the BFD session with this situation is called an oscillating BFD session.
  • the reason for the flapping BFD session may be that the network packet is congested and the link itself is normal, or the link is frequently abnormal due to attacks.
  • a BFD session that flaps due to the latter is called a frequently flapping BFD session.
  • For temporarily invalid BFD sessions they can be re-established with a high probability after entering the link establishment queue, and their status quickly returns to up.
  • the embodiments of the present application propose a method, device, network device, and computer storage medium for establishing a session based on the BFD technology.
  • Newly added BFD sessions can be established first, and BFD sessions that have failed to be established can be delayed, so that sessions can be quickly established in the case of large capacity and complex configurations, and the device can quickly enter a stable state.
  • the BFD session can be recovered quickly when the BFD session fluctuates occasionally.
  • the frequent flapping can be suppressed by delaying the link establishment of the frequently fluctuating BFD session.
  • an embodiment of the present application provides a method for establishing a session based on the BFD technology, which includes but is not limited to the following steps S100 , S200 and S300 .
  • Step S100 perform basic configuration detection on the BFD session, and add the BFD session that passes the detection to the link establishment queue;
  • Step S200 when the BFD session in the chain-building queue fails to be established, move the failed BFD session to the delayed chain-building queue;
  • Step S300 start a delay timer for the BFD session that failed to be established, and move the BFD session that failed to be established to the link establishment queue when the delay timer expires.
  • the BFD sessions that pass the detection are added to the link establishment queue.
  • the initial n BFD sessions are sequentially queued in the link establishment queue and waiting to be established.
  • the delay queue is empty.
  • the above step S200 is executed, the sessions S1 and S3 are successfully established and removed from the queue, and the sessions S2 and S4 fail to be established, respectively start a delay timer t1 and t2 and move into the delay queue.
  • the newly added session Sn+1 is added to the end of the link establishment queue before the corresponding timer of the session in the delay queue expires.
  • the above step S300 is executed, the timer of session S2 in the delay queue expires, the timer is removed and removed from the delay queue, and added to the end of the link establishment queue.
  • step S300 the BFD session that fails to be established is moved to any position in the link establishment queue, which may be the front, middle or end of the link establishment queue.
  • the method for establishing a session based on the BFD technology in the embodiment of the present application has a good effect on the situation where there are a large number of sessions that fail to be established in the communication network.
  • Fig. 6A in some situations in this field, for the session that fails to establish, it is to constantly go back to queue up and try to rebuild in the link building queue usually, at this moment, newly added session Sn+n will be added to the failed session (Sn+1, Sn +67-8) to wait for the establishment later, so that the newly added session cannot be established quickly.
  • the link establishment queue is empty at this time, and the newly added session Sn+n will enter the link establishment queue directly Start establishing a session.
  • the duration of the delay timer may be a fixed value or a random value.
  • the use of random values helps the sessions that failed to establish links to be dispersed in the delay queue, preventing a large number of failed sessions from entering the delay queue and being removed from the delay queue and entering the link establishment queue at the same time, thereby ensuring that the status of a large number of BFD sessions is quickly stabilized.
  • step S200 after the successfully established BFD session is removed from the link establishment queue, further includes:
  • the oscillating BFD sessions are classified into temporarily invalid BFD sessions and frequently oscillating BFD sessions. Try to build.
  • a temporarily invalidated BFD session is added to the link establishment queue, it is inserted at the front of the link establishment queue, which is conducive to faster re-establishment of a session temporarily invalidated due to an external failure.
  • a method for establishing a session based on BFD technology which breaks the principle of equal session establishment, gives priority to the establishment of newly added BFD sessions, and delays the establishment of BFD sessions that have failed in previous attempts, so that large-capacity .
  • the session is quickly established, and the device quickly enters a steady state.
  • the BFD session can be recovered quickly when the BFD session fluctuates occasionally.
  • the frequent flapping can be suppressed by delaying the link establishment of the frequently fluctuating BFD session.
  • the embodiment of the present application also provides a device for establishing a session based on BFD technology.
  • the device includes:
  • the detection module 71 is configured to perform basic configuration detection on the BFD session, and add the BFD session passed through to the link establishment queue;
  • the session establishment module 72 is configured to try to establish according to the order of the BFD sessions in the link-building queue, if the establishment is successful, the BFD sessions that are successfully established will be removed from the link-building queue, and if the establishment fails, the BFD sessions that have failed to be established will be moved to In the delayed link establishment queue, a delay timer is enabled for the BFD sessions that fail to be established. When the delay timer expires, the BFD sessions that fail to be established will be moved to the link establishment queue.
  • the device for establishing a session based on BFD technology further includes a monitoring module 73 and a marking module 74,
  • the monitoring module 73 is configured to monitor the state of the successfully established BFD session, if the successfully established BFD session fails due to failure, the marking module 74 is configured to mark it as a temporarily invalid BFD session, and the session establishing module 72 will The temporarily invalidated BFD session is added to the link establishment queue and the number of link establishment times of the temporarily invalidated session is recorded. In some examples, when the number of link establishment times of the temporarily invalidated BFD session reaches a threshold, the marking module 74 further marks the temporarily invalidated BFD session as a frequently oscillating BFD session, and the session establishment module 72 is configured to move the frequently oscillating BFD session to In the delayed link establishment queue, a delay timer is enabled for frequently flapping BFD sessions.
  • the frequently flapped BFD sessions in the delayed link establishment queue are moved to the link establishment queue.
  • the flapping BFD sessions are classified into temporary failure BFD sessions and frequent flapping BFD sessions, so that the temporary failure BFD sessions can be quickly restored and the BFD sessions that are frequently flapping are delayed from trying to establish again.
  • a temporarily invalidated BFD session is added to the link establishment queue, it is inserted at the front of the link establishment queue, which is conducive to faster re-establishment of a session temporarily invalidated due to an external failure.
  • the principle of equal session establishment is broken, newly added BFD sessions are established first, and BFD sessions that have failed to be established are delayed, so that in the case of large capacity and complex configuration
  • the session is established quickly, and the device quickly enters a steady state.
  • the BFD session can be recovered quickly when the BFD session fluctuates occasionally.
  • the frequent flapping can be suppressed by delaying the link establishment of the frequently fluctuating BFD session.
  • the embodiment of the present application also provides a network device, including at least one processor and a memory for communicating with the at least one processor; the memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor Executing, so that at least one processor can execute the aforementioned method for establishing a session based on the BFD technology.
  • a processor 910 and a memory 920 in a network device 900 may be connected through a bus.
  • the memory 920 as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs.
  • the memory 920 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk memory, a flash memory device, or other non-transitory solid-state storage devices.
  • the memory 920 includes memory that is remotely located relative to the processor 910, and these remote memories may be connected to the network device 900 through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the device structure shown in FIG. 9 does not constitute a limitation to the network device 900, and may include more or less components than shown in the figure, or combine some components, or arrange different components.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, for example, by the Execution by one processor 910 can make the above-mentioned one or more processors execute the method for controlling the reflective smart surface in the above-mentioned method embodiment, for example, execute the above-described steps S100 to S300 in FIG. 3 , and the method in FIG. 4 Method step S210 to step S230.
  • the method for establishing a session based on the BFD technology provided by the embodiment of the present application has at least the following beneficial effects: Breaking the principle of equal session establishment, giving priority to establishing newly added BFD sessions, and delaying the establishment of BFD sessions that have failed attempts, so that in large capacity, In the case of complex configurations, the session is quickly established, and the device quickly enters a steady state. When the device is running stably, the BFD session can be recovered quickly when the BFD session fluctuates occasionally. When the device is attacked and the BFD session fluctuates frequently, the frequent flapping can be suppressed by delaying the link establishment of the frequently fluctuating BFD session.
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer And Data Communications (AREA)

Abstract

A method and apparatus for establishing a session on the basis of BFD technology, and a network device and a computer storage medium. The method comprises: performing basic configuration detection on a BFD session, and adding the BFD session, which has passed the detection, to a link establishment queue (S100); when the BFD session in the link establishment queue fails to be established, moving the BFD session, which has failed to be established, into a delayed link establishment queue (S200); and starting a delay timer for the BFD session, which has failed to be established, and when the delay timer ends, moving the BFD session, which has failed to be established, into the link establishment queue (S300).

Description

基于BFD技术建立会话的方法、装置、网络设备及计算机存储介质Method, device, network equipment and computer storage medium for establishing session based on BFD technology
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为202110726338.5、申请日为2021年06月29日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with application number 202110726338.5 and a filing date of June 29, 2021, and claims the priority of this Chinese patent application. The entire content of this Chinese patent application is hereby incorporated by reference into this application.
技术领域technical field
本申请实施例涉及IP网络通信技术领域,尤其其涉及一种基于BFD技术建立会话的方法、装置、网络设备及计算机存储介质。The embodiments of the present application relate to the technical field of IP network communication, and in particular, relate to a method, device, network device, and computer storage medium for establishing a session based on the BFD technology.
背景技术Background technique
针对双向转发检测(Bidirectional Forwarding Detection,BFD)会话建立通常会在会话进入建链队列前进行配置检查,只有检查通过的会话才可以进入建链队列,避免基本配置缺失的会话进入建链队列,浪费建链资源。其次,在会话建立时通常会采用并发建立机制,也就是同时进行建立的会话会有多个,比如10个会话可以同时进行建立,如果这个10个在同一时刻都完成建立,就从建链队列移出,然后对队列中的后10个会话进行建立。配置检查、并发建立及加快报文交互都是能够加速设备上的BFD会话建立,但当建链队列中有大量建立失败的会话时(会话建立失败可能是由于对端会话配置缺失导致,这种情况没法通过本端检查基本配置发现),新生成的会话会排在这些会话后面,等待这些会话再次建立失败后才能被遍历到并开始建立会话,尤其是对于正常建立成功的会话偶然出现失效的情况,会话不能快速恢复状态,因为失效的会话再次建立时会被添加到建链队列的末端,对于建链而言等同新增加的会话。For bidirectional forwarding detection (Bidirectional Forwarding Detection, BFD) session establishment, the configuration check is usually performed before the session enters the link establishment queue. Only the sessions that pass the check can enter the link establishment queue, so as to avoid sessions with missing basic configurations entering the link establishment queue, which wastes Link building resources. Secondly, the concurrent establishment mechanism is usually used when establishing a session, that is, there will be multiple sessions established at the same time. For example, 10 sessions can be established at the same time. If all 10 sessions are established at the same time, start from the link establishment queue Move out, and then establish the last 10 sessions in the queue. Configuration checking, concurrent establishment, and faster message exchange can all speed up the establishment of BFD sessions on the device. However, when there are a large number of failed sessions in the link establishment queue (session establishment failures may be The situation cannot be found by checking the basic configuration on the local side), the newly generated sessions will be queued behind these sessions, and wait for these sessions to fail to be established again before they can be traversed and start to establish sessions, especially for sessions that are successfully established normally and occasionally fail In this case, the session cannot quickly restore the state, because the invalid session will be added to the end of the link establishment queue when it is established again, which is equivalent to a newly added session for link establishment.
因此,IP网络通信技术领域,尤其部署了大量BFD会话的网络,对网络故障敏感,但由于网络割接等原因设备上会残留大量建立失败的BFD会话,运营商期望新的会话快速建立,或者设备后重启期望设备上的会话能快速达到稳态,或者期望针对频繁振荡的会话能够一定程度抑制。Therefore, in the field of IP network communication technology, especially the network where a large number of BFD sessions are deployed, it is sensitive to network failures. However, due to reasons such as network cutover, there will be a large number of BFD sessions that fail to be established on the device. Operators expect new sessions to be established quickly, or After restarting the device, it is expected that the sessions on the device can quickly reach a steady state, or that the sessions that frequently fluctuate can be suppressed to a certain extent.
发明内容Contents of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics described in detail in this article. This summary is not intended to limit the scope of the claims.
本申请实施例提供了一种基于BFD技术建立会话的方法、装置、网络设备及计算机存储介质。Embodiments of the present application provide a method, device, network device, and computer storage medium for establishing a session based on the BFD technology.
第一方面,本申请实施例提供了一种基于BFD技术建立会话的方法,包括:对BFD会话进行基本配置检测,将检测通过的BFD会话添加至建链队列;当建链队列中的BFD会话建立失败,将建立失败的BFD会话移动至延时建链队列中;为所述建立失败的BFD会话开启一延时定时器,当所述延时定时器超时则将所述建立失败的BFD会话移动到所述建链队列中。In the first aspect, the embodiment of the present application provides a method for establishing a session based on BFD technology, including: performing basic configuration detection on the BFD session, and adding the BFD session that passes the detection to the link establishment queue; when the BFD session in the link establishment queue If the establishment fails, move the failed BFD session to the delayed link-building queue; start a delay timer for the BFD session that failed to establish, and when the delay timer expires, the BFD session that failed to establish Move to the link establishment queue.
第二方面,本申请实施例提供了一种基于BFD技术建立会话的装置,包括:检测模块,被配置为对BFD会话进行基本配置检测,将检测通过的BFD会话添加至建链队列;会话建立 模块,被配置为按照建链队列中的BFD会话的先后顺序进行建立尝试,当建链队列中的BFD会话建立失败,将建立失败的BFD会话移动至延时建链队列中,同时为所述建立失败的BFD会话开启一延时定时器,当所述延时定时器超时则将所述建立失败的BFD会话移动到所述建链队列中。In the second aspect, the embodiment of the present application provides a device for establishing a session based on BFD technology, including: a detection module configured to perform basic configuration detection on the BFD session, and add the BFD session that passes the detection to the link establishment queue; session establishment The module is configured to attempt to establish BFD sessions in the order of the BFD sessions in the link-building queue. When the BFD sessions in the link-building queue fail to be established, the failed BFD sessions will be moved to the delayed link-building queue, and at the same time, the The BFD session that fails to be established starts a delay timer, and when the delay timer expires, the BFD session that fails to be established is moved to the link establishment queue.
第三方面,本申请实施例提供了一种网络设备,包括处理器、存储器及通信总线;所述通信总线用于被配置为实现处理器和存储器之间的连接通信;所述处理器用于被配置为执行存储器中存储的一个或者多个计算机程序,以实现如第一方面所述的基于BFD技术建立会话的方法。In a third aspect, the embodiment of the present application provides a network device, including a processor, a memory, and a communication bus; the communication bus is configured to realize connection and communication between the processor and the memory; the processor is configured to be It is configured to execute one or more computer programs stored in the memory, so as to implement the method for establishing a session based on the BFD technology as described in the first aspect.
第四方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行如第一方面所述的基于BFD技术建立会话的方法。In the fourth aspect, the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to make a computer execute the A method for establishing a session based on BFD technology.
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the application will be set forth in the description which follows, and, in part, will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
附图说明Description of drawings
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的示例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。The accompanying drawings are used to provide a further understanding of the technical solution of the present application, and constitute a part of the description, and are used together with the examples of the application to explain the technical solution of the application, and do not constitute a limitation to the technical solution of the application.
图1是本申请涉及的通讯网络路由部署示意图;Fig. 1 is a schematic diagram of routing deployment of the communication network involved in this application;
图2是本申请一个实施例中的BFD会话建立示意图;Fig. 2 is a schematic diagram of BFD session establishment in one embodiment of the present application;
图3是本申请一个实施例提供的基于BFD技术建立会话的方法的流程图;FIG. 3 is a flowchart of a method for establishing a session based on BFD technology provided by an embodiment of the present application;
图4是本申请一个实施例提供的基于BFD技术建立会话的方法中对BFD会话振荡的处理方法流程图;FIG. 4 is a flowchart of a method for processing BFD session oscillation in a method for establishing a session based on BFD technology provided by an embodiment of the present application;
图5A是本申请一个实施例提供的基于BFD技术建立会话的方法中的初始会话队列示意图;FIG. 5A is a schematic diagram of an initial session queue in a method for establishing a session based on BFD technology provided by an embodiment of the present application;
图5B是本申请一个实施例提供的基于BFD技术建立会话的方法中的建链期间队列变化示意图;FIG. 5B is a schematic diagram of queue changes during link establishment in a method for establishing a session based on BFD technology provided by an embodiment of the present application;
图5C是本申请一个实施例提供的基于BFD技术建立会话的方法中的新增会话队列变化示意图;FIG. 5C is a schematic diagram of a new session queue change in a method for establishing a session based on BFD technology provided by an embodiment of the present application;
图5D是本申请一个实施例提供的基于BFD技术建立会话的方法中定时器超时的队列变化示意图;FIG. 5D is a schematic diagram of queue changes when the timer expires in the method for establishing a session based on the BFD technology provided by an embodiment of the present application;
图6A是现有技术中存在大量建立失败会话的队列示意图;FIG. 6A is a schematic diagram of a queue in which there are a large number of failed session establishments in the prior art;
图6B是本申请一个实施例中存在大量建立失败会话的队列示意图;FIG. 6B is a schematic diagram of a queue in which there are a large number of failed session establishments in one embodiment of the present application;
图7是本申请一个实施例提供的基于BFD技术建立会话的装置的结构示意图;FIG. 7 is a schematic structural diagram of a device for establishing a session based on BFD technology provided by an embodiment of the present application;
图8是本申请一个实施例提供的基于BFD技术建立会话的装置的结构示意图;FIG. 8 is a schematic structural diagram of a device for establishing a session based on BFD technology provided by an embodiment of the present application;
图9是本申请一个实施例提供的网络设备的结构示意图。Fig. 9 is a schematic structural diagram of a network device provided by an embodiment of the present application.
具体实施方式detailed description
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, not to limit the present application.
如图1所示,通信网络中会存在大量路由器设备(router),一台设备(如图1中的Router5)可以和多台设备进行通信,设备之间为了检测链路(可以是直连、非直连)的连通性可以在设备上手工配置大量BFD会话,也可以通过路由器设备支持的路由协议(比如开放式最短路径优先\边界网管协议等)动态创建BFD会话,这样当链路出现故障,BFD能够快速检测到,然后触发网络中路由(通信路径)切换(例如5->7的路径可以是5->6->7,也可以是5->9>10->7,如果默认是前者,当检测到5-6之间链路故障时可以将通信路径切换到后者),减少链路故障带来的丢包,加快网络稳定。As shown in Figure 1, there will be a large number of router devices (routers) in the communication network, and one device (Router5 in Figure 1) can communicate with multiple devices. For non-direct connection) connectivity, a large number of BFD sessions can be manually configured on the device, or BFD sessions can be dynamically created through the routing protocols supported by the router device (such as open shortest path first\border network management protocol, etc.), so that when the link fails , BFD can quickly detect, and then trigger the routing (communication path) switching in the network (for example, the path of 5->7 can be 5->6->7, or 5->9>10->7, if the default It is the former, when a link failure between 5-6 is detected, the communication path can be switched to the latter), reducing packet loss caused by link failure and speeding up network stability.
BFD是一种通过快速(毫秒级别)发送检测报文进行链路检测的技术,在进行链路检测前需要先建立会话,通常称为会话状态协商,当会话状态为up后再进行链路检测。BFD会话状态协商的过程如图2所示,共有四个状态:down,init,up,admindown,前三个状态是常用的,其中down是初始状态。会话建立(建链)的过程为:设备A和设备B上的BFD会话发送相互BFD的down报文;各自收到对端的down报文后就将状态切换为init状态,如果没有收到down报文状态不变,继续发送down报文;init状态的会话发送BFD的init报文;Init状态的会话收到init的报文后状态切换为up(建立成功),如果超时没有收到init报文会话状态就切换后down(建立失败);会话状态切换为up后建立过程结束,之后就进行链路检测。BFD is a technology for link detection by sending detection packets quickly (in milliseconds). Before link detection, a session needs to be established, which is usually called session state negotiation. Link detection is performed after the session state is up. . The process of BFD session state negotiation is shown in Figure 2. There are four states: down, init, up, and admindown. The first three states are commonly used, and down is the initial state. The process of session establishment (link establishment) is as follows: the BFD sessions on device A and device B send mutual BFD down packets; after receiving the down packets from the peer, they switch the state to the init state. The state of the message remains unchanged, and continue to send down messages; the session in the init state sends the init message of BFD; the session in the init state switches to up (established successfully) after receiving the init message, and if the init message is not received after the timeout After the session state is switched, it is down (failure to establish); after the session state is switched to up, the establishment process ends, and then the link detection is performed.
由此,BFD会话成功建立需要3次报文交互,状态变迁为:down->init->up。报文发送的间隔按协议规定为3-5秒,一次成功的会话建立过程时间在6-10秒左右。通常尝试三次建立,这样一个会话建立的最长时间为30秒,同时可以看出,能够建立起来的会话会很快完成建立过程,而建立失败的会话会在占用较长的建链时间。然而,在通常情况下,新生成的会话会被添加原来的一系列会话的后面,而这一系列的会话中存在有将建立失败的会话,在这种情况下,新添加的会话将要等待这些将建立失败的会话多次建立失败后才能开始尝试建立,这样容易造成会话建立的效率较低。同时,在一些情况中,原本已经建立成功的BFD会话由于出现故障而跳转到失效(down)的状态,具有这种情况的BFD会话被称为振荡的BFD会话。对于形成振荡的BFD会话的原因可能是一时网络报文拥塞导致振荡而链路本身没问题,也可能是受到攻击导致链路频繁异常,由前者造成振荡的BFD会话称为暂时失效BFD会话,而由后者造成振荡的BFD会话称为频繁振荡BFD会话。对于暂时失效BFD会话进入建链队列后大概率可以再次建立起来,其状态快速恢复为up,而对于频繁振荡BFD会话大概率再次建立时还是失败的。因此,对于本领域技术人员,通常期望新添加的BFD会话和暂时失效BFD会话能够快速被尝试建立,抑制建立失败的BFD会话和频繁振荡的BFD会话尝试建立。Therefore, three packet exchanges are required to successfully establish a BFD session, and the state transition is: down->init->up. The interval for sending messages is 3-5 seconds according to the agreement, and the time for a successful session establishment process is about 6-10 seconds. Usually three attempts are made to establish a session. The maximum time for such a session to be established is 30 seconds. At the same time, it can be seen that the session that can be established will complete the establishment process quickly, while the session that fails to be established will take a long time to establish a link. However, under normal circumstances, the newly generated session will be added behind the original series of sessions, and there are sessions that will fail to be established in this series of sessions. In this case, the newly added session will wait for these The failed session establishment can only be attempted after repeated establishment failures, which will easily result in low efficiency of session establishment. At the same time, in some cases, a BFD session that has been successfully established originally jumps to a failure (down) state due to a fault, and the BFD session with this situation is called an oscillating BFD session. The reason for the flapping BFD session may be that the network packet is congested and the link itself is normal, or the link is frequently abnormal due to attacks. A BFD session that flaps due to the latter is called a frequently flapping BFD session. For temporarily invalid BFD sessions, they can be re-established with a high probability after entering the link establishment queue, and their status quickly returns to up. However, for frequently-oscillated BFD sessions, there is a high probability that they will still fail to be re-established. Therefore, those skilled in the art generally expect that newly added BFD sessions and temporarily invalidated BFD sessions can be quickly attempted to be established, and the establishment of failed BFD sessions and frequently oscillating BFD sessions are suppressed from attempting to be established.
基于此,本申请实施例提出了一种基于BFD技术建立会话的方法、装置、网络设备及计算机存储介质。能够优先建立新添加的BFD会话,延后建立曾尝试失败的BFD会话,从而在大容量、复杂配置的情况下快速建立会话,设备快速进入稳态。在设备运行稳定情况下BFD会话偶然出现振荡时能够快速进行恢复,当设备受到攻击使得BFD会话频繁振荡的情况下能够通过对频繁振荡的BFD会话进行延时建链从而抑制振荡的频繁发生。Based on this, the embodiments of the present application propose a method, device, network device, and computer storage medium for establishing a session based on the BFD technology. Newly added BFD sessions can be established first, and BFD sessions that have failed to be established can be delayed, so that sessions can be quickly established in the case of large capacity and complex configurations, and the device can quickly enter a stable state. When the device is running stably, the BFD session can be recovered quickly when the BFD session fluctuates occasionally. When the device is attacked and the BFD session fluctuates frequently, the frequent flapping can be suppressed by delaying the link establishment of the frequently fluctuating BFD session.
参照图3,本申请实施例提供了一种基于BFD技术建立会话的方法,该方法包括但不限于以下步骤S100、步骤S200和步骤S300。Referring to FIG. 3 , an embodiment of the present application provides a method for establishing a session based on the BFD technology, which includes but is not limited to the following steps S100 , S200 and S300 .
步骤S100,对BFD会话进行基本配置检测,将检测通过的BFD会话添加至建链队列;Step S100, perform basic configuration detection on the BFD session, and add the BFD session that passes the detection to the link establishment queue;
步骤S200,当建链队列中的BFD会话建立失败,将建立失败的BFD会话移动至延时建链 队列中;Step S200, when the BFD session in the chain-building queue fails to be established, move the failed BFD session to the delayed chain-building queue;
步骤S300,为建立失败的BFD会话开启一延时定时器,当延时定时器超时则将建立失败的BFD会话移动到建链队列中。Step S300, start a delay timer for the BFD session that failed to be established, and move the BFD session that failed to be established to the link establishment queue when the delay timer expires.
参照图5A,检测通过的BFD会话添加至建链队列,例如,初始n个BFD会话依次在建链队列中并排队等待建立,此时延时队列为空。参照图5B,执行上述步骤S200,会话S1、S3建立成功被移出队列,会话S2、S4建立失败,分别开启一个延时定时器t1、t2并移入到延时队列。参照图5C,在延时队列中会话的相应定时器超时之前新增加的会话Sn+1添加到建链队列末端。参照图5D,执行上述步骤S300,延时队列中会话S2的定时器超时,去除定时器并从延时队列移出,添加到建链队列末端。Referring to FIG. 5A , the BFD sessions that pass the detection are added to the link establishment queue. For example, the initial n BFD sessions are sequentially queued in the link establishment queue and waiting to be established. At this time, the delay queue is empty. Referring to FIG. 5B , the above step S200 is executed, the sessions S1 and S3 are successfully established and removed from the queue, and the sessions S2 and S4 fail to be established, respectively start a delay timer t1 and t2 and move into the delay queue. Referring to FIG. 5C , the newly added session Sn+1 is added to the end of the link establishment queue before the corresponding timer of the session in the delay queue expires. Referring to FIG. 5D , the above step S300 is executed, the timer of session S2 in the delay queue expires, the timer is removed and removed from the delay queue, and added to the end of the link establishment queue.
在本申请的一些实施例中,在步骤S300中,将建立失败的BFD会话移动到建链队列中的任一位置,可以是移动至建链队列中的最前端、中间或末端。In some embodiments of the present application, in step S300, the BFD session that fails to be established is moved to any position in the link establishment queue, which may be the front, middle or end of the link establishment queue.
本申请实施例的基于BFD技术建立会话的方法对于通信网络中存在大量建立失败的会话的情况具有较好的效果。参照图6A,在本领域的一些情况中,对于建立失败的会话通常是不断回到建链队列中排队尝试重建,此时新加入的会话Sn+n将添加到失败会话(Sn+1、Sn+6.....)后面等待建立,这样新加入的会话并不能快速地建立。在本申请实施例中,由于此前建立失败的会话在延时队列中,并且各自的定时器未超时,这时建链队列是空的,新添加的会话Sn+n会进入到建链队列直接开始建立会话。The method for establishing a session based on the BFD technology in the embodiment of the present application has a good effect on the situation where there are a large number of sessions that fail to be established in the communication network. With reference to Fig. 6A, in some situations in this field, for the session that fails to establish, it is to constantly go back to queue up and try to rebuild in the link building queue usually, at this moment, newly added session Sn+n will be added to the failed session (Sn+1, Sn +6.....) to wait for the establishment later, so that the newly added session cannot be established quickly. In the embodiment of this application, since the sessions that failed to be established before are in the delay queue, and the respective timers have not expired, the link establishment queue is empty at this time, and the newly added session Sn+n will enter the link establishment queue directly Start establishing a session.
在本申请的一些实施例中,延时定时器的时长可以是固定值,也可以是随机值。采用随机值有利于建链失败的会话在延时队列中分散开,避免大量建立失败会话同时进入延时队列又同时被移出延时队列进入建链队列,从而保证大量BFD会话状态快速达到稳定。In some embodiments of the present application, the duration of the delay timer may be a fixed value or a random value. The use of random values helps the sessions that failed to establish links to be dispersed in the delay queue, preventing a large number of failed sessions from entering the delay queue and being removed from the delay queue and entering the link establishment queue at the same time, thereby ensuring that the status of a large number of BFD sessions is quickly stabilized.
在本申请的一些实施例中,参照图4,在上述步骤S200中,将建立成功的BFD会话移出建链队列后,还包括:In some embodiments of the present application, referring to FIG. 4, in the above step S200, after the successfully established BFD session is removed from the link establishment queue, further includes:
S210、监测建立成功的BFD会话的状态,如果建立成功的BFD会话由于故障而失效,则将其标记为暂时失效的BFD会话,将暂时失效BFD会话添加至建链队列并记录所述暂时失效会话的建链次数;S210, monitor the state of the successfully established BFD session, if the successfully established BFD session fails due to a fault, mark it as a temporarily invalid BFD session, add the temporarily invalid BFD session to the link establishment queue and record the temporarily invalid session The number of chain building times;
S220、当建链次数超过阈值,将所述暂时失效BFD会话标记成频繁振荡的BFD会话,将所述频繁振荡的BFD会话移动至延时建链队列中;S220. When the number of link establishment times exceeds the threshold, mark the temporarily invalidated BFD session as a frequently oscillating BFD session, and move the frequently oscillating BFD session to a delayed link establishment queue;
S230、为频繁振荡的BFD会话开启一延时定时器,当延时定时器超时则将延时建链队列中的频繁振荡的BFD会话移动到建链队列中。S230. Start a delay timer for the frequently oscillating BFD session, and move the frequently oscillating BFD session in the delayed link establishment queue to the link establishment queue when the delay timer expires.
在上述实施例中,通过设置失效次数的阈值将振荡的BFD会话分类为暂时失效BFD会话和频繁振荡的BFD会话,实现了将暂时失效BFD会话快速恢复建立,同时延后频繁振荡的BFD会话再次尝试建立。在一些示例中,将暂时失效BFD会话添加至建链队列时将其插入到建链队列的最前面,有利于偶然因为外部故障暂时失效的会话更快地重新建立。In the above-mentioned embodiment, by setting the threshold value of failure times, the oscillating BFD sessions are classified into temporarily invalid BFD sessions and frequently oscillating BFD sessions. Try to build. In some examples, when a temporarily invalidated BFD session is added to the link establishment queue, it is inserted at the front of the link establishment queue, which is conducive to faster re-establishment of a session temporarily invalidated due to an external failure.
通过本申请实施例的上述步骤,实现了一种基于BFD技术建立会话的方法,打破会话建立均等的原则,优先建立新添加的BFD会话,延后建立曾尝试失败的BFD会话,从而在大容量、复杂配置的情况下快速建立会话,设备快速进入稳态。在设备运行稳定情况下BFD会话偶然出现振荡时能够快速进行恢复,当设备受到攻击使得BFD会话频繁振荡的情况下能够通过对频繁振荡的BFD会话进行延时建链从而抑制振荡的频繁发生。Through the above-mentioned steps in the embodiment of the present application, a method for establishing a session based on BFD technology is realized, which breaks the principle of equal session establishment, gives priority to the establishment of newly added BFD sessions, and delays the establishment of BFD sessions that have failed in previous attempts, so that large-capacity , In the case of complex configurations, the session is quickly established, and the device quickly enters a steady state. When the device is running stably, the BFD session can be recovered quickly when the BFD session fluctuates occasionally. When the device is attacked and the BFD session fluctuates frequently, the frequent flapping can be suppressed by delaying the link establishment of the frequently fluctuating BFD session.
本申请实施例的还提供了一种基于BFD技术建立会话的装置,参照图7,该装置包括:The embodiment of the present application also provides a device for establishing a session based on BFD technology. Referring to FIG. 7, the device includes:
检测模块71,被配置为对BFD会话进行基本配置检测,将检测通过的BFD会话添加至建链队列;The detection module 71 is configured to perform basic configuration detection on the BFD session, and add the BFD session passed through to the link establishment queue;
会话建立模块72,被配置为按照建链队列中的BFD会话的先后顺序进行建立尝试,如果建立成功则将建立成功的BFD会话移出建链队列,如果建立失败则将建立失败的BFD会话移动至延时建链队列中,同时为建立失败的BFD会话开启一延时定时器,当延时定时器超时则将建立失败的BFD会话移动到建链队列中。The session establishment module 72 is configured to try to establish according to the order of the BFD sessions in the link-building queue, if the establishment is successful, the BFD sessions that are successfully established will be removed from the link-building queue, and if the establishment fails, the BFD sessions that have failed to be established will be moved to In the delayed link establishment queue, a delay timer is enabled for the BFD sessions that fail to be established. When the delay timer expires, the BFD sessions that fail to be established will be moved to the link establishment queue.
在本申请的一些实施例中,参照图8,基于BFD技术建立会话的装置还包括监测模块73和标记模块74,In some embodiments of the present application, referring to FIG. 8 , the device for establishing a session based on BFD technology further includes a monitoring module 73 and a marking module 74,
其中,该监测模块73被配置为监测建立成功的BFD会话的状态,如果建立成功的BFD会话由于故障而失效,则标记模块74被配置为将其标记为暂时失效BFD会话,会话建立模块72将暂时失效BFD会话添加至建链队列并记录所述暂时失效会话的建链次数。在一些示例中,当暂时失效BFD会话的建链次数达到阈值时,标记模块74将暂时失效BFD会话进一步标记为频繁振荡的BFD会话,会话建立模块72被配置为将频繁振荡的BFD会话移动至延时建链队列中,为频繁振荡的BFD会话开启一延时定时器,当延时定时器超时则将延时建链队列中的频繁振荡的BFD会话移动到建链队列中。通过设置失效次数的阈值将振荡的BFD会话分类为暂时失效BFD会话和频繁振荡的BFD会话,实现了将暂时失效BFD会话快速恢复建立,同时延后频繁振荡的BFD会话再次尝试建立。在一些示例中,将暂时失效BFD会话添加至建链队列时将其插入到建链队列的最前面,有利于偶然因为外部故障暂时失效的会话更快地重新建立。Wherein, the monitoring module 73 is configured to monitor the state of the successfully established BFD session, if the successfully established BFD session fails due to failure, the marking module 74 is configured to mark it as a temporarily invalid BFD session, and the session establishing module 72 will The temporarily invalidated BFD session is added to the link establishment queue and the number of link establishment times of the temporarily invalidated session is recorded. In some examples, when the number of link establishment times of the temporarily invalidated BFD session reaches a threshold, the marking module 74 further marks the temporarily invalidated BFD session as a frequently oscillating BFD session, and the session establishment module 72 is configured to move the frequently oscillating BFD session to In the delayed link establishment queue, a delay timer is enabled for frequently flapping BFD sessions. When the delay timer expires, the frequently flapped BFD sessions in the delayed link establishment queue are moved to the link establishment queue. By setting the threshold of the number of failures, the flapping BFD sessions are classified into temporary failure BFD sessions and frequent flapping BFD sessions, so that the temporary failure BFD sessions can be quickly restored and the BFD sessions that are frequently flapping are delayed from trying to establish again. In some examples, when a temporarily invalidated BFD session is added to the link establishment queue, it is inserted at the front of the link establishment queue, which is conducive to faster re-establishment of a session temporarily invalidated due to an external failure.
通过本申请实施例中的基于BFD技术建立会话的装置,打破会话建立均等的原则,优先建立新添加的BFD会话,延后建立曾尝试失败的BFD会话,从而在大容量、复杂配置的情况下快速建立会话,设备快速进入稳态。在设备运行稳定情况下BFD会话偶然出现振荡时能够快速进行恢复,当设备受到攻击使得BFD会话频繁振荡的情况下能够通过对频繁振荡的BFD会话进行延时建链从而抑制振荡的频繁发生。Through the device for establishing sessions based on BFD technology in the embodiment of the present application, the principle of equal session establishment is broken, newly added BFD sessions are established first, and BFD sessions that have failed to be established are delayed, so that in the case of large capacity and complex configuration The session is established quickly, and the device quickly enters a steady state. When the device is running stably, the BFD session can be recovered quickly when the BFD session fluctuates occasionally. When the device is attacked and the BFD session fluctuates frequently, the frequent flapping can be suppressed by delaying the link establishment of the frequently fluctuating BFD session.
本申请实施例的还提供了一种网络设备,包括至少一个处理器和用于与至少一个处理器通信连接的存储器;存储器存储有能够被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行前述的基于BFD技术建立会话的方法。The embodiment of the present application also provides a network device, including at least one processor and a memory for communicating with the at least one processor; the memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor Executing, so that at least one processor can execute the aforementioned method for establishing a session based on the BFD technology.
参照图9,以网络设备900中的处理器910和存储器920可以通过总线连接为例。存储器920作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器920可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器920包括相对于处理器910远程设置的存储器,这些远程存储器可以通过网络连接至网络设备900。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。Referring to FIG. 9 , it is taken as an example that a processor 910 and a memory 920 in a network device 900 may be connected through a bus. The memory 920, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory 920 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk memory, a flash memory device, or other non-transitory solid-state storage devices. In some implementations, the memory 920 includes memory that is remotely located relative to the processor 910, and these remote memories may be connected to the network device 900 through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
本领域技术人员可以理解,图9中示出的装置结构并不构成对网络设备900的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the device structure shown in FIG. 9 does not constitute a limitation to the network device 900, and may include more or less components than shown in the figure, or combine some components, or arrange different components.
本申请实施例的还提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个或多个处理器执行,例如,被图9中的一个处理器910执行,可使得上述一个或多个处理器执行上述方法实施例中的反射智能表面的控制方法,例如,执行以上描述的图3中的方法步骤S100至步骤S300、图4中的方法步骤S210至 步骤S230。The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, for example, by the Execution by one processor 910 can make the above-mentioned one or more processors execute the method for controlling the reflective smart surface in the above-mentioned method embodiment, for example, execute the above-described steps S100 to S300 in FIG. 3 , and the method in FIG. 4 Method step S210 to step S230.
本申请实施例提供的基于BFD技术建立会话的方法,至少具有如下有益效果:打破会话建立均等的原则,优先建立新添加的BFD会话,延后建立曾尝试失败的BFD会话,从而在大容量、复杂配置的情况下快速建立会话,设备快速进入稳态。在设备运行稳定情况下BFD会话偶然出现振荡时能够快速进行恢复,当设备受到攻击使得BFD会话频繁振荡的情况下能够通过对频繁振荡的BFD会话进行延时建链从而抑制振荡的频繁发生。The method for establishing a session based on the BFD technology provided by the embodiment of the present application has at least the following beneficial effects: Breaking the principle of equal session establishment, giving priority to establishing newly added BFD sessions, and delaying the establishment of BFD sessions that have failed attempts, so that in large capacity, In the case of complex configurations, the session is quickly established, and the device quickly enters a steady state. When the device is running stably, the BFD session can be recovered quickly when the BFD session fluctuates occasionally. When the device is attacked and the BFD session fluctuates frequently, the frequent flapping can be suppressed by delaying the link establishment of the frequently fluctuating BFD session.
以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统可以被实施为软件、固件、硬件及其适当的组合。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those skilled in the art can understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware and an appropriate combination thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit . Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
以上是对本申请的实施例进行了说明,但本申请并不局限于上述实施方式,熟悉本领域的技术人员在不违背本申请精神的前提下还可作出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。The above is the description of the embodiments of the present application, but the present application is not limited to the above-mentioned embodiments. Those skilled in the art can also make various equivalent deformations or replacements without violating the spirit of the present application. These equivalent Any modification or substitution is within the scope defined by the claims of the present application.

Claims (12)

  1. 一种基于BFD技术建立会话的方法,所述方法包括:A method for establishing a session based on BFD technology, the method comprising:
    对BFD会话进行基本配置检测,将检测通过的BFD会话添加至建链队列;Check the basic configuration of the BFD session, and add the BFD session that passes the test to the link establishment queue;
    当建链队列中的BFD会话建立失败,将建立失败的BFD会话移动至延时建链队列中;以及When the establishment of the BFD session in the link creation queue fails, move the failed BFD session to the delayed link establishment queue; and
    为所述建立失败的BFD会话开启一延时定时器,当所述延时定时器超时则将所述建立失败的BFD会话移动到所述建链队列中。A delay timer is started for the BFD session that fails to be established, and when the delay timer expires, the BFD session that fails to be established is moved to the link establishment queue.
  2. 根据权利要求1所述的基于BFD技术建立会话的方法,还包括:The method for establishing a session based on BFD technology according to claim 1, further comprising:
    监测建立成功的BFD会话的状态,如果所述建立成功的BFD会话由于故障而失效,则将其标记为暂时失效BFD会话,将所述暂时失效BFD会话添加至建链队列并记录所述暂时失效BFD会话的建链次数。Monitor the state of the successfully established BFD session, if the successfully established BFD session fails due to a fault, mark it as a temporarily invalid BFD session, add the temporarily invalid BFD session to the link establishment queue and record the temporarily invalid The number of times a BFD session is established.
  3. 根据权利要求2所述的基于BFD技术建立会话的方法,还包括:The method for establishing a session based on BFD technology according to claim 2, further comprising:
    当建链次数超过阈值,将所述暂时失效BFD会话标记成频繁振荡的BFD会话,将所述频繁振荡的BFD会话移动至延时建链队列中;When the number of link building times exceeds the threshold, the temporarily invalidated BFD session is marked as a frequently oscillating BFD session, and the frequently oscillating BFD session is moved to the delayed link building queue;
    为所述频繁振荡的BFD会话开启一延时定时器,当所述延时定时器超时则将延时建链队列中的频繁振荡的BFD会话移动到所述建链队列中。A delay timer is started for the frequently oscillating BFD session, and when the delay timer expires, the frequently oscillating BFD session in the delayed link establishment queue is moved to the link establishment queue.
  4. 根据权利要求2所述的基于BFD技术建立会话的方法,其中,将所述暂时失效BFD会话添加至建链队列,包括:The method for establishing a session based on BFD technology according to claim 2, wherein adding the temporarily invalidated BFD session to the link establishment queue includes:
    将所述暂时失效BFD会话插入到建链队列最前面。Insert the temporarily invalidated BFD session into the head of the link establishment queue.
  5. 根据权利要求1所述的基于BFD技术建立会话的方法,其中,所述延时定时器的延时时长是固定值或随机值。The method for establishing a session based on BFD technology according to claim 1, wherein the delay time of the delay timer is a fixed value or a random value.
  6. 根据权利要求1所述的基于BFD技术建立会话的方法,其中,当所述延时定时器超时则将所述建立失败的BFD会话移动到所述建链队列中的任一位置。The method for establishing a session based on BFD technology according to claim 1, wherein, when the delay timer expires, the BFD session that fails to be established is moved to any position in the link establishment queue.
  7. 一种基于BFD技术建立会话的装置,包括:A device for establishing a session based on BFD technology, comprising:
    检测模块,被配置为对BFD会话进行基本配置检测,将检测通过的BFD会话添加至建链队列;The detection module is configured to perform basic configuration detection on the BFD session, and add the BFD session that passes the detection to the link establishment queue;
    会话建立模块,被配置为按照建链队列中的BFD会话的先后顺序进行建立尝试,当建链队列中的BFD会话建立失败,将建立失败的BFD会话移动至延时建链队列中,同时为所述建立失败的BFD会话开启一延时定时器,当所述延时定时器超时则将所述建立失败的BFD会话移动到所述建链队列中。The session establishment module is configured to attempt to establish the BFD sessions in the sequence of the link establishment queue. When the BFD sessions in the link establishment queue fail to be established, the failed BFD sessions will be moved to the delayed link establishment queue. The BFD session that fails to be established starts a delay timer, and when the delay timer expires, the BFD session that fails to be established is moved to the link establishment queue.
  8. 根据权利要求7所述的基于BFD技术建立会话的装置,还包括:The device for establishing a session based on BFD technology according to claim 7, further comprising:
    监测模块;和monitoring module; and
    标记模块,markup module,
    其中,所述监测模块被配置为监测建立成功的BFD会话的状态,如果所述建立成功的BFD会话由于故障而失效,则所述标记模块被配置为将其标记为暂时失效BFD会话,所述会话建立模块将所述暂时失效BFD会话添加至建链队列并记录所述暂时失效会话的建链次数。Wherein, the monitoring module is configured to monitor the state of the successfully established BFD session, if the successfully established BFD session fails due to a fault, the marking module is configured to mark it as a temporarily invalid BFD session, the The session establishment module adds the temporarily invalidated BFD session to the link establishment queue and records the number of link establishment times of the temporarily invalidated session.
  9. 根据权利要求7所述的基于BFD技术建立会话的装置,其中,The device for establishing a session based on BFD technology according to claim 7, wherein,
    当建链次数超过阈值,所述标记模块将所述暂时失效BFD会话标记成频繁振荡的BFD会 话,所述会话建立模块被配置为将所述频繁振荡的BFD会话移动至延时建链队列中,为所述频繁振荡的BFD会话开启一延时定时器,当所述延时定时器超时则将延时建链队列中的频繁振荡的BFD会话移动到所述建链队列中。When the number of link establishment times exceeds the threshold, the marking module marks the temporarily invalidated BFD session as a frequently oscillating BFD session, and the session establishment module is configured to move the frequently oscillating BFD session to a delayed link establishment queue Start a delay timer for the frequently oscillating BFD session, and move the frequently oscillating BFD session in the delayed link establishment queue to the link establishment queue when the delay timer expires.
  10. 根据权利要求8所述的基于BFD技术建立会话的装置,其中,The device for establishing a session based on BFD technology according to claim 8, wherein,
    所述会话建立模块被配置为将所述暂时失效BFD会话插入到建链队列最前面。The session establishment module is configured to insert the temporarily invalidated BFD session into the front of the link establishment queue.
  11. 一种网络设备,包括处理器、存储器及通信总线;A network device, including a processor, a memory, and a communication bus;
    所述通信总线用于被配置为实现处理器和存储器之间的连接通信;The communication bus is configured to implement connection communication between the processor and the memory;
    所述处理器用于被配置为执行存储器中存储的一个或者多个计算机程序,以实现如权利要求1至6中任一项所述的基于BFD技术建立会话的方法。The processor is configured to execute one or more computer programs stored in the memory, so as to implement the method for establishing a session based on the BFD technology according to any one of claims 1 to 6.
  12. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行如权利要求1至6中任意一项所述的基于BFD技术建立会话的方法。A computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the BFD technology-based establishment according to any one of claims 1 to 6. method of the session.
PCT/CN2022/098219 2021-06-29 2022-06-10 Method and apparatus for establishing session on basis of bfd technology, and network device and computer storage medium WO2023273838A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110726338.5 2021-06-29
CN202110726338.5A CN115550249A (en) 2021-06-29 2021-06-29 Method, device, network equipment and computer storage medium for establishing session based on BFD technology

Publications (1)

Publication Number Publication Date
WO2023273838A1 true WO2023273838A1 (en) 2023-01-05

Family

ID=84690028

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/098219 WO2023273838A1 (en) 2021-06-29 2022-06-10 Method and apparatus for establishing session on basis of bfd technology, and network device and computer storage medium

Country Status (2)

Country Link
CN (1) CN115550249A (en)
WO (1) WO2023273838A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1527523A (en) * 2003-09-19 2004-09-08 中兴通讯股份有限公司 Method of realizing session data operation and manintenance
US20070180105A1 (en) * 2006-01-30 2007-08-02 Clarence Filsfils Technique for distinguishing between link and node failure using bidirectional forwarding detection (BFD)
CN101170459A (en) * 2007-11-28 2008-04-30 中兴通讯股份有限公司 Failure detection and link recovery method based on bidirectional forward link
CN101175252A (en) * 2007-11-28 2008-05-07 华为技术有限公司 Method and network system for establishing conversation in multimedia broadcast multicast service
CN111193796A (en) * 2019-12-26 2020-05-22 深圳证券交易所 Session keeping method based on delay queue, server and readable storage medium
KR20200072941A (en) * 2018-12-13 2020-06-23 한국전자통신연구원 Method and apparatus for handling VRRP(Virtual Router Redundancy Protocol)-based network failure using real-time fault detection

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1527523A (en) * 2003-09-19 2004-09-08 中兴通讯股份有限公司 Method of realizing session data operation and manintenance
US20070180105A1 (en) * 2006-01-30 2007-08-02 Clarence Filsfils Technique for distinguishing between link and node failure using bidirectional forwarding detection (BFD)
CN101170459A (en) * 2007-11-28 2008-04-30 中兴通讯股份有限公司 Failure detection and link recovery method based on bidirectional forward link
CN101175252A (en) * 2007-11-28 2008-05-07 华为技术有限公司 Method and network system for establishing conversation in multimedia broadcast multicast service
KR20200072941A (en) * 2018-12-13 2020-06-23 한국전자통신연구원 Method and apparatus for handling VRRP(Virtual Router Redundancy Protocol)-based network failure using real-time fault detection
CN111193796A (en) * 2019-12-26 2020-05-22 深圳证券交易所 Session keeping method based on delay queue, server and readable storage medium

Also Published As

Publication number Publication date
CN115550249A (en) 2022-12-30

Similar Documents

Publication Publication Date Title
US7903546B2 (en) Detecting unavailable network connections
US7961601B2 (en) Lesser disruptive open shortest path first handling of bidirectional forwarding detection state changes
US10505838B2 (en) System and method for diverting established communication sessions
CN107547383B (en) Path detection method and device
US9491107B1 (en) Non-stop routing with internal session mirroring and adaptive application-level rate limiting
EP2222023B1 (en) Link fault processing method and data forwarding device
CN107612754B (en) Bidirectional forwarding link fault detection method and device and network node equipment
WO2009082917A1 (en) Graceful restart method of router, router and communication system thereof
JP2013126244A (en) Packet communication device and method
CN107547368B (en) BFD session switching method, device and storage medium
US8477655B2 (en) Method, device, and system for establishing label switching path in fast rerouting switching
WO2019001197A1 (en) Link switching method and apparatus
WO2008080311A1 (en) A linkage method of links and a communication device
CN109873719B (en) Fault detection method and device
JP2006033124A (en) Tunnel fault notification device and method
US7869350B1 (en) Method and apparatus for determining a data communication network repair strategy
WO2017036165A1 (en) Link fault detection method and apparatus
WO2021143524A1 (en) Fault detection method, and apparatus
US7565694B2 (en) Method and apparatus for preventing network reset attacks
WO2023273838A1 (en) Method and apparatus for establishing session on basis of bfd technology, and network device and computer storage medium
US7680028B1 (en) Method and apparatus for restarting RSVP processes in multiple network devices
EP3550785B1 (en) Message processing method and network device
CN106301835B (en) BFD link establishing method and device and router
CN113872860B (en) Path switching method and device
WO2021018150A1 (en) Link detection method and apparatus

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: 22831658

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE