WO2020125651A1 - 标签属性识别方法、装置、设备及存储介质 - Google Patents

标签属性识别方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2020125651A1
WO2020125651A1 PCT/CN2019/126078 CN2019126078W WO2020125651A1 WO 2020125651 A1 WO2020125651 A1 WO 2020125651A1 CN 2019126078 W CN2019126078 W CN 2019126078W WO 2020125651 A1 WO2020125651 A1 WO 2020125651A1
Authority
WO
WIPO (PCT)
Prior art keywords
label
packet
tag
attribute
message
Prior art date
Application number
PCT/CN2019/126078
Other languages
English (en)
French (fr)
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 WO2020125651A1 publication Critical patent/WO2020125651A1/zh

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/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • 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
    • 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
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • H04L45/507Label distribution

Definitions

  • This application relates to the field of data communication, for example, a tag attribute recognition method, device, device, and storage medium.
  • VPN Virtual Private Network
  • the tag attribute implementation method does not preprocess the packet before forwarding the packet, and does not recognize the tag attribute of the packet. Therefore, it is necessary to look up the table to obtain the tag attribute information when forwarding.
  • the instruction space needs to be wasted to continue parsing the message. Or divide the label range to distinguish the label attributes, which will cause a great waste of label resources.
  • Embodiments of the present application provide a tag attribute recognition method, device, device, and storage medium, to avoid label allocation restrictions and resource waste caused by undetermined tag attributes in the related art.
  • an embodiment of the present application provides a label attribute identification method for identifying label attributes before packet forwarding.
  • the method includes: identifying a multi-protocol label exchange based on the packet analysis result of a received data packet (Multi-label exchange Protocol (LabelSwtich, MPLS) message; extract the label value of the label in the MPLS message; obtain label attributes based on the label value.
  • LabelSwtich Multi-label exchange Protocol
  • a tag attribute identification device that identifies a tag attribute before a message is forwarded, the device includes a message analysis module, an extraction module, and an acquisition module; the message analysis module is set to be based on received data The packet parsing result of the packet identifies the MPLS packet; the extraction module is configured to extract the label value of the label in the MPLS packet; and the acquisition module is configured to acquire the label attribute based on the label value.
  • a network device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, when the computer program is executed by the processor Implement the method described in the first aspect.
  • a computer-readable storage medium stores a computer program on the computer-readable storage medium, and the computer program is executed by a processor to implement the method described in the first aspect.
  • FIG. 1 is a flowchart of a tag attribute recognition method according to an embodiment of this application
  • FIG. 3 is a schematic block diagram of a tag attribute recognition device according to an embodiment of this application.
  • FIG. 4 is a functional block diagram of a packet parsing module according to an embodiment of this application.
  • FIG. 5 is a schematic block diagram of a packaging module according to an embodiment of the application.
  • FIG. 6 is a flowchart of a label message forwarding device in a VPN network according to an embodiment of the present application
  • FIG. 7 and 8 are schematic diagrams of VPN network structure.
  • Multi-Protocol Label Switching (MultiProtocolLabelSwtich, MPLS) is a technology generated under this background, which absorbs asynchronous transmission mode ( Asynchronous Transfer Mode (ATM) Virtual Path Identifier (Virtual Path Identifier, VPI)/Virtual Channel Identifier (VCI) exchange ideas, seamlessly integrates the flexibility of Internet Protocol (IP) routing technology With the simplicity of Layer 2 switching, this connection-oriented attribute of MPLS is added to connectionless-oriented IP networks.
  • ATM Asynchronous Transfer Mode
  • VPI Virtual Path Identifier
  • VPI Virtual Channel Identifier
  • VCI Virtual Channel Identifier
  • MPLS VPN is an IP VPN based on MPLS technology. It is an IP virtual private network (IPVPN) that implements MPLS technology on network routing and switching equipment, simplifies the routing of core routers, and combines label switching with traditional routing technology.
  • IPVPN IP virtual private network
  • the advantage of MPLS lies in the combination of Layer 2 switching and Layer 3 routing technology, and it has excellent performance in solving major problems in IP networks such as VPN, service classification, and traffic engineering. Therefore, MPLS VPNs are increasingly favored by operators in solving enterprise interconnections and providing various new services, becoming an important means for IP network operators to provide value-added services.
  • MPLS VPN can be divided into two layers of MPLS VPN (namely MPLS L2VPN) and three layers of MPLS VPN (namely MPLS L3VPN).
  • the VPN network structure is shown in Figures 7 and 8.
  • the MPLS VPN network is mainly composed of three parts: user network edge (Customer Edge, CE) router equipment, service provider edge (Provider Edge, PE) router equipment, and service provider (Provider, P) core router equipment.
  • the CE router device is directly connected to the service provider's network, and it cannot "perceive" the existence of the VPN.
  • the PE router device is directly connected to the user's CE, is responsible for VPN service access, and handles VPN-IPv4 routing.
  • the P core router device is responsible for fast data forwarding and is not directly connected to the CE router device.
  • the MPLS VPN network uses label switching.
  • One label corresponds to one user data stream, which is very easy to isolate data between users.
  • QoS quality of service
  • Service classification Service classification that plagues traditional IP networks.
  • RSVP Class of Service
  • MPLS itself provides the ability of traffic engineering, which can optimize the configuration of network resources to the greatest extent, automatically and quickly repair network failures, and provide high availability and high reliability.
  • TE Traffic Engineering
  • TE can also support the current mainstream MPLS L3/L2 VPN applications.
  • the TE tunnel can be used as a public network tunnel for VPN applications to provide bandwidth guarantee for VPN users.
  • LSP Label Switched Path
  • An embodiment of the present application provides a label attribute recognition method, which recognizes the label attribute before the message is forwarded. As shown in FIG. 1, the method includes steps S101 to S103.
  • step S101 an MPLS message is identified based on the message analysis result of the received data packet.
  • identifying the MPLS message based on the packet analysis result of the received data packet in step S101 includes: receiving a data packet from the network side; performing comparison analysis on the packet of the data packet; according to the comparison Identify the MPLS packets for the analysis results.
  • the method further includes: storing the received data packet.
  • a data packet is received from the network side, and then the received data packet is stored in a tri-state content addressable memory (ternary content addressable memory, tcam).
  • the packet of the stored data packet is compared and analyzed. If it is found that the packet is an MPLS packet, step S102 is performed.
  • step S102 the label value of the label in the MPLS packet is extracted.
  • the label value of the label in the packet is extracted.
  • step S103 a label attribute is obtained based on the label value.
  • acquiring the tag attribute based on the tag value includes: searching the attribute of the tag in a pre-stored tag attribute table based on the tag value, thereby obtaining the tag attribute.
  • a label attribute table is stored in the VPN network in advance, and the label attribute value is used to search for the attribute of the label in the label attribute table to obtain the label attribute.
  • An embodiment of the present application provides another method for identifying tag attributes, which identifies tag attributes before packet forwarding. As shown in FIG. 2, the method includes steps S201 to S205.
  • step S201 an MPLS message is identified based on the message analysis result of the received data packet.
  • identifying the MPLS message based on the packet analysis result of the received data packet in step S101 includes: receiving a data packet from the network side; performing comparison analysis on the packet of the data packet; according to the comparison Identify the MPLS packets for the analysis results.
  • the method further includes: storing the received data packet.
  • a data packet is received from the network side, and then the received data packet is stored in tcam, and the stored data packet is compared and analyzed. If the message is found to be an MPLS message, step S102 is performed.
  • step S202 the label value of the label in the MPLS packet is extracted.
  • the label value of the label in the packet is extracted.
  • step S203 a label attribute is obtained based on the label value.
  • acquiring the tag attribute based on the tag value includes: searching the attribute of the tag in a pre-stored tag attribute table based on the tag value, thereby obtaining the tag attribute.
  • a label attribute table is stored in the VPN network in advance, and the label attribute value is used to search for the attribute of the label in the label attribute table to obtain the label attribute.
  • step S204 the packet header type of the label is determined based on the label attribute.
  • the returned label attribute is used to determine whether the label is a tunnel termination, PW, or LSR, to determine the label header type.
  • step S205 the packet with the label is forwarded according to the packet header, and the packet header is obtained by encapsulating the packet header type.
  • the method before forwarding the packet with the label according to the packet header, includes: encapsulating the packet header type into the packet header.
  • the encapsulating the message header according to the message header type includes: obtaining a message header type and a corresponding position of the message header type in the message header;
  • the label attribute is used to determine whether the label is tunnel termination, pseudo wire (Pseudo Wire, PW) or label switching router (Label Switching Router, LSR) and other attributes.
  • PW pseudo wire
  • LSR Label Switching Router
  • An embodiment of the present application provides a tag attribute identification device that identifies tag attributes before packet forwarding.
  • the device includes a packet analysis module 301, an extraction module 302, and an acquisition module 303.
  • the message parsing module 301 is configured to recognize the MPLS message based on the message parsing result of the received data packet.
  • the extraction module 302 is configured to extract the label value of the label in the MPLS packet.
  • the obtaining module 303 is set to obtain a label attribute based on the label value.
  • the message parsing module 301 includes a message receiving module 401, a comparison parsing module 403, and an identification module 404.
  • the message receiving module 401 is configured to receive data packets from the network side.
  • the comparison and analysis module 403 is configured to perform comparison and analysis on the packet of the data packet.
  • Identification module 404 set to identify MPLS packets according to the result of comparison and analysis.
  • the device further includes: a storage module 402 configured to store the received data packet.
  • the acquisition module 303 includes a tag attribute recognition module configured to search for the attribute of the tag in a pre-stored tag attribute table based on the tag value, thereby obtaining the tag attribute.
  • the device further includes a determination module 304 and a forwarding module 306.
  • the determining module 304 is set to determine the packet header type of the label based on the label attribute.
  • the forwarding module 306 is configured to forward the packet with the label according to the packet header, and the packet header is obtained by encapsulating the type of the packet header.
  • the device further includes: an encapsulation module 305 configured to encapsulate the packet header type into the packet header.
  • the encapsulation module 305 includes a packet header acquisition module 501, an identification acquisition module 502, and a packet header encapsulation module 503.
  • the packet header acquisition module 501 is configured to acquire the packet header type and the corresponding position of the packet header type in the packet header.
  • the identifier obtaining module 502 is set to obtain the identifier of the special message.
  • the packet header encapsulation module 503 is configured to encapsulate the packet header type, the corresponding position of the packet header type in the packet header, and the identifier of the special packet into the packet header.
  • a tag attribute recognition device forwards a tag message in a VPN network. As shown in FIG. 6, it includes steps S601 to S604.
  • step S601 the message receiving module receives the packet from the network side and sends it to the message parsing module.
  • step S602 the message parsing module sends the message to the tcam of the module, compares and analyzes the message, and extracts the label value of the label in the message when the message is found to be an MPLS message.
  • Tag attribute recognition module the message parsing module sends the message to the tcam of the module, compares and analyzes the message, and extracts the label value of the label in the message when the message is found to be an MPLS message.
  • step S603 a tag attribute table is stored in the tag attribute recognition module, the attribute of the tag is searched using the tag value of the tag, and the attribute is returned to the message parsing module.
  • step S604 the packet parsing module judges that the label is a tunnel termination, PW, or LSR attribute by the returned label attribute, so as to determine the type of the packet header after the label.
  • the header type and corresponding position of the message and the identification of the special message are sealed in the message header and brought to the forwarding module for corresponding forwarding processing.
  • the tag attribute recognition device distinguishes the attributes of the tag when it receives the message, so that it knows the encapsulation format of the message, and then parses the entire message, and takes the result of the analysis to the forwarding module.
  • the tag attribute identification module performs tag attribute identification in advance, which avoids the limitation of tag allocation and waste of resources caused by undetermined tag attributes, saves resources, and is simple and easy to implement.
  • the label attribute search in the forwarding module is avoided to determine the location of the forwarding label and the waste of resources caused by the message parsing in the forwarding module is improved, and the forwarding matrix sub-module is improved. Data processing capacity saves its bandwidth resources.
  • An embodiment of the present application provides a network device, which can be understood as a physical device, including a processor and a memory storing executable instructions of the processor. When the instructions are executed by the processor, the foregoing embodiment is executed. Identification method of tag attributes.
  • the processor can be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU), a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or a One or more integrated circuits configured to implement the embodiments of the present application.
  • the memory is used to store the executable instructions of the processor; the memory is used to store the program code and transmit the program code to the processor.
  • the memory may include volatile memory (Volatile Memory), such as random access memory (Random Access Memory, RAM); it may also include non-volatile memory (Non-Volatile Memory), such as read-only memory (Read-Only Memory, ROM), flash memory (Flash), hard disk (HDD), or solid-state drive (SSD); it can also include a combination of the above types of memory.
  • volatile memory such as random access memory (Random Access Memory, RAM
  • non-Volatile Memory such as read-only memory (Read-Only Memory, ROM), flash memory (Flash), hard disk (HDD), or solid-state drive (SSD)
  • ROM read-only memory
  • flash flash memory
  • HDD hard disk
  • SSD solid-state drive
  • Embodiments of the present application provide a computer-readable storage medium that stores a computer program on the computer-readable storage medium.
  • the computer program is executed by a processor, the label attribute recognition method described in the foregoing embodiment is implemented.
  • the computer-readable storage medium includes but is not limited to: ROM, RAM, magnetic disk or optical disk.
  • the label attribute is identified before the packet is forwarded, the received packet is parsed to identify the MPLS packet, and then the label attribute is obtained according to the extracted label value of the label in the MPLS packet.
  • the label attribute of the message is obtained to complete the distinction of the label attribute, which avoids searching the label attribute during forwarding to determine the position of the forwarding label and reporting when forwarding
  • the resource waste caused by the text analysis improves the data processing ability and saves its bandwidth resources. Therefore, the limitation of label allocation and the waste of resources due to undetermined label attributes are avoided, resources are saved, and the operation is simple and easy.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请公开了一种标签属性识别方法、装置、设备及存储介质。其中,标签属性识别方法,在报文转发前对标签属性进行识别,所述方法包括:基于接收的数据包的报文解析结果识别多协议标签交换MPLS报文;提取所述MPLS报文中标签的标签值;基于所述标签值获取标签属性。

Description

标签属性识别方法、装置、设备及存储介质
本申请要求在2018年12月17日提交中国专利局、申请号为201811542617.0的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据通信领域,例如一种标签属性识别方法、装置、设备及存储介质。
背景技术
对于虚拟专用网络(Virtual Private Network,VPN)网络,需要确定配置了L3VPN或是L2VPN,需要确定设备在网络中的位置,以确定其转发行为,这些都是通过标签属性来判断。
相关技术中的标签属性实现方法,在报文转发前并不对报文进行预处理,不识别报文的标签属性,因此需要在转发时查表获取标签属性信息,在浪费查表资源的同时还需要浪费指令空间继续对报文进行解析。或者对标签范围进行划分,来区别标签属性,这样会对标签资源造成很大的浪费。
发明内容
本申请实施例提供一种标签属性识别方法、装置、设备及存储介质,用以避免相关技术中由于标签属性未确定而造成的标签分配的限制以及资源浪费的情况。
第一方面,本申请实施例提供一种标签属性识别方法,在报文转发前对标签属性进行识别,所述方法包括:基于接收的数据包的报文解析结果识别多协议标签交换(Multi-Protocol Label Swtich,MPLS)报文;提取所述MPLS报文中标签的标签值;基于所述标签值获取标签属性。
第二方面,一种标签属性识别装置,在报文转发前对标签属性进行识别,所述装置包括报文解析模块、提取模块以及获取模块;所述报文解析模块,设置为基于接收的数据包的报文解析结果识别MPLS报文;所述提取模块,设置为提取所述MPLS报文中标签的标签值;所述获取模块,设置为基于所述标签值获取标签属性。
第三方面,一种网络设备,所述网络设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现第一方面中所述的方法。
第四方面,一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现第一方面中所述的方法。
附图说明
图1为本申请一实施例所述的标签属性识别方法的流程图;
图2为本申请一实施例所述的另一种标签属性识别方法的流程图;
图3为本申请一实施例所述的标签属性识别装置的原理框图;
图4为本申请一实施例所述的报文解析模块的原理框图;
图5为本申请一实施例所述的封装模块的原理框图;
图6为本申请一实施例所述的标签属性识别装置在VPN网络中进行标签报文转发的流程图;
图7和图8为VPN网络结构的示意图。
具体实施方式
Internet的网络和业务发生了爆炸性增长,对骨干网络提出来更高的要求,多协议标签交换(Multi Protocol Label Swtich,MPLS)就是这种背景下产生的一种技术,它吸收了异步传输模式(Asynchronous Transfer Mode,ATM)的虚拟路径标识符(Virtual Path identifier,VPI)/虚拟通道标识符(Virtual ChannelIdentifier,VCI)交换思想,无缝地集成了互联网协议(Internet Protocol,IP)路由技术的灵活性和二层交换的简捷性,在面向无连接的IP网络中增加了MPLS这种面向连接的属性。
与此同时,MPLS在流量工程和VPN等方面的优势又得以凸显。MPLS VPN是一种基于MPLS技术的IP VPN,是在网络路由和交换设备上应用MPLS技术,简化核心路由器的路由选择方式,结合传统路由技术的标记交换实现的IP虚拟专用网络(IP VPN)。MPLS优势在于将二层交换和三层路由技术结合起来,在解决VPN、服务分类和流量工程这些IP网络的重大问题时具有很优异的表现。因此,MPLS VPN在解决企业互连、提供各种新业务方面也越来越被运营商看 好,成为在IP网络运营商提供增值业务的重要手段。MPLS VPN又可分为二层MPLS VPN(即MPLS L2 VPN)和三层MPLS VPN(即MPLS L3 VPN)。VPN网络结构如图7和图8所示。
MPLS VPN网络主要由用户网络边缘(Customer Edge,CE)路由器设备、服务提供商边缘(Provider Edge,PE)路由器设备和服务提供商(Provider,P)核心路由器设备等3部分组成。
CE路由器设备直接与服务提供商网络相连,它“感知”不到VPN的存在。
PE路由器设备,与用户的CE直接相连,负责VPN业务接入,处理VPN-IPv4路由,是MPLS三层VPN的主要实现者。
P核心路由器设备,负责快速转发数据,不与CE路由器设备直接相连。
在整个MPLS VPN中,P核心路由器设备、PE路由器设备需要支持MPLS的基本功能,CE路由器设备不必支持MPLS。
MPLS VPN的网络采用标签交换,一个标签对应一个用户数据流,非常易于用户间数据的隔离,利用区分服务体系可以轻易地避免困扰传统IP网络的服务质量(Quality of Service,QoS)/服务分类(Class of Service,CoS)情况,MPLS自身提供流量工程的能力,可以最大限度地优化配置网络资源,自动快速修复网络故障,提供高可用性和高可靠性。
为了在大型骨干网络中部署流量工程,必须采用一种可扩展性好、简单的解决方案。MPLS流量工程(Traffic Engineering,TE)就是为这一需求而提出的。TE也可以支持目前主流的MPLS L3/L2 VPN应用。TE隧道可以作为VPN应用的公网隧道,为VPN用户提供带宽保证。
对于MPLS转发,标签交换路径(Label Switched Path,LSP)建立后,流量就会在LSP的入口节点根据分配好的标签通过这条LSP进行转发。设备在网络中所处位置不同,就会有不同的标签属性,以确定按哪一级的标签进行转发。
MPLS VPN应用中有L3/L2 VPN,PE设备上有不同的报文封装格式,不同的转发行为,因此需要区分标签的属性;同时数据流可能承载在不同的隧道上,因此也需要判断标签的属性来确定隧道是否终结,以确定按哪一级的标签进行转发。
本申请一实施例提供一种标签属性识别方法,在报文转发前对标签属性进行识别,如图1所示,所述方法包括步骤S101至步骤S103。
在步骤S101中,基于接收的数据包的报文解析结果识别MPLS报文。
在一实施例中,步骤S101所述基于接收的数据包的报文解析结果识别MPLS报文,包括:接收来自网络侧的数据包;对所述数据包的报文进行比对解析;根据比对解析的结果识别MPLS报文。
在一实施例中,接收来自网络侧的数据包之后,还包括;存储接收的数据包。
在一个应用场景中,如VPN网络中标签报文转发的场景中,从网络侧接收数据包,然后将接收的数据包存储到三态内容寻址存储器(ternary content addressable memory,tcam)中,对存储的数据包的报文进行比对解析,在发现报文是MPLS报文的情况该,进行步骤S102。
在步骤S102中,提取所述MPLS报文中标签的标签值。
如在VPN网络中标签报文转发的场景中,在发现报文是MPLS报文的情况下,提取报文中标签的标签(label)值。
在步骤S103中,基于所述标签值获取标签属性。
在一实施例中,基于所述标签值获取标签属性,包括:基于所述标签值在预存储的标签属性表中查找所述标签的属性,从而得到标签属性。
如在VPN网络中标签报文转发的场景中,VPN网络中事先存放一张标签属性表,用标签的label值在标签属性表中查找该标签的属性,得到标签属性。
本申请一实施例提供另一种标签属性识别方法,在报文转发前对标签属性进行识别,如图2所示,所述方法包括步骤S201至步骤S205。
在步骤S201中,基于接收的数据包的报文解析结果识别MPLS报文。
在一实施例中,步骤S101所述基于接收的数据包的报文解析结果识别MPLS报文,包括:接收来自网络侧的数据包;对所述数据包的报文进行比对解析;根据比对解析的结果识别MPLS报文。
在一实施例中,接收来自网络侧的数据包之后,还包括;存储接收的数据包。
在一个应用场景中,如VPN网络中标签报文转发的场景中,从网络侧接收数据包,然后将接收的数据包存储到tcam中,对存储的数据包的报文进行比对解析,在发现报文是MPLS报文的情况下,进行步骤S102。
在步骤S202中,提取所述MPLS报文中标签的标签值。
如在VPN网络中标签报文转发的场景中,在发现报文是MPLS报文的情况下,提取报文中标签的label值。
在步骤S203中,基于所述标签值获取标签属性。
在一实施例中,基于所述标签值获取标签属性,包括:基于所述标签值在预存储的标签属性表中查找所述标签的属性,从而得到标签属性。
如在VPN网络中标签报文转发的场景中,VPN网络中事先存放一张标签属性表,用标签的label值在标签属性表中查找该标签的属性,得到标签属性。
在步骤S204中,基于所述标签属性确定所述标签的报文头类型。
通过返回的标签属性判断该标签是隧道终结、PW或LSR等属性,以决定该标签的报文头类型。
在步骤S205中,依据报文头对带有所述标签的报文进行转发,所述报文头为对所述报文头类型封装得到的。
在一实施例中,依据报文头对带有所述标签的报文进行转发之前,包括:将所述报文头类型封装到所述报文头中。
在一实施例中,所述依据所述报文头类型对报文头进行封装,包括:获取报文头类型以及所述报文头类型在报文头中对应的位置;
获取特殊报文的标识;将所述报文头类型、报文头类型在报文头中对应的位置以及特殊报文的标识封装到所述报文头中。
在一个应用场景中,通过标签属性判断该标签是隧道终结、伪线(Pseudo Wire,PW)或标签交换路由器(Label Switching Router,LSR)等属性,决定该标签后的报文头类型后,将报文的头类型及在报文头中对应的位置以及特殊报文的标识封在报文头,从而根据报文头做相应的转发处理。
本申请一实施例提供一种标签属性识别装置,在报文转发前对标签属性进行识别,如图3所述,所述装置包括报文解析模块301、提取模块302以及获取模块303。
报文解析模块301,设置为基于接收的数据包的报文解析结果识别MPLS报文。
提取模块302,设置为提取所述MPLS报文中标签的标签值。
获取模块303,设置为基于所述标签值获取标签属性。
在本申请的一个实施例中,如图4所示,所述报文解析模块301,包括报文接收模块401、比对解析模块403以及识别模块404。
报文接收模块401,设置为接收来自网络侧的数据包。
比对解析模块403,设置为对所述数据包的报文进行比对解析。
识别模块404:设置为根据比对解析的结果识别MPLS报文。
在一实施例中,装置还包括:存储模块402,设置为存储接收的数据包。
在本申请的一个实施例中,所述获取模块303,包括:标签属性识别模块,设置为基于所述标签值在预存储的标签属性表中查找所述标签的属性,从而得到标签属性。
在本申请的一个实施例中,装置还包括确定模块304以及转发模块306。
确定模块304,设置为基于所述标签属性确定所述标签的报文头类型。
转发模块306,设置为依据报文头对带有所述标签的报文进行转发,所述报文头为对所述报文头类型进行封装得到的。
在本申请的一个实施例中,装置还包括:封装模块305,设置为将所述报文头类型封装到所述报文头中。
在本申请的一个实施例中,如图5所示,所述封装模块305,包括报文头获取模块501、标识获取模块502以及报文头封装模块503。
报文头获取模块501,设置为获取报文头类型以及所述报文头类型在报文头中对应的位置。
标识获取模块502,设置为获取特殊报文的标识。
报文头封装模块503,设置为将所述报文头类型、报文头类型在报文头中对应的位置以及特殊报文的标识封装到所述报文头中。
一种标签属性识别装置在VPN网络中标签报文转发的步骤,如图6所示,包括步骤S601至步骤S604。
在步骤S601中,报文接收模块收到从网络侧的包,将其发送给报文解析模块。
在步骤S602中,报文解析模块将报文送到该模块的tcam中,对报文进行比对解析,在发现报文是MPLS报文的情况下,提取报文中标签的label值送到标签属性识别模块。
在步骤S603中,标签属性识别模块中存放一张标签属性表,用标签的label值查找该标签的属性,并将属性返回报文解析模块。
在步骤S604中,报文解析模块通过返回的标签属性判断该标签是隧道终结、PW或LSR等属性,以决定该标签后的报文头类型。将报文的头类型及对应的位置以及特殊报文的标识封在报文头带给转发模块,以做相应的转发处理。
标签属性识别装置在收到报文时就区分出了标签的属性,这样就知道了报 文的封装格式,进而对整个报文进行解析,并将解析的结果带给转发模块处理。
标签属性识别模块提前进行标签属性识别,避免了由于标签属性未确定而造成的标签分配的限制以及资源浪费的情况,节省了资源并且简单易行。
通过在报文解析模块中完成标签属性的区分,避免了在转发模块中进行标签属性的查找来确定转发标签的位置以及在转发模块做报文解析造成的资源浪费,提高了转发矩阵子模块的数据处理能力,节省了其带宽资源。
本申请一实施例提供一种网络设备,可以作为实体装置来理解,包括处理器以及存储有所述处理器可执行指令的存储器,当所述指令被处理器执行时,执行上述实施例所述的标签属性识别方法。
处理器可以是通用处理器,例如中央处理器(Central Processing Unit,CPU),还可以是数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC),或者是被配置成实施本申请实施例的一个或多个集成电路。其中,存储器用于存储所述处理器的可执行指令;存储器,用于存储程序代码,并将该程序代码传输给处理器。存储器可以包括易失性存储器(Volatile Memory),例如随机存取存储器(Random Access Memory,RAM);也可以包括非易失性存储器(Non-Volatile Memory),例如只读存储器(Read-Only Memory,ROM)、快闪存储器(Flash Memory)、硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD);还可以包括上述种类的存储器的组合。
本申请实施例提供一种提供计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述实施例所述的标签属性识别方法。
其中,计算机可读存储介质包括但不限于为:ROM、RAM、磁盘或光盘等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实 施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括多个指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
本申请实施例通过在报文转发前对标签属性进行识别,对接收的报文进行解析从而识别出MPLS报文,然后根据提取的MPLS报文中标签的标签值获取标签属性。在报文转发前,即接收到报文时,就获取报文的标签属性,从而完成标签属性的区分,避免了在转发中进行标签属性的查找来确定转发标签的位置以及在转发时做报文解析造成的资源浪费,提高了数据处理能力,节省了其带宽资源。从而避免了由于标签属性未确定而造成的标签分配的限制以及资源浪费的情况,节省了资源并且简单易行。

Claims (10)

  1. 一种标签属性识别方法,所述方法包括:
    基于接收的数据包的报文解析结果识别多协议标签交换MPLS报文;
    提取所述MPLS报文中标签的标签值;
    基于所述标签值获取标签属性。
  2. 如权利要求1所述的标签属性识别方法,其中,所述基于接收的数据包的报文解析结果识别MPLS报文,包括:
    接收来自网络侧的数据包;
    对所述数据包的报文进行比对解析;
    根据比对解析的结果识别MPLS报文。
  3. 如权利要求2所述的标签属性识别方法,所述接收来自网络侧的数据包之后,还包括;
    存储接收的数据包。
  4. 如权利要求1所述的标签属性识别方法,其中,所述基于所述标签值获取标签属性,包括:
    基于所述标签值在预存储的标签属性表中查找所述标签的属性,得到标签属性。
  5. 如权利要求1至4任一项所述的标签属性识别方法,所述基于所述标签值获取标签属性之后,还包括:
    基于所述标签属性确定所述标签的报文头类型;
    依据报文头对带有所述标签的报文进行转发,所述报文头是对所述报文头类型进行封装得到的。
  6. 如权利要求5所述的标签属性识别方法,所述依据报文头对带有所述标签的报文进行转发之前,还包括:
    将所述报文头类型封装到所述报文头中。
  7. 如权利要求6所述的标签属性识别方法,其中,所述将所述报文头类型封装到所述报文头中,包括:
    获取报文头类型以及所述报文头类型在报文头中对应的位置;
    获取特殊报文的标识;
    将所述报文头类型、报文头类型在报文头中对应的位置以及特殊报文的标识封装到所述报文头中。
  8. 一种标签属性识别装置,所述装置包括报文解析模块、提取模块以及获 取模块;
    所述报文解析模块,设置为基于接收的数据包的报文解析结果识别多协议标签交换MPLS报文;
    所述提取模块,设置为提取所述MPLS报文中标签的标签值;
    所述获取模块,设置为基于所述标签值获取标签属性。
  9. 一种网络设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至7中任一项所述的方法。
  10. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7中任一项所述的方法。
PCT/CN2019/126078 2018-12-17 2019-12-17 标签属性识别方法、装置、设备及存储介质 WO2020125651A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811542617.0 2018-12-17
CN201811542617.0A CN111327528A (zh) 2018-12-17 2018-12-17 标签属性识别方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2020125651A1 true WO2020125651A1 (zh) 2020-06-25

Family

ID=71102474

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/126078 WO2020125651A1 (zh) 2018-12-17 2019-12-17 标签属性识别方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN111327528A (zh)
WO (1) WO2020125651A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726737A (zh) * 2021-07-26 2021-11-30 绿盟科技集团股份有限公司 一种通信方法、设备及介质
CN115065637A (zh) * 2022-06-10 2022-09-16 亚信科技(中国)有限公司 传输算力资源信息的方法、装置和电子设备
WO2024027271A1 (zh) * 2022-08-01 2024-02-08 中兴通讯股份有限公司 应用流量感知方法及系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105024985A (zh) * 2014-04-30 2015-11-04 深圳市中兴微电子技术有限公司 一种报文处理方法及装置
CN106936720A (zh) * 2017-04-27 2017-07-07 北京东土科技股份有限公司 一种sdn交换机运行方法、控制器和交换机
WO2017141078A1 (en) * 2016-02-15 2017-08-24 Telefonaktiebolaget Lm Ericsson (Publ) Ospf extensions for flexible path stitching and selection for traffic transiting segment routing and mpls networks
WO2018010560A1 (zh) * 2016-07-15 2018-01-18 中兴通讯股份有限公司 多协议交换标签的检测、处理方法、装置及系统
CN107872386A (zh) * 2016-09-23 2018-04-03 中兴通讯股份有限公司 一种报文的调度方法及装置
CN108111416A (zh) * 2017-12-15 2018-06-01 盛科网络(苏州)有限公司 直接识别mpls内部封装报文的方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104348721A (zh) * 2013-07-24 2015-02-11 中兴通讯股份有限公司 标签查找方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105024985A (zh) * 2014-04-30 2015-11-04 深圳市中兴微电子技术有限公司 一种报文处理方法及装置
WO2017141078A1 (en) * 2016-02-15 2017-08-24 Telefonaktiebolaget Lm Ericsson (Publ) Ospf extensions for flexible path stitching and selection for traffic transiting segment routing and mpls networks
WO2018010560A1 (zh) * 2016-07-15 2018-01-18 中兴通讯股份有限公司 多协议交换标签的检测、处理方法、装置及系统
CN107872386A (zh) * 2016-09-23 2018-04-03 中兴通讯股份有限公司 一种报文的调度方法及装置
CN106936720A (zh) * 2017-04-27 2017-07-07 北京东土科技股份有限公司 一种sdn交换机运行方法、控制器和交换机
CN108111416A (zh) * 2017-12-15 2018-06-01 盛科网络(苏州)有限公司 直接识别mpls内部封装报文的方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726737A (zh) * 2021-07-26 2021-11-30 绿盟科技集团股份有限公司 一种通信方法、设备及介质
CN115065637A (zh) * 2022-06-10 2022-09-16 亚信科技(中国)有限公司 传输算力资源信息的方法、装置和电子设备
CN115065637B (zh) * 2022-06-10 2024-03-26 亚信科技(中国)有限公司 传输算力资源信息的方法、装置和电子设备
WO2024027271A1 (zh) * 2022-08-01 2024-02-08 中兴通讯股份有限公司 应用流量感知方法及系统

Also Published As

Publication number Publication date
CN111327528A (zh) 2020-06-23

Similar Documents

Publication Publication Date Title
JP7520170B2 (ja) パケット処理方法および装置、デバイス、ならびにシステム
CN109756425B (zh) 组播转发方法、装置以及bfr
US20190320047A1 (en) Transmitting network overlay information in a service function chain
US7839847B2 (en) Methods and apparatus providing VPN traffic matrix construction
EP1618688B1 (en) Source identifier for mac address learning
CN105024985B (zh) 一种报文处理方法及装置
CN102404197B (zh) 分组的伪线层中包括的数据路径处理信息
CN107483345B (zh) 业务处理方法、设备及系统
US20220191136A1 (en) Label Management Method, Data Stream Processing Method, and Device
CN111953604A (zh) 一种为业务流提供业务服务的方法和装置
WO2020125651A1 (zh) 标签属性识别方法、装置、设备及存储介质
CN112511988B (zh) 报文转发方法、设备、系统、网络设备和存储介质
CN103516611A (zh) 分配和分发用于数据包封装的标签
US20150131672A1 (en) Method, device and system for establishing a pseudo wire
JP2022537296A (ja) Evpnメッセージ転送方法、システム、記憶媒体及び端末
WO2015000384A1 (zh) 一种标签处理的方法及装置
US20230254246A1 (en) Mechanisms for packet path tracing and per-hop delay measurement in segment routing with multiprotocol label switching (sr-mpls) networks
US20240106751A1 (en) Method and apparatus for processing detnet data packet
CN110166361B (zh) 一种报文转发方法及装置
US7471642B2 (en) Communication terminal, load distribution method and load distribution processing program
CN117714559A (zh) 报文处理方法、装置、电子设备及存储介质
CN111865805B (zh) 一种组播gre报文处理方法及系统
CN113973045B (zh) 一种报文传输方法及装置
CN107995084B (zh) 隧道选择方法及装置
CN111901239A (zh) 一种基于虚拟网络的通信方法、系统、装置以及存储介质

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16/11/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19899347

Country of ref document: EP

Kind code of ref document: A1