WO2013107056A1 - 报文转发的方法及装置 - Google Patents

报文转发的方法及装置 Download PDF

Info

Publication number
WO2013107056A1
WO2013107056A1 PCT/CN2012/070702 CN2012070702W WO2013107056A1 WO 2013107056 A1 WO2013107056 A1 WO 2013107056A1 CN 2012070702 W CN2012070702 W CN 2012070702W WO 2013107056 A1 WO2013107056 A1 WO 2013107056A1
Authority
WO
WIPO (PCT)
Prior art keywords
token
token bucket
packet
plane device
instance
Prior art date
Application number
PCT/CN2012/070702
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 华为技术有限公司
Priority to EP12866111.3A priority Critical patent/EP2661027A4/en
Priority to PCT/CN2012/070702 priority patent/WO2013107056A1/zh
Priority to CN201280000061.7A priority patent/CN103534999B/zh
Publication of WO2013107056A1 publication Critical patent/WO2013107056A1/zh
Priority to US14/016,802 priority patent/US9628392B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/66Layer 2 routing, e.g. in Ethernet based MAN's
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/215Flow control; Congestion control using token-bucket
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames

Definitions

  • the embodiments of the present invention relate to the field of communications, and in particular, to a method and an apparatus for forwarding a message. Background technique
  • a network device conforming to a network architecture in which control and forwarding are separated includes a forwarding plane device and a control plane device.
  • the forwarding plane device processes the received packet according to the flow table, and the control plane device controls the forwarding plane device through the control channel.
  • control and forwarding separation in the network architecture separated from control and forwarding means that the forwarding plane device is separated from the control plane device.
  • the forwarding surface device transfers some or all of the functions of the control plane to the control plane device.
  • the forwarding surface device has the ability to communicate with the control plane device.
  • the forwarding surface device is capable of communicating with the control plane device via the control channel.
  • the forwarding plane device that conforms to the network architecture with separate control and forwarding cannot limit the forwarding rate of packets. Summary of the invention
  • the embodiment of the invention provides a method and a device for forwarding a packet, which can solve the problem that the forwarding plane device that conforms to the control and forwarding separate network architecture cannot limit the forwarding rate of the packet.
  • a method for packet forwarding including:
  • the forwarding plane device receives the first packet, and searches for, in the flow table of the forwarding plane device, a first entry that matches the first packet, where the forwarding plane device is a device that conforms to a network architecture that separates control and forwarding. ;
  • the forwarding plane device performs a first operation for limiting the packet forwarding rate to the first packet according to the first entry.
  • a device for forwarding a message including:
  • a receiving unit configured to receive the first packet
  • the forwarding plane device is a device that is configured to be in a network architecture that is separate from the control and the forwarding
  • the processing unit is configured to perform, according to the first entry, the first packet to limit the packet forwarding rate according to the first entry. operating.
  • the technical solution provided by the embodiment of the present invention includes a mechanism for limiting the forwarding rate of the packet, and the forwarding plane device can limit the forwarding rate of the packet.
  • FIG. 1 is a flowchart of a method for forwarding a packet according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of an apparatus for forwarding a message according to an embodiment of the present invention. detailed description
  • Embodiments of the present invention relate to a network architecture that separates control from forwarding.
  • the "control and forwarding separation" in the network architecture separated from control and forwarding means that the forwarding plane device is separated from the control plane device.
  • the forwarding surface device transfers some or all of the functions of the control plane to the control plane device.
  • the forwarding plane device has the ability to communicate with the control plane device.
  • the forwarding plane device is capable of communicating with the control plane device via the control channel.
  • the control plane device is a device that conforms to a network architecture in which control and forwarding are separated.
  • the forwarding plane device according to the present invention is a device that conforms to the network architecture of the control and forwarding classification.
  • the forwarding device processes the received packet according to the flow table.
  • the control plane device controls the forwarding plane device through the control channel.
  • the forwarding plane device may forward the packet to the Layer 2 packet or forward the packet to the Layer 3 packet.
  • the Open Department please refer to the Open Department for details. Open Systems Interconnection model (OSI model).
  • the forwarding plane device When the forwarding plane device is specifically implemented, it may be a switch or a router.
  • the forwarding plane device may specifically be an OpenFlow Switch.
  • OpenFlow Switch please refer to the OpenFlow Switch Specification 1.0 released by the OpenFlow Networking Foundation (OFN).
  • control plane device When the control plane device is specifically implemented, it may be an OpenFlow Controller.
  • OpenFlow Controllers please refer to the OpenFlow Switch Specification Version 1.0 released by OFN.
  • control channel When the control channel is specifically implemented, it may be a secure channel (Secure Channel) in which the development flow switch interacts with the open flow controller.
  • Secure Channel Secure Channel
  • security channel For details on the security channel, refer to Version 1.0 of the OpenFlow Switch Specification published by OFN.
  • the embodiment of the invention provides a method for packet forwarding, and the forwarding device can limit the forwarding rate of the packet. As shown in Figure 1, the method includes:
  • the forwarding plane device receives the first packet, and searches, in the flow table of the forwarding plane device, a first entry that matches the first packet, where the forwarding plane device is a device that conforms to a network architecture that separates control and forwarding.
  • the first packet When the first packet is specifically implemented, it may be an Internet Protocol Packet (IP Packet) or a Media Access Control Frame (MAC Frame).
  • IP Packet Internet Protocol Packet
  • MAC Frame Media Access Control Frame
  • the forwarding plane device forwards the packet according to the flow table.
  • the forwarding plane device can have one flow table or multiple flow tables.
  • the flow table of the forwarding plane device contains one or more flow table entries.
  • the first entry is a flow table entry that matches the first packet.
  • the forwarding plane device can generate a flow table by:
  • the forwarding plane device can store the flow table in the forwarding plane device in advance.
  • the forwarding plane device can receive a configuration message sent by the control plane device.
  • the forwarding plane device generates a flow table based on the configuration message.
  • the flow table entry may include a match field and a count (counts) field.
  • the matching field is used to determine whether the first packet matches the flow table entry.
  • a match field can include one or more matches.
  • the match can be the destination media access control (Media Access Control, MAC) Protocol address, source MAC protocol address, Internet Protocol (IP) address, or Multi-protocol Label Switching (MPLS) label.
  • the count field is used to count the packets.
  • the forwarding plane device performs a first operation for limiting the packet forwarding rate to the first packet according to the first entry.
  • the first operation is used to limit the packet forwarding rate.
  • the forwarding plane device can perform an operation for limiting the packet forwarding rate according to the entry that matches the packet. Therefore, the technical problem that the forwarding plane device cannot limit the forwarding rate of the packet in the prior art can be solved.
  • 102 specifically may include:
  • the forwarding plane device performs the first operation on the first packet according to the first instruction in the first entry, where the first instruction is an instruction corresponding to the first operation.
  • the first instruction belongs to a computer instruction.
  • the first instruction is an instruction corresponding to the first operation.
  • 102 specifically may include:
  • the forwarding plane device acquires the first instruction according to the first identifier included in the first entry, and the forwarding plane device performs the first operation according to the first instruction, where the first identifier is used to identify the first instruction,
  • the first instruction is an instruction corresponding to the first operation.
  • the first instruction is an instruction corresponding to the first operation.
  • the first tag is used to identify the first instruction.
  • the first mark may be a storage address of the first instruction.
  • the first tag can also be a tag of the storage address of the first instruction.
  • the performing the first operation by the forwarding plane device according to the first instruction may specifically include:
  • the forwarding plane device compares the number of tokens corresponding to the length of the first packet with the number of the first tokens corresponding to the token bucket, and the number of tokens corresponding to the length of the first packet is greater than the first token. When the number is small, the forwarding plane device performs an operation other than the forwarding operation on the first packet.
  • the operation other than the forwarding operation may be a discarding operation, or may be sent to the control plane device through the control channel.
  • the forwarding plane device compares the number of tokens corresponding to the length of the first packet with the number corresponding to the token bucket
  • the size of a token number may specifically include:
  • the forwarding plane device updates the second token number corresponding to the token bucket to the first token number according to the token bucket maximum value and the token bucket increment value;
  • the forwarding plane device compares the number of tokens corresponding to the length of the first packet with the size of the first token.
  • the forwarding of the first packet can be restricted by the number of tokens in the token bucket.
  • the forwarding plane device cannot forward the first packet.
  • the forwarding plane device can forward the first packet. After the forwarding is completed, the number of tokens in the token bucket is reduced accordingly.
  • the token bucket maximum value is used to limit the number of tokens in the token bucket.
  • the number of tokens in the token bucket cannot exceed the token bucket maximum.
  • the token bucket increment value is used to increase the number of tokens in the token bucket.
  • the number of tokens in the token bucket can be increased according to the token bucket increment value according to a predetermined time interval.
  • the second order number is the number of tokens before the update.
  • the first number of tokens is the number of updated tokens.
  • the forwarding plane device according to the token bucket maximum value and the token bucket increment value, the number of the second token corresponding to the token bucket being updated to the first token number may include:
  • the forwarding plane device obtains the token bucket maximum value and the token bucket increment value according to the second identifier, where the first entry includes the second identifier, and the second identifier is an identifier of the first instance, the token
  • the second token number corresponding to the bucket, the token bucket maximum value, and the token bucket increment value are elements of the first instance, and the first instance stores the storage space outside the first entry.
  • the forwarding plane device updates the second token number corresponding to the token bucket to the first token number according to the token bucket maximum value and the token bucket increment value.
  • the forwarding plane device compares the number of tokens corresponding to the length of the first packet with the size of the first token, and may specifically include:
  • the forwarding plane device obtains the first token number according to the second marking
  • the forwarding plane device compares the number of tokens corresponding to the length of the first packet with the size of the first token.
  • the first instance may be an array, a linked list, or a structure.
  • the second token number, the token bucket maximum value, and the token bucket increment value corresponding to the token bucket are elements of the first instance.
  • the second tag is the identity of the first instance.
  • the forwarding surface device is capable of obtaining the first number of tokens based on the second flag.
  • Second standard The record can be the storage address of the first instance.
  • the second tag can also be a tag of the storage address of the first instance.
  • the first instance is an array
  • the second token can be the array name of the array.
  • the second mark may be the first pointer of the linked list.
  • the second mark may be the name of a variable corresponding to the structure.
  • the advantage of the foregoing technical solution is that the second token number, the token bucket maximum value, and the token bucket increment value corresponding to the token bucket need not be carried in the first entry.
  • the forwarding plane device according to the token bucket maximum value and the token bucket increment value, the number of the second token corresponding to the token bucket being updated to the first token number may include:
  • the forwarding plane device obtains the maximum value of the token bucket and the token bucket increment value according to the third identifier, where the first entry includes a second identifier, where the second identifier is an identifier of the first instance, and the token bucket is Corresponding second number of tokens, the third identifier is an element of the first instance, the first instance is stored in a storage space other than the first entry; the third identifier is an identifier of the second instance, the a card bucket maximum value and the token bucket increment value are elements of the second instance, and the second instance is stored in a storage space other than the first table entry;
  • the forwarding plane device updates the second token number corresponding to the token bucket to the first token number according to the token bucket maximum value and the token bucket increment value.
  • the forwarding plane device compares the number of tokens corresponding to the length of the first packet with the size of the first token, and specifically includes:
  • the forwarding plane device obtains the first token number according to the second marking
  • the forwarding plane device compares the number of tokens corresponding to the length of the first packet with the size of the first token.
  • the first instance may be an array, a linked list, or a structure.
  • the second token number corresponding to the token bucket and the third token are elements of the first instance.
  • the second tag is the identity of the first instance.
  • the second token can be the array name of the array.
  • the second mark may be the first pointer of the linked list.
  • the second mark may be the name of a variable corresponding to the structure.
  • the second instance can be an array, a linked list, or a structure.
  • the token bucket maximum and the token bucket increment value are the elements of the second instance.
  • the third mark is the identity of the second instance.
  • the third token can be the array name of the array.
  • the third mark may be the first pointer of the linked list.
  • the third mark may be the name of a variable corresponding to the structure. Therefore, the forwarding surface device can be based on the second standard Record the third token and the second token number corresponding to the token bucket.
  • the forwarding device may obtain the token bucket maximum value and the token bucket increment value according to the third flag.
  • the forwarding plane device may update the second token number corresponding to the token bucket to the first token number according to the token bucket maximum value and the token bucket increment value.
  • the forwarding plane device may obtain the updated number of tokens, that is, the first number of tokens, according to the second flag.
  • the second token number, the token bucket maximum value, and the token bucket increment value of the token bucket are not carried in the first entry, which saves the storage space of the first entry.
  • the second example includes a token bucket maximum value and a token bucket increment value.
  • other flow table entries can also use the token bucket maximum value and the token bucket increment value in the second instance to update the number of tokens in the token bucket corresponding to other flow table entries.
  • Other flow table entries are flow table entries other than the first entry.
  • the “first” in the first entry is used to identify the first entry, and is not used to limit the sequence.
  • the “first” and “second” in the first token number and the second token number are used to distinguish between the first token number and the second token number, and are not used to limit the order.
  • “First,”, “Second,”, “Third,” and “Fourth” in the first unit, the second unit, the third unit, and the fourth unit are used to distinguish the first unit from the second unit , the third unit and the fourth unit are not used to limit the order.
  • the “first” and “second” in the first and second examples are used to distinguish between the first instance and the second instance, and are not used to define the order.
  • the “first”, “second”, and “third” in the first mark, the second mark, and the third mark are used to distinguish the first mark, the second mark, and the third mark, and are not used to define the order of precedence.
  • the embodiment of the invention provides a device for forwarding a message.
  • the apparatus can be implemented by the method provided in the first embodiment.
  • the technical solution provided by the embodiment of the present invention can limit the forwarding rate of the packet.
  • the device includes:
  • the receiving unit 201 is configured to receive the first packet.
  • the matching unit 202 is configured to search, in a flow table of the forwarding plane device, a first entry that matches the first packet, where the forwarding plane device is a device that conforms to a network architecture that separates control and forwarding.
  • the forwarding plane device forwards the packet according to the flow table.
  • the forwarding plane device can have one flow table or multiple flow tables.
  • the flow table of the forwarding plane device contains one or more flow table entries.
  • the first entry is a flow table entry that matches the first packet.
  • the forwarding plane device can generate a flow table by:
  • the forwarding plane device can store the flow table in the forwarding plane device in advance.
  • the forwarding plane device can receive the configuration message sent by the control plane device.
  • the forwarding plane device generates a flow table according to the configuration message.
  • the flow table entry may include a matching field and a count field.
  • the matching field is used to determine whether the first packet matches the flow table entry.
  • a match field can include one or more matches.
  • the match can be the destination MAC protocol address, source MAC protocol address, IP address, or MPLS label.
  • the count field is used to count the packets.
  • the processing unit 203 is configured to perform a first operation for limiting the message forwarding rate to the first packet according to the first entry.
  • the first operation is used to limit the packet forwarding rate.
  • the forwarding plane device can perform an operation for limiting the packet forwarding rate according to the entry matching the packet. Therefore, the technical problem that the forwarding plane device cannot limit the forwarding rate of the packet in the prior art can be solved.
  • the processing unit 203 can be specifically configured to:
  • the first instruction belongs to a computer instruction.
  • the first instruction is an instruction corresponding to the first operation.
  • the processing unit 203 can be specifically configured to:
  • the forwarding plane device performing the first operation according to the first instruction, where the first identifier is used to identify the first instruction, where the first instruction is The instruction corresponding to the first operation.
  • the processing unit 203 can include:
  • the comparison subunit is configured to compare the number of tokens corresponding to the length of the first packet with the size of the first token corresponding to the token bucket.
  • an execution subunit configured to perform an operation other than the forwarding operation on the first packet when the number of tokens corresponding to the length of the first packet is greater than the number of the first token.
  • the operation other than the forwarding operation may be a discarding operation, or may be sent to the control plane device through the control channel.
  • the processing unit 203 can also include:
  • An update subunit configured to add the token bucket pair according to the token bucket maximum value and the token bucket increment value
  • the second token number should be updated to the first token number.
  • the forwarding of the first packet can be restricted by the number of tokens in the token bucket.
  • the forwarding plane device cannot forward the first packet.
  • the forwarding plane device can forward the first packet. After the forwarding is completed, the number of tokens in the token bucket is reduced accordingly.
  • the token bucket maximum value is used to limit the number of tokens in the token bucket.
  • the number of tokens in the token bucket cannot exceed the token bucket maximum.
  • the token bucket increment value is used to increase the number of tokens in the token bucket.
  • the number of tokens in the token bucket can be increased according to the token bucket increment value according to a predetermined time interval.
  • the second order number is the number of tokens before the update.
  • the first number of tokens is the number of updated tokens.
  • the update subunit specifically includes:
  • a first unit configured to obtain the token bucket maximum value and the token bucket increment value according to the second identifier, where the first entry includes the second identifier, and the second identifier is an identifier of the first instance, where The second token number corresponding to the token bucket, the token bucket maximum value, and the token bucket increment value are elements of the first instance, where the first instance is stored in a storage space other than the first entry.
  • a second unit configured to update the second token number corresponding to the token bucket to the first token number according to the token bucket maximum value and the token bucket increment value provided by the first unit;
  • the comparison subunit specifically includes:
  • a third unit configured to obtain the first token number according to the second identifier
  • the fourth unit is configured to compare the number of tokens corresponding to the length of the first packet with the size of the first token provided by the second unit.
  • the first instance may be an array, a linked list, or a structure.
  • the second token number, the token bucket maximum value, and the token bucket increment value corresponding to the token bucket are elements of the first instance.
  • the second tag is the identity of the first instance.
  • the forwarding surface device is capable of obtaining the first number of tokens based on the second flag.
  • the second tag can be the storage address of the first instance.
  • the second tag can also be the tag of the storage address of the first instance.
  • the first instance is an array
  • the second token can be the array name of the array.
  • the second mark may be the first pointer of the linked list.
  • the second tag may be the name of a variable corresponding to the structure.
  • the advantage of the foregoing technical solution is that the second token number, the token bucket maximum value, and the token bucket increment value corresponding to the token bucket need not be carried in the first entry.
  • the update subunit may specifically include:
  • a first unit configured to obtain the token bucket maximum value and the token bucket increment value according to the third identifier, where the first entry includes a second identifier, where the second identifier is an identifier of the first instance, the a second token corresponding to the bucket, the third token being an element of the first instance, the first instance being stored in a storage space other than the first entry; the third token being an identifier of the second instance,
  • the token bucket maximum value and the token bucket increment value are elements of the second instance, and the second instance is stored in a storage space other than the first entry.
  • a second unit configured to update the second token number corresponding to the token bucket to the first token number according to the token bucket maximum value and the token bucket increment value provided by the first unit;
  • the comparison subunit specifically includes:
  • a third unit configured to obtain the first token number according to the second identifier
  • the fourth unit is configured to compare the number of tokens corresponding to the length of the first packet with the size of the first token provided by the second unit.
  • the first instance may be an array, a linked list, or a structure.
  • the number of second tokens corresponding to the token bucket and the third token are elements of the first instance.
  • the second tag is the identity of the first instance.
  • the second token can be the array name of the array.
  • the second mark may be the first pointer of the linked list.
  • the second mark may be the name of a variable corresponding to the structure.
  • the second instance can be an array, a linked list, or a structure.
  • the token bucket maximum and the token bucket increment value are the elements of the second instance.
  • the third mark is the identity of the second instance.
  • the third token can be the array name of the array.
  • the third mark may be the first pointer of the linked list.
  • the third mark may be the name of the variable corresponding to the structure. Therefore, the forwarding plane device can obtain the third flag and the second token number corresponding to the token bucket according to the second label.
  • the forwarding device may obtain the token bucket maximum value and the token bucket increment value according to the third flag.
  • the forwarding plane device may update the second token number corresponding to the token bucket to the first token number according to the token bucket maximum value and the token bucket increment value.
  • the forwarding device can obtain the updated number of tokens, that is, the first number of tokens, according to the second flag.
  • the second token number, the token bucket maximum value, and the token bucket increment value of the token bucket are not carried in the first entry, which saves the storage space of the first entry.
  • the second example includes a token bucket maximum value and a token bucket increment value.
  • other flow table entries can also update other flows using the token bucket maximum in the second instance and the token bucket increment value. Number of tokens in the token bucket corresponding to the table entry.
  • Other flow table entries are flow table entries other than the second entry.
  • the “first” in the first entry is used to identify the first entry, and is not used to limit the sequence.
  • the “first” and “second” in the first token number and the second token number are used to distinguish between the first token number and the second token number, and are not used to limit the order.
  • “First,”, “Second,”, “Third,” and “Fourth” in the first unit, the second unit, the third unit, and the fourth unit are used to distinguish the first unit from the second unit , the third unit and the fourth unit are not used to limit the order.
  • the “first” and “second” in the first and second examples are used to distinguish between the first instance and the second instance, and are not used to define the order.
  • the “first”, “second”, and “third” in the first mark, the second mark, and the third mark are used to distinguish the first mark, the second mark, and the third mark, and are not used to define the order of precedence.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or otherwise.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated in one unit. In the unit.
  • the functions, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential to the prior art or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明实施例提供了一种报文转发的方法,包括:转发面装置接收第一报文,在转发面装置的流表中查找与第一报文匹配的第一表项,转发面装置为符合控制与转发分离的网络架构的装置;转发面装置根据第一表项对第一报文执行用于限制报文转发速率的第一操作。此外,本发明实施例还提供了相应的装置。通过本发明实施例提供的技术方案,转发面装置能够对报文的转发速率进行限制。

Description

报文转发的方法及装置 技术领域
本发明实施例涉及通信领域, 具体地, 涉及报文转发的方法及装置。 背景技术
随着网络架构的发展, 出现了各种控制与转发分离的网络架构, 例如开 放流(OpenFlow )。
符合控制与转发分离的网络架构的网络设备包括转发面装置以及控制 面装置。 其中, 转发面装置根据流表对收到的报文进行处理, 控制面装置通 过控制通道对转发面装置进行控制。
控制与转发分离的网络架构中的 "控制与转发分离"是指转发面装置与 控制面装置分离。 其中, 转发面装置将控制面的部分或者全部功能转移到控 制面装置。 转发面装置具备与控制面装置进行通信的能力。 转发面装置能够 通过控制通道与控制面装置通信。
发明人发现现有技术存在如下技术问题:
符合控制与转发分离的网络架构的转发面装置不能对报文的转发速率 进行限制。 发明内容
本发明实施例提供了报文转发的方法及装置, 能够解决符合控制与转发 分离的网络架构的转发面装置不能对报文的转发速率进行限制的问题。
一方面, 提供了一种报文转发的方法, 包括:
转发面装置接收第一报文,在所述转发面装置的流表中查找与所述第一 报文匹配的第一表项,所述转发面装置为符合控制与转发分离的网络架构的 装置;
所述转发面装置根据所述第一表项对所述第一报文执行用于限制报文 转发速率的第一操作。
另一方面, 提供了一种报文转发的装置, 包括:
接收单元, 用于接收第一报文;
匹配单元, 用于在转发面装置的流表中查找与所述第一报文匹配的第一 表项, 所述转发面装置为符合控制与转发分离的网络架构的装置; 处理单元, 用于根据所述第一表项对所述第一报文执行用于限制报文转 发速率的第一操作。
本发明实施例提供的技术方案中包含了对报文的转发速率进行限制的 机制, 转发面装置能够对报文的转发速率进行限制。 附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对实施例或现有技 术描述中所需要使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图 仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造 性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明实施例提供的报文转发的方法的流程图;
图 2是本发明实施例提供的报文转发的装置的结构示意图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创 造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明实施例涉及到控制与转发分离的网络架构。控制与转发分离的网 络架构中的 "控制与转发分离" 是指转发面装置与控制面装置分离。 其中, 转发面装置将控制面的部分或者全部功能转移到控制面装置。转发面装置具 备与控制面装置进行通信的能力。转发面装置能够通过控制通道与控制面装 置通信。
本发明涉及的控制面装置为符合控制与转发分离的网络架构的装置。本 发明涉及的转发面装置为符合控制与转发分类的网络架构的装置。 其中, 转 发面装置根据流表对收到的报文进行处理。控制面装置通过控制通道对转发 面装置进行控制。
转发面装置对报文进行转发具体实现时, 可以是对二层的报文进行转 发, 也可以是对三层的报文进行转发。 关于二层与三层, 具体请参考开放系 统互连模型 ( Open Systems Interconnection model, OSI model )。
转发面装置具体实现时, 可以是交换机或者路由器。
在转发面装置是交换机的场景下,转发面装置具体可以是开放流交换机 ( OpenFlow Switch ) 。 关于开放流交换机, 请参考标准制定组织 (Standard Setting Organization , SSO ) 开放流网给基础 ( OpenFlow Networking Foundation, OFN )发布的《开放流交换机规范》版本 1.0 ( OpenFlow Switch Specification 1.0 ) 。
控制面装置具体实现时, 可以是开放流控制器( OpenFlow Controller ) 。 关于开放流控制器, 请参考 OFN发布的 《开放流交换机规范》版本 1.0。
控制通道具体实现时,可以是开发流交换机与开放流控制器进行交互的 安全通道(Secure Channel )。 关于安全通道, 具体请参考 OFN发布的 《开 放流交换机规范》版本 1.0。
实施例一
本发明实施例提供了一种报文转发的方法,转发面装置可以对报文的转 发速率进行限制。 如图 1所示, 该方法包括:
101、 转发面装置接收第一报文, 在该转发面装置的流表中查找与该第 一报文匹配的第一表项,该转发面装置为符合控制与转发分离的网络架构的 装置。
第一报文具体实现时, 可以是网际协议分组 ( Internet Protocol Packet , IP分组;),也可以是媒体接入控制帧( Media Access Control Frame , MAC帧)。
转发面装置根据流表进行报文转发。转发面装置可以具有一个流表或者 多个流表。 转发面装置的流表包含一个或多个流表表项。 第一表项为与第一 报文匹配的流表表项。 转发面装置可以通过如下途径生成流表:
转发面装置可以预先在转发面装置中存储流表。 另外, 转发面装置可以 接收控制面装置发送的配置 (configuration ) 消息。 转发面装置根据配置消 息生成流表。
具体实现时, 流表表项可以包括匹配(match )字段和计数(counts )字 段。
其中, 匹配字段用于判断第一报文是否与流表表项匹配。 匹配字段可以 包括一个或多个匹配项。 匹配项可以是目地媒体接入控制 ( Media Access Control, MAC )协议地址、 源 MAC协议地址、 网际协议( Internet Protocol, IP )地址或者多协议标签交换( Multi-protocol Label Switching, MPLS )标签。 计数字段用于对报文进行统计。
102、 该转发面装置根据该第一表项对该第一报文执行用于限制报文转 发速率的第一操作。
第一操作用于限制报文转发速率。
可见, 通过本实施例提供的方法, 转发面装置可以根据与报文匹配的表 项对该报文执行用于限制报文转发速率的操作。 因此, 可以解决现有技术中 转发面装置不能对报文的转发速率进行限制的技术问题。
可选的,
102具体可以包括:
该转发面装置根据该第一表项中的第一指令对该第一报文执行该第一 操作, 该第一指令为该第一操作对应的指令。
第一指令属于计算机指令。 第一指令为第一操作对应的指令。
可选的,
102具体可以包括:
该转发面装置根据该第一表项中包含的第一标记获取该第一指令,该转 发面装置根据该第一指令执行该第一操作, 该第一标记用于标识该第一指 令, 该第一指令为该第一操作对应的指令。
第一指令为第一操作对应的指令。
第一标记用于标识第一指令。 具体实现时, 第一标记可以是第一指令的 存储地址。 第一标记也可以是第一指令的存储地址的标签。
可选的,
该转发面装置根据该第一指令执行该第一操作具体可以包括:
该转发面装置比较该第一报文的长度对应的令牌数与令牌桶对应的第 一令牌数的大小, 当该第一报文的长度对应的令牌数大于该第一令牌数时, 该转发面装置对该第一报文执行转发操作以外的操作。
具体实现时, 转发操作以外的操作可以是丟弃操作, 也可以是通过控制 通道上送至控制面装置操作等。
可选的,
该转发面装置比较该第一报文的长度对应的令牌数与令牌桶对应的第 一令牌数的大小具体可以包括:
该转发面装置根据令牌桶最大值以及令牌桶增量值,将该令牌桶对应的 第二令牌数更新为该第一令牌数;
该转发面装置比较该第一报文的长度对应的令牌数与该第一令牌数的 大小。
具体实现时, 可以通过令牌桶中的令牌数限制第一报文的转发。 当令牌 桶中的令牌数小于第一报文的长度对应的令牌数时,转发面装置不能转发第 一报文。 当令牌桶中的令牌数大于或者等于第一报文的长度对应的令牌数 时, 转发面装置可以转发第一报文。 转发完成后, 令牌桶中的令牌数相应减 少。
具体实现时, 令牌桶最大值用于限定令牌桶中的令牌数。 令牌桶中的令 牌数不能超过令牌桶最大值。 令牌桶增量值用于增加令牌桶中的令牌数。 可 以按照预定的时间间隔, 根据令牌桶增量值增加令牌桶中的令牌数。 第二令 牌数为更新前的令牌数。 第一令牌数为更新后的令牌数。
可选的,
该转发面装置根据令牌桶最大值以及令牌桶增量值,将该令牌桶对应的 第二令牌数更新为该第一令牌数具体可以包括:
该转发面装置根据第二标记获得该令牌桶最大值以及该令牌桶增量值, 该第一表项中包含该第二标记, 该第二标记为第一实例的标识, 该令牌桶对 应的第二令牌数、 该令牌桶最大值以及该令牌桶增量值为该第一实例的元 素, 该第一实例存储在该第一表项之外的存储空间。
该转发面装置根据该令牌桶最大值以及该令牌桶增量值,将该令牌桶对 应的该第二令牌数更新为该第一令牌数。
该转发面装置比较该第一报文的长度对应的令牌数与该第一令牌数的 大小具体可以包括:
该转发面装置根据第二标记获得该第一令牌数;
该转发面装置比较该第一报文的长度对应的令牌数与该第一令牌数的 大小。
具体实现时, 第一实例可以为数组、 链表或者结构体。 该令牌桶对应的 第二令牌数、 令牌桶最大值以及令牌桶增量值为第一实例的元素。 第二标记 为第一实例的标识。 转发面装置能够根据第二标记获得第一令牌数。 第二标 记可以是第一实例的存储地址。 第二标记也可以是第一实例的存储地址的标 签。 当第一实例为数组时, 第二标记可以是该数组的数组名。 当第一实例为 链表时, 第二标记可以是该链表的首指针。 当第一实例为结构体时, 第二标 记可以是该结构体对应的变量的名字。
上述技术方案的好处是, 令牌桶对应的第二令牌数、 令牌桶最大值以及 令牌桶增量值不需要承载在第一表项中。
可选的,
该转发面装置根据令牌桶最大值以及令牌桶增量值,将该令牌桶对应的 第二令牌数更新为该第一令牌数具体可以包括:
该转发面装置根据第三标记获得该令牌桶最大值以及该令牌桶增量值, 该第一表项中包含第二标记, 该第二标记是第一实例的标识, 该令牌桶对应 的第二令牌数、 该第三标记为该第一实例的元素, 该第一实例存储在该第一 表项之外的存储空间; 该第三标记是第二实例的标识, 该令牌桶最大值以及 该令牌桶增量值为该第二实例的元素, 该第二实例存储在该第一表项之外的 存储空间;
该转发面装置根据该令牌桶最大值以及该令牌桶增量值,将该令牌桶对 应的该第二令牌数更新为该第一令牌数。
该转发面装置比较该第一报文的长度对应的令牌数与该第一令牌数的 大小具体包括:
该转发面装置根据该第二标记获得该第一令牌数;
该转发面装置比较该第一报文的长度对应的令牌数与该第一令牌数的 大小。
具体实现时, 第一实例可以为数组、 链表或者结构体。 该令牌桶对应的 第二令牌数以及第三标记为第一实例的元素。 第二标记为第一实例的标识。 当第一实例为数组时, 第二标记可以是该数组的数组名。 当第一实例为链表 时, 第二标记可以是该链表的首指针。 当第一实例为结构体时, 第二标记可 以是该结构体对应的变量的名字。 第二实例可以为数组、 链表或者结构体。 令牌桶最大值以及令牌桶增量值为第二实例的元素。 第三标记为第二实例的 标识。 当第二实例为数组时, 第三标记可以是该数组的数组名。 当第二实例 为链表时, 第三标记可以是该链表的首指针。 当第二实例为结构体时, 第三 标记可以是该结构体对应的变量的名字。 因此, 转发面装置可以根据第二标 记获得第三标记以及该令牌桶对应的第二令牌数。转发装置可以根据第三标 记获得令牌桶最大值以及令牌桶增量值。转发面装置可以根据令牌桶最大值 以及令牌桶增量值, 将该令牌桶对应的第二令牌数更新为第一令牌数。 转发 面装置可以根据第二标记获得更新后的令牌数, 即第一令牌数。
上述技术方案的好处是, 令牌桶对应的第二令牌数、 令牌桶最大值以及 令牌桶增量值没有承载在第一表项中, 节省了第一表项的存储空间。 另外, 第二实例中包含令牌桶最大值以及令牌桶增量值。 除了第一表项, 其他流表 表项也可以使用第二实例中的令牌桶最大值以及令牌桶增量值更新其他流 表表项对应的令牌桶中的令牌数。 其他流表表项为第一表项之外的流表表 项。
本发明实施例中, 第一表项中的 "第一" 用于标识第一表项, 不用于限 定先后顺序。 第一令牌数和第二令牌数中的 "第一" 和 "第二" 用于区分第 一令牌数和第二令牌数, 不用于限定先后顺序。 第一单元、 第二单元、 第三 单元和第四单元中的 "第一,,、 "第二,,、 "第三,, 和 "第四,, 用于区分第一单 元、 第二单元、 第三单元和第四单元, 不用于限定先后顺序。 第一实例和第 二实例中的 "第一" 和 "第二" 用于区分第一实例和第二实例, 不用于限定 先后顺序。 第一标记、 第二标记和第三标记中的 "第一"、 "第二"和 "第三" 用于区分第一标记、 第二标记和第三标记, 不用于限定先后顺序。
实施例二
本发明实施例提供了一种报文转发的装置。该装置可以通过实施例一提 供的方法实现。 通过本发明实施例提供的技术方案, 可以对报文的转发速率 进行限制。 如图 2所示, 该装置包括:
接收单元 201 , 用于接收第一报文。
第一报文具体实现时,可以是网际协议分组,也可以是媒体接入控制帧。 匹配单元 202, 用于在转发面装置的流表中查找与该第一报文匹配的第 一表项, 该转发面装置为符合控制与转发分离的网络架构的装置。
转发面装置根据流表进行报文转发。转发面装置可以具有一个流表或者 多个流表。 转发面装置的流表包含一个或多个流表表项。 第一表项为与第一 报文匹配的流表表项。 转发面装置可以通过如下途径生成流表:
转发面装置可以预先在转发面装置中存储流表。 另外, 转发面装置可以 接收控制面装置发送的配置消息。 转发面装置根据配置消息生成流表。 具体实现时, 流表表项可以包括匹配字段和计数字段。
其中, 匹配字段用于判断第一报文是否与流表表项匹配。 匹配字段可以 包括一个或多个匹配项。 匹配项可以是目地 MAC协议地址、 源 MAC协议 地址、 IP地址或者 MPLS标签。 计数字段用于对报文进行统计。
处理单元 203, 用于根据该第一表项对该第一报文执行用于限制报文转 发速率的第一操作。
第一操作用于限制报文转发速率。
可见, 通过本实施例提供的装置, 转发面装置可以根据与报文匹配的表 项对该报文执行用于限制报文转发速率的操作。 因此, 可以解决现有技术中 转发面装置不能对报文的转发速率进行限制的技术问题。
可选的,
该处理单元 203可以具体用于:
根据该第一表项中的第一指令对该第一报文执行该第一操作, 该第一指 令为该第一操作对应的指令。
第一指令属于计算机指令。 第一指令为第一操作对应的指令。
可选的,
该处理单元 203可以具体用于:
根据该第一表项中包含的第一标记获取该第一指令,该转发面装置根据 该第一指令执行该第一操作, 该第一标记用于标识该第一指令, 该第一指令 为该第一操作对应的指令。
可选的,
该处理单元 203可以包括:
比较子单元, 用于比较该第一报文的长度对应的令牌数与令牌桶对应的 第一令牌数的大小。
执行子单元, 用于当该第一报文的长度对应的令牌数大于该第一令牌数 时对该第一报文执行转发操作以外的操作。
具体实现时, 转发操作以外的操作可以是丟弃操作, 也可以是通过控制 通道上送至控制面装置操作等。
可选的,
该处理单元 203还可以包括:
更新子单元, 用于根据令牌桶最大值以及令牌桶增量值, 将该令牌桶对 应的第二令牌数更新为该第一令牌数。
具体实现时, 可以通过令牌桶中的令牌数限制第一报文的转发。 当令牌 桶中的令牌数小于第一报文的长度对应的令牌数时,转发面装置不能转发第 一报文。 当令牌桶中的令牌数大于或者等于第一报文的长度对应的令牌数 时, 转发面装置可以转发第一报文。 转发完成后, 令牌桶中的令牌数相应减 少。
具体实现时, 令牌桶最大值用于限定令牌桶中的令牌数。 令牌桶中的令 牌数不能超过令牌桶最大值。 令牌桶增量值用于增加令牌桶中的令牌数。 可 以按照预定的时间间隔, 根据令牌桶增量值增加令牌桶中的令牌数。 第二令 牌数为更新前的令牌数。 第一令牌数为更新后的令牌数。
可选的,
该更新子单元具体包括:
第一单元, 用于根据第二标记获得该令牌桶最大值以及该令牌桶增量 值, 该第一表项中包含该第二标记, 该第二标记为第一实例的标识, 该令牌 桶对应的第二令牌数、该令牌桶最大值以及该令牌桶增量值为该第一实例的 元素, 该第一实例存储在该第一表项之外的存储空间;
第二单元, 用于根据该第一单元提供的该令牌桶最大值以及该令牌桶增 量值, 将该令牌桶对应的该第二令牌数更新为该第一令牌数;
该比较子单元具体包括:
第三单元, 用于根据该第二标记获得该第一令牌数;
第四单元, 用于比较该第一报文的长度对应的令牌数与该第二单元提供 的该第一令牌数的大小。
具体实现时, 第一实例可以为数组、 链表或者结构体。 该令牌桶对应的 第二令牌数、 令牌桶最大值以及令牌桶增量值为第一实例的元素。 第二标记 为第一实例的标识。 转发面装置能够根据第二标记获得第一令牌数。 第二标 记可以是第一实例的存储地址。第二标记也可以是第一实例的存储地址的标 签。 当第一实例为数组时, 第二标记可以是该数组的数组名。 当第一实例为 链表时, 第二标记可以是该链表的首指针。 当第一实例为结构体时, 第二标 记可以是该结构体对应的变量的名字。
上述技术方案的好处是, 令牌桶对应的第二令牌数、 令牌桶最大值以及 令牌桶增量值不需要承载在第一表项中。 可选的,
该更新子单元具体可以包括:
第一单元, 用于根据第三标记获得该令牌桶最大值以及该令牌桶增量 值, 该第一表项中包含第二标记, 该第二标记是第一实例的标识, 该令牌桶 对应的第二令牌数、 该第三标记为该第一实例的元素, 该第一实例存储在该 第一表项之外的存储空间; 该第三标记是第二实例的标识, 该令牌桶最大值 以及该令牌桶增量值为该第二实例的元素, 该第二实例存储在该第一表项之 外的存储空间;
第二单元, 用于根据该第一单元提供的该令牌桶最大值以及该令牌桶增 量值, 将该令牌桶对应的该第二令牌数更新为该第一令牌数;
该比较子单元具体包括:
第三单元, 用于根据该第二标记获得该第一令牌数;
第四单元, 用于比较该第一报文的长度对应的令牌数与该第二单元提供 的该第一令牌数的大小。
具体实现时, 第一实例可以为数组、 链表或者结构体。 该令牌桶对应的 第二令牌数以及第三标记为第一实例的元素。 第二标记为第一实例的标识。 当第一实例为数组时, 第二标记可以是该数组的数组名。 当第一实例为链表 时, 第二标记可以是该链表的首指针。 当第一实例为结构体时, 第二标记可 以是该结构体对应的变量的名字。 第二实例可以为数组、 链表或者结构体。 令牌桶最大值以及令牌桶增量值为第二实例的元素。 第三标记为第二实例的 标识。 当第二实例为数组时, 第三标记可以是该数组的数组名。 当第二实例 为链表时, 第三标记可以是该链表的首指针。 当第二实例为结构体时, 第三 标记可以是该结构体对应的变量的名字。 因此, 转发面装置可以根据第二标 记获得第三标记以及该令牌桶对应的第二令牌数。转发装置可以根据第三标 记获得令牌桶最大值以及令牌桶增量值。转发面装置可以根据令牌桶最大值 以及令牌桶增量值, 将该令牌桶对应的第二令牌数更新为第一令牌数。 转发 面装置可以根据第二标记获得更新后的令牌数, 即第一令牌数。
上述技术方案的好处是, 令牌桶对应的第二令牌数、 令牌桶最大值以及 令牌桶增量值没有承载在第一表项中, 节省了第一表项的存储空间。 另外, 第二实例中包含令牌桶最大值以及令牌桶增量值。 除了第一表项, 其他流表 表项也可以使用第二实例中的令牌桶最大值以及令牌桶增量值更新其他流 表表项对应的令牌桶中的令牌数。 其他流表表项为第二表项之外的流表表 项。
本发明实施例中, 第一表项中的 "第一" 用于标识第一表项, 不用于限 定先后顺序。 第一令牌数和第二令牌数中的 "第一" 和 "第二" 用于区分第 一令牌数和第二令牌数, 不用于限定先后顺序。 第一单元、 第二单元、 第三 单元和第四单元中的 "第一,,、 "第二,,、 "第三,, 和 "第四,, 用于区分第一单 元、 第二单元、 第三单元和第四单元, 不用于限定先后顺序。 第一实例和第 二实例中的 "第一" 和 "第二" 用于区分第一实例和第二实例, 不用于限定 先后顺序。 第一标记、 第二标记和第三标记中的 "第一"、 "第二"和 "第三" 用于区分第一标记、 第二标记和第三标记, 不用于限定先后顺序。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结 合来实现。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特 定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方 法来实现所描述的功能, 但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到, 为描述的方便和筒洁, 上述描 述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对应 过程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个 系统, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间 的耦合或直接耦合或通信连接可以是通过一些接口, 装置或单元的间接耦合 或通信连接, 可以是电性, 机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或 者全部单元来实现本实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元 中, 也可以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一 个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使 用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明 的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部 分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质 中, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。 而前 述的存储介质包括: U盘、移动硬盘、只读存储器( ROM, Read-Only Memory )、 随机存取存储器(RAM, Random Access Memory ), 磁碟或者光盘等各种可 以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应所述以权利要求的保护范围为准。

Claims

1、 一种报文转发的方法, 其特征在于, 包括:
转发面装置接收第一报文,在所述转发面装置的流表中查找与所述第一 报文匹配的第一表项,所述转发面装置为符合控制与转发分离的网络架构的 装置;
所述转发面装置根据所述第一表项对所述第一报文执行用于限制报文 转发速率的第一操作。
2、 根据权利要求 1所述方法, 其特征在于, 所述转发面装置根据所述 第一表项对所述第一报文执行用于限制报文转发速率的第一操作具体包括: 所述转发面装置根据所述第一表项中的第一指令对所述第一报文执行 所述第一操作, 所述第一指令为所述第一操作对应的指令。
3、 根据权利要求 1所述方法, 其特征在于, 所述转发面装置根据所述 第一表项对所述第一报文执行用于限制报文转发速率的第一操作具体包括: 所述转发面装置根据所述第一表项中包含的第一标记获取所述第一指 令, 所述转发面装置根据所述第一指令执行所述第一操作, 所述第一标记用 于标识所述第一指令, 所述第一指令为所述第一操作对应的指令。
4、 根据权利要求 1至 3中任一所述方法, 其特征在于, 所述第一操作 具体包括:
所述转发面装置比较所述第一报文的长度对应的令牌数与令牌桶对应 的第一令牌数的大小, 当所述第一报文的长度对应的令牌数大于所述第一令 牌数时, 所述转发面装置对所述第一报文执行转发操作以外的操作。
5、 根据权利要求 4所述方法, 其特征在于, 所述转发面装置比较所述 第一报文的长度对应的令牌数与令牌桶对应的第一令牌数的大小具体包括: 所述转发面装置根据令牌桶最大值以及令牌桶增量值,将所述令牌桶对 应的第二令牌数更新为所述第一令牌数;
所述转发面装置比较所述第一报文的长度对应的令牌数与所述第一令 牌数的大小。
6、 根据权利要求 5所述方法, 其特征在于,
所述转发面装置根据令牌桶最大值以及令牌桶增量值,将所述令牌桶对 应的第二令牌数更新为所述第一令牌数具体包括: 所述转发面装置根据第二标记获得所述令牌桶最大值以及所述令牌桶 增量值, 所述第一表项中包含所述第二标记, 所述第二标记为第一实例的标 识, 所述令牌桶对应的第二令牌数、 所述令牌桶最大值以及所述令牌桶增量 值为所述第一实例的元素, 所述第一实例存储在所述第一表项之外的存储空 间;
所述转发面装置根据所述令牌桶最大值以及所述令牌桶增量值,将所述 令牌桶对应的所述第二令牌数更新为所述第一令牌数;
所述转发面装置比较所述第一报文的长度对应的令牌数与所述第一令 牌数的大小具体包括:
所述转发面装置根据第二标记获得所述第一令牌数;
所述转发面装置比较所述第一报文的长度对应的令牌数与所述第一令 牌数的大小。
7、 根据权利要求 6所述的方法, 其特征在于,
所述第一实例为数组、 链表或者结构体。
8、 根据权利要求 5所述方法, 其特征在于,
所述转发面装置根据令牌桶最大值以及令牌桶增量值,将所述令牌桶对 应的第二令牌数更新为所述第一令牌数具体包括:
所述转发面装置根据第三标记获得所述令牌桶最大值以及所述令牌桶 增量值, 所述第一表项中包含第二标记, 所述第二标记是第一实例的标识, 所述令牌桶对应的第二令牌数、 所述第三标记为所述第一实例的元素, 所述 第一实例存储在所述第一表项之外的存储空间; 所述第三标记是第二实例的 标识, 所述令牌桶最大值以及所述令牌桶增量值为所述第二实例的元素, 所 述第二实例存储在所述第一表项之外的存储空间;
所述转发面装置根据所述令牌桶最大值以及所述令牌桶增量值,将所述 令牌桶对应的所述第二令牌数更新为所述第一令牌数;
所述转发面装置比较所述第一报文的长度对应的令牌数与所述第一令 牌数的大小具体包括:
所述转发面装置根据所述第二标记获得所述第一令牌数;
所述转发面装置比较所述第一报文的长度对应的令牌数与所述第一令 牌数的大小。
9、 根据权利要求 8所述的方法, 其特征在于: 所述第一实例和所述第二实例为数组、 链表或者结构体。
10、 一种报文转发的装置, 其特征在于, 包括:
接收单元, 用于接收第一报文;
匹配单元, 用于在转发面装置的流表中查找与所述第一报文匹配的第一 表项, 所述转发面装置为符合控制与转发分离的网络架构的装置;
处理单元, 用于根据所述第一表项对所述第一报文执行用于限制报文转 发速率的第一操作。
11、 根据权利要求 10所述装置, 其特征在于, 所述处理单元具体用于: 根据所述第一表项中的第一指令对所述第一报文执行所述第一操作, 所 述第一指令为所述第一操作对应的指令。
12、 根据权利要求 10所述装置, 其特征在于, 所述处理单元具体用于: 根据所述第一表项中包含的第一标记获取所述第一指令, 所述转发面装 置根据所述第一指令执行所述第一操作, 所述第一标记用于标识所述第一指 令, 所述第一指令为所述第一操作对应的指令。
13、 根据权利要求 9至 12中任一所述装置, 其特征在于, 所述处理单 元包括:
比较子单元, 用于比较所述第一报文的长度对应的令牌数与令牌桶对应 的第一令牌数的大小;
执行子单元, 用于当所述第一报文的长度对应的令牌数大于所述第一令 牌数时对所述第一报文执行转发操作以外的操作。
14、 根据权利要求 13所述装置, 其特征在于, 所述处理单元还包括: 更新子单元, 用于根据令牌桶最大值以及令牌桶增量值, 将所述令牌桶 对应的第二令牌数更新为所述第一令牌数。
15、 根据权利要求 14所述装置, 其特征在于,
所述更新子单元具体包括:
第一单元, 用于根据第二标记获得所述令牌桶最大值以及所述令牌桶增 量值,所述第一表项中包含所述第二标记,所述第二标记为第一实例的标识, 所述令牌桶对应的第二令牌数、所述令牌桶最大值以及所述令牌桶增量值为 所述第一实例的元素, 所述第一实例存储在所述第一表项之外的存储空间; 第二单元, 用于根据所述第一单元提供的所述令牌桶最大值以及所述令 牌桶增量值, 将所述令牌桶对应的所述第二令牌数更新为所述第一令牌数; 所述比较子单元具体包括:
第三单元, 用于根据所述第二标记获得所述第一令牌数;
第四单元, 用于比较所述第一报文的长度对应的令牌数与所述第二单元 提供的所述第一令牌数的大小。
16、 根据权利要求 15所述的装置, 其特征在于,
所述第一实例为数组、 链表或者结构体。
17、 根据权利要求 14所述的装置, 其特征在于,
所述更新子单元具体包括:
第一单元, 用于根据第三标记获得所述令牌桶最大值以及所述令牌桶增 量值, 所述第一表项中包含第二标记, 所述第二标记是第一实例的标识, 所 述令牌桶对应的第二令牌数、 所述第三标记为所述第一实例的元素, 所述第 一实例存储在所述第一表项之外的存储空间; 所述第三标记是第二实例的标 识, 所述令牌桶最大值以及所述令牌桶增量值为所述第二实例的元素, 所述 第二实例存储在所述第一表项之外的存储空间;
第二单元, 用于根据所述第一单元提供的所述令牌桶最大值以及所述令 牌桶增量值, 将所述令牌桶对应的所述第二令牌数更新为所述第一令牌数; 所述比较子单元具体包括:
第三单元, 用于根据所述第二标记获得所述第一令牌数;
第四单元, 用于比较所述第一报文的长度对应的令牌数与所述第二单元 提供的所述第一令牌数的大小。
18、 根据权利要求 17所述的装置, 其特征在于:
所述第一实例和所述第二实例为数组、 链表或者结构体。
PCT/CN2012/070702 2012-01-21 2012-01-21 报文转发的方法及装置 WO2013107056A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP12866111.3A EP2661027A4 (en) 2012-01-21 2012-01-21 METHOD AND DEVICE FOR ROUTING MESSAGES
PCT/CN2012/070702 WO2013107056A1 (zh) 2012-01-21 2012-01-21 报文转发的方法及装置
CN201280000061.7A CN103534999B (zh) 2012-01-21 2012-01-21 报文转发的方法及装置
US14/016,802 US9628392B2 (en) 2012-01-21 2013-09-03 Method and device for forwarding message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/070702 WO2013107056A1 (zh) 2012-01-21 2012-01-21 报文转发的方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/016,802 Continuation US9628392B2 (en) 2012-01-21 2013-09-03 Method and device for forwarding message

Publications (1)

Publication Number Publication Date
WO2013107056A1 true WO2013107056A1 (zh) 2013-07-25

Family

ID=48798541

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/070702 WO2013107056A1 (zh) 2012-01-21 2012-01-21 报文转发的方法及装置

Country Status (4)

Country Link
US (1) US9628392B2 (zh)
EP (1) EP2661027A4 (zh)
CN (1) CN103534999B (zh)
WO (1) WO2013107056A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301248A (zh) * 2014-10-31 2015-01-21 杭州华三通信技术有限公司 报文限速方法和装置
WO2018149228A1 (zh) * 2017-02-16 2018-08-23 中兴通讯股份有限公司 报文发送方法及装置
CN109379163A (zh) * 2018-09-05 2019-02-22 新华三技术有限公司 一种报文转发速率控制方法及装置

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017173601A1 (zh) * 2016-04-06 2017-10-12 华为技术有限公司 软件定义网络sdn中流量控制方法和设备
CN108270690B (zh) * 2016-12-30 2021-12-24 北京华为数字技术有限公司 控制报文流量的方法和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925455A (zh) * 2005-08-29 2007-03-07 中兴通讯股份有限公司 一种基于令牌桶的报文限速方法
CN102217228A (zh) * 2007-09-26 2011-10-12 Nicira网络公司 管理和保护网络的网络操作系统
US20110261831A1 (en) * 2010-04-27 2011-10-27 Puneet Sharma Dynamic Priority Queue Level Assignment for a Network Flow
US20110261688A1 (en) * 2010-04-27 2011-10-27 Puneet Sharma Priority Queue Level Optimization for a Network Flow
US20110273988A1 (en) * 2010-05-10 2011-11-10 Jean Tourrilhes Distributing decision making in a centralized flow routing system

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6965777B1 (en) * 2000-11-16 2005-11-15 Thomas Cast Method of delivering short messages using a SMPP gateway with standard interface
US6975876B1 (en) * 2000-11-17 2005-12-13 Thomas Cast System and method for performing throttle control in a SMPP gateway
US8020163B2 (en) * 2003-06-02 2011-09-13 Interuniversitair Microelektronica Centrum (Imec) Heterogeneous multiprocessor network on chip devices, methods and operating systems for control thereof
US20060056308A1 (en) * 2004-05-28 2006-03-16 International Business Machines Corporation Method of switching fabric for counteracting a saturation tree occurring in a network with nodes
US9009660B1 (en) * 2005-11-29 2015-04-14 Tilera Corporation Programming in a multiprocessor environment
US8914878B2 (en) * 2009-04-29 2014-12-16 Juniper Networks, Inc. Detecting malicious network software agents
US8789173B2 (en) * 2009-09-03 2014-07-22 Juniper Networks, Inc. Protecting against distributed network flood attacks
US8291258B2 (en) * 2010-01-08 2012-10-16 Juniper Networks, Inc. High availability for network security devices
US8897134B2 (en) * 2010-06-25 2014-11-25 Telefonaktiebolaget L M Ericsson (Publ) Notifying a controller of a change to a packet forwarding configuration of a network element over a communication channel
CA2814488A1 (en) * 2010-10-15 2012-04-19 Nec Corporation Switch system, and data forwarding method
US8694825B2 (en) * 2011-07-20 2014-04-08 International Business Machines Corporation Protecting storage fabrics from errant device causing single point of failure
US8560663B2 (en) * 2011-09-30 2013-10-15 Telefonaktiebolaget L M Ericsson (Publ) Using MPLS for virtual private cloud network isolation in openflow-enabled cloud computing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925455A (zh) * 2005-08-29 2007-03-07 中兴通讯股份有限公司 一种基于令牌桶的报文限速方法
CN102217228A (zh) * 2007-09-26 2011-10-12 Nicira网络公司 管理和保护网络的网络操作系统
US20110261831A1 (en) * 2010-04-27 2011-10-27 Puneet Sharma Dynamic Priority Queue Level Assignment for a Network Flow
US20110261688A1 (en) * 2010-04-27 2011-10-27 Puneet Sharma Priority Queue Level Optimization for a Network Flow
US20110273988A1 (en) * 2010-05-10 2011-11-10 Jean Tourrilhes Distributing decision making in a centralized flow routing system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301248A (zh) * 2014-10-31 2015-01-21 杭州华三通信技术有限公司 报文限速方法和装置
CN104301248B (zh) * 2014-10-31 2018-04-06 新华三技术有限公司 报文限速方法和装置
WO2018149228A1 (zh) * 2017-02-16 2018-08-23 中兴通讯股份有限公司 报文发送方法及装置
CN108449160A (zh) * 2017-02-16 2018-08-24 中兴通讯股份有限公司 报文发送方法及装置
CN109379163A (zh) * 2018-09-05 2019-02-22 新华三技术有限公司 一种报文转发速率控制方法及装置
CN109379163B (zh) * 2018-09-05 2021-11-23 新华三技术有限公司 一种报文转发速率控制方法及装置

Also Published As

Publication number Publication date
EP2661027A1 (en) 2013-11-06
CN103534999B (zh) 2016-07-13
CN103534999A (zh) 2014-01-22
EP2661027A4 (en) 2014-09-24
US9628392B2 (en) 2017-04-18
US20140006637A1 (en) 2014-01-02

Similar Documents

Publication Publication Date Title
CN110050448B (zh) 管理多播业务的系统和方法
US9954779B2 (en) Method, apparatus, and system for supporting flexible lookup keys in software-defined networks
EP2773073B1 (en) Entry generation method, message receiving method, and corresponding device and system
AU2019344548B2 (en) Unique identities of endpoints across layer 3 networks
EP3069471B1 (en) Optimized multicast routing in a clos-like network
WO2013170652A1 (en) Overlay tunnel information exchange protocol
JP2012217178A5 (zh)
WO2012106892A1 (zh) 一种业务流处理的方法、装置及系统
US9900238B2 (en) Overlay network-based original packet flow mapping apparatus and method therefor
WO2017107814A1 (zh) 一种传播QoS策略的方法、装置及系统
WO2016107379A1 (zh) 一种发送报文的方法和装置
WO2015081551A1 (zh) 一种网络中实现报文路由的方法、设备和系统
WO2013107056A1 (zh) 报文转发的方法及装置
WO2018024187A1 (zh) 报文监控
US9553764B2 (en) Migration of guest bridge
CN108075991B (zh) 报文转发方法及装置
WO2015149367A1 (zh) 报文处理的方法与设备
US9749262B2 (en) Packet processing method and forwarding element
US10104018B2 (en) Method, apparatus, and system for controlling forwarding of service data in virtual network
US20140289379A1 (en) Control apparatus, communication system, virtual network management method, and program
KR20160062688A (ko) 오버레이 네트워크 기반에서의 오리지널 패킷 플로우 매핑 장치 및 그 방법
WO2014183579A1 (zh) 控制数据转发的方法及逻辑交换机
WO2014067055A1 (zh) 流表刷新的方法及装置

Legal Events

Date Code Title Description
REEP Request for entry into the european phase

Ref document number: 2012866111

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2012866111

Country of ref document: EP

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

Ref document number: 12866111

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE