WO2013059991A1 - Data message processing method and system, message forwarding device - Google Patents
Data message processing method and system, message forwarding device Download PDFInfo
- Publication number
- WO2013059991A1 WO2013059991A1 PCT/CN2011/081287 CN2011081287W WO2013059991A1 WO 2013059991 A1 WO2013059991 A1 WO 2013059991A1 CN 2011081287 W CN2011081287 W CN 2011081287W WO 2013059991 A1 WO2013059991 A1 WO 2013059991A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- field
- ipv6
- flow table
- packet
- content
- 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.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/64—Routing or path finding of packets in data switching networks using an overlay routing layer
Definitions
- the present invention relates to the field of communications technologies, and in particular, to a data packet processing method and system, and a packet forwarding device. Background technique
- TCP/IP Transmission Control Protocol/Internet Protocol
- OpenFlow OpenFlow
- the OpenFlow Switch converts the packet forwarding process that was originally controlled by the switch/router into an OpenFlow switch and control server (Controller). ) to complete together, thus achieving the separation of data forwarding and routing control.
- the control server can control the flow table in the OpenFlow switch through pre-defined interface operations to control data forwarding.
- the switch can obtain the flow table entry that matches the data packet by querying the flow table, and the operation that needs to be performed on the data packet can be determined according to the flow table entry, and the operation can be, for example, forwarding. Go to the destination port, drop, report to the control server, and so on.
- Embodiments of the present invention provide a data packet processing method and system, and a packet forwarding device.
- the embodiment of the invention provides a data packet processing method, including: Determining, according to the link layer data type field included in the data packet, whether the data packet is an IPv6 packet;
- the data packet is an IPv6 packet
- the content of the field in the IPv6 packet is matched with the content of the field that is required to be matched in the IPv6 flow table that is sent by the control server, and the IPv6 flow table includes the following. Said at least one field:
- Message entry field metadata field, link layer source address field, link layer destination address field, link layer data type field, virtual local area network identification field, virtual local area network priority field, MPLS label field, MPLS traffic type field, IPv6 source address field, IPv6 destination address field, IPv6 traffic type field, IPv6 next header field, IPv6 flow label field, transport layer source port or ICMP type field, transport layer destination port or ICMP code field;
- IPv6 text is processed correspondingly according to the matching result.
- the embodiment of the invention provides a packet forwarding device, which includes:
- a determining module configured to determine, according to a link layer data type field included in the data packet, whether the data packet is an IPv6 packet;
- a matching module configured to: if the data packet is an IPv6 packet, match the field content in the IPv6 packet with a field content that needs to be matched in an IPv6 flow table that is sent by the control server in advance, the IPv6
- the flow table contains at least one of the following fields:
- Message entry field metadata field, link layer source address field, link layer destination address field, link layer data type field, virtual local area network identification field, virtual local area network priority field, MPLS label field, MPLS traffic type field, IPv6 source address field, IPv6 destination address field, IPv6 traffic type field, IPv6 next header field, IPv6 flow label field, transport layer source port or ICMP type field, transport layer destination port or ICMP code field;
- the processing module is configured to perform corresponding processing on the IPv6 packet according to the matching result.
- the embodiment of the present invention further provides a data packet processing system, including a control server and at least one packet forwarding device, wherein the packet forwarding device uses the packet forwarding device.
- the IPv6 flow table structure supporting the IPv6 packet is pre-defined in the control server of the OpenFlow system architecture, and the IPv6 flow table is delivered to the packet forwarding device of the OpenFlow system architecture.
- the packet forwarding device may determine, according to the link layer data type field included in the data packet, whether the data packet is an IPv6 packet, and if it is an IPv6 packet, the packet forwarding device Can be in the field contained in the IPv6 message The content matches the content of the field in the stored IPv6 flow table, and the IPv6 packet is processed according to the matching result. Therefore, the embodiment of the present invention can enable the packet forwarding device of the OpenFlow system architecture to support IPv6 packets, and expand the OpenFlow system architecture.
- Embodiment 1 is a flowchart of Embodiment 1 of a data packet processing method according to the present invention
- Embodiment 2 is a flowchart of Embodiment 2 of a data packet processing method according to the present invention
- Embodiment 3 is a flowchart of Embodiment 3 of a data packet processing method according to the present invention.
- Embodiment 4 is a schematic structural diagram of Embodiment 1 of a packet forwarding device according to the present invention.
- FIG. 5 is a schematic structural diagram of Embodiment 2 of a packet forwarding device according to the present invention.
- FIG. 6 is a schematic structural diagram of an embodiment of a data packet processing system according to the present invention. detailed description
- the flow table in the OpenFlow system architecture only supports IPv4 packets, but does not support IPv6 packets, and cannot identify and match related fields in the header of IPv6 packets. Therefore, the OpenFlow system architecture cannot be completed. Network programming control based on IPv64 transmission.
- the flow table is extended in the OpenFlow system architecture, and an IPv6 flow table supporting the IPv6 packet is added to support the identification and matching of the IPv6 packet.
- IPv6 flow table in the embodiment of the present invention is removed.
- IPv4 related fields in the existing OpenFlow flow table namely IPv4 source address, IPv4 destination address, IPv4 protocol type (IPv4 Protocol Type) and IPv4 monthly service type field (IPv4 ToS), newly added IPv6 source address
- IPv6 destination address field, the IPv6 traffic type field, the IPv6 next header field, and the IPv6 flow label field are five fields, thereby forming an IPv6 flow table containing 16 fields.
- the embodiment of the present invention may further add a Hop-by-Hop Header Options field and a routing header of the Routing Header in the IPv6 flow table.
- the (Routing Type) field, the Segment Left field, the Type Specific Data field, and the Options Options field of the Destination Options Header form an IPv6 stream containing 21 fields. table.
- the complete IPv6 flow table may include the following 21 fields: an Ingress Port field, a Metadata field, a link layer source address (Ether Src) field, and a link layer destination. Address (Ether Dst) field, link layer data type (Ether Type) field, virtual local area network (VLAN) identifier (Vlan ID) field, virtual local area network priority (Vlan Priority) field, multi-protocol Multi-Protocol Label Switching (hereinafter referred to as MPLS) label (MPLS Label) field, MPLS Traffic Class field, IPv6 source address (IPv6 Src) field, IPv6 destination address (IPv6 Dst) field, IPv6 The IPv6 Traffic Class field, the IPv6 Next Header field, the IPv6 Flow Label field, the transport layer source port, or the Internet Protocol Message Protocol (ICMP).
- ICMP Internet Protocol Message Protocol
- TCP/UDP/SCTP Src Port/ICMP Type TCP/UDP/SCTP Src Port/ICMP Type
- Transport destination port or ICMP code TCP/UDP/SCTP Dst Port/ICMP Code
- Hop-by-Hop Header option Options
- Routing header Routing Header
- the (Routing Type) field the Segment Left field, the Type Specific Data field, and the Options Options field of the Destination Options Header.
- the field length of the IPv6 source address field may be 256 bits, which may include a 128-bit IPv6 source address mask field and a 128-bit source address field. When the IPv6 source address field matches, the IPv6 source address mask field may be selectively matched. . IPv6 destination address field The field length can be 256 bits, which can contain a 128-bit IPv6 destination address mask field. When the IPv6 destination address field matches, the IPv6 destination address mask field can be selectively matched. Both the IPv6 Traffic Class field and the IPv6 Next Header field can be 8 bits.
- the length of the IPv6 Flow Label field can be 32 bits. Only the lower 20 bits are used as valid storage bits, and the upper 12 bits are all zero.
- the TCP/UDP/SCTP Src Port represents the transport layer source port
- the ICMP Type represents the ICMP type
- the field is either Indicates the source port of the transport layer, which indicates the ICMP type. If the field indicates the transport layer source port or ICMP type, it is characterized by the specific content of the field. It is similar to the port of the transport layer or the ICMP code TCP/UDP/SCTP Dst Port/ICMP Code field, and will not be described here.
- control server does not need a packet forwarding device, such as a switch or a router, to receive all the fields in the received IPv6 packet. Matches with the above 16 fields or 21 fields.
- control server can send the following two forms of IPv6 flow table to the packet forwarding device:
- the control server delivers a complete IPv6 flow table.
- the complete IPv6 flow table includes the above 16 fields or 21 fields. In these fields, the content of one or a few fields may be matched by the corresponding field in the IPv6 packet received by the packet forwarding device, and the remaining fields are matched. You can indicate that no matching is required by setting it to "empty" or "any".
- Form 2 The control server delivers an incomplete IPv6 flow table.
- control server only needs to send the fields that need to match the IPv6 data, that is, only the entries in the IPv6 flow table are sent, and the other fields that do not need to be matched need not be sent. .
- the fields in the IPv6 flow table entries to be delivered may be in the form of a type-length-value. Said.
- the IPv6 flow table delivered by the above two methods is included in the required
- the matching field is matched to the corresponding operation (Instruction).
- the packet forwarding device may perform a preset operation, for example, discarding the IPv6 packet, or sending the IPv6 packet to the controller server to request the control server to the IPv6.
- the text is processed.
- IPv6 flow table may be used as an independent flow table, and the IPv6 flow table does not include the IPv4 flow table.
- the control server can only send the IPv6 flow table to the packet forwarding device, and if the packet forwarding device needs to support the IPv6 packet, And the IPv4 dual-stack operation, the control server needs to send the IPv4 flow table to the packet forwarding device, and the IPv6 flow table is sent to the packet forwarding device.
- the IPv6 flow table stored in the packet forwarding device and The IPv4 flow table needs to be distinguished by the respective flow table type values of the IPv6 flow table and the IPv4 flow table.
- Embodiment 1 is a flowchart of Embodiment 1 of a data packet processing method according to the present invention. As shown in FIG. 1, the method in this embodiment includes:
- Step 101 Determine, according to the link layer data type field included in the data packet, whether the data packet is an IPv6 packet.
- a packet forwarding device in the OpenFlow system architecture can receive data packets, which can be either IPv4 packets or IPv6 packets.
- the two packets can pass data packets.
- the link layer data type field contained in the Ether Type representation.
- the data packet is an IPv4 packet. If the Ether Type is 0x86DD, the data packet is an IPv6 packet.
- Step 102 If the data packet is an IPv6 packet, match the content of the field in the IPv6 packet with the content of the field that needs to be matched in the IPv6 flow table that is sent by the control server in advance.
- the IPv6 flow table may include at least one of the following fields:
- Ingress Port Metadata, Ether Src, Ether Dst, Ether Type, Vlan ID, Vlan Priority, MPLS Label, MPLS Traffic Class, IPv6 Src, IPv6 Dst, IPv6 Traffic Class, IPv6 Next Header, IPv6 Flow Label, TCP/UDP/SCTP Src Port/ICMP Type, TCP/UDP/SCTP Dst Port/ICMP Code, Hop-by-Hop Header Options, Routing Type, Segment Left, Type Specific Data, and Destination Options Header Options.
- the Controller in the OpenFlow system architecture may send the IPv6 flow table to the switch controlled by the IPv6 flow table in advance.
- the switch may send the two forms of the IPv6 flow table to the switch. It can be understood by those skilled in the art that the Controller can issue different IPv6 flow tables for different switches controlled by the controller.
- the switch in the OpenFlow system architecture may extract the content of the field from the IPv6 packet, and then extract the content of the field with the field content that needs to be matched in the pre-stored IPv6 flow table. Make a match.
- the switch can extract all the contents of the field included in the IPv6 packet, and only match the content of the field to be matched with the entry in the IPv6 flow table, or extract only the required matching.
- the content of the field matches the entry in the IPv6 flow table.
- the switch may extract the packet entry field, the link layer source address field, the link layer destination address field, and the link in the data packet before determining whether the received data packet is an IPv6 packet.
- the content of the layer data type field is similar to the process of IPv4 in the OpenFlow system architecture, and is not described here.
- the switch can extract the IPv6 source address field, the IPv6 destination address field, the IPv6 traffic type field, the IPv6 next header field, the IPv6 flow label field, and the transport layer source in the IPv6 packet.
- the port or ICMP type field, the transport layer destination port, or the ICMP code field is the switch's IP packet for extract IPv6 packet.
- the option field of the hop-by-hop extension header and the route type field of the route extension header may also be extracted in the IPv6 extension header. , the remaining slice field, the type specification data field, and the option field of the destination option header.
- the switch may first apply the extracted field content to generate a flow table matching structure, and then generate the data.
- the formed flow table matching structure matches the content of the field that needs to be matched in the IPv6 flow table.
- Step 103 Perform corresponding processing on the IPv6 packet according to the matching result.
- the IPv6 4 message can be processed according to the matching result.
- the switch can perform an IPv6 flow table corresponding to the processing operation of the IPv6 packet.
- the Instruction can include:
- the operation of the next-level IPv6 flow table is associated with the IPv6 packet forwarding operation.
- IPv6 packet for example, add the IPv6 source address, IPv6 destination address, IPv6 Traffic Class, and IPv6 Flow Table settings.
- the switch can perform the preset operation to process the IPv6 packet, for example, discarding the IPv6 text or sending the IPv6 ⁇ message to the Controller.
- the IPv6 flow table structure supporting the IPv6 packet is pre-defined in the control server of the OpenFlow system architecture, and the IPv6 flow table is delivered to the packet forwarding device of the OpenFlow system architecture.
- the packet forwarding device may determine, according to the link layer data type field included in the data packet, whether the data packet is an IPv6 packet, and if it is an IPv6 packet, the packet forwarding device The content of the field included in the IPv6 packet may be matched with the content of the field in the stored IPv6 flow table, and the IPv6 packet is processed according to the matching result. Therefore, this embodiment can enable the packet forwarding device of the OpenFlow system architecture to support IPv6 packets, and expand the OpenFlow system architecture.
- the IPv4 packet is already supported in the existing OpenFlow system architecture.
- the OpenFlow system architecture can support IPv6 packets. Therefore, for the Swtich in the OpenFlow system architecture. It is said that if it needs to support IPv6 packets and IPv4 packets, it needs to perform double-stack operation on IPv6 packets and IPv4 packets.
- the IPv4 flow table and the IPv6 flow table can be delivered to the switch by the controller in advance. . The dual stack operation will be described in detail below using an embodiment.
- Embodiment 2 is a flowchart of Embodiment 2 of a data packet processing method according to the present invention. As shown in FIG. 2, the method in this embodiment may include:
- Step 201 Receive a data packet.
- Step 202 Initialize content of a message entry field, a link layer source address field, a link layer destination address field, and a link layer data type field in the flow table matching structure.
- the initialization operation may be an Ingress Port field, a link layer source address (Ether Src) field, a link layer destination address (Ether Dst) field, and a link layer in the flow table matching structure.
- the Ether Type field is initialized to the corresponding value in the data, and the initial value of the remaining fields in the flow table matching structure can be set to zero.
- Step 203 Whether the next header is Vlan, if yes, execute step 204, otherwise step 206 is performed. Whether it is Vlan. For example, if the content of the Ether Type is 0x8100 or 0x88a8, the next header is Vlan.
- Step 204 Extract the Vlan ID and Vlan Priority fields, and continue processing using the Ether Type after the last Vlan header.
- Step 207 When using Ether Type for processing, use the Ether Type after the last Vlan header.
- Step 205 Skip the remaining Vlan headers and perform step 206.
- Step 206 Whether the switch supports MPLS. If yes, go to step 207. Otherwise, go to step 210.
- this step is an optional step. If the switch supports MPLS by default, the next step can be omitted.
- Step 207 Whether the next header is an MPLS shim header, if yes, go to step 208; otherwise, go to step 210.
- the switch can determine whether the next 4-head is MPLS by determining the content of the Ether Type. For example, if the content of the Ether Type is 0x8848 or 0x8847, the next one is MPLS.
- Step 209 Skip the remaining MPLS headers and perform step 214.
- the default processing mode of the switch is to ignore the first MPLS label and then skip all the remaining MPLS labels and process the MPLS payload packet header.
- Step 210 Whether the next header is an IPv6 header, if yes, go to step 211, otherwise go to step 212.
- the switch can determine whether the next header is an IPv6 header by determining the content of the Ether Type. For example, if the content of the Ether Type is 0x86DD, the next header is the IPv6 header.
- Step 211 Perform IPv6 packet processing, and perform step 214.
- the IPv6 packet can be processed by using the method described in the foregoing Embodiment 1, and details are not described herein.
- Step 212 Whether the next header is an IPv4 header, if yes, step 213 is performed, otherwise it ends.
- the switch determines that the next header is not an IPv6 header, it can further determine whether the header is an IPv4 header. Specifically, the switch can also determine whether the next header is an IPv4 header by determining the content of the Ether Type. For example, if the content of the Ether Type is 0x0800, the header is an IPv4 header.
- Step 213 Perform: ⁇ 4 "3 ⁇ 4" processing, and perform step 214.
- the sequence between the foregoing steps 210 to 211 and the steps 212 to 213 may be reversed, that is, whether the IPv4 packet is determined first, and then it is determined whether the packet is an IPv6 packet, or the foregoing step 210 and step 212 may be performed in combination. That is, the switch can determine whether the data packet is an IPv4 packet or an IPv6 packet by using the value of the Ether Type.
- Step 214 Determine a flow table to be used according to the flow table type value identification, and use the extracted related field to perform a flow table query.
- the related fields that are extracted may be filled in the corresponding fields of the flow table matching structure, and then the switch may identify the flow table to be used according to the value of the flow table type. If the data packet is an IPv6 packet, The switch can match the flow table matching structure with the IPv6 flow table for flow table query. If the data packet is an IPv4 packet, the switch can match the flow table matching structure with IPv4. The flow table performs flow table query matching.
- the flow table type value is defined in the IPv6 flow table, and the flow table type value is different from the flow table type value of the IPv4 flow table, so that the IPv6 flow table and the IPv4 flow table can be distinguished by the flow table type value.
- Flow table is defined in the IPv6 flow table, and the flow table type value is different from the flow table type value of the IPv4 flow table, so that the IPv6 flow table and the IPv4 flow table can be distinguished by the flow table type value.
- the present embodiment further describes the dual-stack operation of IPv4 4 and IPv6 messages in a detailed manner, and is compatible with the existing OpenFlow system architecture.
- step 211 The process of performing IPv6 packet processing in step 211 in the embodiment shown in FIG. 2 is described in detail below by using a more specific embodiment.
- FIG. 3 is a flowchart of Embodiment 3 of a data packet processing method according to the present invention. As shown in FIG. 3, the method in this embodiment may include:
- Step 301 Extract an IPv6 source address, a destination address, a Traffic Class, a Next header, and a Flow label.
- Step 302 Whether the next header is an IPv6 extension header, if yes, step 303 is performed, otherwise step 309 is performed.
- Step 303 Whether the next header is a Hop-by-Hop header, if yes, step 304 is performed; otherwise, step 305 is performed.
- the Switch can determine whether the next header is a Hop-by-Hop header by determining whether the IP v6 Next Header is equal to zero.
- Step 304 Extract the Options field of the Hop-by-Hop Header, and perform step 302.
- Step 305 Whether the next header is a Routing Header extension header, if yes, executing step 306, otherwise performing step 307.
- the switch can determine whether the next header is a Routing Header extension header by determining whether the IPv6 Next Header is equal to 43.
- Step 306 Extract the Routing Type, Segment Left, and Type Specific Data fields of the IPv6 routing extension header, and perform step 302.
- Step 307 Whether the next header is a Destination Options Header extension header, if yes, go to step 308; otherwise, go to step 302.
- the switch can determine if the next header is a Destination Options Header extension by determining if the IPv6 Next Header is equal to 60.
- Step 308 extract the options field of the Destination Options Header, and execute the step Step 302.
- Step 309 Whether the IPv6 Next Header is equal to 6, 17 or 132, if yes, go to step 310, otherwise go to step 311.
- Step 310 Extract the TCP/UDP/SCTP Src Port/Dst Port, and go to step 313. If the IPv6 Next Header is equal to 6, extract the TCP Src Port/Dst Port if IPv6 Next
- the UDP Src Port/Dst Port is extracted. If the IPv6 Next Header is equal to 132, the SCTP Src Port/Dst Port is extracted.
- Step 311 Whether the IP Next Header is equal to 58, if yes, execute step 312, otherwise step 313 is performed.
- Step 312 Extract the ICMP Type and Code, and perform step 313.
- Step 313 Perform an flow table query by using the extracted field.
- the foregoing embodiment of the present invention can enable the packet forwarding device of the OpenFlow system architecture to support the IPv6 packet. Moreover, the technical solution of the embodiment of the present invention can support the dual stack operation and expand the OpenFlow system architecture.
- the device in this embodiment may include: a determining module 11, a matching module 12, and a processing module 13, where the determining module 11 is configured to Determining, according to the link layer data type field included in the data packet, whether the data packet is an IPv6 packet, and the matching module 12, configured to: if the data packet is an IPv6 packet, the IPv6 packet The content of the field matches the content of the field that needs to be matched in the IPv6 flow table that is sent by the control server.
- the IPv6 flow table includes at least one of the following fields: a message entry field, a metadata field, and a link layer source.
- link layer destination address field link layer data type field, virtual local area network identification field, virtual local area network priority field, MPLS label field, MPLS traffic type field, IPv6 source address field, IPv6 destination address field, IPv6 traffic type Field, IPv6 Next Header Field, IPv6 Flow Label Field, Transport Layer Source Port or ICMP Type Field, Transport Layer
- the processing module 13 is configured to perform corresponding processing on the IPv6 packet according to the matching result.
- the processing module 13 may be specifically configured to: if the matching is successful, perform the processing operation corresponding to the IPv6 flow table on the IPv6 packet; if the matching is unsuccessful, discard the IPv6 packet. Or sending the IPv6 packet to the control server.
- the packet forwarding device in this embodiment may be a switch in an OpenFlow system architecture or Router.
- the packet forwarding device of this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 1.
- the implementation principle and technical effects are similar, and details are not described herein again.
- the device in this embodiment may further include: an extraction module 14 for determining a module, based on the device shown in FIG. Determining, before determining whether the data packet is an IPv6 packet, extracting, in the data packet, a content of a message entry field, a link layer source address field, a link layer destination address field, and a link layer data type field; After the determining module determines that the data packet is an IPv6 packet, extracting an IPv6 source address field, an IPv6 destination address field, an IPv6 traffic type field, an IPv6 next header field, and an IPv6 flow label field in the IPv6 packet.
- a matching module 12 specifically configured to: use the content of the field extracted by the extraction module and the IPv6 flow table Field contents need to match to match.
- the matching module 12 may include: a generating unit 121 and a matching unit 122, where the generating unit 121 is configured to generate the flow table matching structure by using the field content extracted by the extracting module 14; the matching unit 122 is configured to use the matching table
- the matching structure matches the content of the field that needs to match in the IPv6 flow table.
- the device in this embodiment may further include: a flow table identification module 15 configured to use the flow table included in the IPv6 flow table before the matching module performs matching
- the type value identifies the IPv6 flow table from the IPv6 flow table and the IPv4 flow table.
- the device of this embodiment may further include: a flow table storage module 16, configured to receive an IPv6 flow table sent by the control server, where each field in the IPv6 flow table includes a type, a length, and a value of the field.
- a flow table storage module 16 configured to receive an IPv6 flow table sent by the control server, where each field in the IPv6 flow table includes a type, a length, and a value of the field.
- the device in this embodiment can be used to implement the technical solution of the method embodiment shown in FIG. 2 or FIG. 3, and the implementation principle is similar, and details are not described herein again.
- FIG. 6 is a schematic structural diagram of an embodiment of a data packet processing system according to the present invention.
- the system in this embodiment may be an OpenFlow system architecture.
- the system includes: a control server 1 and at least one packet.
- the text forwarding device 2, in the present embodiment, two message forwarding devices are shown.
- the packet forwarding device 2 in this embodiment may adopt the structure shown in FIG. 4 or FIG.
- the technical solution described in any one of FIG. 1 to FIG. 3 is specifically implemented, and the implementation principle is similar, and details are not described herein again.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
数据报文处理方法和系统、 报文转发设备 技术领域 本发明实施例涉及通信技术领域, 尤其涉及一种数据报文处理方法和 系统、 报文转发设备。 背景技术 The present invention relates to the field of communications technologies, and in particular, to a data packet processing method and system, and a packet forwarding device. Background technique
传统的传输控制协议 /因特网互联协议 ( Transmission Control Protocol/ Internet Protocol, 以下简称: TCP/IP ) 互联网的体系结构是以分布式路由 协议为基础的网络结构, 网络通过 IP ^艮文完成主机间的通讯。 Traditional Transmission Control Protocol/Internet Protocol (TCP/IP) The architecture of the Internet is based on a distributed routing protocol. The network completes the inter-host communication through IP. communication.
但是随着互联网的发展, 分布式网络的体系结构无法更好的满足网络 扩展性和管理上的需求, 因此, 集中式可编程网络体系结构应运而生。 开 放流(以下简称: OpenFlow ) 系统架构就是集中式可编程网络体系结构一 种, OpenFlow交换机( OpenFlow Switch )将原来完全由交换机 /路由器控 制的报文转发过程转化为由 OpenFlow交换机和控制服务器 (Controller ) 来共同完成, 从而实现了数据转发和路由控制的分离。 控制服务器可以通 过事先规定好的接口操作来控制 OpenFlow交换机中的流表, 从而达到控 制数据转发的目的。 交换机针对进入交换机的报文, 可以通过查询流表来 获取与该数据包匹配的流表表项, 根据该流表表项即可确定需要对该数据 包执行的操作, 该操作例如可以是转发到目的端口、 丟弃、 上报控制服务 器等。 However, with the development of the Internet, the architecture of the distributed network cannot better meet the network scalability and management requirements. Therefore, the centralized programmable network architecture emerges. The OpenFlow (hereinafter referred to as: OpenFlow) system architecture is a centralized programmable network architecture. The OpenFlow Switch converts the packet forwarding process that was originally controlled by the switch/router into an OpenFlow switch and control server (Controller). ) to complete together, thus achieving the separation of data forwarding and routing control. The control server can control the flow table in the OpenFlow switch through pre-defined interface operations to control data forwarding. The switch can obtain the flow table entry that matches the data packet by querying the flow table, and the operation that needs to be performed on the data packet can be determined according to the flow table entry, and the operation can be, for example, forwarding. Go to the destination port, drop, report to the control server, and so on.
发明人在研究过程中发现, 现有的 OpenFlow系统架构仅支持对互联 网协议版本 4 ( Internet Protocol version 4; 以下简称 IPv4 )才艮文, 而不支 持互联网协议版本 6 ( Internet Protocol version 6; 以下简称 IPv6 )才艮文, 这在一定程度上限制了 OpenFlow系统架构的发展。 发明内容 本发明实施例提供一种数据报文处理方法和系统、 报文转发设备。 本发明实施例提供一种数据报文处理方法, 包括: 根据数据报文中包含的链路层数据类型字段, 确定所述数据报文是否 是 IPv6才艮文; The inventor found in the research process that the existing OpenFlow system architecture only supports Internet Protocol version 4 (hereinafter referred to as IPv4), but does not support Internet Protocol version 6 (hereinafter referred to as Internet Protocol version 6; IPv6) is a slogan, which limits the development of the OpenFlow system architecture to a certain extent. SUMMARY OF THE INVENTION Embodiments of the present invention provide a data packet processing method and system, and a packet forwarding device. The embodiment of the invention provides a data packet processing method, including: Determining, according to the link layer data type field included in the data packet, whether the data packet is an IPv6 packet;
若所述数据报文是 IPv6报文, 则将所述 IPv6报文中的字段内容与控 制服务器预先下发的 IPv6流表中所需匹配的字段内容进行匹配,所述 IPv6 流表中包含下述至少一个字段: If the data packet is an IPv6 packet, the content of the field in the IPv6 packet is matched with the content of the field that is required to be matched in the IPv6 flow table that is sent by the control server, and the IPv6 flow table includes the following. Said at least one field:
报文入口字段、 元数据字段、 链路层源地址字段、 链路层目的地址字 段、链路层数据类型字段、虚拟局域网标识字段、虚拟局域网优先级字段、 MPLS标签字段、 MPLS流量类型字段、 IPv6源地址字段、 IPv6目的地址 字段、 IPv6流量类型字段、 IPv6下一个报头字段、 IPv6流标签字段、 传 输层源端口或 ICMP类型字段、 传输层目的端口或 ICMP代码字段; Message entry field, metadata field, link layer source address field, link layer destination address field, link layer data type field, virtual local area network identification field, virtual local area network priority field, MPLS label field, MPLS traffic type field, IPv6 source address field, IPv6 destination address field, IPv6 traffic type field, IPv6 next header field, IPv6 flow label field, transport layer source port or ICMP type field, transport layer destination port or ICMP code field;
根据匹配结果对所述 IPv6 文进行相应的处理。 The IPv6 text is processed correspondingly according to the matching result.
本发明实施例提供一种报文转发设备, 包括: The embodiment of the invention provides a packet forwarding device, which includes:
确定模块, 用于根据数据报文中包含的链路层数据类型字段, 确定所 述数据报文是否是 IPv6报文; a determining module, configured to determine, according to a link layer data type field included in the data packet, whether the data packet is an IPv6 packet;
匹配模块, 用于若所述数据报文是 IPv6报文, 则将所述 IPv6报文中 的字段内容与控制服务器预先下发的 IPv6 流表中所需匹配的字段内容进 行匹配, 所述 IPv6流表中包含下述至少一个字段: a matching module, configured to: if the data packet is an IPv6 packet, match the field content in the IPv6 packet with a field content that needs to be matched in an IPv6 flow table that is sent by the control server in advance, the IPv6 The flow table contains at least one of the following fields:
报文入口字段、 元数据字段、 链路层源地址字段、 链路层目的地址字 段、链路层数据类型字段、虚拟局域网标识字段、虚拟局域网优先级字段、 MPLS标签字段、 MPLS流量类型字段、 IPv6源地址字段、 IPv6目的地址 字段、 IPv6流量类型字段、 IPv6下一个报头字段、 IPv6流标签字段、 传 输层源端口或 ICMP类型字段、 传输层目的端口或 ICMP代码字段; Message entry field, metadata field, link layer source address field, link layer destination address field, link layer data type field, virtual local area network identification field, virtual local area network priority field, MPLS label field, MPLS traffic type field, IPv6 source address field, IPv6 destination address field, IPv6 traffic type field, IPv6 next header field, IPv6 flow label field, transport layer source port or ICMP type field, transport layer destination port or ICMP code field;
处理模块, 用于根据匹配结果对所述 IPv6报文进行相应的处理。 本发明实施例还提供一种数据报文处理系统, 包括控制服务器和至少 一个报文转发设备, 其中, 报文转发设备采用上述的报文转发设备。 The processing module is configured to perform corresponding processing on the IPv6 packet according to the matching result. The embodiment of the present invention further provides a data packet processing system, including a control server and at least one packet forwarding device, wherein the packet forwarding device uses the packet forwarding device.
本发明实施例, 可以在 OpenFlow系统架构的控制服务器中预先定义 支持 IPv6报文的 IPv6流表结构, 并向 OpenFlow系统架构的报文转发设 备下发 IPv6流表。 报文转发设备在接收到数据报文后, 可以根据该数据 报文中包含的链路层数据类型字段, 确定该数据报文是否是 IPv6报文, 如果是 IPv6报文, 则报文转发设备可以将该 IPv6报文中所包含的字段内 容与存储的 IPv6流表中的字段内容进行匹配, 并根据匹配结果对该 IPv6 报文进行处理。 因此, 本发明实施例可以使得 OpenFlow系统架构的报文 转发设备支持 IPv6报文, 拓展了 OpenFlow系统架构。 附图说明 In the embodiment of the present invention, the IPv6 flow table structure supporting the IPv6 packet is pre-defined in the control server of the OpenFlow system architecture, and the IPv6 flow table is delivered to the packet forwarding device of the OpenFlow system architecture. After receiving the data packet, the packet forwarding device may determine, according to the link layer data type field included in the data packet, whether the data packet is an IPv6 packet, and if it is an IPv6 packet, the packet forwarding device Can be in the field contained in the IPv6 message The content matches the content of the field in the stored IPv6 flow table, and the IPv6 packet is processed according to the matching result. Therefore, the embodiment of the present invention can enable the packet forwarding device of the OpenFlow system architecture to support IPv6 packets, and expand the OpenFlow system architecture. DRAWINGS
实施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见 地, 下面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员 来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的 附图。 The drawings used in the embodiments or the description of the prior art are briefly described. It is obvious that the drawings in the following description are some embodiments of the present invention, and are not creative to those skilled in the art. Other drawings can also be obtained from these drawings on the premise of labor.
图 1为本发明数据报文处理方法实施例一的流程图; 1 is a flowchart of Embodiment 1 of a data packet processing method according to the present invention;
图 2为本发明数据报文处理方法实施例二的流程图; 2 is a flowchart of Embodiment 2 of a data packet processing method according to the present invention;
图 3为本发明数据报文处理方法实施例三的流程图; 3 is a flowchart of Embodiment 3 of a data packet processing method according to the present invention;
图 4为本发明报文转发设备实施例一的结构示意图; 4 is a schematic structural diagram of Embodiment 1 of a packet forwarding device according to the present invention;
图 5为本发明报文转发设备实施例二的结构示意图; FIG. 5 is a schematic structural diagram of Embodiment 2 of a packet forwarding device according to the present invention;
图 6为本发明数据报文处理系统实施例的结构示意图。 具体实施方式 FIG. 6 is a schematic structural diagram of an embodiment of a data packet processing system according to the present invention. detailed description
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本 发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描 述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提 下所获得的所有其他实施例, 都属于本发明保护的范围。 The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
在现有技术中, OpenFlow系统架构中的流表仅支持 IPv4报文, 而并 不支持 IPv6报文, 无法对 IPv6报文的报头中相关字段进行识别与匹配, 因此, OpenFlow系统架构无法完成对基于 IPv64艮文传输的网络编程控制。 In the prior art, the flow table in the OpenFlow system architecture only supports IPv4 packets, but does not support IPv6 packets, and cannot identify and match related fields in the header of IPv6 packets. Therefore, the OpenFlow system architecture cannot be completed. Network programming control based on IPv64 transmission.
本发明实施例为了解决现有 OpenFlow系统架构无法支持 IPv6报文的 缺陷, 在该 OpenFlow系统架构中对流表进行扩展, 增加支持 IPv6报文的 IPv6流表 , 以支持 IPv6报文的识别和匹配。 In the embodiment of the present invention, in order to solve the defect that the existing OpenFlow system architecture cannot support the IPv6 packet, the flow table is extended in the OpenFlow system architecture, and an IPv6 flow table supporting the IPv6 packet is added to support the identification and matching of the IPv6 packet.
本发明实施例中的 IPv6流表同现有技术中的 IPv4流表相比, 去掉了 现有 OpenFlow流表中的 IPv4相关字段, 即 IPv4源地址, IPv4目的地址, IPv4十办议类型 ( IPv4 Protocol Type )和 IPv4月良务类型字段 ( IPv4 ToS )四 个字段, 新添加 IPv6源地址字段、 IPv6 目的地址字段、 IPv6流量类型字 段、 IPv6下一个报头字段和 IPv6流标签字段这五个字段, 从而形成包含 16个字段的 IPv6流表。 进一步地, 为了支持 IPv6扩展头, 本发明实施例 还可以在该 IPv6 流表中进一步添加逐跳扩展头的选项 ( Hop-by-Hop Header Options )字段、路由扩展头( Routing Header )的路由类型( Routing Type )字段、 剩余片 ( Segment Left )字段、 类型指定数据( Type Specific Data ) 字段以及目的地选项才艮头 ( Destination Options Header ) 的选项 ( Options ) 字段, 形成包含 21个字段的 IPv6流表。 Compared with the IPv4 flow table in the prior art, the IPv6 flow table in the embodiment of the present invention is removed. IPv4 related fields in the existing OpenFlow flow table, namely IPv4 source address, IPv4 destination address, IPv4 protocol type (IPv4 Protocol Type) and IPv4 monthly service type field (IPv4 ToS), newly added IPv6 source address The field, the IPv6 destination address field, the IPv6 traffic type field, the IPv6 next header field, and the IPv6 flow label field are five fields, thereby forming an IPv6 flow table containing 16 fields. Further, in order to support the IPv6 extension header, the embodiment of the present invention may further add a Hop-by-Hop Header Options field and a routing header of the Routing Header in the IPv6 flow table. The (Routing Type) field, the Segment Left field, the Type Specific Data field, and the Options Options field of the Destination Options Header form an IPv6 stream containing 21 fields. table.
在本发明实施例中, 完整的 IPv6流表可以包含如下 21个字段: 报文入口 (Ingress Port ) 字段, 元数据 (Metadata ) 字段, 链路层源 地址 (Ether Src ) 字段, 链路层目的地址 ( Ether Dst ) 字段, 链路层数据 类型 ( Ether Type ) 字段, 虚拟局域网 ( Virtual Local Area Network, 以下 简称: Vlan ) 标识 ( Vlan ID ) 字段, 虚拟局域网优先级 ( Vlan Priority ) 字段, 多协议标签交换( Multi-Protocol Label Switching, 以下简称: MPLS ) 标签 (MPLS Label ) 字段, MPLS流量类型 ( MPLS Traffic Class ) 字段, IPv6源地址 ( IPv6 Src ) 字段, IPv6目的地址 ( IPv6 Dst ) 字段, IPv6流 量类型 ( IPv6 Traffic Class ) 字段, IPv6下一个报头 ( IPv6 Next Header ) 字段, IPv6流标签( IPv6 Flow Label ) 字段, 传输层源端口或控制报文协 议 ( Internet Control Message Protocol , 以 下简称: ICMP ) 类型 ( TCP/UDP/SCTP Src Port/ICMP Type )字段,传输层目的端口或 ICMP代 码( TCP/UDP/SCTP Dst Port/ICMP Code )字段, 逐跳扩展头( Hop-by-Hop Header ) 的选项 (Options ) 字段、 路由扩展头 (Routing Header ) 的路由 类型 ( Routing Type ) 字段、 剩余片 ( Segment Left ) 字段、 类型指定数据 ( Type Specific Data ) 字段以及目的地选项才艮头 ( Destination Options Header ) 的选项 (Options ) 字段。 In the embodiment of the present invention, the complete IPv6 flow table may include the following 21 fields: an Ingress Port field, a Metadata field, a link layer source address (Ether Src) field, and a link layer destination. Address (Ether Dst) field, link layer data type (Ether Type) field, virtual local area network (VLAN) identifier (Vlan ID) field, virtual local area network priority (Vlan Priority) field, multi-protocol Multi-Protocol Label Switching (hereinafter referred to as MPLS) label (MPLS Label) field, MPLS Traffic Class field, IPv6 source address (IPv6 Src) field, IPv6 destination address (IPv6 Dst) field, IPv6 The IPv6 Traffic Class field, the IPv6 Next Header field, the IPv6 Flow Label field, the transport layer source port, or the Internet Protocol Message Protocol (ICMP). Type (TCP/UDP/SCTP Src Port/ICMP Type) field, Transport destination port or ICMP code (TCP/UDP/SCTP Dst Port/ICMP Code) field, Hop-by-Hop Header option (Options) field, Routing header (Routing Header) route type The (Routing Type) field, the Segment Left field, the Type Specific Data field, and the Options Options field of the Destination Options Header.
其中, IPv6源地址字段的字段长度可以为 256bit,其中可以包含 128bit 的 IPv6源地址掩码字段和 128bit的源地址字段, IPv6源地址字段在匹配 时可以通过 IPv6源地址掩码字段进行选择性匹配。 IPv6 目的地址字段的 字段长度可以为 256bit, 其中可以包含 128bit的 IPv6目的地址掩码字段, IPv6 目的地址字段在匹配时可以通过 IPv6 目的地址掩码字段进行选择性 匹配。 IPv6 Traffic Class字段和 IPv6 Next Header字段均可以为 8bits, IPv6 Flow Label字段的长度可以为 32bits ,只使用低 20位 bits作为有效存储位, 而高 12位全部为零。 The field length of the IPv6 source address field may be 256 bits, which may include a 128-bit IPv6 source address mask field and a 128-bit source address field. When the IPv6 source address field matches, the IPv6 source address mask field may be selectively matched. . IPv6 destination address field The field length can be 256 bits, which can contain a 128-bit IPv6 destination address mask field. When the IPv6 destination address field matches, the IPv6 destination address mask field can be selectively matched. Both the IPv6 Traffic Class field and the IPv6 Next Header field can be 8 bits. The length of the IPv6 Flow Label field can be 32 bits. Only the lower 20 bits are used as valid storage bits, and the upper 12 bits are all zero.
需要说明的是, 对于传输层源端口或 ICMP字段 TCP/UDP/SCTP Src Port/ICMP Type来说,其中的 TCP/UDP/SCTP Src Port表示传输层源端口, ICMP Type表示 ICMP 类型, 该字段要么表示传输层源端口, 要么表示 ICMP类型, 该字段具体所表示的是传输层源端口还是 ICMP类型, 则由 该字段的具体内容表征。 对于传输层 目 的端 口或 ICMP 代码 TCP/UDP/SCTP Dst Port/ICMP Code字段来说类似, 此处不再赘述。 It should be noted that, for the transport layer source port or the ICMP field TCP/UDP/SCTP Src Port/ICMP Type, the TCP/UDP/SCTP Src Port represents the transport layer source port, and the ICMP Type represents the ICMP type, and the field is either Indicates the source port of the transport layer, which indicates the ICMP type. If the field indicates the transport layer source port or ICMP type, it is characterized by the specific content of the field. It is similar to the port of the transport layer or the ICMP code TCP/UDP/SCTP Dst Port/ICMP Code field, and will not be described here.
本领域技术人员可以理解的是, 在 OpenFlow系统架构中, 控制服务 器(Controller )在进行匹配策略设计时, 并非需要报文转发设备, 例如交 换机或者路由器, 接收的 IPv6报文中的全部字段内容均与上述 16个字段 或者 21个字段对应匹配。 It can be understood by those skilled in the art that, in the architecture of the OpenFlow system, the control server (Controller) does not need a packet forwarding device, such as a switch or a router, to receive all the fields in the received IPv6 packet. Matches with the above 16 fields or 21 fields.
因此, 控制服务器可以向报文转发设备发送如下两种形式的 IPv6 流 表: Therefore, the control server can send the following two forms of IPv6 flow table to the packet forwarding device:
形式一、 控制服务器下发完整的 IPv6流表 Form 1. The control server delivers a complete IPv6 flow table.
该完整的 IPv6流表包括上述 16个字段或者 21个字段, 这些字段中, 可以指定某一个或者某几个字段的内容需要报文转发设备接收的 IPv6报 文中对应的字段匹配, 而其余字段则可以通过设为 "空" 或者 "any" 而 表示无需匹配。 The complete IPv6 flow table includes the above 16 fields or 21 fields. In these fields, the content of one or a few fields may be matched by the corresponding field in the IPv6 packet received by the packet forwarding device, and the remaining fields are matched. You can indicate that no matching is required by setting it to "empty" or "any".
形式二、 控制服务器下发不完整的 IPv6流表 Form 2: The control server delivers an incomplete IPv6 flow table.
为了简化控制服务器下发的 IPv6 流表, 控制服务器只需要发送需要 IPv6 ^艮文匹配的字段, 也即只发送 IPv6流表中的某些表项, 而其余不需 要匹配的字段则无需下发。 To simplify the IPv6 flow table sent by the control server, the control server only needs to send the fields that need to match the IPv6 data, that is, only the entries in the IPv6 flow table are sent, and the other fields that do not need to be matched need not be sent. .
为了实现这种下发 IPv6 流表表项的方式, 本发明实施例中, 所需下 发的 IPv6流表表项中的字段都可以采用类型-长度-值 ( type-length-value ) 的形式表示。 In the embodiment of the present invention, the fields in the IPv6 flow table entries to be delivered may be in the form of a type-length-value. Said.
可以理解的是, 上述两种方式下发的 IPv6 流表中, 其均包含在所需 匹配的字段匹配成功后所对应执行的操作 (Instruction ) 。 而且, 在所需 匹配的字段匹配不成功, 则报文转发设备可以执行预设的操作, 例如丟弃 该 IPv6报文, 或者将该 IPv6报文发送给控制器服务器以请求控制服务器 对该 IPv6 文进行处理。 It can be understood that the IPv6 flow table delivered by the above two methods is included in the required The matching field is matched to the corresponding operation (Instruction). Moreover, if the matching of the required matching field is unsuccessful, the packet forwarding device may perform a preset operation, for example, discarding the IPv6 packet, or sending the IPv6 packet to the controller server to request the control server to the IPv6. The text is processed.
本发明实施例可以进一步进行如下优化: The embodiment of the present invention may further optimize as follows:
由于一个报文不能同时既是 IPv4报文又是 IPv6报文,如果将 IPv4流 表和 IPv6流表放在一个统一的 OpenFlow流表中, 则该统一的 OpenFlow 流表中必然存在空闲的存储空间, OpenFlow 流表的利用率较低, 因此, 本发明实施例优选地, 可以将该 IPv6流表作为一个独立的流表, 该 IPv6 流表中不包含 IPv4流表。 If a packet cannot be both an IPv4 packet and an IPv6 packet, if the IPv4 flow table and the IPv6 flow table are placed in a unified OpenFlow flow table, there must be free storage space in the unified OpenFlow flow table. The utilization of the OpenFlow flow table is low. Therefore, in the embodiment of the present invention, the IPv6 flow table may be used as an independent flow table, and the IPv6 flow table does not include the IPv4 flow table.
可以理解的是, 如果该 OpenFlow系统架构中的报文转发设备只需要 支持 IPv6报文,则控制服务器可以只向报文转发设备下发 IPv6流表即可, 而如果报文转发设备需要支持 IPv6和 IPv4的双栈操作, 则控制服务器既 需要向报文转发设备下发 IPv4流表, 也需要向报文转发设备下发 IPv6流 表, 此时, 报文转发设备中存储的 IPv6流表和 IPv4流表就需要通过 IPv6 流表和 IPv4流表各自的流表类型值加以区分。 It can be understood that if the packet forwarding device in the OpenFlow system architecture only needs to support the IPv6 packet, the control server can only send the IPv6 flow table to the packet forwarding device, and if the packet forwarding device needs to support the IPv6 packet, And the IPv4 dual-stack operation, the control server needs to send the IPv4 flow table to the packet forwarding device, and the IPv6 flow table is sent to the packet forwarding device. At this time, the IPv6 flow table stored in the packet forwarding device and The IPv4 flow table needs to be distinguished by the respective flow table type values of the IPv6 flow table and the IPv4 flow table.
下面采用几个实施例, 对发明的技术方案进行详细说明。 The technical solutions of the invention will be described in detail below using several embodiments.
图 1为本发明数据报文处理方法实施例一的流程图, 如图 1所示, 本 实施例的方法包括: 1 is a flowchart of Embodiment 1 of a data packet processing method according to the present invention. As shown in FIG. 1, the method in this embodiment includes:
步骤 101、 根据数据报文中包含的链路层数据类型字段, 确定所述数 据报文是否是 IPv6报文。 Step 101: Determine, according to the link layer data type field included in the data packet, whether the data packet is an IPv6 packet.
OpenFlow 系统架构中的报文转发设备, 例如 OpenFlow 交换机 ( switch )可以接收数据报文, 该数据报文既可以是 IPv4报文, 也可以是 IPv6报文,这两种报文可以通过数据报文中所包含的链路层数据类型字段 Ether Type表征。 A packet forwarding device in the OpenFlow system architecture, such as an OpenFlow switch, can receive data packets, which can be either IPv4 packets or IPv6 packets. The two packets can pass data packets. The link layer data type field contained in the Ether Type representation.
举例来说, 若该 Ether Type=0x0800, 则该数据报文为 IPv4报文, 若 该 Ether Type=0x86DD, 则该数据报文为 IPv6报文。 For example, if the Ether Type is 0x0800, the data packet is an IPv4 packet. If the Ether Type is 0x86DD, the data packet is an IPv6 packet.
步骤 102、 若所述数据报文是 IPv6报文, 则将所述 IPv6报文中的字 段内容与控制服务器预先下发的 IPv6 流表中所需匹配的字段内容进行匹 配。 在本实施例中, 该 IPv6流表中可以包含下述至少一个字段: Step 102: If the data packet is an IPv6 packet, match the content of the field in the IPv6 packet with the content of the field that needs to be matched in the IPv6 flow table that is sent by the control server in advance. In this embodiment, the IPv6 flow table may include at least one of the following fields:
Ingress Port, Metadata, Ether Src, Ether Dst, Ether Type , Vlan ID , Vlan Priority, MPLS Label, MPLS Traffic Class, IPv6 Src, IPv6 Dst, IPv6 Traffic Class, IPv6 Next Header, IPv6 Flow Label, TCP/UDP/SCTP Src Port/ICMP Type, TCP/UDP/SCTP Dst Port/ICMP Code, Hop-by-Hop Header Options、 Routing Type、 Segment Left、 Type Specific Data以及 Destination Options Header Options。 Ingress Port, Metadata, Ether Src, Ether Dst, Ether Type, Vlan ID, Vlan Priority, MPLS Label, MPLS Traffic Class, IPv6 Src, IPv6 Dst, IPv6 Traffic Class, IPv6 Next Header, IPv6 Flow Label, TCP/UDP/SCTP Src Port/ICMP Type, TCP/UDP/SCTP Dst Port/ICMP Code, Hop-by-Hop Header Options, Routing Type, Segment Left, Type Specific Data, and Destination Options Header Options.
具体来说, OpenFlow系统架构中的 Controller, 可以预先将 IPv6流表 发送给其所控制的 switch, 具体地, 其可以向 switch发送上述两种形式的 IPv6流表。 本领域技术人员可以理解的是, Controller可以为其所控制的 不同的 switch下发不同的 IPv6流表。 Specifically, the Controller in the OpenFlow system architecture may send the IPv6 flow table to the switch controlled by the IPv6 flow table in advance. Specifically, the switch may send the two forms of the IPv6 flow table to the switch. It can be understood by those skilled in the art that the Controller can issue different IPv6 flow tables for different switches controlled by the controller.
OpenFlow系统架构中的 switch在确定该数据报文为 IPv6报文后, 可 以从该 IPv6报文中提取包含的字段内容, 然后将提取的字段内容与预存 的 IPv6流表中所需匹配的字段内容进行匹配。 After determining that the data packet is an IPv6 packet, the switch in the OpenFlow system architecture may extract the content of the field from the IPv6 packet, and then extract the content of the field with the field content that needs to be matched in the pre-stored IPv6 flow table. Make a match.
需要说明的是, switch既可以将该 IPv6报文中所包含的全部字段内容 都提取出来而只将需要匹配的字段内容与 IPv6 流表中的表项进行匹配, 也可以只提取所需匹配的字段内容与 IPv6流表中的表项进行匹配。 It should be noted that the switch can extract all the contents of the field included in the IPv6 packet, and only match the content of the field to be matched with the entry in the IPv6 flow table, or extract only the required matching. The content of the field matches the entry in the IPv6 flow table.
在具体实现时, switch可以在确定接收到的数据报文是否是 IPv6报文 之前, 提取该数据报文中的报文入口字段、 链路层源地址字段、 链路层目 的地址字段和链路层数据类型字段的内容, 该过程与 OpenFlow系统架构 中对 IPv4的处理过程类似, 此处不再赘述。 在确定该数据 文是 IPv6才艮 文之后 , switch可以再提取 IPv6报文中的 IPv6源地址字段、 IPv6目的地 址字段、 IPv6流量类型字段、 IPv6下一个报头字段、 IPv6流标签字段、 传输层源端口或 ICMP类型字段、 传输层目的端口或 ICMP代码字段, 如 果该 IPv6报文还有扩展头, 则还可以提取该 IPv6扩展头中的逐跳扩展头 的选项字段、 路由扩展头的路由类型字段、 剩余片字段、 类型指定数据字 段、 目的地选项报头的选项字段。 通过上述过程, switch即可完成对 IPv6 报文中的字段内容的提取。 In a specific implementation, the switch may extract the packet entry field, the link layer source address field, the link layer destination address field, and the link in the data packet before determining whether the received data packet is an IPv6 packet. The content of the layer data type field is similar to the process of IPv4 in the OpenFlow system architecture, and is not described here. After determining that the data is an IPv6 packet, the switch can extract the IPv6 source address field, the IPv6 destination address field, the IPv6 traffic type field, the IPv6 next header field, the IPv6 flow label field, and the transport layer source in the IPv6 packet. The port or ICMP type field, the transport layer destination port, or the ICMP code field. If the IPv6 packet has an extension header, the option field of the hop-by-hop extension header and the route type field of the route extension header may also be extracted in the IPv6 extension header. , the remaining slice field, the type specification data field, and the option field of the destination option header. Through the above process, the switch can complete the extraction of the field contents in the IPv6 message.
优先地, 在将所需匹配的字段内容与 IPv6 流表中的表项进行匹配之 前, switch可以先应用所提取的字段内容生成流表匹配结构, 然后再将生 成的流表匹配结构与 IPv6流表中所需匹配的字段内容进行匹配。 First, before matching the contents of the required matching field with the entries in the IPv6 flow table, the switch may first apply the extracted field content to generate a flow table matching structure, and then generate the data. The formed flow table matching structure matches the content of the field that needs to be matched in the IPv6 flow table.
步骤 103、 根据匹配结果对所述 IPv6报文进行相应的处理。 Step 103: Perform corresponding processing on the IPv6 packet according to the matching result.
switch在获取匹配结果后,可以根据该匹配结果对该 IPv6 4艮文进行相 应的处理。 After the switch obtains the matching result, the IPv6 4 message can be processed according to the matching result.
举例来说, 若匹配结果为成功, 则 switch可以对 IPv6报文进行 IPv6 流表中所对应的处理操作 Instruction , Instruction可以包括: For example, if the matching result is successful, the switch can perform an IPv6 flow table corresponding to the processing operation of the IPv6 packet. The Instruction can include:
存在多个 IPv6流表级联的情况下, 关联下一级 IPv6流表的操作; 将 IPv6报文进行端口转发操作; If the IPv6 flow table is cascaded, the operation of the next-level IPv6 flow table is associated with the IPv6 packet forwarding operation.
修改 IPv6报文的设置域操作( set field action ) , 例如在其中增加 IPv6 源地址, IPv6目的地址, IPv6 Traffic Class和 IPv6 Flow Table的设置操作 等。 Change the set field action of the IPv6 packet, for example, add the IPv6 source address, IPv6 destination address, IPv6 Traffic Class, and IPv6 Flow Table settings.
若匹配结果为不成功, 则 switch可以执行预设的操作处理该 IPv6报 文, 例如丟弃该 IPv6 文或者将该 IPv6 ^艮文发送给 Controller等。 If the matching result is unsuccessful, the switch can perform the preset operation to process the IPv6 packet, for example, discarding the IPv6 text or sending the IPv6^ message to the Controller.
本实施例, 可以在 OpenFlow系统架构的控制服务器中预先定义支持 IPv6报文的 IPv6流表结构,并向 OpenFlow系统架构的报文转发设备下发 IPv6流表。 报文转发设备在接收到数据报文后, 可以根据该数据报文中包 含的链路层数据类型字段,确定该数据报文是否是 IPv6报文,如果是 IPv6 报文, 则报文转发设备可以将该 IPv6报文中所包含的字段内容与存储的 IPv6流表中的字段内容进行匹配, 并根据匹配结果对该 IPv6报文进行处 理。因此,本实施例可以使得 OpenFlow系统架构的报文转发设备支持 IPv6 报文, 拓展了 OpenFlow系统架构。 In this embodiment, the IPv6 flow table structure supporting the IPv6 packet is pre-defined in the control server of the OpenFlow system architecture, and the IPv6 flow table is delivered to the packet forwarding device of the OpenFlow system architecture. After receiving the data packet, the packet forwarding device may determine, according to the link layer data type field included in the data packet, whether the data packet is an IPv6 packet, and if it is an IPv6 packet, the packet forwarding device The content of the field included in the IPv6 packet may be matched with the content of the field in the stored IPv6 flow table, and the IPv6 packet is processed according to the matching result. Therefore, this embodiment can enable the packet forwarding device of the OpenFlow system architecture to support IPv6 packets, and expand the OpenFlow system architecture.
在现有 OpenFlow系统架构中已经支持 IPv4报文, 在该基础上, 采用 本发明上述实施例所述的技术方案, OpenFlow系统架构即可支持 IPv6报 文,因此,对于 OpenFlow系统架构中的 swtich来说,如果其需要支持 IPv6 报文和 IPv4报文, 则其需要对 IPv6报文和 IPv4报文进行双栈操作, 需要 说明的是, IPv4流表和 IPv6流表可以由 Controller预先下发给 switch。 下 面采用一个实施例对该双栈操作进行详细说明。 The IPv4 packet is already supported in the existing OpenFlow system architecture. On the basis of the technical solution described in the foregoing embodiment of the present invention, the OpenFlow system architecture can support IPv6 packets. Therefore, for the Swtich in the OpenFlow system architecture. It is said that if it needs to support IPv6 packets and IPv4 packets, it needs to perform double-stack operation on IPv6 packets and IPv4 packets. The IPv4 flow table and the IPv6 flow table can be delivered to the switch by the controller in advance. . The dual stack operation will be described in detail below using an embodiment.
图 2为本发明数据报文处理方法实施例二的流程图, 如图 2所示, 本 实施例的方法可以包括: 2 is a flowchart of Embodiment 2 of a data packet processing method according to the present invention. As shown in FIG. 2, the method in this embodiment may include:
步骤 201、 接收数据报文。 步骤 202、 初始化流表匹配结构中的报文入口字段、 链路层源地址字 段、 链路层目的地址字段和链路层数据类型字段的内容。 Step 201: Receive a data packet. Step 202: Initialize content of a message entry field, a link layer source address field, a link layer destination address field, and a link layer data type field in the flow table matching structure.
具体来说, 该初始化操作可以是将流表匹配结构中的报文入口 ( Ingress Port ) 字段, 链路层源地址 ( Ether Src ) 字段、 链路层目的地址 ( Ether Dst )字段以及链路层数据类型( Ether Type )字段被初始化为数据 才艮文中的对应值, 而该流表匹配结构中的其余字段的初始值可设为 0。 Specifically, the initialization operation may be an Ingress Port field, a link layer source address (Ether Src) field, a link layer destination address (Ether Dst) field, and a link layer in the flow table matching structure. The Ether Type field is initialized to the corresponding value in the data, and the initial value of the remaining fields in the flow table matching structure can be set to zero.
需要说明的是, 本实施例仅以提取全部字段内容且采用流表匹配结构 这种具体实现方式为例进行说明, 本领域技术人员可以理解的是, 不采用 流表匹配结构而只将字段内容提取出来进行后续的匹配操作也可实现该 技术方案。 It should be noted that, in this embodiment, only a specific implementation manner in which all field contents are extracted and a flow table matching structure is adopted is taken as an example. Those skilled in the art can understand that only the flow table matching structure is used, and only the field content is used. This technical solution can also be implemented by extracting and performing subsequent matching operations.
步骤 203、 下一个报头是否是 Vlan, 若是则执行步骤 204 , 否则执行 步骤 206。 是否是 Vlan。 举例来说, 该 Ether Type的内容若为 0x8100或者 0x88a8 , 则下一个报头就是 Vlan。 Step 203: Whether the next header is Vlan, if yes, execute step 204, otherwise step 206 is performed. Whether it is Vlan. For example, if the content of the Ether Type is 0x8100 or 0x88a8, the next header is Vlan.
步骤 204、 提取 Vlan ID和 Vlan Priority字段, 使用最后一个 Vlan报 头后的 Ether Type继续处理。 Step 204: Extract the Vlan ID and Vlan Priority fields, and continue processing using the Ether Type after the last Vlan header.
switch在确定下一个报头是 Vlan后, 可以从数据报文中提取 Vlan ID 和 Vlan Priority字段。 后续步骤 207再使用 Ether Type进行处理时 , 则使 用最后一个 Vlan 头后的 Ether Type„ After the switch determines that the next header is Vlan, it can extract the Vlan ID and Vlan Priority fields from the data packet. Subsequent Steps 207 When using Ether Type for processing, use the Ether Type after the last Vlan header.
步骤 205、 跳过剩余的 Vlan头, 并执行步骤 206。 Step 205: Skip the remaining Vlan headers and perform step 206.
步骤 206、 交换机是否支持 MPLS , 若是则执行步骤 207, 否则执行步 骤 210。 Step 206: Whether the switch supports MPLS. If yes, go to step 207. Otherwise, go to step 210.
需要说明的是, 本步骤为可选步骤, 若该 switch默认支持 MPLS , 则 次步骤可以省略。 It should be noted that this step is an optional step. If the switch supports MPLS by default, the next step can be omitted.
步骤 207、 下一个报头是否是 MPLS shim报头, 若是则执行步骤 208 , 否则执行步骤 210。 Step 207: Whether the next header is an MPLS shim header, if yes, go to step 208; otherwise, go to step 210.
switch 可以通过确定 Ether Type 的内容来确定下一个 4艮头是否是 MPLS„ 举例来说, 该 Ether Type的内容若为 0x8848或者 0x8847, 则下一 个^艮头就是 MPLS。 步骤 208、 提取 Mpls label和 Mpls Traffic Class。 The switch can determine whether the next 4-head is MPLS by determining the content of the Ether Type. For example, if the content of the Ether Type is 0x8848 or 0x8847, the next one is MPLS. Step 208: Extract the Mpls label and the Mpls Traffic Class.
步骤 209、 跳过剩余的 MPLS报头, 并执行步骤 214。 Step 209: Skip the remaining MPLS headers and perform step 214.
针对 MPLS, 目前 switch默认的处理方式是不管后面的报文了, 而且 只解析第一个 MPLS标签, 然后跳过剩余所有的 MPLS标签, 处理 MPLS 的负载报文报头。 For MPLS, the default processing mode of the switch is to ignore the first MPLS label and then skip all the remaining MPLS labels and process the MPLS payload packet header.
步骤 210、 下一个报头是否是 IPv6报头, 若是则执行步骤 211 , 否则 执行步骤 212。 Step 210: Whether the next header is an IPv6 header, if yes, go to step 211, otherwise go to step 212.
switch可以通过确定 Ether Type的内容来确定下一个报头是否是 IPv6 报头。 举例来说, 该 Ether Type的内容若为 0x86DD, 则下一个报头就是 IPv6才艮头。 The switch can determine whether the next header is an IPv6 header by determining the content of the Ether Type. For example, if the content of the Ether Type is 0x86DD, the next header is the IPv6 header.
步骤 211、 进行 IPv6报文处理, 并执行步骤 214。 Step 211: Perform IPv6 packet processing, and perform step 214.
该步骤 211 即可采用上述实施例一所描述的方法对 IPv6报文进行处 理, 此处不在赘述。 In the step 211, the IPv6 packet can be processed by using the method described in the foregoing Embodiment 1, and details are not described herein.
步骤 212、 下一个报头是否是 IPv4报头, 若是则执行步骤 213 , 否则 结束。 Step 212: Whether the next header is an IPv4 header, if yes, step 213 is performed, otherwise it ends.
switch如果确定下一个报头不是 IPv6报头,则其可以进一步确定该报 头是否是 IPv4报头。 具体来说, switch同样可以通过确定 Ether Type的内 容来确定下一个报头是否是 IPv4报头。 举例来说, 该 Ether Type的内容 若为 0x0800, 则该报头就是 IPv4报头。 If the switch determines that the next header is not an IPv6 header, it can further determine whether the header is an IPv4 header. Specifically, the switch can also determine whether the next header is an IPv4 header by determining the content of the Ether Type. For example, if the content of the Ether Type is 0x0800, the header is an IPv4 header.
步骤 213、 进行:^¥4 "¾文处理, 并执行步骤 214。 Step 213: Perform: ^¥4 "3⁄4" processing, and perform step 214.
需要说明的是, 上述步骤 210〜211与步骤 212〜213之间的顺序可以颠 倒, 即先判断是否是 IPv4报文, 再判断是否是 IPv6报文, 或者上述步骤 210和步骤 212可以合并执行, 即 switch可以通过 Ether Type的值一次性 判断出该数据报文是 IPv4报文还是 IPv6报文。 It should be noted that the sequence between the foregoing steps 210 to 211 and the steps 212 to 213 may be reversed, that is, whether the IPv4 packet is determined first, and then it is determined whether the packet is an IPv6 packet, or the foregoing step 210 and step 212 may be performed in combination. That is, the switch can determine whether the data packet is an IPv4 packet or an IPv6 packet by using the value of the Ether Type.
步骤 214、 根据流表类型值识别确定所需使用的流表, 并使用提取的 相关字段进行流表查询。 Step 214: Determine a flow table to be used according to the flow table type value identification, and use the extracted related field to perform a flow table query.
具体来说, 上述提取的相关字段均可以被填写到流表匹配结构的对应 字段中, 然后 switch可以根据流表类型值识别确定所需使用的流表, 若数 据报文为 IPv6报文, 则 switch可以将流表匹配结构与 IPv6流表进行流表 查询匹配,若数据报文为 IPv4报文,则 switch可以将流表匹配结构与 IPv4 流表进行流表查询匹配。 Specifically, the related fields that are extracted may be filled in the corresponding fields of the flow table matching structure, and then the switch may identify the flow table to be used according to the value of the flow table type. If the data packet is an IPv6 packet, The switch can match the flow table matching structure with the IPv6 flow table for flow table query. If the data packet is an IPv4 packet, the switch can match the flow table matching structure with IPv4. The flow table performs flow table query matching.
本实施例所述的技术方案中, IPv6流表中定义了流表类型值, 该流表 类型值区别于 IPv4流表的流表类型值,从而可以通过流表类型值区分 IPv6 流表和 IPv4流表。 In the technical solution of the embodiment, the flow table type value is defined in the IPv6 flow table, and the flow table type value is different from the flow table type value of the IPv4 flow table, so that the IPv6 flow table and the IPv4 flow table can be distinguished by the flow table type value. Flow table.
本实施例在图 1 所示实施例的基础上, 进一步详细描述了 IPv4 4艮文 和 IPv6报文的双栈操作, 可以兼容现有 OpenFlow系统架构。 Based on the embodiment shown in FIG. 1, the present embodiment further describes the dual-stack operation of IPv4 4 and IPv6 messages in a detailed manner, and is compatible with the existing OpenFlow system architecture.
下面采用一个更为具体的实施例对图 2 所示实施例中步骤 211 进行 IPv6报文处理的过程进行详细说明。 The process of performing IPv6 packet processing in step 211 in the embodiment shown in FIG. 2 is described in detail below by using a more specific embodiment.
图 3为本发明数据报文处理方法实施例三的流程图, 如图 3所示, 本 实施例的方法可以包括: FIG. 3 is a flowchart of Embodiment 3 of a data packet processing method according to the present invention. As shown in FIG. 3, the method in this embodiment may include:
步骤 301、 提取 IPv6源地址, 目的地址 , Traffic Class, Next header , Flow label。 Step 301: Extract an IPv6 source address, a destination address, a Traffic Class, a Next header, and a Flow label.
步骤 302、 下一个报头是否是 IPv6扩展头, 若是则执行步骤 303 , 否 则执行步骤 309。 Step 302: Whether the next header is an IPv6 extension header, if yes, step 303 is performed, otherwise step 309 is performed.
步骤 303、下一个报头是否是 Hop-by-Hop报头,若是则执行步骤 304, 否则执行步骤 305。 Step 303: Whether the next header is a Hop-by-Hop header, if yes, step 304 is performed; otherwise, step 305 is performed.
Switch可通过判断 IP v6 Next Header是否等于 0来判断下一个报头是 否是 Hop-by-Hop报头。 The Switch can determine whether the next header is a Hop-by-Hop header by determining whether the IP v6 Next Header is equal to zero.
步骤 304、提取 Hop-by-Hop Header的 Options字段,并执行步骤 302。 步骤 305、 下一个报头是否是 Routing Header扩展头, 若是则执行步 骤 306, 否则执行步骤 307。 Step 304: Extract the Options field of the Hop-by-Hop Header, and perform step 302. Step 305: Whether the next header is a Routing Header extension header, if yes, executing step 306, otherwise performing step 307.
switch可通过判断 IPv6 Next Header是否等于 43来判断下一个报头是 否是 Routing Header扩展头。 The switch can determine whether the next header is a Routing Header extension header by determining whether the IPv6 Next Header is equal to 43.
步骤 306、提取 IPv6 routing扩展头的 Routing Type, Segment Left, Type Specific Data字段, 并执行步骤 302。 Step 306: Extract the Routing Type, Segment Left, and Type Specific Data fields of the IPv6 routing extension header, and perform step 302.
步骤 307、 下一个报头是否是 Destination Options Header扩展头, 若 是则执行步骤 308 , 否则执行步骤 302。 Step 307: Whether the next header is a Destination Options Header extension header, if yes, go to step 308; otherwise, go to step 302.
switch可通过判断 IPv6 Next Header是否等于 60来判断下一个报头是 否是 Destination Options Header扩展头。 The switch can determine if the next header is a Destination Options Header extension by determining if the IPv6 Next Header is equal to 60.
步骤 308、 提取 Destination Options Header的 options字段, 并执行步 骤 302。 Step 308, extract the options field of the Destination Options Header, and execute the step Step 302.
步骤 309、 IPv6 Next Header是否等于 6, 17或 132, 若是则执行步骤 310, 否则执行步骤 311。 Step 309: Whether the IPv6 Next Header is equal to 6, 17 or 132, if yes, go to step 310, otherwise go to step 311.
步骤 310、 提取 TCP/UDP/SCTP Src Port/Dst Port, 并执行步骤 313。 若 IPv6 Next Header等于 6 ,则提取 TCP Src Port/Dst Port ,若 IPv6 Next Step 310: Extract the TCP/UDP/SCTP Src Port/Dst Port, and go to step 313. If the IPv6 Next Header is equal to 6, extract the TCP Src Port/Dst Port if IPv6 Next
Header等于 17, 则提取 UDP Src Port/Dst Port, 若 IPv6 Next Header等于 132, 则提取 SCTP Src Port/Dst Port。 If Header is equal to 17, the UDP Src Port/Dst Port is extracted. If the IPv6 Next Header is equal to 132, the SCTP Src Port/Dst Port is extracted.
步骤 311、 IP Next Header是否等于 58, 若是则执行步骤 312, 否则执 行步骤 313。 Step 311: Whether the IP Next Header is equal to 58, if yes, execute step 312, otherwise step 313 is performed.
步骤 312、 提取 ICMP Type和 Code, 并执行步骤 313。 Step 312: Extract the ICMP Type and Code, and perform step 313.
步骤 313、 使用提取字段进行流表查询。 Step 313: Perform an flow table query by using the extracted field.
本发明上述实施例, 可以使得 OpenFlow系统架构的报文转发设备支 持 IPv6报文, 而且, 本发明实施例的技术方案可以支持双栈操作, 拓展 了 OpenFlow系统架构。 The foregoing embodiment of the present invention can enable the packet forwarding device of the OpenFlow system architecture to support the IPv6 packet. Moreover, the technical solution of the embodiment of the present invention can support the dual stack operation and expand the OpenFlow system architecture.
图 4为本发明报文转发设备实施例一的结构示意图, 如图 4所示, 本 实施例的设备可以包括: 确定模块 11、 匹配模块 12以及处理模块 13 , 其 中, 确定模块 11 , 用于根据数据报文中包含的链路层数据类型字段, 确定 所述数据报文是否是 IPv6报文;匹配模块 12,用于若所述数据报文是 IPv6 报文, 则将所述 IPv6报文中的字段内容与控制服务器预先下发的 IPv6流 表中所需匹配的字段内容进行匹配, 所述 IPv6 流表中包含下述至少一个 字段: 报文入口字段、 元数据字段、 链路层源地址字段、 链路层目的地址 字段、 链路层数据类型字段、 虚拟局域网标识字段、 虚拟局域网优先级字 段、 MPLS标签字段、 MPLS流量类型字段、 IPv6源地址字段、 IPv6目的 地址字段、 IPv6流量类型字段、 IPv6下一个报头字段、 IPv6流标签字段、 传输层源端口或 ICMP类型字段、 传输层目的端口或 ICMP代码字段; 处 理模块 13 , 用于根据匹配结果对所述 IPv6报文进行相应的处理。 4 is a schematic structural diagram of Embodiment 1 of a packet forwarding device according to the present invention. As shown in FIG. 4, the device in this embodiment may include: a determining module 11, a matching module 12, and a processing module 13, where the determining module 11 is configured to Determining, according to the link layer data type field included in the data packet, whether the data packet is an IPv6 packet, and the matching module 12, configured to: if the data packet is an IPv6 packet, the IPv6 packet The content of the field matches the content of the field that needs to be matched in the IPv6 flow table that is sent by the control server. The IPv6 flow table includes at least one of the following fields: a message entry field, a metadata field, and a link layer source. Address field, link layer destination address field, link layer data type field, virtual local area network identification field, virtual local area network priority field, MPLS label field, MPLS traffic type field, IPv6 source address field, IPv6 destination address field, IPv6 traffic type Field, IPv6 Next Header Field, IPv6 Flow Label Field, Transport Layer Source Port or ICMP Type Field, Transport Layer The destination port or the ICMP code field; the processing module 13 is configured to perform corresponding processing on the IPv6 packet according to the matching result.
在本实施例中, 该处理模块 13 可以具体用于若匹配成功, 则对所述 IPv6报文进行所述 IPv6流表中所对应的处理操作; 若匹配不成功, 则丟 弃所述 IPv6报文或者将所述 IPv6报文发送给所述控制服务器。 In this embodiment, the processing module 13 may be specifically configured to: if the matching is successful, perform the processing operation corresponding to the IPv6 flow table on the IPv6 packet; if the matching is unsuccessful, discard the IPv6 packet. Or sending the IPv6 packet to the control server.
本实施例的报文转发设备可以是 OpenFlow系统架构中的交换机或者 路由器。 本实施例的报文转发设备可以用于执行图 1所示方法实施例的技 术方案, 其实现原理和技术效果类似, 此处不再赘述。 The packet forwarding device in this embodiment may be a switch in an OpenFlow system architecture or Router. The packet forwarding device of this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 1. The implementation principle and technical effects are similar, and details are not described herein again.
图 5为本发明报文转发设备实施例二的结构示意图, 如图 5所示, 本 实施例的设备在图 4所示设备的基础上, 进一步可以包括: 提取模块 14, 用于在确定模块 11确定所述数据报文是否是 IPv6报文之前, 提取所述数 据报文中的报文入口字段、 链路层源地址字段、 链路层目的地址字段和链 路层数据类型字段的内容; 在所述确定模块确定所述数据报文是 IPv6报 文之后, 提取所述 IPv6报文中的 IPv6源地址字段、 IPv6目的地址字段、 IPv6流量类型字段、 IPv6下一个报头字段、 IPv6流标签字段、 传输层源 端口或 ICMP类型字段、 传输层目的端口或 ICMP代码字段、 逐跳扩展头 的选项字段、 路由扩展头的路由类型字段、 剩余片字段、 类型指定数据字 段、 目的地选项报头的选项字段; 匹配模块 12, 具体用于将所述提取模块 所提取的上述字段内容与所述 IPv6流表中所需匹配的字段内容进行匹配。 5 is a schematic structural diagram of Embodiment 2 of a packet forwarding device according to the present invention. As shown in FIG. 5, the device in this embodiment may further include: an extraction module 14 for determining a module, based on the device shown in FIG. Determining, before determining whether the data packet is an IPv6 packet, extracting, in the data packet, a content of a message entry field, a link layer source address field, a link layer destination address field, and a link layer data type field; After the determining module determines that the data packet is an IPv6 packet, extracting an IPv6 source address field, an IPv6 destination address field, an IPv6 traffic type field, an IPv6 next header field, and an IPv6 flow label field in the IPv6 packet. , transport layer source port or ICMP type field, transport layer destination port or ICMP code field, option field for hop-by-hop extension header, route type field for route extension header, remaining slice field, type specification data field, option for destination option header a matching module 12, specifically configured to: use the content of the field extracted by the extraction module and the IPv6 flow table Field contents need to match to match.
进一步地, 该匹配模块 12可以包括: 生成单元 121和匹配单元 122, 生成单元 121 ,用于应用提取模块 14提取的上述字段内容生成流表匹配结 构; 匹配单元 122, 用于将所述流表匹配结构与所述 IPv6流表中所需匹配 的字段内容进行匹配。 Further, the matching module 12 may include: a generating unit 121 and a matching unit 122, where the generating unit 121 is configured to generate the flow table matching structure by using the field content extracted by the extracting module 14; the matching unit 122 is configured to use the matching table The matching structure matches the content of the field that needs to match in the IPv6 flow table.
为了支持 IPv6报文和 IPv4报文的双栈操作, 本实施例的设备还可以 包括: 流表识别模块 15 , 用于所述匹配模块进行匹配前根据所述 IPv6流 表中所包含的流表类型值, 从 IPv6流表和 IPv4流表中识别确定所述 IPv6 流表。 In order to support the dual-stack operation of the IPv6 packet and the IPv4 packet, the device in this embodiment may further include: a flow table identification module 15 configured to use the flow table included in the IPv6 flow table before the matching module performs matching The type value identifies the IPv6 flow table from the IPv6 flow table and the IPv4 flow table.
本实施例的设备还可以包括: 流表存储模块 16, 用于接收所述控制服 务器下发的 IPv6流表, 所述 IPv6流表中的各个字段包含该字段的类型、 长度和值。 The device of this embodiment may further include: a flow table storage module 16, configured to receive an IPv6 flow table sent by the control server, where each field in the IPv6 flow table includes a type, a length, and a value of the field.
本实施例的设备可以用于执行图 2 或图 3 所示方法实施例的技术方 案, 其实现原理类似, 此处不再赘述。 The device in this embodiment can be used to implement the technical solution of the method embodiment shown in FIG. 2 or FIG. 3, and the implementation principle is similar, and details are not described herein again.
图 6为本发明数据报文处理系统实施例的结构示意图, 如图 6所示, 本实施例的系统可以为 OpenFlow系统架构, 在本实施例中, 该系统包括: 控制服务器 1和至少一个报文转发设备 2, 在本实施例中示出了两个报文 转发设备。本实施例中的报文转发设备 2可以采用图 4或图 5所示的结构, 其具体可以执行图 1〜3中任一所述的技术方案, 其实现原理类似, 此处不 再赘述。 FIG. 6 is a schematic structural diagram of an embodiment of a data packet processing system according to the present invention. As shown in FIG. 6, the system in this embodiment may be an OpenFlow system architecture. In this embodiment, the system includes: a control server 1 and at least one packet. The text forwarding device 2, in the present embodiment, two message forwarding devices are shown. The packet forwarding device 2 in this embodiment may adopt the structure shown in FIG. 4 or FIG. The technical solution described in any one of FIG. 1 to FIG. 3 is specifically implemented, and the implementation principle is similar, and details are not described herein again.
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步 骤可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机 可读取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程 序代码的介质。 A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修 改, 或者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不 使相应技术方案的本质脱离本发明各实施例技术方案的范围。 It should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: The technical solutions described in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; and the modifications or substitutions do not deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201180002343.6A CN103181129B (en) | 2011-10-25 | 2011-10-25 | Data message processing method and system, message forwarding equipment |
| PCT/CN2011/081287 WO2013059991A1 (en) | 2011-10-25 | 2011-10-25 | Data message processing method and system, message forwarding device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2011/081287 WO2013059991A1 (en) | 2011-10-25 | 2011-10-25 | Data message processing method and system, message forwarding device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2013059991A1 true WO2013059991A1 (en) | 2013-05-02 |
Family
ID=48167046
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2011/081287 Ceased WO2013059991A1 (en) | 2011-10-25 | 2011-10-25 | Data message processing method and system, message forwarding device |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN103181129B (en) |
| WO (1) | WO2013059991A1 (en) |
Cited By (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104348716A (en) * | 2013-07-23 | 2015-02-11 | 杭州华三通信技术有限公司 | Message processing method and equipment |
| CN104426762A (en) * | 2013-08-30 | 2015-03-18 | 中兴通讯股份有限公司 | Metadata transmitting and receiving method and OFLS (open flow logic switch) |
| CN104734963A (en) * | 2015-03-24 | 2015-06-24 | 电子科技大学 | IPv4 and IPv6 network interconnection method based on SDN |
| CN106656720A (en) * | 2016-10-31 | 2017-05-10 | 上海斐讯数据通信技术有限公司 | SDN-based IPv4 to IPv6 transition method and system |
| CN112995062A (en) * | 2021-02-07 | 2021-06-18 | 中国银联股份有限公司 | Data transmission method and device |
| CN113347090A (en) * | 2020-02-18 | 2021-09-03 | 华为技术有限公司 | Message processing method, forwarding equipment and message processing system |
| CN113595931A (en) * | 2021-07-08 | 2021-11-02 | 杭州海康威视数字技术股份有限公司 | Message processing method, device, equipment and storage medium |
| CN113949519A (en) * | 2020-06-29 | 2022-01-18 | 中国电信股份有限公司 | Method and system for implementing user identity fidelity |
| CN114205415A (en) * | 2020-09-17 | 2022-03-18 | 深圳市中兴微电子技术有限公司 | Message modification method and device, computer equipment and medium |
| CN114553757A (en) * | 2022-01-29 | 2022-05-27 | 阿里巴巴(中国)有限公司 | Protocol message processing method, device and equipment based on programmable switch |
| CN115412512A (en) * | 2022-10-31 | 2022-11-29 | 浙江九州云信息科技有限公司 | A method and device for multi-cloud cross-network intercommunication based on IPv6 |
| CN117336251A (en) * | 2023-11-30 | 2024-01-02 | 上海鉴智其迹科技有限公司 | Vehicle-mounted data interaction method and device, electronic equipment and storage medium |
| CN118573601A (en) * | 2024-07-29 | 2024-08-30 | 广州通则康威科技股份有限公司 | ICMP-based DNAT connectivity test method, device and equipment |
Families Citing this family (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103841189B (en) * | 2014-02-28 | 2018-09-28 | 上海斐讯数据通信技术有限公司 | The method that data communicate between control cloud computing center server |
| TWI720113B (en) | 2017-01-20 | 2021-03-01 | 香港商阿里巴巴集團服務有限公司 | Method and device for processing telegrams |
| CN106878308B (en) * | 2017-02-21 | 2020-06-19 | 浪潮集团有限公司 | ICMP message matching system and method |
| CN108881195A (en) * | 2018-06-07 | 2018-11-23 | 蒋云 | Data safety sharing method and device based on cloud environment |
| CN109088769B (en) * | 2018-08-18 | 2021-05-07 | 国网山西省电力公司信息通信分公司 | Device for diagnosing MPLS-VPN data message |
| CN109117182B (en) * | 2018-08-29 | 2022-03-08 | 赛尔网络有限公司 | Detection method, equipment, system and medium for supporting IPv6 degree based on source code |
| CN111343088B (en) * | 2020-02-21 | 2021-01-29 | 清华大学 | Message transmission method and device, terminal and storage medium |
| CN111950000B (en) * | 2020-07-30 | 2022-10-21 | 新华三技术有限公司 | Access control method and device |
| CN116684358B (en) * | 2023-07-31 | 2023-12-12 | 之江实验室 | Flow table management system and method for programmable network element equipment |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2011030889A1 (en) * | 2009-09-14 | 2011-03-17 | 日本電気株式会社 | Communication system, forwarding node, path management server, communication method, and program |
| EP2355423A1 (en) * | 2010-01-29 | 2011-08-10 | Deutsche Telekom AG | System and method for routing data packets over an Internet Protocol network |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2009042919A2 (en) * | 2007-09-26 | 2009-04-02 | Nicira Networks | Network operating system for managing and securing networks |
-
2011
- 2011-10-25 WO PCT/CN2011/081287 patent/WO2013059991A1/en not_active Ceased
- 2011-10-25 CN CN201180002343.6A patent/CN103181129B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2011030889A1 (en) * | 2009-09-14 | 2011-03-17 | 日本電気株式会社 | Communication system, forwarding node, path management server, communication method, and program |
| EP2355423A1 (en) * | 2010-01-29 | 2011-08-10 | Deutsche Telekom AG | System and method for routing data packets over an Internet Protocol network |
Non-Patent Citations (1)
| Title |
|---|
| ZHILIANG, WANG ET AL., THINKING ABOUT EXTENSIBILITY AND SCALABILITY IN OPENFLOW NETWORKING (CANS 2011), 9 August 2011 (2011-08-09), pages 8, 12 - 14 * |
Cited By (20)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104348716B (en) * | 2013-07-23 | 2018-03-23 | 新华三技术有限公司 | A kind of message processing method and equipment |
| CN104348716A (en) * | 2013-07-23 | 2015-02-11 | 杭州华三通信技术有限公司 | Message processing method and equipment |
| CN104426762A (en) * | 2013-08-30 | 2015-03-18 | 中兴通讯股份有限公司 | Metadata transmitting and receiving method and OFLS (open flow logic switch) |
| CN104734963A (en) * | 2015-03-24 | 2015-06-24 | 电子科技大学 | IPv4 and IPv6 network interconnection method based on SDN |
| CN104734963B (en) * | 2015-03-24 | 2018-07-13 | 电子科技大学 | A kind of IPv4 and IPv6 network interconnecting methods based on SDN |
| CN106656720A (en) * | 2016-10-31 | 2017-05-10 | 上海斐讯数据通信技术有限公司 | SDN-based IPv4 to IPv6 transition method and system |
| CN113347090B (en) * | 2020-02-18 | 2023-06-20 | 华为技术有限公司 | Message processing method, forwarding device and message processing system |
| CN113347090A (en) * | 2020-02-18 | 2021-09-03 | 华为技术有限公司 | Message processing method, forwarding equipment and message processing system |
| CN113949519A (en) * | 2020-06-29 | 2022-01-18 | 中国电信股份有限公司 | Method and system for implementing user identity fidelity |
| CN114205415A (en) * | 2020-09-17 | 2022-03-18 | 深圳市中兴微电子技术有限公司 | Message modification method and device, computer equipment and medium |
| CN112995062A (en) * | 2021-02-07 | 2021-06-18 | 中国银联股份有限公司 | Data transmission method and device |
| CN112995062B (en) * | 2021-02-07 | 2023-07-07 | 中国银联股份有限公司 | Data transmission method and device |
| CN113595931A (en) * | 2021-07-08 | 2021-11-02 | 杭州海康威视数字技术股份有限公司 | Message processing method, device, equipment and storage medium |
| CN113595931B (en) * | 2021-07-08 | 2024-01-16 | 杭州海康威视数字技术股份有限公司 | Message processing method, device, equipment and storage medium |
| CN114553757A (en) * | 2022-01-29 | 2022-05-27 | 阿里巴巴(中国)有限公司 | Protocol message processing method, device and equipment based on programmable switch |
| CN115412512A (en) * | 2022-10-31 | 2022-11-29 | 浙江九州云信息科技有限公司 | A method and device for multi-cloud cross-network intercommunication based on IPv6 |
| CN115412512B (en) * | 2022-10-31 | 2023-03-24 | 浙江九州云信息科技有限公司 | IPv 6-based multi-cloud cross-network intercommunication method and device |
| CN117336251A (en) * | 2023-11-30 | 2024-01-02 | 上海鉴智其迹科技有限公司 | Vehicle-mounted data interaction method and device, electronic equipment and storage medium |
| CN117336251B (en) * | 2023-11-30 | 2024-02-23 | 上海鉴智其迹科技有限公司 | Vehicle-mounted data interaction method and device, electronic equipment and storage medium |
| CN118573601A (en) * | 2024-07-29 | 2024-08-30 | 广州通则康威科技股份有限公司 | ICMP-based DNAT connectivity test method, device and equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN103181129A (en) | 2013-06-26 |
| CN103181129B (en) | 2015-09-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2013059991A1 (en) | Data message processing method and system, message forwarding device | |
| CN109756425B (en) | Multicast forwarding method, device and BFR | |
| US9954779B2 (en) | Method, apparatus, and system for supporting flexible lookup keys in software-defined networks | |
| Kempf et al. | Moving the mobile evolved packet core to the cloud | |
| CN103718520B (en) | Method, device and system for processing data packets | |
| CN114422432B (en) | Reliable coverage based on reliable transport layer | |
| CN103430149B (en) | Virtual machine migration notification method and system | |
| US20160043943A1 (en) | Application wire | |
| CN104125191B (en) | Processing method, equipment and the system of point-to-point protocol based on Ethernet | |
| WO2014008820A1 (en) | Service processing method, device and system | |
| WO2013113171A1 (en) | Flow identification method, device, and system | |
| CN107046506B (en) | Message processing method, flow classifier and service function example | |
| WO2011103781A2 (en) | Method, device for implementing identifier and locator split, and method for data encapsulating | |
| WO2010006528A1 (en) | Pseudo wire establishing method, device and system | |
| WO2015143802A1 (en) | Service function chaining processing method and device | |
| WO2016000513A1 (en) | Method and device for updating processing manner of service flow packet | |
| WO2013086897A1 (en) | Entry generation method, message receiving method, and corresponding device and system | |
| US20170155582A1 (en) | Method and Apparatus for Processing Modified Packet | |
| WO2011160517A1 (en) | Tunnel switching method and system for multi-protocol label switching services | |
| WO2017198131A1 (en) | Method and system for redirecting data stream, and network device and control device | |
| CN104158752A (en) | Method and device of processing business flow | |
| WO2014198217A1 (en) | Tunnel processing method and system, control plane equipment and forwarding plane equipment | |
| WO2014149888A1 (en) | Universal labels in internetworking | |
| WO2011103759A1 (en) | Method for establishing associated bidirectional label switching path and system thereof | |
| CN104734949A (en) | Flow gauge configuration achieving method and device |
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: 11874552 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 11874552 Country of ref document: EP Kind code of ref document: A1 |