+

CN104270280B - LSP ping and tracert system and method is realized on the router - Google Patents

LSP ping and tracert system and method is realized on the router Download PDF

Info

Publication number
CN104270280B
CN104270280B CN201410442004.5A CN201410442004A CN104270280B CN 104270280 B CN104270280 B CN 104270280B CN 201410442004 A CN201410442004 A CN 201410442004A CN 104270280 B CN104270280 B CN 104270280B
Authority
CN
China
Prior art keywords
tracert
mac
lsp
lsp ping
forwarding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201410442004.5A
Other languages
Chinese (zh)
Other versions
CN104270280A (en
Inventor
付华楷
朱冰
许赛群
高璐晓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN201410442004.5A priority Critical patent/CN104270280B/en
Publication of CN104270280A publication Critical patent/CN104270280A/en
Application granted granted Critical
Publication of CN104270280B publication Critical patent/CN104270280B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种在路由器上实现LSP ping和tracert的系统及方法,涉及网络通信领域,该系统包括控制平面和转发平面,控制平面包括LSP ping和tracert应用模块、IP协议栈和控制平面信令驱动,转发平面包括转发平面信令驱动和转发微码,IP协议栈为LSP ping和tracert应用模块提供统一的收发包接口;控制平面信令驱动进行控制平面上的MAC‑IN‑MAC处理;转发平面信令驱动进行转发平面上的MAC‑IN‑MAC处理。本发明将LSP ping和tracert报文提交到转发平面,由转发平面完成相应的选路,实现LSP ping和tracert的准确性、实时性,同时性能上能获得更大的提升,降低控制平面的负担。

The invention discloses a system and method for realizing LSP ping and tracert on a router, and relates to the field of network communication. The system includes a control plane and a forwarding plane, and the control plane includes an LSP ping and tracert application module, an IP protocol stack, and a control plane information module. The forwarding plane includes the forwarding plane signaling driver and the forwarding microcode, and the IP protocol stack provides a unified interface for sending and receiving packets for the LSP ping and tracert application modules; the control plane signaling driver performs MAC-IN-MAC processing on the control plane; The forwarding plane signaling driver performs MAC-IN-MAC processing on the forwarding plane. The invention submits the LSP ping and tracert messages to the forwarding plane, and the forwarding plane completes the corresponding route selection, realizes the accuracy and real-time performance of the LSP ping and tracert, and at the same time can obtain greater improvement in performance and reduce the burden on the control plane .

Description

在路由器上实现LSP ping和tracert的系统及方法System and method for realizing LSP ping and tracert on router

技术领域technical field

本发明涉及网络通信领域,具体是涉及一种在路由器上实现LSP(LabelSwitching Path,标签交换路径)ping(端对端连通)和tracert(跟踪路由)的系统及方法。The invention relates to the field of network communication, in particular to a system and method for realizing LSP (Label Switching Path, label switching path) ping (end-to-end connectivity) and tracert (trace routing) on a router.

背景技术Background technique

在MPLS(Multi-Protocol Label Switching,多协议标签交换)的应用中,对于LSP的有效性、可达性的检测,目前没有十分有效的方法。MPLS系统主要包括控制平面和转发平面,控制平面负责MPLS转发路径(LSP)的建立,但没法检测LSP传输数据失败这种错误。而转发平面由于是基于孤立的节点,也没有办法知道上下游及整条LSP的情况,因此,需要一个让用户在合理的时间内能检测出这种问题的工具,于是LSP ping和tracert应运而生。LSPping和tracert通过基于UDP(User Data Protocol,用户数据报协议)的echo(回显)消息(包含请求和应答),来探测LSP的连通性和LSP的整条路径。In the application of MPLS (Multi-Protocol Label Switching, Multi-Protocol Label Switching), there is currently no very effective method for detecting the validity and reachability of an LSP. The MPLS system mainly includes a control plane and a forwarding plane. The control plane is responsible for establishing an MPLS forwarding path (LSP), but it cannot detect errors such as LSP transmission failures. Since the forwarding plane is based on isolated nodes, there is no way to know the situation of the upstream, downstream and the entire LSP. Therefore, a tool that allows users to detect this problem within a reasonable time is needed, so LSP ping and tracert came into being. pregnancy. The LSPping and tracert detect the connectivity of the LSP and the entire path of the LSP through an echo (echo) message (including a request and a response) based on the UDP (User Data Protocol, User Datagram Protocol).

由于电信级的组网一般带有保护场景,在此场景里,由转发平面实现检测隧道的主备状态并实现倒换,当前的隧道实时主备信息,只有转发平面感知,控制平面并不立即感知当前的主备信息,导致控制平面发送LSP ping检测报文时,并不知道该往哪条LSP发送,这是LSP ping和tracert功能实现遇到的另一个难点。Carrier-level networking generally has a protection scenario. In this scenario, the forwarding plane detects the active/standby state of the tunnel and realizes the switchover. The current real-time active/standby information of the tunnel is only perceived by the forwarding plane, and not immediately by the control plane. The current active and standby information causes the control plane to not know which LSP to send the LSP ping detection message to. This is another difficulty encountered in the implementation of the LSP ping and tracert functions.

此外,在路由器上实现MPLS功能时,MPLS的转发功能仅在转发平面上面实现,控制平面无MPLS软转发功能,即使支持软转发功能,在有主备(LSP 1:1)保护的场景下,转发平面硬件能实时检查到主备状态变化,但是控制面感知到主用状态变化有很大延迟,在延迟的时间段内控制面和转发面的主备状态存在不一致的问题。In addition, when the MPLS function is implemented on the router, the MPLS forwarding function is only implemented on the forwarding plane, and the control plane does not have the MPLS soft forwarding function. The forwarding plane hardware can detect changes in the active and standby states in real time, but there is a large delay in the control plane sensing the change in the active state. During the delayed period, the active and standby states of the control plane and the forwarding plane are inconsistent.

发明内容Contents of the invention

本发明的目的是为了克服上述背景技术的不足,提供一种在路由器上实现LSPping和tracert的系统及方法,将LSP ping和tracert报文提交到转发平面,由转发平面完成相应的选路,实现LSP ping和tracert的准确性、实时性,同时性能上能获得更大的提升,降低控制平面的负担。The purpose of the present invention is in order to overcome the deficiency of above-mentioned background technology, provide a kind of system and the method that realize LSPping and tracert on the router, submit LSP ping and tracert message to forwarding plane, complete corresponding routing by forwarding plane, realize The accuracy and real-time performance of LSP ping and tracert can be greatly improved, and the burden on the control plane can be reduced.

本发明提供一种在路由器上实现LSP ping和tracert的系统,包括控制平面和转发平面,所述控制平面包括LSP ping和tracert应用模块、IP协议栈和控制平面信令驱动,转发平面包括转发平面信令驱动和转发微码,其中:The present invention provides a system for realizing LSP ping and tracert on a router, including a control plane and a forwarding plane, the control plane includes an LSP ping and tracert application module, an IP protocol stack and a control plane signaling driver, and the forwarding plane includes a forwarding plane Signaling driver and forwarding microcode, where:

所述LSP ping和tracert应用模块用于:对LSP ping和tracert包进行协议层面的处理;The LSP ping and tracert application modules are used to: process the LSP ping and tracert packets at the protocol level;

所述IP协议栈用于:为LSP ping和tracert应用模块提供统一的收发包接口,是统一的收发包平台,IP协议栈自动创建一个操作管理维护OAM接口,加载OAM接口驱动,OAM接口驱动将LSP ping和tracert报文封装成对应的MAC-IN-MAC格式,MAC-IN-MAC是一种封装格式,用于传递控制平面和转发平面相互关注的信息;Described IP protocol stack is used for: providing unified sending and receiving packet interface for LSP ping and tracert application module, is a unified sending and receiving packet platform, IP protocol stack automatically creates an operation management maintenance OAM interface, loads OAM interface driver, OAM interface driver will LSP ping and tracert messages are encapsulated into the corresponding MAC-IN-MAC format. MAC-IN-MAC is an encapsulation format used to transmit information of mutual concern between the control plane and the forwarding plane;

所述控制平面信令驱动用于:进行控制平面上的MAC-IN-MAC处理,在控制平面发送报文时封装MAC-IN-MAC头,控制平面接收报文时剥离MAC-IN-MAC头;The control plane signaling driver is used to: perform MAC-IN-MAC processing on the control plane, encapsulate the MAC-IN-MAC header when the control plane sends a message, and peel off the MAC-IN-MAC header when the control plane receives a message ;

所述转发平面信令驱动用于:进行转发平面上的MAC-IN-MAC处理;The forwarding plane signaling driver is used to: perform MAC-IN-MAC processing on the forwarding plane;

所述转发微码用于:在路由器设备发包时,根据MAC-IN-MAC头里面携带的LSP信息,查找LSP转发表,将报文封装上LSP标签头,再封装上链路层头,最后从LSP转发表对应的物理接口或者逻辑接口发送出去;作为运营商边缘PE节点收包时,上送到转发平面信令驱动,由其统一封装后送至控制平面。The forwarding microcode is used for: when the router device sends a packet, according to the LSP information carried in the MAC-IN-MAC header, search the LSP forwarding table, encapsulate the message on the LSP label header, and then encapsulate the link layer header, and finally It is sent out from the physical interface or logical interface corresponding to the LSP forwarding table; when receiving packets as a carrier edge PE node, it is sent to the signaling driver of the forwarding plane, which is uniformly encapsulated and sent to the control plane.

在上述技术方案的基础上,所述IP协议栈使用OAM接口发送LSP ping和tracert报文。On the basis of the above technical solution, the IP protocol stack uses the OAM interface to send LSP ping and tracert messages.

本发明还提供基于上述系统的在路由器上实现LSP ping和tracert的方法,包括以下步骤:The present invention also provides the method for realizing LSP ping and tracert on router based on above-mentioned system, comprises the following steps:

A、路由器设备发送LSP ping和tracert报文:A. The router device sends LSP ping and tracert messages:

步骤101、控制平面启动之后,IP协议栈自动创建一个OAM接口,加载OAM接口驱动,OAM接口驱动将LSP ping和tracert报文封装成对应的MAC-IN-MAC格式,MAC-IN-MAC是一种封装格式,用于传递控制平面和转发平面相互关注的信息;Step 101, after the control plane starts, the IP protocol stack automatically creates an OAM interface, loads the OAM interface driver, and the OAM interface driver encapsulates the LSP ping and tracert messages into a corresponding MAC-IN-MAC format, and MAC-IN-MAC is a An encapsulation format used to transfer information of mutual concern between the control plane and the forwarding plane;

步骤102、LSP ping和tracert应用模块创建一个链路原始套接口,绑定到OAM接口上;Step 102, LSP ping and tracert application modules create a link original socket, bound to the OAM interface;

步骤103、LSP ping和tracert应用模块发送LSP ping包时,将包数据部分及对应的LSP信息按照一定的格式封装在一块数据里面,再通过链路原始套接口发送出去;Step 103, when the LSP ping and tracert application modules send the LSP ping packet, the packet data part and the corresponding LSP information are encapsulated in a piece of data according to a certain format, and then sent out through the link original socket;

步骤104、链路原始套接口作为IP协议栈提供的资源供包括LSP ping和tracert应用模块在内的上层模块使用,IP协议栈判断链路原始套接口绑定的接口类型是否为OAM接口,如果链路原始套接口绑定的接口是OAM接口,则转到步骤105;否则转到步骤106;Step 104, the original socket of the link is used as the resource provided by the IP protocol stack for upper layer modules including LSP ping and tracert application modules, and the IP protocol stack judges whether the interface type bound to the original socket of the link is an OAM interface, if If the interface bound to the original socket of the link is an OAM interface, then go to step 105; otherwise go to step 106;

步骤105、IP协议栈发处理发包时,如果链路原始套接口绑定的接口是OAM接口,则使用IP协议栈加载的OAM接口驱动,将按照组装时的格式,解析链路原始套接口发送的LSPping和tracert报文携带的信息,然后将信息封装成带MAC-IN-MAC头的报文,发送给转发平面,转到步骤107;Step 105, when the IP protocol stack sends and processes the packet, if the interface bound to the original socket of the link is an OAM interface, then use the OAM interface driver loaded by the IP protocol stack to parse the original socket of the link according to the format at the time of assembly. The information carried by the LSPping and tracert message, then encapsulate the information into a message with a MAC-IN-MAC header, send it to the forwarding plane, and go to step 107;

步骤106、如果链路原始套接口绑定的接口不是OAM接口,则使用其他对应类型接口的驱动封装,转到步骤107;Step 106, if the interface bound to the original socket of the link is not an OAM interface, use the driver encapsulation of other corresponding types of interfaces, and go to step 107;

步骤107、转发平面信令驱动接收控制平面发送给转发平面的携带有待检测的LSP信息的MAC-IN-MAC报文,发到转发微码,转到步骤108;Step 107, the forwarding plane signaling drives the receiving control plane to send to the forwarding plane the MAC-IN-MAC message carrying the LSP information to be detected, sends it to the forwarding microcode, and turns to step 108;

步骤108、转发微码解析MAC-IN-MAC格式,得到LSP ping和tracert报文和待检测的LSP信息,查找LSP转发表,根据LSP转发表封装上MPLS标签,然后将LSP ping和tracert报文从对应出接口发送出去;Step 108, the forwarding microcode parses the MAC-IN-MAC format, obtains LSP ping and tracert messages and the LSP information to be detected, searches the LSP forwarding table, encapsulates the MPLS label according to the LSP forwarding table, and then sends the LSP ping and tracert messages Send out from the corresponding outgoing interface;

B、路由器设备接收LSP ping和tracert报文:B. The router device receives LSP ping and tracert messages:

步骤201、转发平面接收到生存时间TTL=0或1的LSP ping和tracert报文;Step 201, the forwarding plane receives LSP ping and tracert messages with TTL=0 or 1;

步骤202、转发微码识别LSP ping和tracert报文之后,将LSP ping和tracert报文上送给控制平面,上送时,LSP ping和tracert报文的MAC-IN-MAC格式里面携带LSP ping和tracert报文的接收端口信息;Step 202, after the forwarding microcode identifies the LSP ping and tracert messages, the LSP ping and tracert messages are sent to the control plane. When sending, the MAC-IN-MAC format of the LSP ping and tracert messages carries the LSP ping and tracert messages. The receiving port information of the tracert message;

步骤203、控制平面信令驱动接收到带MAC-IN-MAC头的报文之后,根据收到的报文的MAC-IN-MAC头解析出收包接口,然后将MAC-IN-MAC头剥离后上送到IP协议栈中对应的接口;Step 203: After the control plane signaling driver receives the message with the MAC-IN-MAC header, it parses out the receiving interface according to the MAC-IN-MAC header of the received message, and then strips off the MAC-IN-MAC header Afterwards, it is sent to the corresponding interface in the IP protocol stack;

步骤204、LSP ping和tracert应用模块创建链路原始套接口,该链路原始套接口未绑定OAM接口,通过该链路原始套接口从IP协议栈接收到LSP ping和tracert报文,之后再进行LSP ping和tracert应用模块的协议处理。Step 204, LSP ping and tracert application module create the link original socket, this link original socket is not bound OAM interface, receive LSP ping and tracert message from IP protocol stack through this link original socket, and then Perform protocol processing of the LSP ping and tracert application modules.

在上述技术方案的基础上,步骤108还包括以下步骤:如果待检测的LSP是有主备的场景,转发平面在发送LSP ping和tracert报文时,选择从主用LSP隧道发送出去。On the basis of the above technical solution, step 108 also includes the following steps: if the LSP to be detected has an active/standby scenario, the forwarding plane selects to send the LSP ping and tracert messages from the active LSP tunnel.

与现有技术相比,本发明的优点如下:Compared with prior art, advantage of the present invention is as follows:

(1)与现有的路由器设备中控制平面未管理LSP实时主备状态的场景相比,本发明将LSP ping和tracert报文提交到转发平面,由转发平面完成相应的选路,控制平面的LSPping和tracert应用模块和转发平面配合完成LSP ping和tracert报文的封装和发送,实现LSP ping和tracert的准确性。(1) Compared with the scene in which the control plane does not manage the real-time active/standby state of the LSP in the existing router equipment, the present invention submits the LSP ping and tracert messages to the forwarding plane, and the forwarding plane completes the corresponding route selection, and the control plane The LSPping and tracert application module cooperates with the forwarding plane to complete the encapsulation and sending of LSP ping and tracert messages, so as to realize the accuracy of LSP ping and tracert.

(2)与现有的路由器设备的控制平面管理LSP实时主备状态的场景中控制平面获取转发平面LSP状态不及时相比,本发明将OAM报文提交到转发平面,OAM报文的MPLS标签相关处理在转发平面上实现,控制平面的LSP ping和tracert应用模块和转发平面配合完成LSP ping和tracert报文的封装和发送,能够保证LSP ping和tracert的实时性,同时性能上能获得更大的提升,降低控制平面的负担。(2) Compared with the scene where the control plane of the existing router equipment manages LSP real-time active and standby states, the control plane obtains the LSP state of the forwarding plane and is not in time, the present invention submits the OAM message to the forwarding plane, and the MPLS label of the OAM message Relevant processing is implemented on the forwarding plane. The LSP ping and tracert application module of the control plane cooperates with the forwarding plane to complete the encapsulation and sending of LSP ping and tracert messages, which can ensure the real-time performance of LSP ping and tracert and achieve greater performance. The improvement reduces the burden on the control plane.

附图说明Description of drawings

图1是本发明实施例中在路由器上实现LSP ping和tracert的系统的结构框图。FIG. 1 is a structural block diagram of a system for implementing LSP ping and tracert on a router in an embodiment of the present invention.

图2是本发明实施例中路由器设备发送LSP报文的流程图。Fig. 2 is a flow chart of sending an LSP message by a router device in an embodiment of the present invention.

图3是本发明实施例中路由器设备接收LSP报文的流程图。Fig. 3 is a flow chart of receiving an LSP message by a router device in an embodiment of the present invention.

具体实施方式detailed description

下面结合附图及具体实施例对本发明作进一步的详细描述。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

参见图1所示,本发明实施例提供一种在路由器上实现LSP ping和tracert的系统,包括控制平面和转发平面,控制平面包括LSP ping和tracert应用模块、IP协议栈和控制平面信令驱动,转发平面包括转发平面信令驱动和转发微码,其中:Referring to Fig. 1, an embodiment of the present invention provides a system for implementing LSP ping and tracert on a router, including a control plane and a forwarding plane, and the control plane includes an LSP ping and tracert application module, an IP protocol stack and a control plane signaling driver , the forwarding plane includes the forwarding plane signaling driver and forwarding microcode, where:

LSP ping和tracert应用模块用于:对LSP ping和tracert包进行协议层面的处理;The LSP ping and tracert application modules are used to: process the LSP ping and tracert packets at the protocol level;

IP协议栈用于:为LSP ping和tracert应用模块提供统一的收发包接口,是统一的收发包平台,IP协议栈自动创建一个OAM(Operation、Administration、Management,操作管理维护)接口,加载OAM接口驱动,OAM接口驱动将LSP ping和tracert报文封装成对应的MAC-IN-MAC格式,MAC-IN-MAC是一种封装格式,用于传递控制平面和转发平面相互关注的信息;IP协议栈使用该OAM接口发送LSP ping和tracert报文;The IP protocol stack is used to: provide a unified sending and receiving packet interface for the LSP ping and tracert application modules. It is a unified sending and receiving packet platform. The IP protocol stack automatically creates an OAM (Operation, Administration, Management, operation management and maintenance) interface and loads the OAM interface Driver, the OAM interface driver encapsulates LSP ping and tracert messages into the corresponding MAC-IN-MAC format, MAC-IN-MAC is an encapsulation format used to transmit the information of mutual concern between the control plane and the forwarding plane; the IP protocol stack Use this OAM interface to send LSP ping and tracert messages;

控制平面信令驱动用于:进行控制平面上的MAC-IN-MAC处理,在控制平面发送报文时封装MAC-IN-MAC头,控制平面接收报文时剥离MAC-IN-MAC头;The control plane signaling driver is used to: perform MAC-IN-MAC processing on the control plane, encapsulate the MAC-IN-MAC header when the control plane sends a message, and strip the MAC-IN-MAC header when the control plane receives a message;

转发平面信令驱动用于:进行转发平面上的MAC-IN-MAC处理;The forwarding plane signaling driver is used to: perform MAC-IN-MAC processing on the forwarding plane;

转发微码用于:在路由器设备发包时,根据MAC-IN-MAC头里面携带的LSP信息,查找LSP转发表,将报文封装上LSP标签头,再封装上链路层头,最后从LSP转发表对应的物理接口或者逻辑接口发送出去;作为PE(Provider Edge,运营商边缘)节点收包时,上送到转发平面信令驱动,由其统一封装后送至控制平面。The forwarding microcode is used for: when the router device sends a packet, according to the LSP information carried in the MAC-IN-MAC header, look up the LSP forwarding table, encapsulate the packet with the LSP label header, and then encapsulate the link layer header, and finally from the LSP The physical interface or logical interface corresponding to the forwarding table is sent out; when received as a PE (Provider Edge, operator's edge) node, it is sent to the signaling driver of the forwarding plane, which is uniformly encapsulated and sent to the control plane.

本发明实施例提供一种基于上述系统的在路由器上实现LSPping和tracert的方法,包括以下步骤:Embodiments of the present invention provide a method for implementing LSPping and tracert on a router based on the above system, including the following steps:

A、参见图2所示,路由器设备发送LSP ping和tracert报文:A. As shown in Figure 2, the router device sends LSP ping and tracert messages:

步骤101、控制平面启动之后,IP协议栈自动创建一个OAM接口,加载OAM接口驱动,OAM接口驱动将LSP ping和tracert报文封装成对应的MAC-IN-MAC格式,MAC-IN-MAC是一种封装格式,用于传递控制平面和转发平面相互关注的信息;Step 101, after the control plane starts, the IP protocol stack automatically creates an OAM interface, loads the OAM interface driver, and the OAM interface driver encapsulates the LSP ping and tracert messages into a corresponding MAC-IN-MAC format, and MAC-IN-MAC is a An encapsulation format used to transfer information of mutual concern between the control plane and the forwarding plane;

步骤102、LSP ping和tracert应用模块创建一个链路原始套接口,绑定到OAM接口上;Step 102, LSP ping and tracert application modules create a link original socket, bound to the OAM interface;

步骤103、LSP ping和tracert应用模块发送LSP ping包时,将包数据部分及对应的LSP信息按照一定的格式封装在一块数据里面,再通过链路原始套接口发送出去;Step 103, when the LSP ping and tracert application modules send the LSP ping packet, the packet data part and the corresponding LSP information are encapsulated in a piece of data according to a certain format, and then sent out through the link original socket;

步骤104、链路原始套接口作为IP协议栈提供的资源供包括LSP ping和tracert应用模块在内的上层模块使用,IP协议栈判断链路原始套接口绑定的接口类型是否为OAM接口,如果链路原始套接口绑定的接口是OAM接口,则转到步骤105;否则转到步骤106;Step 104, the original socket of the link is used as the resource provided by the IP protocol stack for upper layer modules including LSP ping and tracert application modules, and the IP protocol stack judges whether the interface type bound to the original socket of the link is an OAM interface, if If the interface bound to the original socket of the link is an OAM interface, then go to step 105; otherwise go to step 106;

步骤105、IP协议栈发处理发包时,如果链路原始套接口绑定的接口是OAM接口,则使用IP协议栈加载的OAM接口驱动,将按照组装时的格式,解析链路原始套接口发送的LSPping和tracert报文携带的信息,然后将信息封装成带MAC-IN-MAC头的报文,发送给转发平面,转到步骤107;Step 105, when the IP protocol stack sends and processes the packet, if the interface bound to the original socket of the link is an OAM interface, then use the OAM interface driver loaded by the IP protocol stack to parse the original socket of the link according to the format at the time of assembly. The information carried by the LSPping and tracert message, then encapsulate the information into a message with a MAC-IN-MAC header, send it to the forwarding plane, and go to step 107;

步骤106、如果链路原始套接口绑定的接口不是OAM接口,则使用其他对应类型接口的驱动封装,转到步骤107;Step 106, if the interface bound to the original socket of the link is not an OAM interface, use the driver encapsulation of other corresponding types of interfaces, and go to step 107;

步骤107、转发平面信令驱动接收控制平面发送给转发平面的携带有待检测的LSP信息的MAC-IN-MAC报文,发到转发微码,转到步骤108;Step 107, the forwarding plane signaling drives the receiving control plane to send to the forwarding plane the MAC-IN-MAC message carrying the LSP information to be detected, sends it to the forwarding microcode, and turns to step 108;

步骤108、转发微码解析MAC-IN-MAC格式,得到LSP ping和tracert报文和待检测的LSP信息,查找LSP转发表,根据LSP转发表封装上MPLS标签,然后将LSP ping和tracert报文从对应出接口发送出去;如果待检测的LSP是有主备(如LSP1:1)的场景,转发平面在发送LSP ping和tracert报文时,选择从主用LSP隧道发送出去。Step 108, the forwarding microcode parses the MAC-IN-MAC format, obtains LSP ping and tracert messages and the LSP information to be detected, searches the LSP forwarding table, encapsulates the MPLS label according to the LSP forwarding table, and then sends the LSP ping and tracert messages Send out from the corresponding outbound interface; if the LSP to be detected has a master/standby (for example, LSP1:1) scenario, the forwarding plane chooses to send out through the master LSP tunnel when sending LSP ping and tracert messages.

B、参见图3所示,路由器设备接收LSP ping和tracert报文:B, see as shown in Figure 3, router equipment receives LSP ping and tracert message:

步骤201、转发平面接收到TTL(Time To Live,生存时间)=0或1的LSP ping和tracert报文;Step 201, forwarding plane receives TTL (Time To Live, time to live)=0 or 1 LSP ping and tracert message;

步骤202、转发微码识别LSP ping和tracert报文之后,将LSP ping和tracert报文上送给控制平面,上送时,LSP ping和tracert报文的MAC-IN-MAC格式里面携带LSP ping和tracert报文的接收端口信息;Step 202, after the forwarding microcode identifies the LSP ping and tracert messages, the LSP ping and tracert messages are sent to the control plane. When sending, the MAC-IN-MAC format of the LSP ping and tracert messages carries the LSP ping and tracert messages. The receiving port information of the tracert message;

步骤203、控制平面信令驱动接收到带MAC-IN-MAC头的报文之后,根据收到的报文的MAC-IN-MAC头解析出收包接口,然后将MAC-IN-MAC头剥离后上送到IP协议栈中对应的接口;Step 203: After the control plane signaling driver receives the message with the MAC-IN-MAC header, it parses out the receiving interface according to the MAC-IN-MAC header of the received message, and then strips off the MAC-IN-MAC header Afterwards, it is sent to the corresponding interface in the IP protocol stack;

步骤204、LSP ping和tracert应用模块创建链路原始套接口,该链路原始套接口未绑定OAM接口,通过该链路原始套接口从IP协议栈接收到LSP ping和tracert报文,之后再进行LSP ping和tracert应用模块的协议处理。Step 204, LSP ping and tracert application module create the link original socket, this link original socket is not bound OAM interface, receive LSP ping and tracert message from IP protocol stack through this link original socket, and then Perform protocol processing of the LSP ping and tracert application modules.

本领域的技术人员可以对本发明实施例进行各种修改和变型,倘若这些修改和变型在本发明权利要求及其等同技术的范围之内,则这些修改和变型也在本发明的保护范围之内。Those skilled in the art can make various modifications and variations to the embodiments of the present invention, and if these modifications and variations are within the scope of the claims of the present invention and their equivalent technologies, then these modifications and variations are also within the protection scope of the present invention .

说明书中未详细描述的内容为本领域技术人员公知的现有技术。The content not described in detail in the specification is the prior art known to those skilled in the art.

Claims (4)

1.一种在路由器上实现LSP ping和tracert的系统,包括控制平面和转发平面,其特征在于:所述控制平面包括标签交换路径LSP ping和tracert应用模块、IP协议栈和控制平面信令驱动,转发平面包括转发平面信令驱动和转发微码,其中:1. A system realizing LSP ping and tracert on a router, comprising a control plane and a forwarding plane, characterized in that: said control plane comprises a label switching path LSP ping and a tracert application module, an IP protocol stack and a control plane signaling driver , the forwarding plane includes the forwarding plane signaling driver and forwarding microcode, where: 所述LSP ping和tracert应用模块用于:对LSP ping和tracert包进行协议层面的处理;The LSP ping and tracert application modules are used to: process the LSP ping and tracert packets at the protocol level; 所述IP协议栈用于:为LSP ping和tracert应用模块提供统一的收发包接口,是统一的收发包平台,IP协议栈自动创建一个操作管理维护OAM接口,加载OAM接口驱动,OAM接口驱动将LSP ping和tracert报文封装成对应的MAC-IN-MAC格式,MAC-IN-MAC是一种封装格式,用于传递控制平面和转发平面相互关注的信息;Described IP protocol stack is used for: for LSP ping and tracert application module provide unified send and receive packet interface, is unified send and receive packet platform, IP protocol stack automatically creates an operation management maintenance OAM interface, loads OAM interface driver, OAM interface driver will LSP ping and tracert messages are encapsulated into the corresponding MAC-IN-MAC format. MAC-IN-MAC is an encapsulation format used to transmit information of mutual concern between the control plane and the forwarding plane; 所述控制平面信令驱动用于:进行控制平面上的MAC-IN-MAC处理,在控制平面发送报文时封装MAC-IN-MAC头,控制平面接收报文时剥离MAC-IN-MAC头;The control plane signaling driver is used to: perform MAC-IN-MAC processing on the control plane, encapsulate the MAC-IN-MAC header when the control plane sends a message, and peel off the MAC-IN-MAC header when the control plane receives a message ; 所述转发平面信令驱动用于:进行转发平面上的MAC-IN-MAC处理;The forwarding plane signaling driver is used to: perform MAC-IN-MAC processing on the forwarding plane; 所述转发微码用于:在路由器发包时,根据MAC-IN-MAC头里面携带的LSP信息,查找LSP转发表,将报文封装上LSP标签头,再封装上链路层头,最后从LSP转发表对应的物理接口或者逻辑接口发送出去;作为运营商边缘PE节点收包时,上送到转发平面信令驱动,由其统一封装后送至控制平面。The forwarding microcode is used for: when the router sends a packet, according to the LSP information carried in the MAC-IN-MAC header, search the LSP forwarding table, encapsulate the LSP label header on the message, and then encapsulate the link layer header, and finally from the The physical interface or logical interface corresponding to the LSP forwarding table is sent out; when the carrier edge PE node receives the packet, it is sent to the signaling driver of the forwarding plane, which is uniformly encapsulated and sent to the control plane. 2.如权利要求1所述的在路由器上实现LSP ping和tracert的系统,其特征在于:所述IP协议栈使用OAM接口发送LSP ping和tracert报文。2. the system realizing LSP ping and tracert on router as claimed in claim 1, is characterized in that: described IP protocol stack uses OAM interface to send LSP ping and tracert message. 3.基于权利要求1或2所述系统的在路由器上实现LSP ping和tracert的方法,其特征在于,包括以下步骤:3. the method for realizing LSP ping and tracert on the router based on the system described in claim 1 or 2, is characterized in that, comprises the following steps: A、路由器发送LSP ping和tracert报文:A. The router sends LSP ping and tracert messages: 步骤101、控制平面启动之后,IP协议栈自动创建一个OAM接口,加载OAM接口驱动,OAM接口驱动将LSP ping和tracert报文封装成对应的MAC-IN-MAC格式,MAC-IN-MAC是一种封装格式,用于传递控制平面和转发平面相互关注的信息;Step 101, after the control plane starts, the IP protocol stack automatically creates an OAM interface, loads the OAM interface driver, and the OAM interface driver encapsulates the LSP ping and tracert messages into a corresponding MAC-IN-MAC format, and MAC-IN-MAC is a An encapsulation format used to transfer information of mutual concern between the control plane and the forwarding plane; 步骤102、LSP ping和tracert应用模块创建一个链路原始套接口,绑定到OAM接口上;Step 102, LSP ping and tracert application modules create a link original socket, bound to the OAM interface; 步骤103、LSP ping和tracert应用模块发送LSP ping包时,将包数据部分及对应的LSP信息按照一定的格式封装在一块数据里面,再通过链路原始套接口发送出去;Step 103, when the LSP ping and tracert application modules send the LSP ping packet, the packet data part and the corresponding LSP information are encapsulated in a piece of data according to a certain format, and then sent out through the link original socket; 步骤104、链路原始套接口作为IP协议栈提供的资源供包括LSP ping和tracert应用模块在内的上层模块使用,IP协议栈判断链路原始套接口绑定的接口类型是否为OAM接口,如果链路原始套接口绑定的接口是OAM接口,则转到步骤105;否则转到步骤106;Step 104, the original socket of the link is used as the resource provided by the IP protocol stack for upper layer modules including LSP ping and tracert application modules, and the IP protocol stack judges whether the interface type bound to the original socket of the link is an OAM interface, if If the interface bound to the original socket of the link is an OAM interface, then go to step 105; otherwise go to step 106; 步骤105、IP协议栈发处理发包时,如果链路原始套接口绑定的接口是OAM接口,则使用IP协议栈加载的OAM接口驱动,将按照组装时的格式,解析链路原始套接口发送的LSP ping和tracert报文携带的信息,然后将信息封装成带MAC-IN-MAC头的报文,发送给转发平面,转到步骤107;Step 105, when the IP protocol stack sends and processes the packet, if the interface bound to the original socket of the link is an OAM interface, then use the OAM interface driver loaded by the IP protocol stack to parse the original socket of the link according to the format at the time of assembly. The information carried in the LSP ping and tracert message of the LSP, then the information is encapsulated into a message with a MAC-IN-MAC header, and sent to the forwarding plane, and then go to step 107; 步骤106、如果链路原始套接口绑定的接口不是OAM接口,则使用其他对应类型接口的驱动封装,转到步骤107;Step 106, if the interface bound to the original socket of the link is not an OAM interface, use the driver encapsulation of other corresponding types of interfaces, and go to step 107; 步骤107、转发平面信令驱动接收控制平面发送给转发平面的携带有待检测的LSP信息的MAC-IN-MAC报文,发到转发微码,转到步骤108;Step 107, the forwarding plane signaling drives the receiving control plane to send to the forwarding plane the MAC-IN-MAC message carrying the LSP information to be detected, sends it to the forwarding microcode, and turns to step 108; 步骤108、转发微码解析MAC-IN-MAC格式,得到LSP ping和tracert报文和待检测的LSP信息,查找LSP转发表,根据LSP转发表封装上MPLS标签,然后将LSP ping和tracert报文从对应出接口发送出去;Step 108, the forwarding microcode parses the MAC-IN-MAC format, obtains LSP ping and tracert messages and the LSP information to be detected, searches the LSP forwarding table, encapsulates the MPLS label according to the LSP forwarding table, and then sends the LSP ping and tracert messages Send out from the corresponding outgoing interface; B、路由器接收LSP ping和tracert报文:B. The router receives LSP ping and tracert messages: 步骤201、转发平面接收到生存时间TTL=0或1的LSP ping和tracert报文;Step 201, the forwarding plane receives LSP ping and tracert messages with TTL=0 or 1; 步骤202、转发微码识别LSP ping和tracert报文之后,将LSP ping和tracert报文上送给控制平面,上送时,LSP ping和tracert报文的MAC-IN-MAC格式里面携带LSP ping和tracert报文的接收端口信息;Step 202, after the forwarding microcode identifies the LSP ping and tracert messages, the LSP ping and tracert messages are sent to the control plane. When sending, the MAC-IN-MAC format of the LSP ping and tracert messages carries the LSP ping and tracert messages. The receiving port information of the tracert message; 步骤203、控制平面信令驱动接收到带MAC-IN-MAC头的报文之后,根据收到的报文的MAC-IN-MAC头解析出收包接口,然后将MAC-IN-MAC头剥离后上送到IP协议栈中对应的接口;Step 203: After the control plane signaling driver receives the message with the MAC-IN-MAC header, it parses out the receiving interface according to the MAC-IN-MAC header of the received message, and then strips off the MAC-IN-MAC header Afterwards, it is sent to the corresponding interface in the IP protocol stack; 步骤204、LSP ping和tracert应用模块创建链路原始套接口,该链路原始套接口未绑定OAM接口,通过该链路原始套接口从IP协议栈接收到LSP ping和tracert报文,之后再进行LSP ping和tracert应用模块的协议处理。Step 204, LSP ping and tracert application module create the link original socket, this link original socket is not bound OAM interface, receive LSP ping and tracert message from IP protocol stack through this link original socket, and then Perform protocol processing of the LSP ping and tracert application modules. 4.如权利要求3所述的在路由器上实现LSP ping和tracert的方法,其特征在于:步骤108还包括以下步骤:如果待检测的LSP是有主备的场景,转发平面在发送LSP ping和tracert报文时,选择从主用LSP隧道发送出去。4. the method for realizing LSP ping and tracert on router as claimed in claim 3, it is characterized in that: step 108 also comprises the following steps: if the LSP to be detected has the scene of master and backup, forwarding plane is sending LSP ping and When sending tracert packets, choose to send them through the primary LSP tunnel.
CN201410442004.5A 2014-09-02 2014-09-02 LSP ping and tracert system and method is realized on the router Expired - Fee Related CN104270280B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410442004.5A CN104270280B (en) 2014-09-02 2014-09-02 LSP ping and tracert system and method is realized on the router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410442004.5A CN104270280B (en) 2014-09-02 2014-09-02 LSP ping and tracert system and method is realized on the router

Publications (2)

Publication Number Publication Date
CN104270280A CN104270280A (en) 2015-01-07
CN104270280B true CN104270280B (en) 2017-11-07

Family

ID=52161774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410442004.5A Expired - Fee Related CN104270280B (en) 2014-09-02 2014-09-02 LSP ping and tracert system and method is realized on the router

Country Status (1)

Country Link
CN (1) CN104270280B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218196B (en) * 2017-12-13 2020-09-08 新华三技术有限公司 Information collection method, device, equipment and machine-readable storage medium
CN112737932B (en) * 2020-12-25 2023-04-07 江苏省未来网络创新研究院 DPDK-based high-performance IPSCE gateway

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101427501A (en) * 2004-06-18 2009-05-06 思科技术公司 Consistency between mpls traffic engineering forwarding and control planes
CN103580894A (en) * 2012-07-31 2014-02-12 华为技术有限公司 Method, device and system for operation, administration and maintenance (OAM) configuration
CN103891216A (en) * 2011-10-18 2014-06-25 思科技术公司 Fhrp optimizations for n-way gateway load balancing in fabric path switching networks

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7996559B2 (en) * 2007-10-12 2011-08-09 Nortel Networks Limited Automatic MEP provisioning in a link state controlled Ethernet network
WO2014020379A1 (en) * 2012-08-01 2014-02-06 Telefonaktiebolaget L M Ericsson (Publ) Operations, administration, and management (oam) functions in a software defined network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101427501A (en) * 2004-06-18 2009-05-06 思科技术公司 Consistency between mpls traffic engineering forwarding and control planes
CN103891216A (en) * 2011-10-18 2014-06-25 思科技术公司 Fhrp optimizations for n-way gateway load balancing in fabric path switching networks
CN103580894A (en) * 2012-07-31 2014-02-12 华为技术有限公司 Method, device and system for operation, administration and maintenance (OAM) configuration

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Bidirectional Forwarding Detection (BFD)for MPLS Label Switched Paths (LSPs);R. Aggarwal等;《Internet Engineering Task Force (IETF) RFC5884》;20100630;全文 *
MPLS On-Demand Connectivity Verification and Route Tracing;E. Gray等;《Internet Engineering Task Force (IETF)RFC6426》;20111130;全文 *
基于NP路由器的以太网OAM研究与实现;黄丽;《中国硕博学位论文全文数据库 信息科技辑》;20120115;全文 *

Also Published As

Publication number Publication date
CN104270280A (en) 2015-01-07

Similar Documents

Publication Publication Date Title
EP2803173B1 (en) Expanding network functionalities for openflow based split-architecture networks
CN102437931B (en) Detection method and device of service path
CN103534982B (en) The protection method of service reliability, equipment and network virtualization system
CN110324165B (en) Network equipment management method, device and system
US20200396162A1 (en) Service function chain sfc-based communication method, and apparatus
CN108964943B (en) Method and device for realizing IOAM packaging
CN103326940B (en) Method for forwarding message in network and edge device of operator
CN102780635B (en) The method of pretection switch, TOR switch and system is realized based on TRILL network
CN102301663A (en) Message processing method and associated devices
CN104852828B (en) A kind of network delay detection method, apparatus and system
CN110875855A (en) Method and network device for detecting network link status
KR101699643B1 (en) Oam method and device based on multi-protocol label switching
CN105743780A (en) Message transmission method and device
CN108075968A (en) A kind of network system and pseudo-line service processing method
CN103368844A (en) Message processing method and label switching router in MPLS network
CN102918807B (en) Method and routing equipment for BFD session establishment
CN104270280B (en) LSP ping and tracert system and method is realized on the router
CN102843282B (en) A kind of message processing method and system
CN105763347B (en) For method getparms, the network equipment and system
CN110535675B (en) Method and device for multicast fast switching
CN104378245B (en) OAM method and device is realized on the AC mouths of L2VPN frameworks
EP3468101B1 (en) Method for controlling network transmission and related apparatus
WO2019056239A1 (en) Packet synchronization method and device
CN104811386B (en) Message forwarding method, equipment and system
WO2018205884A1 (en) Signalling configuration method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171107

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载