Method, equipment and system for sending message

文档序号:1589714 发布日期:2020-01-03 浏览:35次 中文

阅读说明:本技术 一种发送报文的方法、设备和系统 (Method, equipment and system for sending message ) 是由 谢经荣 夏阳 闫刚 庄顺万 于 2018-06-27 设计创作,主要内容包括:本申请提供了一种发送报文的方法,该方法包括第一设备生成包含BIER头的第一报文。该BIER头包含Entropy,其中,所述Entropy包括第一部分和第二部分。第一设备根据所述第一报文的目的地址确定存在多条用于转发第一报文的转发表项。第一设备根据第一部分从多条转发表项中选择一条转发表项,所选择的转发表项包含第二设备的地址,所述第二设备为所述第一设备的下一跳设备。第一设备向第二设备发送第一报文,其中,第二部分用于第二设备从多条用于转发第一报文的转发表项中选择第二设备转发第一报文的转发表项。通过上述方法,能够根据Entropy的不同部分,灵活实现对数据流的多级负载分担。(The application provides a method for sending a message, which comprises that a first device generates a first message containing a BIER header. The BIER header comprises control, wherein the control comprises a first portion and a second portion. And the first equipment determines that a plurality of forwarding table entries for forwarding the first message exist according to the destination address of the first message. The first device selects a forwarding table from the multiple forwarding tables according to the first part, wherein the selected forwarding table includes an address of a second device, and the second device is a next hop device of the first device. And the second part is used for selecting a forwarding table item for forwarding the first message by the second equipment from multiple forwarding table items for forwarding the first message by the second equipment. By the method, multi-level load sharing of the data stream can be flexibly realized according to different parts of the Encopy.)

1. A method for sending a message, comprising:

generating, by a first device, a first packet comprising a bit-indexed display-copy BIER header, the BIER header comprising an Entropy entry, the entry being for forwarding the first packet along a forwarding path, the entry comprising a first portion and a second portion, the first portion being different from the second portion;

the first equipment determines that a plurality of forwarding table entries for forwarding the first message exist according to the destination address of the first message;

the first device selects a forwarding table from the multiple forwarding tables according to the first part, wherein the selected forwarding table includes an address of a second device, and the second device is a next hop device of the first device;

the first device sends the first packet to the second device, and the second part is used for the second device to select a forwarding table from multiple forwarding tables for forwarding the first packet.

2. The method of claim 1, wherein the first portion and the second portion occupy different bits of the Encopy.

3. The method according to claim 1 or 2, wherein the first device determines the entry value of the BIER header of the first packet according to the number of the forwarding entries of the first device for forwarding the first packet and the number of the forwarding entries of the second device for forwarding the first packet.

4. The method according to claims 1 to 3, wherein the first device generating the first packet including the BIER header comprises:

the first equipment receives a second message from fourth equipment;

and the first equipment encapsulates the BIER head to the second message to generate the first message.

5. A method for sending a message, comprising:

the method comprises the steps that a second device receives a first message sent by a first device, the first message comprises a bit-indexed display copy BIER header, the BIER header comprises Entropy Encopy, the Encopy is used for forwarding the first message along a forwarding path, the Encopy comprises a first part and a second part, the first part is different from the second part, and the first part is used for the first device to select one forwarding table item from multiple forwarding table items used for forwarding the first message;

the second equipment determines that a plurality of forwarding table entries for forwarding the first message exist according to the destination address of the first message;

the second device selects a forwarding table from the multiple forwarding tables according to the second part, wherein the selected forwarding table includes an address of a third device, and the third device is a next hop device of the second device;

and the second equipment sends the first message to the third equipment.

6. The method of claim 5, wherein the first portion and the second portion occupy different bits of the Encopy.

7. The method according to claim 5 or 6, wherein the entry value of the BIER header of the first packet is determined according to the number of the plurality of forwarding entries of the first device for forwarding the first packet and the number of the plurality of forwarding entries of the second device for forwarding the first packet.

8. An apparatus for sending a message, the apparatus being a first apparatus of a plurality of apparatuses, the apparatus comprising:

a generating unit, configured to generate a first packet including a bit index showing a duplicate header, where the BIER header includes an Entropy entry, and the entry is configured to forward the first packet along a forwarding path, and the entry includes a first part and a second part, where the first part is different from the second part;

a determining unit, configured to determine, according to a destination address of the first packet, that multiple forwarding entries exist for forwarding the first packet;

a selecting unit, configured to select a forwarding table entry from the multiple forwarding table entries according to the first part, where the selected forwarding table entry includes an address of a second device, and the second device is a next hop device of the first device;

a sending unit, configured to send the first packet to the second device, where the second part is used for the second device to select a forwarding table from multiple forwarding tables used for forwarding the first packet.

9. The apparatus of claim 8, wherein the first portion and the second portion occupy different bits of the Encopy.

10. The apparatus according to claim 8 or 9,

the determining unit is further configured to determine an entry value of a BIER header of the first packet according to the number of the multiple forwarding entries of the first device for forwarding the first packet and the number of the multiple forwarding entries of the second device for forwarding the first packet.

11. The apparatus according to claims 8 to 10, characterized in that the apparatus further comprises a receiving unit:

the receiving unit is configured to receive a second packet from a fourth device;

the generating unit is configured to encapsulate a BIER header in the second packet to generate the first packet.

12. An apparatus for sending a message, the apparatus being a first apparatus of a plurality of apparatuses, the apparatus comprising:

a receiving unit, configured to receive a first packet sent by a first device, where the first packet includes a bit-indexed display copy BIER header, where the BIER header includes an Entropy entry, where the entry is used to forward the first packet along a forwarding path, where the entry includes a first part and a second part, the first part is different from the second part, and the first part is used for the first device to select one forwarding entry from multiple forwarding entries used to forward the first packet;

a determining unit, configured to determine, according to a destination address of the first packet, that multiple forwarding entries exist for forwarding the first packet;

a selecting unit, configured to select a forwarding table entry from the multiple forwarding table entries according to the second part, where the selected forwarding table entry includes an address of a third device, and the third device is a next hop device of the second device;

a sending unit, configured to send the first packet to the third device.

13. The apparatus of claim 12, wherein the first portion and the second portion occupy different bits of the entry.

14. The apparatus according to claim 12 or 13, wherein the entry value of the BIER header of the first packet is determined according to the number of the plurality of forwarding entries of the first apparatus for forwarding the first packet and the number of the plurality of forwarding entries of the second apparatus for forwarding the first packet.

15. A system for transmitting messages, the system comprising a first device and a second device,

the first device is configured to generate a first packet including a bit index and showing a copied BIER header, determine that multiple forwarding entries for forwarding the first packet exist according to a destination address of the first packet, select one forwarding entry from the multiple forwarding entries according to a first part, and send the first packet to a second device, where the BIER header includes an Entropy entry, the entry is used to forward the first packet along a forwarding path, the entry includes the first part and a second part, the first part is different from the second part, the selected forwarding entry includes an address of the second device, and the second device is a next hop device of the first device;

the second device is configured to receive the first packet, determine that multiple forwarding entries for forwarding the first packet exist according to a destination address of the first packet, select one forwarding entry from the multiple forwarding entries according to the second part, and send the first packet to a third device, where the third device is a next hop device of the second device.

16. The system of claim 15, wherein the first portion and the second portion occupy different bits of the entry.

17. The system according to claim 15 or 16, wherein the first device is further configured to determine an entry value of the BIER header of the first packet according to the number of the plurality of forwarding entries of the first device for forwarding the first packet and the number of the plurality of forwarding entries of the second device for forwarding the first packet.

18. The system according to claims 15 to 17, wherein the first device is further configured to receive a second packet from a fourth device, and encapsulate a BIER header for the second packet to generate the first packet.

19. A computer-readable medium comprising instructions that, when executed by a computer, cause the computer to perform the method of any of claims 1 to 7.

Technical Field

The present invention relates to the field of communications technologies, and in particular, to a method, a device, and a system for sending a packet.

Background

The display duplication of Bit Indexes (BIER) is a multicast forwarding technique generated by the discussion of Internet Engineering Task Force (IETF) in 2014. In Request For Comments (RFC) 8279, an Entropy (english: Entropy) value of a BIER header is defined For traffic load sharing, For example, in the system 100 shown in fig. 1, devices A, D, E and F are edge nodes of a BIER domain, and when a first traffic and a second traffic are both required to be sent to device F by device a, device a may fill in Entropy as a value 1 when encapsulating the BIER header For the first traffic, and fill in Entropy as a value 2 when encapsulating the BIER header For the second traffic, so that device B may cause the first traffic to sequentially pass through devices A, B, C and F to reach device F and cause the second traffic to sequentially pass through A, B, E and F to reach device F when receiving the first traffic and the second traffic, thereby implementing traffic load sharing.

With the rapid development and wide application of a multi-stage network, for example, in a CLOS network of a data center, the number of each stage of devices in the network reaches more than two, that is, the devices in each stage of network have multiple equivalent paths, the above method cannot flexibly share the load of each stage of network devices in the multi-stage network.

Disclosure of Invention

The embodiment of the application provides a method, equipment and a system for sending a message, which are used for realizing load sharing and forwarding on different equipment according to different parts of an entry of a BIER header, so that each stage of equipment in a multi-stage network can flexibly realize load sharing of data streams according to different parts of the same entry.

In a first aspect, the present application provides a method for sending a packet, where the method includes a first device generating a first packet including a BIER header. The BIER header contains Entropy control. The control is configured to forward a first packet along a forwarding path, where the control includes a first portion and a second portion. The first portion is different from the second portion. The first equipment determines that a plurality of forwarding table entries for forwarding the first message exist according to the destination address of the first message. And the first equipment selects one forwarding table item from the multiple forwarding table items according to the first part. The selected forwarding table entry includes an address of a second device, where the second device is a next-hop device of the first device. The first device sends a first message to a second device, wherein a second part is used for the second device to select a forwarding table from multiple forwarding tables for forwarding the first message.

By the method, the first device can share the load of the message according to the first part, and the second device can also share the load of the message according to the second part, so that the load sharing and forwarding on different devices can be realized through different parts of the Encopy, the path of the data stream is controlled, and the multi-stage load sharing of the message is realized.

With reference to the first aspect, in a first possible implementation manner, the first portion and the second portion occupy different bits of entry.

By using different bits of Encopy in the BIER header of the message, the multi-level load sharing of the message is realized.

With reference to the first aspect, in a second possible implementation manner, the first device determines an entry value of a BIER header of the first packet according to the number of multiple forwarding entries of the first device for forwarding the first packet and the number of multiple forwarding entries of the second device for forwarding the first packet. The first device has multiple forwarding entries for forwarding the first packet, that is, multiple load-sharing paths for forwarding the first packet exist on the first device, the second device has multiple forwarding entries for forwarding the first packet, that is, multiple load-sharing paths for forwarding the first packet exist on the second device, and the first device generates the entry according to the load-sharing number of the first device and the load-sharing number of the second device, so that the forwarding entries used when forwarding the first packet on each device are accurately controlled, for example: and setting the first part as 0001, the first device sends the first message by using a first forwarding path in the multiple forwarding paths, and setting the second part as 0003, the second device sends the first message by using a third forwarding path in the multiple forwarding paths, so that the control of the forwarding path for forwarding the first message by each device in the multiple devices is respectively realized.

With reference to the first aspect, in a third possible implementation manner, the generating, by the first device, the first packet including the BIER header includes: the first device receives a second message from the fourth device. And the first equipment encapsulates the BIER head to the second message to generate a first message.

With reference to the first aspect, in a fourth possible implementation manner, the Forwarding Table entry may be a Bit Index Forwarding Table (Bit Index Forwarding Table, abbreviated as BIFT).

With reference to the first aspect, in a fifth possible implementation manner, the value of the entry is equal to a sum of a first part and a second part, where the first part is generated according to a number of forwarding entries of the first device for forwarding the first packet, and the second part is generated according to a number of forwarding entries of the second device for forwarding the first packet.

In a second aspect, the present application provides a method for sending a packet, where the method includes: the second equipment receives a first message sent by the first equipment. The first packet includes a BIER header that includes an Entropy entry for forwarding the first packet along a forwarding path. The Encopy comprises a first portion and a second portion, wherein the first portion is different from the second portion. The first part is used for the first device to select one forwarding table entry from multiple forwarding table entries for forwarding the first message. And the second equipment determines that a plurality of forwarding table entries for forwarding the first message exist according to the destination address of the first message. The second device selects a forwarding entry from the plurality of forwarding entries based on the second portion. The selected forwarding table entry includes an address of a third device, and the third device is a next-hop device of the second device. The second device sends the first message to the third device.

With reference to the second aspect, in a first possible implementation manner, the first part and the second part occupy different bits of control.

With reference to the second aspect, in a second possible implementation manner, the first device determines an entry value of the BIER header of the first packet according to the number of the multiple forwarding entries of the first device for forwarding the first packet and the number of the multiple forwarding entries of the second device for forwarding the first packet.

With reference to the second aspect, in a third possible implementation manner, the control further comprises a third part, wherein the third part and the first part and the second part are different. The third part is configured to select, by the third device, a forwarding table from multiple forwarding tables for forwarding the first packet, where the third device has multiple equal cost paths for sending the first packet.

In a third aspect, the present application provides a device for sending a packet. The device comprises a generating unit, a determining unit, a selecting unit and a transmitting unit. The generating unit is used for generating a first message containing a BIER header. The BIER header contains Entropy control. The entry is used to forward the first packet along the forwarding path. The Encopy comprises a first portion and a second portion, wherein the first portion is different from the second portion. The determining unit is configured to determine that multiple forwarding entries for forwarding the first packet exist according to the destination address of the first packet. The selecting unit is used for selecting one forwarding table entry from the multiple forwarding table entries according to the first part. The selected forwarding table entry includes an address of a second device, where the second device is a next-hop device of the device. The sending unit is used for sending the first message to the second equipment. The second part is used for the second device to select a forwarding table entry from a plurality of forwarding table entries for forwarding the first message.

With reference to the third aspect, in a first possible implementation manner, the first part and the second part occupy different bits of control.

With reference to the third aspect, in a second possible implementation manner, the determining unit is further configured to determine, according to the number of multiple forwarding table entries of the first device for forwarding the first packet and the number of multiple forwarding table entries of the second device for forwarding the first packet.

With reference to the third aspect, in a third possible implementation manner, the apparatus further includes a receiving unit, where the receiving unit is configured to receive the second packet from the fourth apparatus. The generating unit is used for encapsulating the BIER head to the second message to generate the first message.

In a fourth aspect, the present application provides an apparatus for sending a packet. The device comprises a receiving unit, a determining unit, a selecting unit and a transmitting unit. The receiving unit is used for receiving a first message sent by first equipment. The first message contains a BIER header that contains the entry. The control is configured to forward the first packet along a forwarding path, where the control includes a first portion and a second portion, and the first portion is different from the second portion. The first part is used for the first device to select one forwarding table entry from multiple forwarding table entries for forwarding the first message. The determining unit is configured to determine that multiple forwarding entries for forwarding the first packet exist according to the destination address of the first packet. The selecting unit is configured to select one forwarding entry from the multiple forwarding entries according to the second part. The selected forwarding table entry includes an address of a third device, where the third device is a next hop device of the second device. The sending unit is used for sending the first message to the third equipment.

With reference to the fourth aspect, in a first possible implementation manner, the first part and the second part occupy different bits of entry.

With reference to the fourth aspect, in a second possible implementation manner, the entry value of the BIER header of the first packet is determined according to the number of the multiple forwarding entries of the first device for forwarding the first packet and the number of the multiple forwarding entries of the second device for forwarding the first packet.

In a fifth aspect, the present application provides a system for determining a traffic transmission path in a network, the system comprising a first device and a second device. The first device is configured to generate a first packet including a BIER header, determine that multiple forwarding entries for forwarding the first packet exist according to a destination address of the first packet, select one forwarding entry from the multiple forwarding entries according to the first part, and send the first packet to the second device. The BIER header contains Entropy control. Encopy is used to forward the first packet along the forwarding path. The Encopy comprises a first portion and a second portion, wherein the first portion is different from the second portion. The selected forwarding table entry includes an address of a second device, and the second device is a next-hop device of the first device.

The second device is configured to receive a first packet sent by the first device, determine that multiple forwarding entries for forwarding the first packet exist according to a destination address of the first packet, select a forwarding entry from the multiple forwarding entries according to the second part, and send the first packet to a third device, where the third device is a next hop device of the second device.

With reference to the fifth aspect, in a first possible implementation manner, the first part and the second part occupy different bits of the entry.

With reference to the fifth aspect, in a second possible implementation manner, the first device is further configured to determine an entry value of a BIER header of the first packet according to the number of multiple forwarding entries of the first device for forwarding the first packet and the number of multiple forwarding entries of the second device for forwarding the first packet.

With reference to the fifth aspect, in a first possible implementation manner, the first device is further configured to receive a second packet from a fourth device, and encapsulate a BIER header for the second packet to generate the first packet.

In a sixth aspect, the present application provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the method of the first aspect and each of the possible implementations described above.

In a seventh aspect, the present application provides another computer-readable storage medium having stored therein instructions, which, when executed on a computer, cause the computer to perform the method of the second aspect and each of the possible implementations.

In an eighth aspect, the present application provides a device comprising a network interface, a processor, a memory, and a bus connecting the network interface, the processor, and the memory. The memory is configured to store a program, instructions or code, and the processor is configured to execute the program, instructions or code in the memory to perform the method of the first aspect and each possible implementation manner.

In a ninth aspect, the present application provides a device comprising a network interface, a processor, a memory, and a bus connecting the network interface, the processor, and the memory. The memory is used for storing programs, instructions or codes, and the processor is used for executing the programs, instructions or codes in the memory to realize the method of the second aspect and each possible implementation mode.

Drawings

Fig. 1 is a schematic view of an application scenario for sending a packet according to an embodiment of the present invention.

Fig. 2 is a schematic diagram of another application scenario for sending a packet according to an embodiment of the present invention.

Fig. 3 is a schematic flowchart of a method for sending a packet according to an embodiment of the present invention.

Fig. 4 is a schematic flowchart of another method for sending a packet according to an embodiment of the present invention.

Fig. 5 is a device for sending a message according to an embodiment of the present invention.

Fig. 6 is a further apparatus for sending a message according to an embodiment of the present invention.

Fig. 7 is a further apparatus for sending a message according to an embodiment of the present invention.

Fig. 8 is a further apparatus for sending a message according to an embodiment of the present invention.

Fig. 9 is a system for sending a message according to an embodiment of the present invention.

Detailed Description

25页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种对拥塞控制算法的改进方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!