A message transmission method and apparatus

By determining the target control entry based on the device identification by the routing reflector and the first network device, the network resource consumption and client filtering strategy complexity problems caused by the large number of IBGP peer connections are solved, and network congestion reduction and business deployment simplification are achieved.

CN116158062BActive Publication Date: 2025-07-04HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202080105163.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-23
Publication Date
2025-07-04
Estimated Expiration
2040-09-23

AI Technical Summary

Technical Problem

In the autonomous domain, establishing connectivity between IBGP peers requires a large number of connections, resulting in high consumption of network resources and controller resources, and the client needs to configure complex routing filtering strategies, which increases maintenance difficulty.

Method used

The routing information is reflected to the client through the routing reflector. The first network device determines the target control entry based on the device identification in the message, and only sends the required control entry to the second network device, reducing network congestion and simplifying service deployment.

Benefits of technology

Reduces processing pressure on routing reflectors and clients, reduces network congestion, and simplifies the configuration and maintenance of clients' filtering policy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116158062B_ABST
    Figure CN116158062B_ABST
Patent Text Reader

Abstract

An embodiment of the present application discloses a message transmission method and apparatus. After obtaining one or more control entries, a first network device determines a target control entry to be sent to a second network device according to the device identifier of the second network device included in the first message to which each control entry belongs. The first network device sends at least one second message to the second network device, where the target control entry is located in at least one second message, and the second message includes the device identifier of the second network device. It can be seen that when the first network device forwards the control entry to the second network device, it determines the target control entry required by the second network device according to the device identifier of the second network device, and then only sends the target control entry to the second network device, reducing the pressure of the first network device to publish the control entry and reducing network congestion. At the same time, there is no need to deploy a filtering policy on the second network device, simplifying the service deployment work.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and particularly to a message transmission method and apparatus. Background Art

[0002] During data transmission, to ensure the connectivity between internal border gateway protocol (IBGP) peers, a full connection needs to be established between the IBGP peers. As Figure 1a shown, an autonomous system (AS) includes 4 routers. These 4 routers can form IBGP peers. To ensure the connectivity between the routers, 6 IBGP connections need to be established. When the AS includes more routers, the number of IBGP connections to be established is large, consuming a great deal of network resources and controller resources. To solve the above problems, a routing emission scheme is proposed. Specifically, within an AS, one of the routers is used as a route reflector (RR), and the other routers are used as clients to establish IBGP connections with the RR respectively. There is no need to establish IBGP connections between the clients. The RR transmits (reflects) routing information to each client. As Figure 1b shown, R0 is used as the RR, and IBGP connections are established between R0 and R1, R2, and R3 respectively. R1, R2, and R3 are used as clients of the RR.

[0003] However, during service deployment, although the RR sends all the obtained routing information to each client, each client actually only needs to process the routing information related to its service requirements, and discards the routing information without service requirements. Therefore, a routing filtering policy adapted to the local machine needs to be configured on each client so that the client can filter out unnecessary routing information according to the configured routing filtering policy. When there are hundreds or thousands of clients, on the one hand, the amount of routing information reflected by the RR will increase exponentially, requiring higher device processing capabilities of the RR and exacerbating network congestion; on the other hand, the workload of configuring routing filtering policies on the clients will also increase significantly, and different clients often need to configure different routing filtering policies, making the maintenance difficult. Summary of the Invention

[0004] In view of this, embodiments of this application provide a message transmission method and apparatus to reduce the amount of routing information reflected by the RR, reduce network congestion, and simplify service deployment.

[0005] To solve the above problems, the technical solutions provided by embodiments of this application are as follows:

[0006] In a first aspect, a message transmission method is provided. The method includes: a first network device obtains at least one control entry, where the at least one control entry is located in at least one first message, and each of the at least one first messages includes an identifier of a network device to which the first message is to be sent; the first network device determines a target control entry to be sent to a second network device according to the identifier of the second network device included in some or all of the at least one first messages, where the target control entry is one or more control entries among the at least one control entries; the first network device sends at least one second message to the second network device, the target control entry is located in the at least one second message, and each of the at least one second messages includes an identifier of the second network device. In this embodiment, before sending to the second network device after obtaining one or more control entries, the first network device can determine the target control entry to be sent to the second network device according to the identifier of the second network device in the first message where the control entry is located, and then send one or more second messages including the target control entry to the second network device, so that the second network device only obtains the control entries it needs. Therefore, it can not only reduce the pressure of the first network device to publish control entries and reduce network congestion. At the same time, there is no need to deploy a filtering policy on the second network device, simplifying the service deployment work.

[0007] In a possible implementation, the first network device is a route reflector device.

[0008] In a possible implementation, the second network device is a route reflector device, or the second network device is a client device. In this implementation, when there is a first-level route reflector device in the application scenario, the first network device is a route reflector device and the second network device is a client device; when there is a second-level route reflector device in the application scenario, the first network device is a first-level route reflector device and the second network device is a second-level route reflector device.

[0009] In a possible implementation, when the second network device is a route reflector device, the at least one second message further includes the device identifier of a third network device, and the device identifier of the third network device is used to instruct the second network device to determine, according to the device identifier of the third network device, the control entry destined for the third network device from the target control entries. In this implementation, when the second network device is a secondary route reflector device, it may have corresponding clients, that is, the third network device, and then the second message may further include the device identifier of the third network device. The second network device may determine the target control entry to be sent to the third network device according to the device identifier in the second message being the device identifier of the third network device, and further, the second network device may send only the target control entry required by the third network device.

[0010] In a possible implementation, when there is a corresponding third network device for the second network device, the second network device may receive a fifth message sent by the third network device, and the fifth message includes the device identifier of the third network device. The second network device may match the device identifier of the third network device in the fifth message with the device identifier of the third network device in one or more second messages to which the target control entry belongs, and determine, from the matching second messages, the target control entry to be sent to the third network device.

[0011] In a possible implementation, the at least one second message is a Border Gateway Protocol (BGP) message, and the device identifier of the second network device is respectively located in the extended community attributes of the at least one second message. In this implementation, the device identifier included in the first message or the second message may be located in the extended community attributes of the message, and the first network device may determine whether the device identifier included in the first message is the device identifier of the second network device by parsing the extended community attributes in the first message.

[0012] In a possible implementation, the device identifier of the second network device is a Router Identifier (Router-ID). In this implementation, the device identifier of the second network device may be a router identifier, which may specifically be the IP address or loopback address of the second network device.

[0013] In a possible implementation, the method further includes: before the first network device obtains the at least one control entry, the first network device receives a third message sent by the second network device, where the third message includes the device identifier of the second network device; the first network device determines a target control entry to be sent to the second network device according to the device identifier of the second network device included in some or all of the at least one first message, including: the first network device determines the target control entry to be sent to the second network device from the one or more first messages according to the device identifier of the second network device received from the third message matching the device identifier of the second network device in the one or more first messages. In this implementation, the second network device pre-sends a third message including its own device identifier to the first network device, so that the first network device can obtain the device identifier of the second network device. When the first network device determines the target control entry to be sent to the second network device, it can match the device identifier of the second network device obtained from the third message with the device identifier of the second network device in the first message, so as to determine the target control entry from the matching first message.

[0014] In a possible implementation, the control entry is a flow rule (flowspec), or a segment routing (SR) policy, or a route policy distribution (RPD).

[0015] In a possible implementation, the at least one control entry is obtained by the first network device from a controller or a server, or the at least one control entry is received by the first network device from a fourth network device, or the at least one control entry is locally configured by the first network device. In this implementation, when the first network device is a head node, it can obtain the control entry from a controller or a server, or it is locally configured; when the first network device is an intermediate node or a tail node, it can receive the control entry sent by the upper-level network device.

[0016] In a possible implementation, when the at least one control entry is received by the first network device from a fourth network device, the at least one control entry is determined by the fourth network device according to the device identifier of the first network device. When the first network device is an intermediate node or a tail node, the upper-level network device can determine the target control entry to be sent to the first network device according to the device identifier of the first network device, and then send the required target control entry to the first network device.

[0017] In a second aspect of the embodiments of the present application, a message transmission system is provided. The system includes: a first network device and a second network device; the first network device is configured to obtain at least one control entry, and the at least one control entry is located in at least one first message. Each of the at least one first messages includes the device identifier of the network device to which the first message needs to be sent; the first network device is further configured to determine, according to the device identifier included in some or all of the at least one first messages being the device identifier of the second network device, a target control entry to be sent to the second network device, where the target control entry is one or more control entries among the at least one control entries; the first network device is further configured to send at least one second message to the second network device, the target control entry is located in the at least one second message, and each of the at least one second messages includes the device identifier of the second network device; the second network device is configured to receive the at least one second message.

[0018] In a possible implementation manner, the system further includes: a third network device, and the device identifier of the third network device is further included in the at least one second message; the second network device is further configured to determine, according to the device identifier of the third network device, a control entry to be sent to the third network device from the target control entries, where the control entry is at least one or more control entries among the target control entries; the second network device is further configured to send at least one fourth message to the third network device, the control entry is located in the at least one fourth message, and each of the at least one fourth messages includes the device identifier of the third network device.

[0019] In a possible implementation manner, the second network device is further configured to send a third message to the first network device, and the third message includes the device identifier of the second network device.

[0020] In a possible implementation manner, the third network device is further configured to send a fifth message to the second network device, and the fifth message includes the device identifier of the third network device.

[0021] In the third aspect of the embodiments of the present application, a message transmission device is provided. The device includes: an acquisition unit configured to acquire at least one control entry, where the at least one control entry is located in at least one first message, and each of the at least one first message includes the device identifier of the network device to which the first message is to be sent; a determination unit configured to determine, according to the device identifier of the second network device included in some or all of the at least one first message, a target control entry to be sent to the second network device, where the target control entry is one or more control entries among the at least one control entry; and a sending unit configured to send at least one second message to the second network device, where the target control entry is located in the at least one second message, and each of the at least one second message includes the device identifier of the second network device.

[0022] In a possible implementation, the device is a route reflection device.

[0023] In a possible implementation, the second network device is a route reflection device, or the second network device is a client device.

[0024] In a possible implementation, when the second network device is a route reflection device, the at least one second message further includes the device identifier of a third network device, and the device identifier of the third network device is used to instruct the second network device to determine, according to the device identifier of the third network device, the control entry to be sent to the third network device from the target control entry.

[0025] In a possible implementation, the at least one second message is a Border Gateway Protocol (BGP) message, and the device identifier of the second network device is respectively located in the extended community attribute of the at least one second message.

[0026] In a possible implementation, the device identifier of the second network device is a Router Identifier (Router-ID).

[0027] In a possible implementation, the device further includes: a receiving unit, which is further configured to, before executing the acquisition unit, receive a third message sent by the second network device, where the third message includes the device identifier of the second network device; and the determination unit is specifically configured to determine, according to the device identifier of the second network device received from the third message being matched with the device identifier of the second network device in one or more of the first messages to which the target control entry belongs, the target control entry to be sent to the second network device from the one or more first messages.

[0028] In a possible implementation, the control entry is a flow rule (flowspec), or a segment routing (SR) policy, or a route policy distribution (RPD).

[0029] In a possible implementation, the at least one control entry is obtained by the device from a controller or a server, or the at least one control entry is received by the device from a fourth network device, or the at least one control entry is locally configured by the first network device.

[0030] In a possible implementation, when the at least one control entry is received by the device from a fourth network device, the at least one control entry is determined by the fourth network device according to the device identifier of the device.

[0031] In a fourth aspect of the embodiments of the present application, a communication device is provided, including: a processor and a memory; the memory is used to store computer-readable instructions or a computer program; the processor is used to read the computer-readable instructions or the computer program so that the communication device implements the message transmission method described in the first aspect.

[0032] In a fifth aspect of the embodiments of the present application, a computer-readable storage medium includes instructions or a computer program, which, when running on a computer, causes the computer to execute the message transmission method described in the above first aspect.

[0033] According to the technical solution provided by the embodiments of the present application, after obtaining one or more control entries, the first network device determines, according to the device identifier included in the first message to which each control entry belongs and which is the device identifier of the second network device, a target control entry to be sent to the second network device. The target control entry is used to instruct the second network device to perform local control, and the target control entry is one or more of the at least one control entry obtained. The first network device sends at least a second message to the second network device, where the target control entry is at least located in one second message and the second message includes the device identifier of the second network device. It can be seen that through the message transmission method provided by the embodiments of the present application, when the first network device forwards a control entry to the second network device, it can match the target control entry required by the second network device according to the device identifier of the second network device, and then only send the target control entry to the second network device, reducing the pressure of the first network device to publish control entries and reducing network congestion. At the same time, there is no need to deploy a filtering policy on the second network device, simplifying the service deployment work. Description of the Drawings

[0034] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0035] Figure 1a It is a schematic diagram of full connection in a BGP network architecture;

[0036] Figure 1b It is a schematic diagram of route reflection in a BGP network architecture;

[0037] Figure 2a It is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0038] Figure 2b It is another schematic diagram of an application scenario provided by an embodiment of the present application;

[0039] Figure 3 It is a message transmission flow chart provided by an embodiment of the present application;

[0040] Figure 4a It is a schematic diagram of the structure of an UPDATE message provided by an embodiment of the present application;

[0041] Figure 4b It is a schematic diagram of the structure of a device identifier provided by an embodiment of the present application;

[0042] Figure 5 It is another message transmission flow chart provided by an embodiment of the present application;

[0043] Figure 6 It is a structural diagram of a message transmission device provided by an embodiment of the present application;

[0044] Figure 7 It is a structural diagram of a message transmission system provided by an embodiment of the present application;

[0045] Figure 8 It is a structural diagram of a communication device provided by an embodiment of the present application;

[0046] Figure 9 It is another structural diagram of a communication device provided by an embodiment of the present application. Specific Embodiments

[0047] To enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all should fall within the scope of protection of the present invention.

[0048] Refer to Figure 2a A schematic diagram of an application scenario as shown. In this network system, an example is given with a first-level route reflector device included. Specifically, network device R0 is a route reflector device, and network devices R1 and R2 are clients corresponding to the route reflector device R0. For another example Figure 2b Another schematic diagram of an application scenario as shown. In this network system, an example is given with two-level route reflector devices included. Specifically, network device R0 is a first-level route reflector device, and network devices R1 and R2 are second-level route reflector devices. Among them, the next-level network devices connected to the first-level route reflector device R0 are network devices R1 and R2 that perform the RR role. Among them, R0, R1, and R2 are all network devices with RR reflection functions. In addition, R1 and R2 can also be called clients of R0 relative to R0. Since the second-level route reflector devices R1 and R2 are simultaneously clients of the first-level route reflector device R0, there is no need to establish a full connection between network devices R1 and R2. The next-level network devices connected to the second-level route reflector device R1 are network devices R3 and R4 that perform the client role, and the next-level network devices connected to the second-level route reflector device R2 are network devices R5 and R6 that perform the client role. Among them, R3 - R6 are clients, receiving the routes or policies reflected by RR, but they do not have the route reflection function themselves. In a possible situation, R3 and R4 are peers to each other, and R5 and R6 are peers to each other.

[0049] Among them, each network device can also be called a node, which is a device with packet forwarding function in the network system. For example, it can be a router, a switch, a repeater, or a label switching router (LSR), etc. In Figure 2a In the application scenario as shown, there are two transmission paths, namely R0 - R1 and R0 - R2. Among them, R0 is the head node, and R1 or R2 is the tail node. In Figure 2b In the application scenario as shown, there are multiple transmission paths, including R0 - R1 - R3, R0 - R1 - R4, R0 - R2 - R5, and R0 - R2 - R6. In this embodiment, R0 is the head node 201, R1 and R2 are intermediate nodes 202, and R3, R4, R5, and R6 are tail nodes.

[0050] Among them, the head node, in one case, can be the node that generates the first message, that is, the node indicated by the source address in the first message. In this case, the head node is the first node on the end-to-end transmission path of the message. In another case, it can be the node connected to the server or controller, and obtains the first message from the server or controller.

[0051] The tail node, in one case, can be the node indicated by the destination address in the first message; in another case, it is the node connected to the node indicated by the destination address; in another case, it can also be the last node on the end-to-end transmission path that needs to perform local control according to the control entry in the first message.

[0052] The intermediate node is one or more forwarding nodes passed between the head node and the tail node during message forwarding.

[0053] For ease of understanding, the following will be described by taking Figure 2b the network system structure shown as an example. Refer to Figure 3 , this figure is a flowchart of a message transmission method provided by an embodiment of the present application. The roles of the head node 201, intermediate node 202, and tail node 203 named in the following embodiments are mainly used to distinguish different functions that different network devices can perform in the message forwarding path, and the positions of different network devices in the network topology can be specifically determined in combination with different service scenarios. As Figure 3 shown, the method may include:

[0054] S301: The head node 201 obtains at least one first message.

[0055] In this embodiment, the head node 201 first obtains at least one first message including one or more control entries. That is, the head node 201 can obtain one or more first messages, and each first message can include one or more control entries. Among them, each first message respectively includes the device identifier of the network device to which the first message needs to be sent. The device identifier of the network device can be a router identifier (router-id), and the router identifier can be the Internet protocol (IP) address or loopback address of the network device, or the device identifier is the identification (ID) of the network device, etc. For example, still taking Figure 2bFor example, the head node 201 is the network device R0, and the intermediate nodes 202 are the network device R1 and the network device R2 respectively. Among them, the router identifier of the network device R1 is 1.1.1.1, and the router identifier of the network device R2 is 2.2.2.2. If the first packet includes the routing identifier 1.1.1.1, it indicates that one or more control entries in the first packet are sent to the network device R1. If the first packet includes the routing identifier 2.2.2.2, it indicates that one or more control entries in the first packet can be sent to the network device R2. Among them, the control entry is used to instruct the network device receiving the control entry to perform local control, and the control entry can be a flow specification (flowspec), a segment routing (SR) policy, or a route policy distribution (RPD), etc.

[0056] Taking the above example where the head node 201 is Figure 2b R0 in it as an example, in other possible situations, the head node can also be Figure 2b R1 or R2 in it.

[0057] The head node 201 obtains at least one first packet in the following ways. One way is that the head node 201 can obtain at least one first packet from the controller or server to which it is connected, that is, the controller or server generates at least one first packet, and the first network device can receive at least one first packet sent by the controller or server. Another way is that the head node 201 is based on the local configuration. Specifically, the head node 201 can obtain it from the local configuration information, and the local configuration information can be, for example, manually configured by the user in the head node 201 according to the actual service requirements as needed.

[0058] Among them, the first packet can be a border gateway protocol (BGP) packet. Specifically, the first packet can be an update (UPDATE) packet in the BGP packet, and the update packet at least includes: a device identifier field and a control entry field. As Figure 4aSchematic diagram of the structure of an update message. The update message may include not only a device identifier field and a control entry field, but also a reserved field, etc. Among them, the reserved field may carry other attribute fields. In some possible scenarios, the other attribute fields may be used to refine the screening of control entries. For example, the head node 201 uses the device identifier field and the other attribute fields to jointly determine a first message including multiple control entries that should be sent to a certain device. The device identifier included in the device identifier field of the determined first message matches the device identifier concerned by the head node 201, and the attribute included in the other attribute field of the determined first message matches the attribute concerned by the head node 201.. The device identifier included in the first message may be located in the extended community attribute of the first message, and the device identifier is indicated by the type-length-value (TLV) in the extended community attribute. Among them, the Type field is used to indicate the extended community attribute type, the Length field is used to indicate the number of bytes included in the "Value" field, such as 8 bytes (Byte), and the Value field is used to indicate the device identifier, such as Figure 4b shown. As a possible implementation, when the extended community attribute in the first message is an extended community attribute based on an IP address, the Value field includes a Global Administrator information field, and the Global Administrator carries the device identifier. When the first message includes multiple device identifiers, the Value field may include multiple Global Administrators, and each Global Administrator carries a device identifier.

[0059] The above carrying method is only a possible example. In other possible application scenarios or design methods, one or more device identifiers carried in the first message may also be located in other possible types of messages, or in other possible fields of the message. Even different device identifiers may be located in different types of fields, as long as the device on the receiving side of the first message can recognize and understand them, so that the receiving-side device can match through the corresponding device identifier to determine the target control entry to be forwarded.

[0060] S302: The head node 201 determines the target control entry to be sent to the intermediate node 202 according to the device identifier included in some or all of the at least one first message, which is the device identifier of the intermediate node 202.

[0061] When the head node 201 sends a control entry to the intermediate node 202, to ensure that the sent control entry is the one required by the intermediate node 202 and to reduce the sending pressure of the head node 201, the head node 201 can determine the target control entry to be sent to the intermediate node 202 according to the device identifier included in some or all of at least one first message, where the device identifier is the device identifier of the intermediate node 202. That is, the head node 201 determines, from the control entries included in each obtained first message, the target control entry to be sent to the intermediate node 202, and the first message to which the target control entry belongs includes the device identifier of the intermediate node 202. For example, if the device identifier of the intermediate node 202 is 1.1.1.1 and the head node 201 obtains 100 first messages, and the device identifiers included in 20 of the first messages are 1.1.1.1, then the head node 201 can determine all the control entries included in these 20 first messages as the target control entries. Among them, the intermediate node 202 can be Figure 2b R1 or R2 in

[0062] In practical applications, the head node 201 can receive a third message sent by the intermediate node 202. The third message includes the device identifier of the intermediate node 202, so as to announce the device identifier corresponding to itself to the head node 201 through the third message. The head node 201 can match the device identifier of the intermediate node 202 received from the third message with the first message including the device identifier of the intermediate node 202, and determine the target control entry to be sent to the intermediate node 202 from the matched first message, and then obtain a second message according to the target control entry. In one case, the third message may further include other attribute fields. When the head node 201 determines the target control entry to be sent to the intermediate node 202, it can match the device identifier of the intermediate node 202 received from the third message and other attributes with the first message including the device identifier of the intermediate node 202 and the attribute fields, and determine the target control entry to be sent to the intermediate node 202 from the matched first message. That is, when the head node 201 determines a matched first message according to the device identifier of the intermediate node 202, it can determine all the control entries included in the matched first message as the target control entry. Or, after the head node 201 determines a matched first message according to the device identifier of the intermediate node 202, it can further determine a first message that meets the other attributes from the matched first message according to the other attributes, and determine the control entries included in the first message that meets the other attributes as the target control entry. The target control entry may be composed of one or more control entries, and may be distributed in one first message or in multiple first messages. For example, if the head node 201 determines 20 matched first messages from 100 obtained first messages according to the device identifier of the intermediate node 202, and then the head node 201 further determines 5 first messages that include the other attributes from the 20 first messages according to the other attributes, then the control entries in the 5 first messages are used as the target control entry.

[0063] After the head node 201 determines the target control entry according to at least one first message, it obtains at least one second message according to the target control entry. The at least one second message is the message determined by the head node 201 for carrying the target control entry. The methods for obtaining the at least one second message include at least the following cases.

[0064] In one case, the head node 201 can use the first message matched by the device identifier of the intermediate node 202 as the second message. That is, all the control entries in each of the above-mentioned matched first messages are determined as the target control entry. For example, the head node 201 obtains a total of 50 first messages, and 20 of the first messages include the device identifier of the intermediate node 202. Then the 20 first messages are the matched first messages, and the head node 201 uses the matched first messages as the second messages, thereby determining 20 second messages.

[0065] Another situation is that the head node 201 first determines, according to the device identifier of the intermediate node 202, that the device identifier included in some or all of the first messages is the device identifier of the intermediate node 202, and determines the control entries in some or all of the first messages that match the device identifier of the intermediate node 202 as the target control entries to be sent to the intermediate node 202, and repackages the target control entries to obtain at least one second message. For example, if the head node 201 determines 50 target control entries from one of the first messages (including 100 control entries) according to the device identifier of the intermediate node 202, then the head node 202 repackages the 50 target control entries again to obtain at least one second message.

[0066] Still another situation is that the head node 201 first determines, according to the device identifier of the intermediate node 202, that the device identifier included in some or all of the first messages is the device identifier of the intermediate node 202, and determines the target control entries to be sent to the intermediate node 202. Then, the head node 201 generates at least one second message according to the target control entries and the control entries that need to be sent to the intermediate node 202 and are stored locally before obtaining at least one first message.

[0067] S303: The head node 201 sends at least one second message to the intermediate node 202.

[0068] After the head node 201 determines the target control entries to be sent to the intermediate node 202 according to the device identifier of the intermediate node 202, it can obtain at least one second message according to the target control entries and send the at least one second message to the intermediate node 202. Among them, the target control entries determined by the head node 201 through S302 can be located in at least one second message, and each second message includes the device identifier of the intermediate node 202. Among them, the second message can be a Border Gateway Protocol (BGP) message, and the device identifier included in the second message can be located in the extended community attribute of the second message. The specific manifestation form can be defined by adding a Type-Length-Value (TLV) in the extended community attribute. For example Figure 4b as shown. For the format of the second message and the encapsulation format of the device identifier in the second message, reference can be made to the relevant description of the first message in S301.

[0069] S304: The intermediate node 202 determines the target control entries to be sent to the tail node 203 according to the device identifier of the tail node 203 included in some or all of the at least one second messages.

[0070] In this embodiment, after receiving at least one second message sent by the head node 201, the intermediate node 202 may determine a target control entry to be sent to the tail node 203 according to the device identifier of the tail node 203 included in some or all of the at least one second message. The device identifier of the tail node 203 may also be included in the second message sent by the head node 201 to the intermediate node 202. For example, if the device identifier of the intermediate node 202 is 1.1.1.1 and the device identifier of the tail node 203 is 3.3.3.3, the second message sent by the head node 201 may include not only the device identifier 1.1.1.1 but also the device identifier 3.3.3.3. The device identifier 1.1.1.1 is used to indicate that the at least one second message is a message destined for the intermediate node 202, and the intermediate node 202 may receive and save the at least one second message; the device identifier 3.3.3.3 can be used to indicate that the intermediate node 202 determines, according to this device identifier, a target control entry that needs to be sent to the tail node 203 from the at least one second message, and the tail node 203 is the network device with the device identifier 3.3.3.3. As an example, as Figure 2b shown, when the intermediate node 202 is R1, the tail node 203 may be R3 or R4, or when the intermediate node 202 is R2, the tail node 203 may be R5 or R6. In a possible implementation, in addition to the device identifier 1.1.1.1, the first message obtained by the head node 201 also includes the device identifier 3.3.3.3. Thus, when the head node 201 sends at least a second message including the target control entry to the intermediate node 202, the device identifier 3.3.3.3 is still carried.

[0071] In practical applications, before the intermediate node 202 determines the target control entry to be sent to the tail node 203, the intermediate node 202 may receive a fifth message sent by the tail node 203. The fifth message includes the device identifier of the tail node 203, so as to notify the intermediate node 202 of the device identifier corresponding to itself through the fifth message. In this way, when the intermediate node 202 receives at least one second message from the head node 201, the intermediate node 202 can match the device identifier of the tail node 203 received from the fifth message with the second message including the device identifier of the tail node 203, determine the target control entry to be sent to the tail node 203 from the matching second message, and obtain at least one fourth message including the target control entry to be sent to the tail node 203. In one case, the fifth message may further include other attribute fields. When determining the target control entry to be sent to the tail node 203, the intermediate node 202 may match the device identifier of the tail node 203 received from the fifth message and other attributes with the second message including the device identifier of the tail node 203 and the attribute field, and determine the target control entry to be sent to the tail node 203 from the matching second message. Among them, for the specific implementation of the intermediate node 202 determining the target control entry to be sent to the tail node 203 and obtaining the fourth message according to the target control entry, reference may be made to the relevant description of the second message acquisition method in S302.

[0072] S305: The intermediate node 202 sends at least one fourth message to the tail node 203.

[0073] After the intermediate node 202 determines the target control entry to be sent to the tail node 203 according to the device identifier of the tail node 203, at least one fourth message is generated according to the target control entry, and the at least one fourth message is sent to the tail node 203. The target control entry determined by the intermediate node 202 through S304 may be located in at least one fourth message, and each fourth message includes the device identifier of the tail node 203. Among them, the fourth message may be a Border Gateway Protocol (BGP) message. For the format of the fourth message and the encapsulation format of the device identifier of the tail node 203 in the fourth message, reference may be made to the relevant description of the first message in S301.

[0074] In this embodiment, after receiving the fourth message, the tail node 203 may perform different processes in different application scenarios. Specifically, the following operations may be included:

[0075] In one case, the tail node 203 stops forwarding after receiving the fourth message. For example, when the tail node 203 is a network device connected to a user device, in this case, the tail node 203 can only receive the fourth message and perform local control according to the target control entry in the fourth message. For example, when the target control entry is a flow rule, the tail node 203 can select a path according to the flow rule to adjust the transmission path of service traffic; or when the target control entry is a segment routing policy, the tail node 203 can obtain a segment list of a specified path according to the segment routing policy to forward subsequent received service traffic through the segment list; or when the target control entry is a routing policy distribution, the tail node can change its own routing processing behavior according to the routing policy distribution. In the above case, the tail node 203 can stop forwarding the fourth message.

[0076] In another case, when there is a peer node for the tail node 203, when the tail node 203 receives the fourth message sent by the intermediate node 202, it can forward the fourth message to the peer node. The peer node can determine the required control entry from the fourth message according to the local policy. It can be understood that the above cases are only examples, and the processing operations performed by the tail node 204 on the message can be determined in combination with specific application scenarios.

[0077] This embodiment takes Figure 2b the network system shown as an example for illustration. When the actual application scenario is Figure 2a the network system architecture shown, after obtaining at least one first message, the head node determines the target control entry to be sent to the tail node according to the device identifier of the device whose device identifier is the tail node included in some or all of the at least one first message, and sends at least one second message to the tail node. Among them, the target control entry is located in at least one second message, and the second message includes the device identifier of the tail node. That is, when there is no intermediate forwarding node between the head node and the tail node, the head node directly determines the target control entry to be sent to the tail node according to the device identifier of the tail node. For the specific implementation, reference can be made to the relevant descriptions in S301-S305. Or, in a possible case, the intermediate node 202 may not support the routing filtering function, then the intermediate node 202 may also not execute S304 and S305, but directly send at least one second message received from the head node 201 to the tail node 203, and then the tail node 203 determines the required control entry according to the local policy. Or, the method provided in this embodiment can also be applied to a possible network system architecture, such as a network system including more than three levels of RR, where each level of RR can use the corresponding method provided in this embodiment to determine the route to be sent to the next-level network device, and the next-level network device can be, for example, an RR with a route reflection function or a client without a route reflection function.

[0078] To facilitate understanding of the technical solution provided by the embodiments of the present application, refer to Figure 5 , which is a flowchart of another message transmission method provided by the embodiments of the present application. As Figure 5 shown, the method may include:

[0079] S501: The first network device obtains at least one control entry, and the at least one control entry is located in at least one first message.

[0080] In this embodiment, the first network device may be the head node 201 or the intermediate node 202 described in the foregoing embodiment.

[0081] When the first network device is the head node 201, the first network device may obtain at least one control entry. Specifically, the first network device may obtain it according to local configuration information, or obtain it from a controller or a server. Among them, for the specific implementation of the first network device obtaining at least one control entry, refer to S301.

[0082] When the first network device is the intermediate node 202, the first network device determines at least one control entry from the messages received from the fourth network device, which is the upper-level network device. As a possible situation, the upper-level network device may be, for example, the head node 201. Specifically, the fourth network device may determine at least one control entry to be sent to the first network device from the messages it obtains according to the device identifier of the first network device, and send the at least one control entry to the first network device. Among them, the first network device may be a route reflection device. For the specific implementation of the fourth network device determining at least one control entry to be sent to the first network device according to the device identifier of the first network device, refer to S302 or S304.

[0083] Among them, each first message includes the device identifier of the network device to which the first message needs to be sent, and the device identifier may be a router identifier. The control entry may be a flow rule (flowspec), or a segment routing (SR) policy, or a route policy distribution (RPD), etc. Among them, for the format of the first message and the format of the encapsulated device identifier, refer to S301.

[0084] S502: The first network device determines the target control entry to be sent to the second network device according to the device identifier included in some or all of the at least one first message, which is the device identifier of the second network device.

[0085] In this embodiment, the first network device may determine, from at least one first packet obtained, that the device identifier included in some or all of the first packets is the device identifier of the second network device, so as to determine the target control entry to be sent to the second network device. In a specific implementation manner, before the first network device determines the target control entry to be sent to the second network device, the first network device may receive a third packet sent by the second network device, and the third packet includes the device identifier of the second network device; the first network device determines, according to the device identifier of the second network device received from the third packet being matched with the device identifier of the second network device in one or more first packets to which the target control entry belongs, the target control entry to be sent to the second network device from the one or more first packets. Among them, for the specific implementation of how the first network device determines the target control entry to be sent to the second network device, reference may be made to S302 or S304.

[0086] S503: The first network device sends at least one second packet to the second network device, and the target control entry is located in the at least one second packet.

[0087] After the first network device determines the target control entry to be sent to the second network device, it may obtain at least one second packet according to the target control entry, so as to send the at least one second packet to the second network device. Among them, each second packet includes the device identifier of the second network device, and the device identifier of the second network device is the router identifier Router-ID. Among them, for the specific implementation of how the first network device obtains at least one second packet, reference may be made to S302.

[0088] In a specific implementation manner, the second packet may be a Border Gateway Protocol (BGP) packet, and the device identifier of the second network device may be located in the extended community attribute of the second packet. Specifically, the second packet may be an UPDATE packet in the BGP packet. For the format of the UPDATE packet and the encapsulation format of the device identifier, reference may be made to the relevant description in S301.

[0089] In a specific implementation manner, the first network device may be a route reflector device. In this case, the second network device may be a client device, such as Figure 2a shown as R1 or R2. Or, the second network device is a next-level route reflector device, such as Figure 2b R1 or R2 in Figure 2bIf it is R3, R4, or R5, R6 among them, then at least one second message further includes the device identifier of a third network device, and the device identifier of the third network device is used to instruct the second network device to determine, according to the device identifier of the third network device, the control entry sent to the third network device from the target control entries. Among them, for the implementation of the second network device to determine the control entry sent to the third network device, reference can be made to S302 or S304.

[0090] When there is a corresponding third network device for the second network device, before the second network device determines the target control entry to be sent to the third network device, the second network device may receive a fifth message sent by the third network device, and the fifth message includes the device identifier of the third network device. The device identifier of the third network device received by the second network device from the fifth message matches the device identifier of the third network device in the second message, and the second network device determines the target control entry to be sent to the third network device from one or more second messages. For the specific implementation, reference can be made to S304.

[0091] Specifically, when the second network device is a tail node, such as R3, R4, R5, or R6 in FIG. 2, the specific operations after it receives the second message can be referred to the relevant description of S305, and this embodiment will not elaborate here.

[0092] Based on the above method embodiments, an embodiment of the present application further provides a message transmission system, see Figure 6 As shown in the structural diagram of a message transmission system, the system may include a first network device 601 and a second network device 602.

[0093] The first network device 601 is configured to obtain at least one control entry, and the at least one control entry is located in at least one first message, and each of the at least one first message includes the device identifier of the network device to which the first message is to be sent. Among them, for the implementation of the first network device, reference can be made to S301 or S501.

[0094] The first network device 601 is further configured to determine, according to the device identifier in some or all of the at least one first message being the device identifier of the second network device, the target control entry to be sent to the second network device, and the target control entry is one or more control entries among the at least one control entry. Among them, for the implementation of the first network device, reference can be made to S302, S304, or S502.

[0095] The first network device 601 is further configured to send at least one second message to the second network device, the target control entry is located in the at least one second message, and each of the at least one second message includes the device identifier of the second network device. For the specific implementation of the first network device, reference can be made to S303, S305, or S503.

[0096] The second network device 602 is configured to receive the at least one second message.

[0097] In a possible implementation, the system further includes: a third network device 603, and the device identifier of the third network device is further included in the at least one second message; the second network device 602 is further configured to determine, according to the device identifier of the third network device, a control entry to be sent to the third network device from the target control entries, where the control entry is at least one or more control entries in the target control entries. For the implementation of the third network device 603, reference may be made to S304 or S503.

[0098] The second network device 602 is further configured to send at least one fourth message to the third network device, where the control entry is located in the at least one fourth message, and the at least one fourth message respectively includes the device identifier of the third network device. Among them, for the implementation of the second network device 602, reference may be made to S305 or S503.

[0099] In a possible implementation, the second network device 602 is further configured to send a third message to the first network device, where the third message includes the device identifier of the second network device. Among them, for the implementation of the second network device 602, reference may be made to S302 or S502.

[0100] In a possible implementation, the third network device 603 is further configured to send a fifth message to the second network device, where the fifth message includes the device identifier of the third network device. Among them, for the implementation of the third network device 603, reference may be made to S304 or S503.

[0101] In addition, an embodiment of the present application further provides a message transmission device, which will be described below with reference to the accompanying drawings.

[0102] See Figure 7 , which is a schematic structural diagram of a message transmission device provided by an embodiment of the present application. This device can be applied to a first network device and execute Figure 5 the functions of the first network device in the embodiment shown. The device 700 may include an obtaining unit 701, a determining unit 702, and a sending unit 703.

[0103] The obtaining unit 701 is configured to obtain at least one control entry, where the at least one control entry is located in at least one first message, and the at least one first message respectively includes the device identifier of the network device to which the first message is to be sent.

[0104] When the first network device to which the apparatus 700 is applied is the head node 201, for the specific implementation of the obtaining unit 701 to obtain the control entry, reference may be made to Figure 3 S301 in the foregoing embodiment. When the first network device to which the apparatus 700 is applied is the intermediate node 202 or the tail node 203, for the specific implementation of the obtaining unit 601 to obtain the control entry, reference may be made to S303 or S305.

[0105] A determining unit 702, configured to determine, according to the device identifier of the second network device included in some or all of the at least one first packet, a target control entry to be sent to the second network device, where the target control entry is one or more control entries among the at least one control entry.

[0106] Among them, for the specific implementation of the determining unit 703, reference may be made to S302 or S304.

[0107] A sending unit 703, configured to send at least one second packet to the second network device, where the target control entry is located in the at least one second packet, and each of the at least one second packets includes the device identifier of the second network device.

[0108] Among them, for the specific implementation of the sending unit 703, reference may be made to S303 or S305.

[0109] In a possible implementation manner, the apparatus is a route reflector device. Among them, the network device to which the apparatus 700 is applied may be a route reflector device, such as the head node 201 or the intermediate node 202.

[0110] In a possible implementation manner, the second network device is a route reflector device, or the second network device is a client device.

[0111] When the first network device to which the apparatus 700 is applied is a route reflector device, the second network device may be a route reflector device. For example, when the first network device is the head node 201 and the second network device is the intermediate node 202. Or the second network device is a client device. For example, when the first network device is the intermediate node 202 and the second network device is the tail node 203.

[0112] In a possible implementation manner, when the second network device is a route reflector device, the at least one second packet further includes the device identifier of a third network device, and the device identifier of the third network device is used to instruct the second network device to determine, according to the device identifier of the third network device, the control entry sent to the third network device from the target control entry.

[0113] In a possible implementation, the at least one second message is a BGP message, and the device identifiers of the second network device are respectively located in the extended community attributes of the at least one second message. For the format of the BGP protocol message and the encapsulation format of the device identifier, refer to S301.

[0114] In a possible implementation, the device identifier of the second network device is a router identifier.

[0115] In a possible implementation, the apparatus further includes: a receiving unit ( Figure 7 not shown in the figure),

[0116] The receiving unit is further configured to receive a third message sent by the second network device before executing the obtaining unit, where the third message includes the device identifier of the second network device; the determining unit is specifically configured to determine, according to the device identifier of the second network device received from the third message and the device identifier of the second network device in one or more of the first messages to which the target control entry belongs, the target control entry to be sent to the second network device from the one or more first messages.

[0117] Wherein, for the specific implementation of the receiving unit and the determining unit, refer to S302.

[0118] In a possible implementation, the control entry is a flowspec, or an SR policy, or an RPD.

[0119] In a possible implementation, the at least one control entry is obtained by the apparatus from a controller or a server, or the at least one control entry is received by the apparatus from a fourth network device, or the at least one control entry is locally configured by the first network device. Wherein, for the specific implementation of obtaining the control entry, refer to S301.

[0120] In a possible implementation, when the at least one control entry is received by the apparatus from a fourth network device, the at least one control entry is determined by the fourth network device according to the device identifier of the apparatus. Wherein, for the implementation of the network device to which the apparatus 700 is applied to receive the control entry from the fourth network device, refer to S301.

[0121] For the specific functions and implementations that the message transmission apparatus 700 can perform, refer to Figure 5 the corresponding description of the first network device in the shown embodiments, which will not be elaborated here.

[0122] Figure 8A schematic structural diagram of a communication device provided by an embodiment of the present application. The communication device may be, for example, Figure 3 the head node 201, the intermediate node 202, or the tail node 203 in the illustrated embodiment, or may also be Figure 5 the first network device, the second network device, or the third network device in the illustrated embodiment, or may also be Figure 7 the device implementation of the message transmission device 700 in the illustrated embodiment.

[0123] Please refer to Figure 8 As shown, the communication device 800 includes at least a processor 810. The communication device 800 may further include a communication interface 820 and a memory 830. The number of processors 810 in the communication device 800 may be one or more, Figure 8 and one processor is taken as an example herein. In the embodiment of the present application, the processor 810, the communication interface 820, and the memory 830 may be connected through a bus system or other means. Among them, Figure 8 connection through the bus system 840 is taken as an example herein.

[0124] The processor 810 may be a CPU, an NP, or a combination of a CPU and an NP. The processor 810 may further include a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0125] When the communication device includes the head node 201, the processor 810 may execute related functions such as obtaining at least one control entry and determining a target control entry in the above method embodiments. When the communication device is the intermediate node 202 or the tail node 203, the processor 810 may execute related functions such as determining a target control entry according to the device identifier in the above method examples.

[0126] The communication interface 820 is used for receiving and sending messages. Specifically, the communication interface 820 may include a receiving interface and a sending interface. Among them, the receiving interface may be used for receiving messages, and the sending interface may be used for sending messages. The number of communication interfaces 820 may be one or more.

[0127] The memory 830 may include volatile memory, such as random-access memory (RAM); the memory 830 may also include non-volatile memory, such as flash memory, hard disk drive (HDD), or solid-state drive (SSD); the memory 830 may further include a combination of the above types of memory. The memory 830 may store, for example, the correspondence between the aforementioned identification information and tunnels.

[0128] Optionally, the memory 830 stores an operating system and programs, executable modules, or data structures, or subsets thereof, or extended sets thereof, where the programs may include various operation instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and handling hardware-based tasks. The processor 810 may read the programs in the memory 830 to implement the message transmission method provided by the embodiments of the present application.

[0129] Among them, the memory 830 may be a storage device in the communication device 800 or a storage device independent of the communication device 800.

[0130] The bus system 840 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus system 840 may be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 8 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0131] Figure 9 is a schematic structural diagram of another communication device 900 provided by the embodiments of the present application. The communication device 900 may be configured as the head node 201, the intermediate node 202, or the tail node 203 in the foregoing embodiments, or may also be the first network device, the second network device, or the third network device in the foregoing embodiments, or Figure 7 the device implementation of the message transmission device 700 in the illustrated embodiment.

[0132] The communication device 900 includes: a main control board 910 and an interface board 930.

[0133] The main control board 910 is also known as the main processing unit (MPU) or the route processor card. The main control board 910 controls and manages each component in the network device 900, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 910 includes: a central processing unit 911 and a memory 912.

[0134] The interface board 930 is also known as the line processing unit (LPU), line card, or service board. The interface board 930 is used to provide various service interfaces and implement packet forwarding. The service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, etc. The Ethernet interface is, for example, a Flexible Ethernet Clients (FlexE Clients). The interface board 930 includes: a central processing unit 931, a network processor 932, a forwarding table entry memory 934, and a physical interface card (PIC) 933.

[0135] The central processing unit 931 on the interface board 930 is used to control and manage the interface board 930 and communicate with the central processing unit 911 on the main control board 910.

[0136] The network processor 932 is used to implement packet forwarding processing. The form of the network processor 932 can be a forwarding chip. Specifically, the processing of upstream packets includes: processing of the packet input interface, forwarding table lookup; processing of downstream packets: forwarding table lookup, etc.

[0137] The physical interface card 933 is used to implement the docking function at the physical layer. The original traffic enters the interface board 930 from here, and the processed packets are sent out from the physical interface card 933. The physical interface card 933 includes at least one physical interface. The physical interface is also called a physical port. The physical interface card 933 corresponds to the FlexE physical interface 204 in the system architecture 200. The physical interface card 933 is also called a daughter card and can be installed on the interface board 930. It is responsible for converting optical and electrical signals into packets, performing a legality check on the packets, and then forwarding them to the network processor 932 for processing. In some embodiments, the central processing unit 931 of the interface board 903 can also execute the function of the network processor 932, such as implementing software forwarding based on a general CPU, so that the network processor 932 is not required in the physical interface card 933.

[0138] Optionally, the communication device 900 includes a plurality of interface boards. For example, the communication device 900 further includes an interface board 940, and the interface board 940 includes: a central processing unit 941, a network processor 942, a forwarding table entry memory 944, and a physical interface card 943.

[0139] Optionally, the communication device 900 further includes a switching fabric board 920. The switching fabric board 920 can also be referred to as a switch fabric unit (SFU). In the case where the network device has a plurality of interface boards 930, the switching fabric board 920 is used to complete data exchange between the interface boards. For example, communication can be performed between the interface board 930 and the interface board 940 through the switching fabric board 920.

[0140] The main control board 910 is coupled to the interface board 930. For example, the main control board 910, the interface board 930, the interface board 940, and the switching fabric board 920 are interconnected through a system bus and a system backplane. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 910 and the interface board 930, and communication is performed between the main control board 910 and the interface board 930 through the IPC channel.

[0141] Logically, the communication device 900 includes a control plane and a forwarding plane. The control plane includes the main control board 910 and the central processing unit 931, and the forwarding plane includes various components that perform forwarding, such as a forwarding table entry memory 934, a physical interface card 933, and a network processor 932. The control plane performs functions such as acting as a router, generating a forwarding table, processing signaling and protocol packets, and configuring and maintaining the status of the device. The control plane distributes the generated forwarding table to the forwarding plane. In the forwarding plane, the network processor 932 performs table lookup and forwarding of the packets received by the physical interface card 933 based on the forwarding table distributed by the control plane. The forwarding table distributed by the control plane can be stored in the forwarding table entry memory 934. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.

[0142] If the communication device 900 is configured as a first network device, the central processing unit 911 can obtain control entries; determine target control entries according to the device identifier of the second network device. The network processor 932 can trigger the physical interface card 933 to send a second packet including the target control entries to the second network device.

[0143] If the communication device 900 is configured as a second network device, the central processing unit 911 can determine a second tunnel according to the identification information in the packet. The network processor 932 can trigger the physical interface card 933 to determine target control entries according to the device identifier of the determined third network device, and send a packet including the target control entries to the third network device.

[0144] It should be understood that the sending unit 703 in the message transmission device 700 etc. may be equivalent to the physical interface card 933 or the physical interface card 943 in the communication device 900; the obtaining unit 701 and the determining unit 702 in the message transmission device 700 etc. may be equivalent to the central processing unit 911 or the central processing unit 931 in the communication device 900.

[0145] It should be understood that the operations on the interface board 940 in the embodiments of the present application are the same as those on the interface board 930. For the sake of brevity, they will not be elaborated here. It should be understood that the communication device 900 in this embodiment may correspond to the first network device or the second network device in the above-mentioned various method embodiments. The main control board 910, the interface board 930 and / or the interface board 940 in the communication device 900 may implement the functions and / or various steps performed by the first network device or the second network device in the above-mentioned various method embodiments. For the sake of brevity, they will not be elaborated here.

[0146] It should be understood that there may be one or more main control boards. When there are multiple main control boards, they may include an active main control board and a standby main control board. There may be one or more interface boards. The stronger the data processing capacity of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching fabric board, or there may be one or more switching fabric boards. When there are multiple switching fabric boards, they can jointly implement load sharing and redundancy backup. In the centralized forwarding architecture, the network device may not require a switching fabric board, and the interface board undertakes the processing function of the service data of the entire system. In the distributed forwarding architecture, the network device may have at least one switching fabric board, and data exchange between multiple interface boards is realized through the switching fabric board, providing a large-capacity data exchange and processing capacity. Therefore, the data access and processing capacity of the network device in the distributed architecture is greater than that of the device in the centralized architecture. Optionally, the form of the network device may also be a single board card, that is, there is no switching fabric board, and the functions of the interface board and the main control board are integrated on this single board card. At this time, the central processing unit on the interface board and the central processing unit on the main control board can be combined into one central processing unit on this single board card to execute the functions after their superposition. The data exchange and processing capacity of this form of device is relatively low (for example, network devices such as low-end switches or routers). Which architecture is specifically adopted depends on the specific networking deployment scenario.

[0147] In some possible embodiments, the above-mentioned first network device or second network device may be implemented as a virtualized device. For example, the virtualized device may be a virtual machine (VM) running a program for sending packets, and the virtual machine is deployed on a hardware device (e.g., a physical server). A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. The virtual machine can be configured as the first network device or the second network device. For example, the first network device or the second network device can be implemented based on a general physical server combined with network function virtualization (NFV) technology. The first network device or the second network device is a virtual host, a virtual router, or a virtual switch. Those skilled in the art can virtualize the first network device or the second network device with the above functions on a general physical server by reading this application, and details are not described herein again.

[0148] It should be understood that the network devices in the above various product forms respectively have any functions of the first network device or the second network device in the above method embodiments, and details are not described herein again.

[0149] The embodiment of the present application also provides a chip, including a processor and an interface circuit. The interface circuit is used to receive instructions and transmit them to the processor; the processor may be, for example Figure 7 A specific implementation form of the packet transmission device 700 shown can be used to execute the above-mentioned packet transmission method. Among them, the processor is coupled to the memory, and the memory is used to store programs or instructions. When the programs or instructions are executed by the processor, the chip system implements the method in any of the above method embodiments.

[0150] Optionally, the processor in the chip system may be one or more. The processor can be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor that implements by reading software code stored in the memory.

[0151] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or separately provided from the processor, and the present application does not limit this. Exemplarily, the memory may be a non-transitory processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or separately provided on different chips. The present application does not specifically limit the type of the memory and the setting manner of the memory and the processor.

[0152] Exemplarily, the chip system may be a field programmable gate array (FPGA), may be an application specific integrated circuit (ASIC), may also be a system on chip (SoC), may also be a central processing unit (CPU), may also be a network processor (NP), may also be a digital signal processing circuit (DSP), may also be a microcontroller unit (MCU), may also be a programmable logic device (PLD) or other integrated chips.

[0153] The embodiment of the present application also provides a computer-readable storage medium, including instructions or a computer program, which, when running on a computer, enables the computer to execute the message transmission method provided in the above embodiment.

[0154] The embodiment of the present application also provides a computer program product including instructions or a computer program, which, when running on a computer, enables the computer to execute the message transmission method provided in the above embodiment.

[0155] It should be noted that the various embodiments in this specification are described in a progressive manner, and the key point of each embodiment is to describe the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the systems or devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the description of the method part.

[0156] It should be understood that in the present application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects and indicates that there can be three relationships. For example, "A and / or B" can represent: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (one)" or its similar expression below refers to any combination of these items, including any combination of single item (one) or plural items (ones). For example, at least one (one) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0157] It should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0158] The steps of the methods or algorithms described in connection with the embodiments disclosed herein can be implemented directly in hardware, in software modules executed by a processor, or in a combination of both. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well known in the art.

[0159] The foregoing description of the disclosed embodiments enables those skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Thus, the present application is not intended to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A message transmission method, characterized in that, The method includes: A first network device obtains at least one control entry, where the at least one control entry is located in at least one first message, and each of the at least one first messages includes a device identifier of a network device to which the first message needs to be sent. The control entry is used to instruct the network device receiving the control entry to perform local control. The first network device is a route reflector device; The first network device determines a target control entry to be sent to the second network device according to the device identifier of the second network device included in some or all of the at least one first messages. The target control entry is one or more control entries among the at least one control entries; The first network device sends at least one second message to the second network device. The target control entry is located in the at least one second message, and each of the at least one second messages includes the device identifier of the second network device; Wherein, the at least one control entry is received by the first network device from a fourth network device, and the at least one control entry is determined by the fourth network device according to the device identifier of the first network device.

2. The method according to claim 1, characterized in that, The second network device is a route reflector device.

3. The method according to claim 1, wherein The second network device is a client device.

4. The method according to claim 2, characterized in that The device identifier of a third network device is further included in the at least one second message, and the device identifier of the third network device is used to instruct the second network device to determine the control entry to be sent to the third network device from the target control entry according to the device identifier of the third network device.

5. The method according to any one of claims 1-4, characterized in that, The at least one second message is a Border Gateway Protocol (BGP) message, and the device identifier of the second network device is respectively located in the extended community attribute of the at least one second message.

6. The method according to any one of claims 1-4, characterized in that, The device identifier of the second network device is a Router Identifier (Router-ID).

7. The method according to any one of claims 1-4, characterized in that The method further includes: Before the first network device obtains the at least one control entry, the first network device receives a third message sent by the second network device, and the third message includes the device identifier of the second network device; The first network device determines a target control entry to be sent to the second network device according to the device identifier of the second network device included in some or all of the at least one first messages, including: The first network device determines the target control entry to be sent to the second network device from the one or more first messages according to the device identifier of the second network device received from the third message matching the device identifier of the second network device in the one or more first messages to which the target control entry belongs.

8. The method according to any one of claims 1 to 4, characterized in that The control entry is a flow specification (flowspec), or a segment routing (SR) policy, or a route policy distribution (RPD).

9. A message transmission system, characterized in that, The system includes: a first network device and a second network device; The first network device is configured to obtain at least one control entry, where the at least one control entry is located in at least one first message, and each of the at least one first messages includes the device identifier of the network device to which the first message is to be sent. The control entry is used to instruct the network device receiving the control entry to perform local control. The first network device is a route reflector device; The first network device is further configured to determine, according to the device identifier of the second network device included in some or all of the at least one first messages, the target control entry to be sent to the second network device, where the target control entry is one or more control entries among the at least one control entries; The first network device is further configured to send at least one second message to the second network device, where the target control entry is located in the at least one second message, and each of the at least one second messages includes the device identifier of the second network device; The second network device is configured to receive the at least one second message; Wherein, the at least one control entry is received by the first network device from a fourth network device, and the at least one control entry is determined by the fourth network device according to the device identifier of the first network device.

10. The system according to claim 9, wherein The system further includes: a third network device, and the device identifier of the third network device is further included in the at least one second message; The second network device is further configured to determine, according to the device identifier of the third network device, from the target control entries, the control entry to be sent to the third network device, where the control entry is at least one or more control entries among the target control entries; The second network device is further configured to send at least one fourth message to the third network device, where the control entry is located in the at least one fourth message, and each of the at least one fourth messages includes the device identifier of the third network device.

11. The system according to claim 9 or 10, characterized in that, The second network device is further configured to send a third message to the first network device, where the third message includes the device identifier of the second network device.

12. The system according to claim 10, wherein The third network device is further configured to send a fifth message to the second network device, where the fifth message includes the device identifier of the third network device.

13. The system according to claim 9 or 10, characterized in that, The device identifier of the second network device is the router identifier Router-ID.

14. A message transmission device, characterized in that, The apparatus includes: An obtaining unit, configured to obtain at least one control entry, where the at least one control entry is located in at least one first message, and each of the at least one first messages includes the device identifier of the network device to which the first message is to be sent. The control entry is used to instruct the network device receiving the control entry to perform local control. The apparatus is a route reflector device; A determining unit, configured to determine, according to the device identifier of the second network device included in some or all of the at least one first messages, the target control entry to be sent to the second network device, where the target control entry is one or more control entries among the at least one control entries; A sending unit, configured to send at least one second message to the second network device, where a target control entry is located in the at least one second message, and the at least one second message respectively includes a device identifier of the second network device.

15. The device according to claim 14, characterized in that, The second network device is a route reflector device, or the second network device is a client device.

16. The device according to claim 15, characterized in that, When the second network device is a route reflector device, the at least one second message further includes a device identifier of a third network device, and the device identifier of the third network device is used to instruct the second network device to determine a control entry sent to the third network device from the target control entry according to the device identifier of the third network device.

17. The device according to any one of claims 14 - 16, characterized in that, The at least one second message is a Border Gateway Protocol (BGP) message, and the device identifier of the second network device is respectively located in an extended community attribute of the at least one second message.

18. The device according to any one of claims 14-16, characterized in that, The device identifier of the second network device is a Router Identifier (Router-ID).

19. The device according to claim 14, characterized in that, The apparatus further includes: a receiving unit, The receiving unit is further configured to receive a third message sent by the second network device before executing the obtaining unit, where the third message includes a device identifier of the second network device; The determining unit is specifically configured to determine, from the one or more first messages, the target control entry sent to the second network device according to the device identifier of the second network device received from the third message matching the device identifier of the second network device in the one or more first messages to which the target control entry belongs.

20. The device according to any one of claims 14-16, characterized in that The control entry is a flow specification (flowspec), or a Segment Routing (SR) policy, or a Route Policy Distribution (RPD).

21. The device according to any one of claims 14 - 16, characterized in that, The at least one control entry is obtained by the apparatus from a controller or a server, or the at least one control entry is received by the apparatus from a fourth network device, or the at least one control entry is locally configured by the apparatus.

22. The device according to claim 21, wherein, When the at least one control entry is received by the apparatus from a fourth network device, the at least one control entry is determined by the fourth network device according to the device identifier of the apparatus.

23. A communication device, characterized in that, including: a processor, a memory; The memory is configured to store computer-readable instructions or a computer program; The processor is configured to read the computer-readable instructions or the computer program, so that the communication device implements the message transmission method according to any one of claims 1-8.

24. A computer-readable storage medium includes instructions or a computer program, which, when running on a computer, cause the computer to execute the message transmission method according to any one of claims 1-8 above.

Citation Information

Patent Citations

  • Routing information transmitting method and system and route reflector

    CN104753794A

  • Transmission method and device of segment routing strategy, and network transmission system

    CN113438159A

  • Method to scale hierarchical route reflectors using automated outbound route filtering-list mechanism

    US20060245374A1