WO2013013567A1 - 发送报文的方法和装置 - Google Patents

发送报文的方法和装置 Download PDF

Info

Publication number
WO2013013567A1
WO2013013567A1 PCT/CN2012/078235 CN2012078235W WO2013013567A1 WO 2013013567 A1 WO2013013567 A1 WO 2013013567A1 CN 2012078235 W CN2012078235 W CN 2012078235W WO 2013013567 A1 WO2013013567 A1 WO 2013013567A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
fragmented
tokens
token bucket
fragmented packet
Prior art date
Application number
PCT/CN2012/078235
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 EP12818328.2A priority Critical patent/EP2709320B1/en
Publication of WO2013013567A1 publication Critical patent/WO2013013567A1/zh
Priority to US14/159,128 priority patent/US9225654B2/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/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/34Flow control; Congestion control ensuring sequence integrity, e.g. using sequence numbers

Definitions

  • the present invention relates to the field of data communications, and in particular, to a method and apparatus for transmitting a message. Background technique
  • Traffic policing is a common network traffic control technology. Due to the rapid development of network data communication with the development of the times, network traffic is growing at a very fast rate, traffic policing becomes more and more important, and traffic policing becomes more and more frequent.
  • the existing traffic policing technology is to use the token bucket to control the packet traffic. Before the packet is forwarded, the packet needs to be classified. If the packet meets the specified traffic characteristics, check whether the token bucket has If there are enough tokens in the token bucket, the packets can be forwarded. The number of tokens corresponding to the number of forwarded packets is subtracted from the token bucket. If there are not enough tokens in the token bucket. The card is discarded. Therefore, traffic of a certain type of packet can be controlled.
  • the packet characteristics are not perceived. Therefore, the fragmented packet and a complete packet are not treated differently. Therefore, the fragmented message may be partially forwarded and partially discarded. At the receiving end of the packet, the fragmented packet cannot be combined into a complete packet, and only the received fragmented packet can be discarded. This results in a waste of network bandwidth.
  • the embodiment of the invention relates to a method and a device for transmitting a message, which can prevent part of the fragmentation in the fragmented message from being sent, and the combined end cannot be combined into a complete message.
  • An embodiment of the present invention provides a method for sending a packet, where the method for sending a packet includes: determining whether the packet is a fragmented packet;
  • the fragment packet is sent, and the number of tokens in the token bucket is reduced, and the number of tokens lost and the number of bytes of the fragmented packet are sent.
  • the fragment packet is sent, and the number of tokens in the token bucket is reduced, and the number of tokens lost and the number of bytes of the fragmented packet are sent.
  • the number of tokens in the token bucket is a negative number.
  • An embodiment of the present invention provides an apparatus for transmitting a message, where the apparatus for transmitting a message includes: a first determining unit, configured to determine whether the packet is a fragmented packet, if the packet is a fragmented packet Determining whether the number of tokens in the token bucket is sufficient; when the number of tokens in the token bucket is sufficient, triggering the sending unit and the first processing unit; when the number of tokens in the token bucket is insufficient, triggering the sending unit and the second Processing unit
  • a sending unit configured to send the fragmented packet
  • a first processing unit configured to subtract the number of tokens in the token bucket, where the number of discarded tokens corresponds to the number of bytes of the transmitted fragmented packet;
  • a second processing unit configured to reduce the number of tokens in the token bucket, where the number of lost tokens corresponds to the number of bytes of the transmitted fragmented message; After the number of tokens corresponding to the number of bytes, the number of tokens in the token bucket is a negative number.
  • the method and device for sending a message in this embodiment can send a fragmented message through the deficit of the token bucket even if there is not enough token in the token bucket, so that the receiver can receive the same report. All the fragmented packets of the text are combined into a complete packet, which avoids waste of network resources and bandwidth.
  • FIG. 1 is a flowchart of a method for sending a message according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for sending a message according to another embodiment of the present invention
  • FIG. 3 is a schematic diagram of an apparatus for sending a message according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of an apparatus for sending a message according to another embodiment of the present invention.
  • FIG. 5 is a schematic diagram of an apparatus for sending a message according to another embodiment of the present invention. detailed description
  • the method and the device for sending a message in the embodiment of the present invention need to determine the type of the packet when the packet is sent, and if the packet is a fragmented packet, the special processing is performed, and the packet belongs to the same packet as the fragmented packet. If the fragmented packet is forwarded, the fragmented packet will be forwarded even if it does not meet the forwarding conditions. This is not the same as the existing packet transmission method. This ensures that the fragmented packets are forwarded.
  • FIG. 1 is a flowchart of a method for sending a message according to an embodiment of the present invention. As shown in the figure, the method for sending a message in this embodiment includes:
  • the fragment packet is sent, and the number of tokens in the token bucket is subtracted; wherein, the number of tokens lost and the fragmented packet sent
  • the number of bytes corresponds to the number of tokens in the token bucket after subtracting the number of tokens corresponding to the number of bytes of the fragmented packet sent (also referred to as the token bucket's deficit).
  • the fragmented packet can be sent out through the deficit of the token bucket, so that the receiver can receive the packet. All fragmented packets of the same packet are combined into one complete packet, which avoids waste of network resources and bandwidth.
  • another embodiment of the present invention provides a flow of a method for sending a text.
  • Chengtu including:
  • the identifier in the header (English: Ident if ier, abbreviated as: ID) field identifies which original datagram the fragmented packet belongs to (ie: a complete
  • ID The offset field in the header of the packet identifies the location of the fragmented message in the original datagram.
  • the flag in the header (English: Flag) field identifies whether a packet is a packet. For fragmented messages. Therefore, in 205, the identifier field, the offset field, and the flag field in the header of the fragmented packet may be recorded in the fragmented packet flow table. In another optional implementation, the entire packet header information of the fragmented packet may also be recorded in the fragmented packet flow table.
  • the fragmented packet flow table exists in the matching table of the fragmented packet, indicating that at least one other fragmented packet that belongs to the same packet as the fragmented packet has been sent.
  • the fragmented packet may be directly discarded, or the fragmented packet may be cached, and the number of tokens in the subsequent token bucket is sufficient, or the fragmented packet flow table exists. After the entry matching the fragmented packet, continue processing. It can be seen that, in the method for sending a packet in this embodiment, even if there is not enough token in the token bucket, as long as there is an entry matching the fragmented packet in the fragmented packet flow table, the token can be passed. The bucket is sent out, and the fragmented packet is sent out, so that the receiver can receive all the fragmented packets belonging to the same packet and combine them into one complete packet, which avoids waste of network resources and bandwidth.
  • the packet may be processed according to the prior art, and the embodiment of the present invention is not limited.
  • the fragmented packet when the fragmented packet is recorded in the fragmented packet flow table, if the fragmented packet flow table is in the fragmented packet flow table, the recorded at least two fragmented packets can be combined into one complete
  • the packet is used to record the resources of the at least two fragmented packets in the fragmented packet flow table.
  • the flag field and the offset field in the IP packet header of the fragmented packet can be used to determine whether the recorded fragmented message can be completely combined into a complete packet.
  • the execution order of the above 204 and 205 may be interchanged or performed simultaneously; the execution order of the above 205 and 207 may be interchanged or performed simultaneously. For the sake of brevity, only one case is shown in the embodiment and the drawings, and the embodiment of the present invention is not limited thereto.
  • the subsequently injected token when the number of tokens in the token bucket is negative, the subsequently injected token will be used preferentially to offset the deficit of the token bucket, and then the token is added.
  • the upper limit of the token bucket's deficit can be set when the token bucket is initialized.
  • FIG. 3 is a schematic diagram of an apparatus for sending a message according to an embodiment of the present invention.
  • the apparatus for transmitting a message in this embodiment specifically includes: a first determining unit 11, a sending unit 12, a first processing unit 13 and a second processing unit 14. among them:
  • the first determining unit 11 is configured to determine whether the packet is a fragmented packet, and if the packet is a fragmented packet, determine whether the number of tokens in the token bucket is sufficient; when the number of tokens in the token bucket is sufficient.
  • the sending unit 12 is configured to send a fragmented message.
  • the first processing unit 13 is configured to reduce the number of tokens in the token bucket, where the number of tokens that are subtracted corresponds to the number of bytes of the fragmented packet that is sent;
  • the second processing unit 14 is configured to subtract the number of tokens in the token bucket, where the number of tokens that are subtracted corresponds to the number of bytes of the fragmented packet that is sent, and the fragmented packet is sent and sent. After the number of tokens corresponding to the number of tokens, the number of tokens in the token bucket is negative (also known as the token bucket's deficit).
  • the device that sends the packet can send the fragmented packet through the deficit of the token bucket even if there is not enough token in the token bucket, so that the receiver can receive the same packet. All the fragmented packets are combined into one complete packet, avoiding the waste of network resources and bandwidth.
  • the apparatus may further include: a recording unit 24 and a second determining unit 25.
  • the first determining unit 1 1 is further configured to trigger the recording unit 24; when the number of tokens in the token bucket is insufficient, the A judging unit 1 1 is further configured to trigger the transmitting unit 12, the second processing unit 14, and the recording unit 24 by the second judging unit 25. among them,
  • the recording unit 24 is configured to record the fragmented packet in the fragmented packet flow table.
  • the second determining unit 25 is configured to query the fragmented packet flow table, and determine whether there is an entry matching the fragmented packet in the fragmented packet flow table, and if yes, triggering the sending unit 12 and the second processing Unit 14 and recording unit 24;
  • the apparatus may further include: a translation unit 26. If the at least two fragmented packets in the fragmented packet flow table can be combined into one complete packet, the translation unit 26 is configured to use the translation into the fragmented packet flow table. Recording resources of the at least two fragmented messages.
  • the apparatus for transmitting a packet in this embodiment if there is not enough token in the token bucket, if there is an entry matching the fragment packet in the fragmented packet flow table,
  • the fragmented packet can be sent out through the token bucket deficit, so that the receiver can receive all the fragmented packets belonging to the same packet and combine them into one complete packet, avoiding network resources and bandwidth. wave Fee.
  • RAM random access memory
  • ROM read-only memory
  • EEPROM electrically programmable ROM
  • EEPROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or technical field Any other form of storage medium known.

Abstract

本发明实施例涉及一种发送报文的方法和装置,所述发送报文的方法包括:判断报文是否为分片报文;如果所述报文是分片报文,判断令牌桶中的令牌数是否足够;发送所述分片报文,并减掉所述令牌桶中的令牌数,减掉的令牌数量与发送的分片报文的字节数相应,当令牌桶中令牌数不足时,减掉与发送的分片报文字节数相应的令牌数量后,所述令牌桶中的令牌数为负数。本实施例的发送报文的方法和装置,即使令牌桶中没有足够的令牌,也可以通过令牌桶的赤字,将分片报文发送出去,使得接收方能够收到属于同一个报文的所有的分片报文并组合成一个完整的报文,避免了网络资源和带宽的浪费。

Description

发送报文的方法和装置 本申请要求于 201 1 年 7 月 25 日提交中国专利局、 申请号为 201110209059. 8、 发明名称为 "发送报文的方法和装置" 的中国专利申请的 优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及数据通信领域, 尤其涉及一种发送报文的方法和装置。 背景技术
流量监管是一种常用的网络流量控制技术。 由于随着时代的发展, 网络 数据通信的急剧增加, 网络流量增长的速度非常快, 流量监管就变得越来越 重要, 流量监管越来越频繁。
现有的流量监管的技术是采用令牌桶来控制报文流量的, 报文被转发前 首先需要对报文进行分类, 如果是符合规定流量特征的报文, 则查看令牌桶 中是否有足够的令牌, 如果令牌桶中有足够的令牌, 则报文可以被转发, 令 牌桶中减掉与转发的报文数量相应的令牌数; 如果令牌桶中没有足够的令牌, 则该报文被丟弃。 由此, 可以实现对某类报文的流量进行控制。
现有的流量监管技术中, 并不感知报文特征, 因此, 对于分片报文和一 个完整的报文并不会区别的对待。 所以会造成分片报文有可能部分被转发, 部分被丟弃。 在报文的接收端, 由于缺少部分分片报文, 无法组合成完整的 报文, 而只能将接收到的分片报文丟弃。 从而造成了网络带宽的浪费。 发明内容
本发明实施例涉及一种发送报文的方法和装置, 可以防止分片报文中的 部分分片无法发送而导致在接收端无法组合成完整报文。 本发明实施例提供了一种发送报文的方法, 所述发送报文的方法包括: 判断报文是否为分片报文;
如果所述报文是分片报文, 判断令牌桶中的令牌数是否足够;
当令牌桶中令牌数足够时, 发送所述分片报文, 并减掉所述令牌桶中的 令牌数, 减掉的令牌数量与发送的分片报文的字节数相应;
当令牌桶中令牌数不足时, 发送所述分片报文, 并减掉所述令牌桶中的 令牌数, 减掉的令牌数量与发送的分片报文的字节数相应; 其中, 减掉与发 送的分片报文字节数相应的令牌数量后, 所述令牌桶中的令牌数为负数。 。
本发明实施例提供了一种发送报文的装置, 所述发送报文的装置包括: 第一判断单元, 用于判断报文是否为分片报文, 如果所述报文是分片报 文则判断令牌桶中的令牌数是否足够; 当令牌桶中令牌数足够时, 触发发送 单元和第一处理单元; 当令牌桶中令牌数不足时, 触发发送单元和第二处理 单元;
发送单元, 用于发送所述分片报文;
第一处理单元, 用于减掉所述令牌桶中的令牌数, 其中, 减掉的令牌数 量与发送的分片报文的字节数相应;
第二处理单元, 用于减掉所述令牌桶中的令牌数, 其中, 减掉的令牌数 量与发送的分片报文的字节数相应; 减掉与发送的分片报文字节数相应的令 牌数量后, 所述令牌桶中的令牌数为负数。
本实施例的发送报文的方法和装置, 即使令牌桶中没有足够的令牌, 也 可以通过令牌桶的赤字, 将分片报文发送出去, 使得接收方能够收到属于同 一个报文的所有的分片报文并组合成一个完整的报文, 避免了网络资源和带 宽的浪费。 附图说明
图 1为本发明实施例提供一种发送报文的方法的流程图; 图 2为本发明另一实施例提供一种发送报文的方法的流程图; 图 3为本发明实施例提供一种发送报文的装置的示意图;
图 4为本发明另一实施例提供一种发送报文的装置的示意图;
图 5为本发明又一实施例提供一种发送报文的装置的示意图。 具体实施方式
下面通过附图和实施例, 对本发明的技术方案做进一步的详细描述。 本发明实施例的发送报文的方法和装置, 在报文发送时需要先判断报文 的类型, 如果报文是分片报文则做特殊处理, 当具有与该分片报文属于同一 报文的分片报文被转发过时, 即使该分片报文本来不符合转发条件也要强行 转发, 与现有的报文发送方法并不相同, 这样才能保证分片报文均被转发。
图 1 为本发明实施例提供一种发送报文的方法的流程图, 如图所示, 本 实施例的发送 文的方法具体包括:
101 , 判断报文是否为分片报文;
102 , 如果报文是分片报文, 则判断令牌桶中的令牌数是否足够;
103 , 当令牌桶中令牌数足够时, 发送所述分片报文, 并减掉所述令牌桶 中的令牌数; 其中, 减掉的令牌数量与发送的分片报文的字节数相应;
104 , 当令牌桶中令牌数不足时, 发送所述分片报文, 并减掉所述令牌桶 中的令牌数; 其中, 减掉的令牌数量与发送的分片报文的字节数相应; 而在 减掉与发送的分片报文字节数相应的令牌数量后, 令牌桶中的令牌数为负数 (也可称为令牌桶的赤字) 。
从中可以看出, 本实施例的发送报文的方法, 即使令牌桶中没有足够的 令牌, 也可以通过令牌桶的赤字, 将分片报文发送出去, 使得接收方能够收 到属于同一个报文的所有的分片报文并组合成一个完整的报文, 避免了网络 资源和带宽的浪费。
可选的, 如图 2所示, 本发明另一实施例提供一种发送 文的方法的流 程图, 包括:
201 , 判断报文是否为分片报文, 如果是则执行 202 ;
202 ,判断令牌桶中的令牌数是否足够;如果是则执行 204 ,否则执行 206; 例如, 根据该分片报文自身的报文长度(字节数) , 判断令牌桶中的令 牌数是否足够;
204 , 发送分片报文, 并减掉所述令牌桶中的令牌数; 其中, 减掉的令牌 数量与发送的分片报文的字节数相应;
205 , 在分片报文流表中记录该分片报文;
对于一个分片报文来说, 报文头中的标识(英文全称为: Ident if ier , 简称为: ID ) 字段能够标识出该分片报文属于哪一个原始数据报(即: 一个 完整的报文) ; 报文头中的偏移字段则能够标识出该分片报文在原始数据报 内的位置; 报文头中的标志 (英文全称为: Flag ) 字段能够标识出一个报文 是否为分片报文。 因此, 在 205 中, 优选的, 可以在分片报文流表中记录该 分片报文的报文头中的标识字段、 偏移字段以及标志字段。 在另一可选实现 中, 还可以在分片报文流表中记录该分片报文的整个报文头信息。
206 , 查询分片报文流表, 判断分片报文流表中是否存在与所述分片报文 匹配的表项, 如果是则执行 207 , 否则执行 208;
207 , 发送所述分片报文, 并减掉所述令牌桶中的令牌数; 其中, 减掉的 令牌数量与发送的分片报文的字节数相应, 所述令牌桶中的令牌数为负数; 执行 205;
分片报文流表中存在于该分片报文匹配的表项, 说明在之前, 至少有一 个与该分片报文属于同一个报文的其他分片报文, 已经被发送出去。
208 , 丟弃或緩存该分片报文。
本发明的实施例中, 可以直接将该分片报文丟弃, 也可以緩存该分片报 文, 待后续令牌桶中的令牌数足够了、 或者是分片报文流表中存在与该分片 报文匹配的表项后, 再继续处理。 从中可以看出, 本实施例的发送报文的方法, 即使令牌桶中没有足够的 令牌, 只要分片报文流表中存在与分片报文匹配的表项, 就可以通过令牌桶 赤字, 将该分片报文发送出去, 使得接收方能够收到属于同一个报文的所有 的分片报文并组合成一个完整的报文, 避免了网络资源和带宽的浪费。
可选的, 如果在 101或者 201 中判断报文不是分片报文, 则可以按照现 有技术的方案来处理, 本发明的实施例不做限定。
可选的, 在 205 中, 将该分片报文记录到上述分片报文流表时, 如果在 分片报文流表中, 记录的至少两个分片报文已经能够组合成一个完整的报文, 则译放该分片报文流表中用于记录所述至少两个分片报文的资源。 例如, 可 以根据分片报文的 IP报文头中的标志字段和偏移字段就可以判断出记录的分 片报文是否可以完整的组合成一个完整的报文。 进一步可选的, 上述 204 和 205的执行顺序可互换, 或同时执行; 上述 205和 207的执行顺序可互换, 或 同时执行。 为了简便, 本实施例以及附图中仅示出了一种情况, 实际上本发 明的实施例对此并不限定。
可选的, 当令牌桶中的令牌数为负数时, 后续注入的令牌将优先用于抵 消令牌桶的赤字, 然后再增加令牌。 优选的, 令牌桶的赤字上限可以在令牌 桶初始化的时候设定。
上述实施例是对于发送报文的方法的描述, 当然发送报文可以通过发送 报文的装置来实现, 图 3为本发明实施例提供一种发送报文的装置的示意图, 如图所示, 本实施例的发送报文的装置具体包括: 第一判断单元 11、 发送单 元 12、 第一处理单元 1 3和第二处理单元 14。 其中:
第一判断单元 11 ,用于判断报文是否为分片报文,如果报文是分片报文, 则判断令牌桶中的令牌数是否足够; 当令牌桶中令牌数足够时, 触发发送单 元 12和第一处理单元 1 3; 当令牌桶中令牌数不足时, 触发发送单元 12和第 二处理单元 14 ;
发送单元 12 , 用于发送分片报文; 第一处理单元 1 3 , 用于减掉所述令牌桶中的令牌数, 其中, 减掉的令牌 数量与发送的分片报文的字节数相应;
第二处理单元 14 , 用于减掉所述令牌桶中的令牌数, 其中, 减掉的令牌 数量与发送的分片报文的字节数相应, 减掉与发送的分片报文字节数相应的 令牌数量后, 令牌桶中的令牌数为负数 (也可称为令牌桶的赤字 ) 。
本发明实施例的发送报文的装置, 即使令牌桶中没有足够的令牌, 也可 以通过令牌桶的赤字, 将分片报文发送出去, 使得接收方能够收到属于同一 个报文的所有的分片报文并组合成一个完整的报文, 避免了网络资源和带宽 的浪费。
可选的, 如图 4所示, 本发明另一实施例中, 所述装置还可以包括: 记 录单元 24和第二判断单元 25。 在本实施例中, 当令牌桶中令牌数足够时, 所 述第一判断单元 1 1还进一步用于触发所述记录单元 24 ; 当令牌桶中令牌数不 足时, 所述第一判断单元 1 1还进一步用于通过所述第二判断单元 25 , 触发发 送单元 12、 第二处理单元 14和记录单元 24。 其中,
所述记录单元 24 , 用于在分片报文流表中记录该分片报文;
所述第二判断单元 25用于查询分片报文流表,判断分片报文流表中是否 存在与该分片报文匹配的表项, 如果存在, 则触发发送单元 12、 第二处理单 元 14和记录单元 24 ;
进一步可选的, 如图 5所示, 本发明又一实施例中, 所述装置还可以包 括: 译放单元 26。 如果在分片报文流表中, 记录的至少两个分片报文已经能 够组合成一个完整的报文, 则所述译放单元 26用于译放所述分片报文流表中 用于记录所述至少两个分片报文的资源。
本实施例的发送报文的装置, 对于发送的分片报文, 即使令牌桶中没有 足够的令牌, 只要分片报文流表中存在与该分片报文匹配的表项, 则可以通 过令牌桶赤字, 将该分片报文发送出去, 使得接收方能够收到属于同一个报 文的所有的分片报文并组合成一个完整的报文, 避免了网络资源和带宽的浪 费。
专业人员应该还可以进一步意识到, 结合本文中所公开的实施例描述的 各示例的单元及算法步骤, 能够以电子硬件、 计算机软件或者二者的结合来 实现, 为了清楚地说明硬件和软件的可互换性, 在上述说明中已经按照功能 一般性地描述了各示例的组成及步骤。 这些功能究竟以硬件还是软件方式来 执行, 取决于技术方案的特定应用和设计约束条件。 专业技术人员可以对每 个特定的应用来使用不同方法来实现所描述的功能, 但是这种实现不应认为 超出本发明的范围。
结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、 处理 器执行的软件模块, 或者二者的结合来实施。 软件模块可以置于随机存储器 ( RAM ) 、 内存、 只读存储器(ROM ) 、 电可编程 R0M、 电可擦除可编程 R0M、 寄存器、 硬盘、 可移动磁盘、 CD-R0M、 或技术领域内所公知的任意其它形式 的存储介质中。
以上所述的具体实施方式, 对本发明的目的、 技术方案和有益效果进行 了进一步详细说明, 所应理解的是, 以上所述仅为本发明的具体实施方式而 已, 并不用于限定本发明的保护范围, 凡在本发明的精神和原则之内, 所做 的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权利要求书
1、 一种发送^¾文的方法, 其特征在于, 包括:
判断报文是否为分片报文;
如果所述报文是分片报文, 判断令牌桶中的令牌数是否足够;
当令牌桶中令牌数足够时, 发送所述分片报文, 并减掉所述令牌桶中的 令牌数, 减掉的令牌数量与发送的分片报文的字节数相应;
当令牌桶中令牌数不足时, 发送所述分片报文, 并减掉所述令牌桶中的 令牌数, 减掉的令牌数量与发送的分片报文的字节数相应; 其中, 减掉与发 送的分片报文字节数相应的令牌数量后, 所述令牌桶中的令牌数为负数。
2、 根据权利要求 1所述的发送报文的方法, 其特征在于, 当所述令牌桶 中的令牌数不足时, 在发送所述分片报文之前, 所述方法还包括:
查询分片报文流表, 判断所述分片报文流表中是否存在与所述分片报文 匹配的表项;
如存在与所述分片报文匹配的表项, 则发送所述分片报文。
3、 根据权利要求 1或 2所述的发送报文的方法, 其特征在于, 当所述令 牌桶中的令牌数足够或者不足时, 所述方法还包括: 在分片报文流表中记录 所述分片报文。
4、 根据权利要求 3所述的发送报文的方法, 其特征在于, 在所述分片报 文流表中记录所述分片报文, 包括: 在分片报文流表中, 至少记录所述分片 报文的报文头中的标识字段、 偏移字段以及标志字段。
5、 根据权利要求 3所述的发送报文的方法, 其特征在于, 如果在所述分 片报文流表中, 记录的至少两个分片报文已经能够组合成一个完整的报文, 则所述方法进一步包括:
译放所述分片报文流表中用于记录所述至少两个分片报文的资源。
6、 一种发送>¾文的装置, 其特征在于, 包括:
第一判断单元, 用于判断报文是否为分片报文, 如果所述报文是分片报 文则判断令牌桶中的令牌数是否足够; 当令牌桶中令牌数足够时, 触发发送 单元和第一处理单元; 当令牌桶中令牌数不足时, 触发发送单元和第二处理 单元;
发送单元, 用于发送所述分片报文;
第一处理单元, 用于减掉所述令牌桶中的令牌数, 其中, 减掉的令牌数 量与发送的分片报文的字节数相应;
第二处理单元, 用于减掉所述令牌桶中的令牌数, 其中, 减掉的令牌数 量与发送的分片报文的字节数相应; 减掉与发送的分片报文字节数相应的令 牌数量后, 所述令牌桶中的令牌数为负数。
7、 根据权利要求 6所述的发送报文的装置, 其特征在于, 当令牌桶中令 牌数足够时, 所述第一判断单元还进一步用于触发记录单元; 当令牌桶中令 牌数不足时, 所述第一判断单元还进一步用于通过第二判断单元, 触发所述 发送单元、 所述第二处理单元和所述记录单元; 其中:
所述记录单元,用于在分片报文流表中记录该分片报文;
所述第二判断单元,用于查询所述分片报文流表, 判断所述分片报文流表 中是否存在与该分片报文匹配的表项, 如果存在, 则触发所述发送单元、 所 述第二处理单元和所述记录单元。
8、 根据权利要求 7所述的发送报文的装置, 其特征在于, 所述装置还包 括释放单元; 如果在所述分片报文流表中, 记录的至少两个分片报文已经能 够组合成一个完整的报文, 则所述译放单元用于译放所述分片报文流表中用 于记录所述至少两个分片报文的资源。
PCT/CN2012/078235 2011-07-25 2012-07-05 发送报文的方法和装置 WO2013013567A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP12818328.2A EP2709320B1 (en) 2011-07-25 2012-07-05 Method and apparatus for sending packet
US14/159,128 US9225654B2 (en) 2011-07-25 2014-01-20 Method and apparatus for sending packet

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110209059.8 2011-07-25
CN201110209059.8A CN102271086B (zh) 2011-07-25 2011-07-25 发送报文的方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/159,128 Continuation US9225654B2 (en) 2011-07-25 2014-01-20 Method and apparatus for sending packet

Publications (1)

Publication Number Publication Date
WO2013013567A1 true WO2013013567A1 (zh) 2013-01-31

Family

ID=45053253

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/078235 WO2013013567A1 (zh) 2011-07-25 2012-07-05 发送报文的方法和装置

Country Status (4)

Country Link
US (1) US9225654B2 (zh)
EP (1) EP2709320B1 (zh)
CN (1) CN102271086B (zh)
WO (1) WO2013013567A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170180254A1 (en) * 2012-03-26 2017-06-22 Amazon Technologies, Inc. Adaptive throttling for shared resources

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102271086B (zh) * 2011-07-25 2015-07-22 华为技术有限公司 发送报文的方法和装置
CN109428801A (zh) * 2017-08-23 2019-03-05 北京华为数字技术有限公司 报文发送方法及装置
CN110912859B (zh) 2018-09-17 2021-12-14 华为技术有限公司 发送报文的方法、接收报文的方法及网络设备
CN110401962B (zh) * 2019-08-13 2020-04-24 翱捷科技(深圳)有限公司 自动调整数据报文长度的LoRaWAN系统及其方法
CN110445729B (zh) * 2019-09-05 2023-03-24 北京物芯科技有限责任公司 一种队列调度方法、装置、设备及储存介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1589542A (zh) * 2000-11-17 2005-03-02 摩托罗拉公司 电缆调制解调器服务流中的多个服务子流
CN1601963A (zh) * 2003-09-26 2005-03-30 华为技术有限公司 基于令牌桶算法的接入速率限制方法
US20070153682A1 (en) * 2005-12-30 2007-07-05 Erik Swenson Multi-priority multi-color markers for traffic metering
CN101110716A (zh) * 2007-08-13 2008-01-23 杭州华三通信技术有限公司 一种对分片报文进行流量监管的方法及装置
CN102271086A (zh) * 2011-07-25 2011-12-07 华为技术有限公司 发送报文的方法和装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001111619A (ja) * 1999-10-12 2001-04-20 Sony Corp 送信装置、通信システム及びその通信方法
CN100499477C (zh) * 2003-05-13 2009-06-10 华为技术有限公司 一种流量整形处理方法
US6970426B1 (en) * 2003-05-14 2005-11-29 Extreme Networks Rate color marker
US20050078602A1 (en) * 2003-10-10 2005-04-14 Nortel Networks Limited Method and apparatus for allocating bandwidth at a network element
JP3961000B2 (ja) * 2005-05-26 2007-08-15 株式会社日立コミュニケーションテクノロジー パケット転送装置及びネットワークシステム
EP2670205B1 (en) * 2008-02-01 2019-01-02 Interdigital Patent Holdings, Inc. Method and apparatus for prioritizing logical channels
CN101309219B (zh) * 2008-06-27 2010-12-15 华为技术有限公司 一种分片报文的流量限制方法和装置
US20110075562A1 (en) * 2009-09-25 2011-03-31 Isaksson Martin Rate Shaping For Wireless Communication Using Token Bucket That Allows Token Debt

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1589542A (zh) * 2000-11-17 2005-03-02 摩托罗拉公司 电缆调制解调器服务流中的多个服务子流
CN1601963A (zh) * 2003-09-26 2005-03-30 华为技术有限公司 基于令牌桶算法的接入速率限制方法
US20070153682A1 (en) * 2005-12-30 2007-07-05 Erik Swenson Multi-priority multi-color markers for traffic metering
CN101110716A (zh) * 2007-08-13 2008-01-23 杭州华三通信技术有限公司 一种对分片报文进行流量监管的方法及装置
CN102271086A (zh) * 2011-07-25 2011-12-07 华为技术有限公司 发送报文的方法和装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170180254A1 (en) * 2012-03-26 2017-06-22 Amazon Technologies, Inc. Adaptive throttling for shared resources
US10193819B2 (en) * 2012-03-26 2019-01-29 Amazon Technologies, Inc. Adaptive throttling for shared resources
US10892998B2 (en) 2012-03-26 2021-01-12 Amazon Technologies, Inc. Adaptive throttling for shared resources

Also Published As

Publication number Publication date
EP2709320A4 (en) 2014-10-29
CN102271086A (zh) 2011-12-07
US9225654B2 (en) 2015-12-29
US20140133309A1 (en) 2014-05-15
CN102271086B (zh) 2015-07-22
EP2709320B1 (en) 2018-09-12
EP2709320A1 (en) 2014-03-19

Similar Documents

Publication Publication Date Title
US9203734B2 (en) Optimized bi-directional communication in an information centric network
US9246825B2 (en) Accelerated processing of aggregate data flows in a network environment
US9166921B2 (en) Selective packet sequence acceleration in a network environment
Xu et al. Sustaining availability of web services under distributed denial of service attacks
US8792353B1 (en) Preserving sequencing during selective packet acceleration in a network environment
US9722933B2 (en) Selective packet sequence acceleration in a network environment
WO2013013567A1 (zh) 发送报文的方法和装置
TW201644238A (zh) 用於服務-使用者平面方法的使用網路符記的高效策略實施
US20220174477A1 (en) Method and apparatus for realizing network capability opening, electronic device and storage medium
KR20140030307A (ko) 정보 중심 네트워크를 위한 일반화된 듀얼 모드 데이터 포워딩 플레인
GB2493129A (en) Managing a SIP server
WO2008131667A1 (fr) Procédé, dispositif d'identification des flux de services et procédé, système de protection contre une attaque par déni de service
WO2021244449A1 (zh) 一种数据处理方法及装置
JP2011509619A (ja) Macテーブルのオーバーフロー攻撃に対する防御を容易にすること
CN103918246A (zh) 用于使用网络地址转换功能对ip分段进行数据分组处理的系统和方法
Thornburgh Adobe's Secure Real-Time Media Flow Protocol
WO2017148419A1 (zh) 数据传输方法及服务器
KR101660352B1 (ko) 트래픽 분배 방법, 장치 및 시스템
CN110198290B (zh) 一种信息处理方法、设备、装置及存储介质
WO2009026824A1 (fr) Procédé, dispositif et système pour transférer des messages multiplex
WO2005004410A1 (fr) Procede pour controler la retransmission d'un message de donnees dans un dispositif d'acheminement
WO2009018769A1 (fr) Procédé et dispositif réseau de défense contre une attaque par message invalide
WO2017157127A1 (zh) 访问记录回传方法、设备和系统
TW201132055A (en) Routing device and related packet processing circuit
WO2014100973A1 (zh) 视频处理方法、设备及系统

Legal Events

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

Ref document number: 12818328

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2012818328

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE