Packet Transmission Method and Apparatus
The packet transmission method addresses resource consumption and congestion in IBGP systems by using device identifiers to deliver only relevant control items, simplifying service deployment and reducing network load.
Patent Information
- Application Number
- JP2023518432
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-09-23
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2040-09-23
AI Technical Summary
The establishment of a full mesh between Internal Border Gateway Protocol (IBGP) peers in large autonomous systems consumes significant network and controller resources, leading to increased network congestion and complex route filtering policies, especially when hundreds of clients require different filtering policies.
A packet transmission method where a network device determines and transmits only relevant control items to target devices based on their identifiers, reducing the need for filtering policies and congestion by using device identifiers in packets to match and deliver required information.
This approach reduces the burden on network devices by ensuring they only transmit necessary control items, thereby alleviating congestion and simplifying service deployment by eliminating the need for complex filtering policies.
Smart Images

Figure 0007703022000001 
Figure 0007703022000002 
Figure 0007703022000003
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and particularly to a packet transmission method and apparatus.
Background Art
[0002] In the data transmission process, in order to ensure the connectivity between internal border gateway protocol (IBGP) peers, a full mesh needs to be established between IBGP peers. As shown in FIG. 1a, an autonomous system (AS) includes four routers. These four routers may form IBGP peers. To ensure the connectivity between the routers, six IBGP connections need to be established. When the AS includes a relatively large number of routers, a relatively large number of IBGP connections need to be established. As a result, a large amount of network resources and controller resources are consumed. To solve the above problems, solutions for routes Reflection have been proposed. Specifically, in an AS, one router is used as a router reflector ( route reflector, RR), and the other routers are used as clients to separately establish IBGP connections to the RR, and there is no need to establish IBGP connections between the clients (clients). The RR transmits (reflects) the routing information to each client. As shown in FIG. 1b, R0 is used as the RR to establish IBGP connections to each of R1, R2, and R3. R1, R2, and R3 are used as clients of the RR.
[0003] However, when the service is deployed, the RR sends all the obtained routing information to each client. Each client, however, only needs to process the routing information relevant to the service requirements of that client and discard other routing information that is not relevant to the service requirements. Therefore, each client needs to be set with a route filtering policy that suits that client and helps filter out unnecessary routing information according to the route filtering policy set for that client. When there are hundreds of clients, the amount of routing information reflected by the RR increases exponentially, imposing higher requirements on the device processing capacity of the RR, worsening the network congestion, further increasing the burden of setting the route filtering policy at the client, and making maintenance difficult because different clients usually need to be set with different route filtering policies.
Summary of the Invention
[0004] In view of the above, embodiments of the present application provide a packet 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, embodiments of the present application provide the following technical solutions.
[0006] According to a first aspect, a packet transmission method is provided. The method includes: a first network device obtaining at least one control item, where the at least one control item is located in at least one first packet, and each of the at least one first packet includes a device identifier of a network device to which the first packet needs to be transmitted; the first network device determining a target control item to be transmitted to a second network device based on that a device identifier included in a part or all of the at least one first packet is the device identifier of the second network device, where the target control item is one or more of the at least one control item; and the first network device transmitting at least one second packet to the second network device, where the target control item is located in the at least one second packet, and each of the at least one second packet includes a device identifier of the second network device. In this embodiment, before obtaining one or more control items and transmitting these control items to the second network device, the first network device determines the target control item to be transmitted to the second network device based on that the device identifier in the first packet where these control items are located is the device identifier of the second network device, and then may transmit one or more second packets including the target control item to the second network device. In this way, the second network device obtains only the control items required by the second network device. Therefore, the pressure on the first network device advertising the control items is reduced, and network congestion is reduced. Further, there is no need to introduce a filtering policy to the second network device, thereby simplifying service deployment.
[0007] In a possible implementation, the first network device is a route reflection device.
[0008] In a possible implementation, the second network device is a route reflection device, or the second network device is a client device. In this implementation, when a level 1 route reflection device exists in the application scenario, the first network device is a route reflection device and the second network device is a client device. When a level 2 route reflection device exists in the application scenario, the first network device is a level 1 route reflection device and the second network device is a level 2 route reflection device.
[0009] In a possible implementation, when the second network device is a route reflection device, at least one second packet further includes a device identifier of a third network device. The device identifier of the third network device is used to instruct the second network device to determine a control item to be sent to the third network device from the target control items based on the device identifier of the third network device. In this implementation, when the second network device is a level 2 route reflection device, there may be a client corresponding to the second network device, that is, a third network device. In this case, the second packet may further include a device identifier of the third network device. The second network device may determine a target control item to be sent to the third network device based on the fact that the device identifier in the second packet is the identifier of the third network device. In this way, the second network device may send only the target control items required by the third network device to the third network device.
[0010] In a possible implementation, when there is a third network device corresponding to the second network device, the second network device may receive a fifth packet sent from the third network device. The fifth packet includes the device identifier of the third network device. Based on the device identifier of the third network device in the fifth packet matching the device identifier of the third network device in one or more second packets to which the target control item belongs, the second network device may determine the target control item to be sent to the third network device from the matched second packets.
[0011] In a possible implementation, at least one second packet is a Border Gateway Protocol (BGP) packet, and the device identifier of the second network is separately located within the extended community attribute of at least one second packet. In this implementation, the device identifier included in the first packet or the second packet may be located within the extended community attribute of that packet. The first network device may determine whether the device identifier included in the first packet is the device identifier of the second network device by parsing the extended community attribute in the first packet.
[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. Specifically, the router identifier may be the IP address or the loopback address of the second network device.
[0013] In a possible implementation, this method further includes the first network device receiving a third packet sent from the second network device before the first network device obtains at least one control item. The third packet includes the device identifier of the second network device. Based on the device identifier included in part or all of at least one first packet being the device identifier of the second network device, the first network device determining the target control item to be sent to the second network device includes the first network device determining, based on the device identifier of the second network device received from the third packet matching the device identifier of the second network device in one or more first packets to which the target control item belongs, the target control item to be sent to the second network device from one or more first packets. In this implementation, since the second network device pre-sends a third packet including the device identifier of the second network device to the first network device, the first network device can know the device identifier of the second network device. When determining the target control item to be sent to the second network device, the first network device may determine the target control item from the matched first packet based on the device identifier of the second network device obtained from the third packet matching the device identifier of the second network device in the first packet.
[0014] In a possible implementation, the control item is a flow specification (flowspec), a segment routing (SR) policy, or a route policy distribution (RPD).
[0015] In a possible implementation, at least one control item is obtained by a first network device from a controller or a server, or at least one control item is received by the first network device from a fourth network device, or at least one control item is locally set by the first network device. In this implementation, when the first network device is an ingress node, the first network device may obtain a control item from a controller or a server, or the control item is locally set. When the first network device is a transit node or an egress node, the first network device may receive a control item transmitted from a higher-level network device.
[0016] In a possible implementation, when at least one control item is received by a first network device from a fourth network device, at least one control item is determined by the fourth network device based on the device identifier of the first network device. When the first network device is a transit node or an egress node, a higher-level network device determines a target control item to be transmitted to the first network device based on the device identifier of the first network device, and then may transmit the target control item required by the first network device to the first network device.
[0017] According to a second aspect of the embodiments of the present application, a packet transmission system is provided. This system includes a first network device and a second network device. The first network device is configured to obtain at least one control item, and at least one control item is located within at least one first packet. Each of the at least one first packet includes a device identifier of the network device to which the first packet needs to be transmitted. The first network device is further configured to determine a target control item to be transmitted to the second network device based on that the device identifier included in a part or all of the at least one first packet is the device identifier of the second network device. The target control item is one or more of the at least one control item. The first network device is further configured to transmit at least one second packet to the second network device. The target control item is located within at least one second packet, and each of the at least one second packet includes a device identifier of the second network device. The second network device is configured to receive at least one second packet.
[0018] In a possible implementation, this system further includes a third network device, and at least one second packet further includes a device identifier of the third network device. The second network device is further configured to determine a control item to be transmitted to the third network device from the target control item based on the device identifier of the third network device. This control item is one of 1 or more of the control items in the target control item. The second network device is further configured to transmit at least one fourth packet to the third network device. The control item is located within at least one fourth packet, and each of the at least one fourth packet includes a device identifier of the third network device.
[0019] In a possible implementation, the second network device is further configured to send a third packet to the first network device, and the third packet includes the device identifier of the second network device.
[0020] In a possible implementation, the third network device is further configured to send a fifth packet to the second network device, and the fifth packet includes the device identifier of the third network device.
[0021] According to a third aspect of the embodiments of the present application, a packet transmission device is provided. The device includes an acquisition unit configured to acquire at least one control item, where the at least one control item is located in at least one first packet, and each of the at least one first packet includes the device identifier of the network device to which the first packet needs to be sent; a determination unit configured to determine a target control item to be sent to a second network device based on that the device identifier included in a part or all of the at least one first packet is the device identifier of the second network device, where the target control item is one or more of the at least one control item; and a transmission unit configured to send at least one second packet to the second network device, where the target control item is located in at least one second packet, and each of the at least one second packet 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, at least one second packet further includes a device identifier of a third network device. The device identifier of the third network device is used to instruct the second network device to determine a control item to be sent to the third network device from the target control item based on the device identifier of the third network device.
[0025] In a possible implementation, at least one second packet is a Border Gateway Protocol (BGP) packet, and the device identifier of the second network device is separately located within an extended community attribute of the at least one second packet.
[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 apparatus further includes a receiving unit. The receiving unit is further configured to receive a third packet sent from the second network device before the obtaining unit is executed, and the third packet includes a device identifier of the second network device. The determining unit is specifically configured to determine, from one or more first packets, a target control item to be sent to the second network device based on that the device identifier of the second network device received from the third packet matches the device identifier of the second network device in one or more first packets to which the target control item belongs.
[0028] In a possible implementation, the control item is a flow specification (flowspec), a Segment Routing (SR) policy, or a Route Policy Distribution (RPD).
[0029] In a possible implementation, at least one control item is obtained by the device from a controller or a server, or at least one control item is received by the device from a fourth network device, or at least one control item is locally set by a first network device.
[0030] In a possible implementation, when at least one control item is received by this device from a fourth network device, at least one control item is determined by the fourth network device based on the device identifier of the device.
[0031] According to a fourth aspect of the embodiments of the present application, a communication device including a processor and a memory is provided. 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 to enable the communication device to implement the packet transmission method according to the first aspect.
[0032] According to a fifth aspect of the embodiments of the present application, a computer-readable storage medium including instructions or a computer program is provided. When the instructions or the computer program are executed on a computer, the computer can execute the packet transmission method according to the first aspect.
[0033] According to the technical solution provided in the embodiments of the present application, after obtaining one or more control items, the first network device determines a target control item to be sent to the second network device based on that the device identifier included in the first packet to which each control item belongs is the device identifier of the second network device. The target control item is used to instruct the second network device to execute local control, and the target control item is one or more of at least one obtained control item. The first network device sends at least one second packet to the second network device, the target control item is located within the at least one second packet, and the second packet includes the device identifier of the second network device. According to the packet transmission method provided in the embodiments of the present application, when transferring the control item to the second network device, the first network device obtains the target control item required by the second network device through matching based on the device identifier of the second network device, and then it can be seen that only the target control item is sent to the second network device. Thereby, the pressure on the first network device advertising the control item is reduced, and the network congestion is reduced. Furthermore, there is no need to introduce a filtering policy into the second network device, thereby simplifying service deployment.
Brief Description of the Drawings
[0034] To more clearly illustrate the specific implementation of the present invention or the technical solutions in the prior art, the attached drawings for explaining the specific implementation or the prior art will be briefly described below. The attached drawings in the following description show some specific implementations of the present invention, and it is obvious that those skilled in the art can further derive other drawings from these attached drawings without creative efforts.
[0035]
Figure 1a
Figure 1b
Figure 2a
Figure 2b
Figure 3
Figure 4a
Figure 4b
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Embodiments for Carrying Out the Invention
[0036] For those skilled in the art to better understand the technical solutions of the present invention, hereinafter, with reference to the accompanying drawings of the embodiments of the present invention, the technical solutions of the embodiments of the present invention will be quickly described. It is obvious that the described embodiments are only a part, not all, of the embodiments of the present invention. All embodiments based on the present invention shall be included in the protection scope of the present invention.
[0037] Referring to the schematic diagram showing the application scenario illustrated in FIG. 2a, an example where the network system includes a level 1 route reflection device is used for illustration. Specifically, network device R0 is the route reflection device, and network devices R1 and T2 are used as clients corresponding to the route reflection device R0. In another example, FIG. 2b is a schematic diagram showing another application scenario, and an example where the network system includes two levels of route reflection devices is used for illustration. Specifically, network device R0 is used as a level 1 route reflection device, and network devices R1 and R2 are used as level 2 route reflection devices. The lower-level network devices connected to the level 1 route reflection device R0 are network devices R1 and R2 that act as RR. Furthermore, R1 and R2 with respect to R0 may also be called clients of R0. Since both the level 2 route reflection devices R1 and R2 are used as clients of the level 1 route reflection device R0, there is no need to establish a full mesh between network device R1 and network device R2. The lower-level network devices connected to the level 2 route reflection device R1 are network devices R3 and R4 that act as clients, and the lower-level network devices connected to the level 2 route reflection device R2 are network devices R5 and R6 that act as clients. R3 to R6 are used as clients that receive the routes or policies reflected by RR, but do not have the route reflection function. If possible, R3 and R4 are peers, and R5 and R6 are peers.
[0038] Each network device, sometimes called a node, is a device with a packet forwarding function in a network system, and may be, for example, a router, a switch, a forwarder, or a label switching router (LSR). In the application scenario shown in Figure 2a, there are two transmission paths, namely R0→R1 and R0→R2. R0 is an ingress node, and R1 or R2 is an egress node. In the application scenario shown in Figure 2b, there are multiple transmission paths, namely R0→R1→R3, R0→R1→R4, R0→R2→R5, and R0→R2→R6. In this embodiment, R0 is the ingress node 201, R1 and R2 are the transit nodes 202, and R3, R4, R5, and R6 are egress nodes.
[0039] In one case, the ingress node may be the node that generates the first packet, that is, the node indicated by the source address in the first packet. In this case, the ingress node is the first node on the end-to-end transmission path of the packet. In another case, the ingress node may be a node connected to a server or a controller, and may obtain the first packet from the server or the controller.
[0040] In one case, the egress node may be the node indicated by the destination address in the first packet. In another case, the egress node is a node connected to the node indicated by the destination address. In another case, the egress node may be the last node on the end-to-end transmission path that needs to perform local control based on the control item in the first packet.
[0041] A transit node is one or more transfer nodes through which a packet passes between an ingress node and an egress node during transfer.
[0042] For ease of understanding, hereinafter, the network system structure shown in FIG. 2b is used as an example for explanation. FIG. 3 is a flowchart showing a packet transmission method according to an embodiment of the present application. Roles with names such as ingress node 201, transit node 202, and egress node 203 in the following embodiments are mainly used to distinguish different functions that can be executed by different network devices on the packet transfer path. The positions of different network devices within the network topology can be determined with reference to various service scenarios in particular. As shown in FIG. 3, this method includes the following steps.
[0043] S301: The ingress node 201 acquires at least one first packet.
[0044] In this embodiment, the ingress node 201 first acquires at least one first packet including one or more control items. Specifically, the ingress node 201 may acquire one or more first packets, and each first packet may include one or more control items. Each first packet includes a device identifier of the network device to which the first packet needs to be transmitted. The device identifier of the network device may be a router identifier (router-id) that may be an Internet protocol (IP) address or a loopback ( loopback ) address of the network device, or the device identifier is the identifier of the network device ( identity,identification, ID, etc. For example, using FIG. 2B again as an example. The ingress node 201 is the network device R0. The transit node 202 is the network device R1 and the network device R2. 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. When the first packet contains the router identifier 1.1.1.1, it indicates that one or more control items in the first packet are to be sent to the network device R1. When the first packet contains the router identifier 2.2.2.2, it indicates that one or more control items in the first packet are to be sent to the network device R2. The control item is used to indicate the network device that receives the control item and executes local control. The control item may be a flow specification (flowspec), a segment routing (SR) policy, or a route policy distribution (RPD), etc.
[0045] In the above example, the ingress node 201 is R0 in FIG. 2b. In another possible case, the ingress node may alternatively be R1 or R2 in FIG. 2b.
[0046] The ingress node 201 obtains at least one first packet in the following manner. In one manner, the ingress node 201 may obtain at least one first packet from a controller or server connected to the ingress node 201, that is, the controller or server generates at least one first packet, and the first network device may receive at least one first packet transmitted from the controller or server. In another manner, the ingress node 201 obtains at least one first packet from local configuration information. Specifically, the ingress node 201 may obtain at least one first packet from local configuration information, and the local configuration information may be manually set by a user to the ingress node 201 according to actual service requirements, for example.
[0047] The first packet may be a Border Gateway Protocol (BGP) packet. Specifically, the first packet may be an UPDATE packet within the BGP packet, and the UPDATE packet includes at least a device identifier field and a control item field. FIG. 4a is a schematic diagram showing the structure of the UPDATE packet. The UPDATE packet may include not only a device identifier field and a control item field but also a reserved field. The reserved field may carry another attribute field. In some possible cases, this other attribute field may be used to perform advanced filtering on the control item. For example, the ingress node 201 uses the device identifier field and another attribute field together to determine the first packet that needs to be sent to the device and includes a plurality of control items. The device identifier included in the device identifier field of the determined first packet matches the device identifier related to the ingress node 201, and the attribute included in the above-mentioned other attribute field of the determined first packet matches the attribute related to the ingress node 201. The device identifier included in the first packet may be located in the extended community attribute of the first packet, and the device identifier is indicated using type-length-value (TLV) in the extended community attribute. As shown in FIG. 4b, the type field is used to indicate the type of the extended community attribute, the length field is used to indicate the number of bytes included in the "value" field, for example, 8 bytes (Byte), and the value field is used to indicate the device identifier. In a possible implementation, when the extended community attribute in the first packet is an extended community attribute based on an IP address, the value field is the Global Administrator ( Global Administrator )It includes an information field, and the global administrator information field carries a device identifier. When the first packet includes a plurality of device identifiers, the value field may include a plurality of global administrator information fields, and each global administrator information field carries one device identifier.
[0048] The above transmission method is merely used as a possible example. In another possible application scenario or design method, alternatively, one or more device identifiers carried in the first packet may be located in another possible type of packet or in another possible field of the packet. If the device identifier can be identified and understood by the device on the receiving side of the first packet, and the receiving-side device can use the corresponding device identifier to perform matching and determine the target control item that needs to be transferred, different device identifiers may also be located in different types of fields.
[0049] S302: The ingress node 201 determines the target control item to be sent to the transit node 202 based on the fact that the device identifier included in part or all of at least one first packet is the device identifier of the transit node 202.
[0050] When the ingress node 201 sends control items to the transit node 202, to ensure that the control items to be sent are the control items required by the transit node 202 and reduce the transmission pressure of the ingress node 201, the ingress node 201 may determine the target control items to be sent to the transit node 202 based on the fact that the device identifier included in part or all of at least one first packet is the device identifier of the transit node 202. That is, the ingress node 201 determines the target control items to be sent to the transit node 202 from the control items included in each acquired first packet. The first packet to which the target control items belong includes the device identifier of the transit node 202. For example, the device identifier of the transit node 202 is 1.1.1.1, and the ingress node 201 acquires 100 first packets, and the device identifiers included in 20 first packets are 1.1.1.1. In this case, the ingress node 201 may determine that all the control items included in the 20 first packets are the target control items. The transit node 202 may be R1 or R2 in FIG. 2b.
[0051] In actual applications, the ingress node 201 may receive a third packet transmitted from the transit node 202. The third packet includes the device identifier of the transit node 202. In this way, the transit node 202 uses the third packet to notify the ingress node 201 of the device identifier corresponding to the transit node 202. Based on the fact that the device identifier of the transit node 202 received from the third packet matches the device identifier of the transit node 202 included in the first packet, and based on the matching first packet, the ingress node 201 may determine the target control item to be transmitted to the transit node 202, and further obtain the second packet based on the target control item. In some cases, the third packet may further include another attribute field. In this case, when determining the target control item to be transmitted to the transit node 202, the ingress node 201 is based on the fact that the device identifier of the transit node 202 and another attribute received from the third packet match the device identifier and the attribute field of the transit node 202 included in the first packet, and based on the matching first packet, may determine the target control item to be transmitted to the transit node 202. That is, when determining the matching first packet based on the device identifier of the transit node 202, the ingress node 201 may determine that all control items included in the matching first packet are target control items. Alternatively, after determining the matching first packet based on the device identifier of the transit node 202, the ingress node 201 may further determine a first packet that satisfies the other attribute from the matching first packet based on the other attribute, and determine that the control items included in the first packet that satisfies the other attribute are target control items. The target control item may include one or more control items, and these one or more control items may be distributed within one first packet or may be distributed within multiple first packets.For example, based on the device identifier of the transit node 202, the ingress node 201 determines 20 matching first packets from 100 acquired first packets, and then, based on another attribute, determines 5 first packets from the 20 first packets with a total number including that another attribute, and determines that the control items within those 5 first packets are the target control items.
[0052] After determining the target control item based on at least one first packet, the ingress node 201 acquires at least one second packet based on the target control item. This at least one second packet is a packet used to carry the target control item determined by the ingress node 201. The method of acquiring at least one second packet includes at least the following several cases.
[0053] In one case, the ingress node 201 may use the first packet acquired by matching using the device identifier of the transit node 202 as the second packet. That is, all control items in each first packet acquired by matching are determined to be the target control items. For example, the ingress node 201 acquires 50 first packets in total, and 20 of them include the device identifier of the transit node 202. In this case, the 20 first packets are the matching first packets. The ingress node 201 uses those matching first packets as the second packets. In this way, 20 second packets are determined.
[0054] In another case, based on the device identifier of the transit node 202 and the fact that the device identifier included in part or all of the first packet is the device identifier of the transit node 202, the ingress node 201 determines that part or all of the control items of the first packet obtained by matching based on the device identifier of the transit node 202 are the target control items to be sent to the transit node 202, and re - capsules the target control items to obtain at least one second packet. For example, the ingress node 201 determines 50 target control items from one first packet (including 100 control items) based on the device identifier of the transit node 202, and the ingress node 201 recapsulates the 50 target control items to obtain at least one second packet.
[0055] In yet another case, the ingress node 201 first determines the target control items to be sent to the transit node 202 based on the device identifier of the transit node 202 and the fact that the device identifier included in part or all of the first packet is the device identifier of the transit node 202. Then, the ingress node 201 generates at least one second packet based on the target control items and the control items that need to be sent to the transit node 202 and were locally stored before at least one first packet was obtained.
[0056] S303: The ingress node 201 sends at least one second packet to the transit node 202.
[0057] After determining the target control item to be sent to the transit node 202 based on the device identifier of the transit node 202, the ingress node 201 may obtain at least one second packet based on the target control item and send this at least one second packet to the transit node 202. The target control item determined by the ingress node 201 in S302 is located within this at least one second packet, and each second packet includes the device identifier of the transit node 202. The second packet may be a Border Gateway Protocol (BGP) packet, and the device identifier included in the second packet may be located within the extended community attribute of the second packet. The specific expression form may be defined by adding a Type / Length / Value (TLV) to the extended community attribute as shown in FIG. 4b. For the format of the second packet and the encapsulation format of the device identifier in the second packet, refer to the relevant description of the first packet in S301.
[0058] S304: The transit node 202 determines the target control item to be sent to the egress node 203 based on the fact that the device identifier included in some or all of the at least one second packet is the device identifier of the egress node 203.
[0059] In this embodiment, after receiving at least one second packet transmitted from the ingress node 201, the transit node 202 may determine a target control item to be transmitted to the egress node 203 based on the fact that part or all of the at least one second packet includes the device identifier of the egress node 203. The second packet transmitted from the ingress node 201 to the transit node 202 may further include the device identifier of the egress node 203. For example, when the device identifier of the transit node 202 is 1.1.1.1 and the device identifier of the egress node 203 is 3.3.3.3, the second packet transmitted from the ingress 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 packet is a packet transmitted to the transit node 202, and the transit node 202 may receive and store the at least one second packet. The device identifier 3.3.3.3 is used to instruct the transit node 202 to determine, based on this device identifier, the target control item that needs to be transmitted from the at least one second packet to the egress node 203, where the egress node 203 is a network device with the device identifier 3.3.3.3. For example, as shown in FIG. 2b, when the transit node 202 is R1, the egress node 203 may be R3 or R4, or when the transit node 202 is R2, the egress node 203 may be R5 or R6. In a possible implementation, the first packet obtained by the ingress node 201 further includes the device identifier 3.3.3.3 in addition to the device identifier 1.1.1.1. In this way, when the ingress node 201 transmits at least one When the second packet including the target control item is transmitted to the transit node 202, the device identifier 3.3.3.3 is also carried.
[0060] In actual application, before the transit node 202 determines the target control item to be sent to the egress node 203, the transit node 202 may receive a fifth packet sent from the egress node 203. The fifth packet includes the device identifier of the egress node 203. Thus, the egress node 203 uses the fifth packet to notify the transit node 202 of the device identifier corresponding to the egress node 203. Therefore, when the transit node 202 receives at least one second packet from the ingress node 201, the transit node 202 determines the target control item to be sent to the egress node 203 based on the fact that the device identifier of the egress node 203 received from the fifth packet matches the device identifier of the egress node 203 included in the second packet, and may further obtain at least one fourth packet including the target control item to be sent to the egress node 203 from the matched second packet. In some cases, the fifth packet may further include another attribute field. In this case, when determining the target control item to be sent to the egress node 203, the transit node 202 determines the target control item to be sent to the egress node 203 based on the fact that the device identifier of the egress node 203 and another attribute received from the fifth packet respectively match the device identifier of the egress node 203 and the attribute field included in the second packet, and may further obtain at least one fourth packet including the target control item to be sent to the egress node 203 from the matched second packet. For the specific implementation in which the transit node 202 determines to send the target control item to the egress node 203 and obtains the fourth packet based on the target control item, please refer to the related description of the method for obtaining the second packet in S302.
[0061] S305: The transit node 202 sends at least one fourth packet to the egress node 203.
[0062] After determining the target control items to be sent to the egress node 203 based on the device identifier of the egress node 203, the transit node 202 generates at least one fourth packet based on the target control items and sends the at least one fourth packet to the egress node 203. The target control items determined by the transit node 202 in S304 are located within the at least one fourth packet, and each fourth packet includes the device identifier of the egress node 203. The fourth packet may be a Border Gateway Protocol (BGP) packet. For the format of the fourth packet and the encapsulation format of the device identifier of the egress node 203 in the fourth packet, refer to the relevant description of the first packet in S301.
[0063] In this embodiment, after receiving the fourth packet, the egress node 203 may perform different processes depending on the application scenario. Specifically, the following operations may be included.
[0064] In one case, after receiving the fourth packet, the egress node 203 does not forward the fourth packet. For example, the egress node 203 is a network device connected to a user device. is In this case, the egress node 203 may receive only the fourth packet and perform local control based on the target control item in the fourth packet. For example, when the target control item is a flow specification, the egress node 203 may select a path based on the flow specification and adjust the service traffic transmission path. Alternatively, when the target control item is a segment routing policy, the egress node 203 may obtain the segment list of the path specified according to the segment routing policy and use the segment list to forward the subsequent received service traffic. Alternatively, when the target control item is a route policy distribution, the egress node may change the routing processing behavior of the egress node based on the route policy distribution. In the above case, the egress node 203 may not forward the fourth packet.
[0065] In another case, when there is a peer node of the egress node 203, the egress node 203 may forward the fourth packet received from the transit node 202 to the peer node when it receives the fourth packet. The peer node may determine the required control item from the fourth packet according to the local policy. The above case is merely used as an example, and it can be understood that the processing operations performed on the packet by the egress node 203 can be determined with reference to individual application scenarios.
[0066] In this embodiment, the network system shown in FIG. 2b is used as an example for illustration. When the actual application scenario is the network system architecture shown in FIG. 2a, after the ingress node obtains at least one first packet, based on the fact that the device identifier included in part or all of the at least one first packet is the device identifier of the egress node, the ingress node determines the target control item to be sent to the egress node, and sends at least one second packet to the egress node. The target control item is located within the at least one second packet, and the second packet includes the device identifier of the egress node. That is, when there is no intermediate transfer node between the ingress node and the egress node, the ingress node directly determines the target control item to be sent to the egress node based on the device identifier of the egress node. For specific implementation, refer to the related descriptions from S301 to S305. Alternatively, if possible, the transit node 202 may not support the route filtering function. In this case, the transit node 202 may not execute S304 and S305, and may directly send at least one second packet received from the ingress node 201 to the egress node 203. Then, the egress node 203 determines the control items required by the egress node 203 according to the local policy. Alternatively, the method provided in this embodiment may also be applied to a possible network system architecture. For example, the network system may include more than three levels of RRs, and each level of RR may need to determine the routes to be sent to the lower-level network devices using the corresponding methods possible to be provided in this embodiment. The lower-level network devices may be, for example, RRs with the route reflection function or clients without the route reflection function.
[0067] To facilitate understanding of the technical solutions provided in the embodiments of this application, please refer to FIG. 5. FIG. 5 is a flowchart showing another packet transmission method according to the embodiments of this application. As shown in FIG. 5, this method may include the following steps.
[0068] S501: The first network device acquires at least one control item. This at least one control item is located within at least one first packet.
[0069] In this embodiment, the first network device may be the ingress node 201 or the transit node 202 described in the above embodiment.
[0070] When the first network device is the ingress node 201, the first network device may acquire at least one control item. Specifically, the first network device may acquire at least one control item based on local configuration information, or may acquire at least one control item from a controller or a server. For the specific implementation of the first network device acquiring at least one control item, please refer to S301.
[0071] When the first network device is the transit node 202, the first network device determines at least one control item from the packets received from the fourth network device that acts as a higher-level network device. If possible, the higher-level network device may be, for example, the ingress node 201. Specifically, the fourth network device determines at least one control item to be sent to the first network device from the packets acquired by the fourth network device based on the device identifier of the first network device, and may send the at least one control item to the first network device. The first network device may be a route reflection device. For the specific implementation in which the fourth network device determines at least one control item to be sent to the first network device based on the device identifier of the first network device, refer to S302 or S304.
[0072] Each first packet includes the device identifier of the network device to which the first packet needs to be sent, and the device identifier may be a router identifier. The control item may be a flow specification (flowspec), a segment routing (SR) policy, or a route policy distribution (RPD), etc. For the format of the first packet and the encapsulation format of the device identifier, refer to S301.
[0073] S502: The first network device determines the target control item to be sent to the second network device based on the fact that the device identifier included in part or all of at least one first packet is the device identifier of the second network device.
[0074] In this embodiment, the first network device may determine a target control item to be transmitted to the second network device when it determines that the device identifier included in part or all of at least one first packet obtained is the device identifier of the second network device. In a specific implementation, before the first network device determines the target control item to be transmitted to the second network device, the first network device may receive a third packet transmitted from the second network device, where the third packet includes the device identifier of the second network device. Based on the device identifier of the second network device received from the third packet being consistent with the device identifier of the second network device in one or more first packets to which the target control item belongs, the first network device determines, from the one or more first packets, the target control item to be transmitted to the second network device. For the specific implementation of the first network device determining the target control item to be transmitted to the second network device, refer to S302 or S304.
[0075] S503: The first network device transmits at least one second packet to the second network device, where the target control item is located within the at least one second packet.
[0076] After determining the target control item to be transmitted to the second network device, the first network device may obtain at least one second packet based on the target control item and transmit the at least one second packet to the second network device. 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. For the specific implementation of the first network device obtaining at least one second packet, refer to S302.
[0077] In a specific implementation, the second packet may be a Border Gateway Protocol (BGP) packet, and the device identifier of the second network device may be located within the extended community attribute of the second packet. Specifically, the second packet may be an UPDATE packet of the BGP packet. For the format of the UPDATE packet and the encapsulation format of the device identifier, refer to the relevant description in S301.
[0078] In a specific implementation, the first network device may be a route reflection device. In this case, the second network device may be a client device such as R1 or R2 shown in FIG. 2a. Alternatively, the second network device may be a lower-level route reflection device such as R1 or R2 in FIG. 2b. When the second network device is a route reflection device, there may be a client device (the third network device) corresponding to the second network device, such as R3 and R4, or R5 and R6 in FIG. 2b. In this case, at least one second packet further includes the device identifier of the third network device. The device identifier of the third network device is used to instruct the second network device to determine the control item transmitted from the target control item to the third network device based on the device identifier of the third network device. For the implementation in which the second network device determines the control item to be transmitted to the third network device, refer to S302 or S304.
[0079] When there is a third network device corresponding to the second network device, before determining the target control items to be sent from the second network device to the third network device, the second network device may receive a fifth packet sent from the third network device. The fifth packet includes the device identifier of the third network device. Based on the device identifier of the third network device received from the fifth packet being identical to the device identifier of the third network device within the second packet, and from one or more second packets, the second network device determines the target control items to be sent to the third network device. For specific implementation, refer to S304.
[0080] Specifically, when the second network device is an egress node such as R3, R4, R5, or R6 in FIG. 2 b For the specific operations of the second network device after receiving the second packet, refer to the relevant description in S305. In this specification, details will not be repeatedly described in this embodiment.
[0081] Based on the above method embodiments, the embodiments of the present application further provide a packet transmission system. Refer to the structural diagram showing the packet transmission system in FIG. 6. This system may include a first network device 601 and a second network device 602.
[0082] The first network device 601 is configured to obtain at least one control item, and this at least one control item is located within at least one first packet. Each of these at least one first packets includes the device identifier of the network device to which the first packet needs to be sent. For the implementation of the first network device, refer to S301 or S501.
[0083] The first network device 601 is further configured to determine a target control item to be transmitted to the second network device based on that the device identifier included in part or all of at least one first packet is the device identifier of the second network device, and the target control item is one or more of the above at least one control item. For the implementation of the first network device, please refer to S302, S304, or S502.
[0084] The first network device 601 is further configured to transmit at least one second packet to the second network device, the target control item is located within the at least one second packet, and each of the at least one second packet includes the device identifier of the second network device. For the implementation of the first network device, please refer to S303, S305, or S503.
[0085] The second network device 602 is configured to receive the at least one second packet.
[0086] In a possible implementation, the system further includes a third network device 603, and the at least one second packet further includes the device identifier of the third network device. The second network device 602 is further configured to determine a control item to be transmitted to the third network device from the target control item based on the device identifier of the third network device, and this control item is of 1 one or a plurality of the target control items. For the implementation of the third network device, please refer to S304 or S503.
[0087] The second network device 602 is further configured to send at least one fourth packet to a third network device, the control item is located within the at least one fourth packet, and each of the at least one fourth packets includes a device identifier of the third network device. For the implementation of the second network device 602, refer to S305 or S503.
[0088] In a possible implementation, the second network device 602 is further configured to send a third packet to the first network device, and the third packet includes a device identifier of the second network device. For the implementation of the second network device 602, refer to S302 or S502.
[0089] In a possible implementation, the third network device 603 is further configured to send a fifth packet to the second network device, and the fifth packet includes a device identifier of the third network device. For the implementation of the third network device 603, refer to S304 or S503.
[0090] Furthermore, the embodiments of the present application further provide a packet transmission device. This device will be described below with reference to the accompanying drawings.
[0091] FIG. 7 is a schematic diagram showing the structure of a packet transmission device according to an embodiment of the present application. This device is applied to a first network device and can execute the functions of the first network device in the embodiment shown in FIG. 5. The device 700 may include an acquisition unit 701, a determination unit 702, and a transmission unit 703.
[0092] The acquisition unit 701 is configured to acquire at least one control item, the at least one control item is located within at least one first packet, and each of the at least one first packets includes a device identifier of the network device to which the first packet needs to be sent.
[0093] When the first network device to which the device 700 is applied is the ingress node 201, for the specific implementation in which the acquisition unit 701 acquires the control item, refer to S301 of the embodiment shown in FIG. 3. When the first network device to which the device 700 is applied is the transit node 202 or the egress node 203, for the specific implementation in which the acquisition unit 701 acquires the control item, refer to S303 or S305.
[0094] The determination unit 702 is configured to determine a target control item to be transmitted to the second network device based on the fact that the device identifier included in part or all of at least one first packet is the device identifier of the second network device, and the target control item is one or more of the above at least one control item.
[0095] For the specific implementation of the determination unit 702 refer to S302 or S304.
[0096] The transmission unit 703 is configured to transmit at least one second packet to the second network device. The target control item is located within the at least one second packet, and each of the at least one second packet includes the device identifier of the second network device.
[0097] For the specific implementation of the transmission unit 703, refer to S303 or S305.
[0098] In a possible implementation, this first device is a route reflection device. The network device to which the device 700 is applied may be a route reflection device such as, for example, the ingress node 201 or the transit node 202.
[0099] In a possible implementation, the second network device is a route reflection device, or the second network device is a client device.
[0100] When the first network device to which the apparatus 700 is applied is a route reflection device, the second network device may be a route reflection device. For example, the first network device is an ingress node 201, and the second network device is a transit node 202. Alternatively, the second network device is a client device. For example, the first network device is a transit node 202, and the second network device is an egress node 203.
[0101] In a possible implementation, when the second network device is a route reflection device, at least one second packet 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 item transmitted from a target control item to the third network device based on the device identifier of the third network device.
[0102] In a possible implementation, at least one second packet is a BGP packet, and the device identifier of the second network device is separately located within an extended community attribute of at least one second packet. For the format of the BGP packet and the encapsulation format of the device identifier, refer to S301. P pa For the format of the BGP packet and the encapsulation format of the device identifier, refer to S301.
[0103] In a possible implementation, the device identifier of the second network device is a router identifier.
[0104] In a possible implementation, the apparatus further includes a receiving unit (not shown in FIG. 7).
[0105] The receiving unit is further configured to receive a third packet transmitted from a second network device before the obtaining unit is executed, and the third packet includes a device identifier of the second network device. The determining unit is specifically configured to determine a target control item to be transmitted to the second network device from the one or more first packets based on that the device identifier of the second network device received from the third packet matches the device identifier of the second network device in the one or more first packets to which the target control item belongs.
[0106] For the specific implementation of the receiving unit and the determining unit, refer to S302.
[0107] In a possible implementation, the control item is a flowspec, an SR policy, or an RPD.
[0108] In a possible implementation, the at least one control item is obtained by the device from a controller or a server, or the at least one control item is received by the device from a fourth network device, or the at least one control item is locally set by the first network device. For the specific implementation of obtaining the control item, refer to S301.
[0109] In a possible implementation, when the device receives the at least one control item from the fourth network device, the at least one control item is determined by the fourth network device based on the device identifier of the device. For the implementation in which the network device to which the device 700 is applied receives the control item from the fourth network device, refer to S301.
[0110] For the specific executable functions and implementations of the packet transmission device 700, refer to the corresponding description of the first network device in the embodiment shown in FIG. 5. In this specification, details will not be repeatedly described.
[0111] FIG. 8 is a schematic diagram showing the structure of a communication device according to an embodiment of the present application. This communication device may be, for example, the ingress node 201, the transit node 202, or the egress node 203 in the embodiment shown in FIG. 3, or the first network device, the second network device, or the third network device in the embodiment shown in FIG. 5, or the device implementation of the packet transmission device 700 in the embodiment shown in FIG. 7.
[0112] Referring to FIG. 8, 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. There may be one or more processors 810 in the communication device 800, but FIG. 8 shows one processor as an example. In this embodiment of the present application, the processor 810, the communication interface 820, and the memory 830 may be connected using a bus system or in another manner, but in FIG. 8, they are connected via a bus system 840 as an example.
[0113] 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 hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0114] When the communication device includes the ingress node 201, the processor 810 may execute related functions such as obtaining at least one control item in the embodiment of the above method and determining a target control item. When the communication device is the transit node 202 or the egress node 203, the processor 810 may execute a related function of determining a target control item based on the device identifier in the embodiment of the above method.
[0115] The communication interface 820 is configured to receive and transmit packets. Specifically, the communication interface 820 may include a receiving interface and a transmitting interface. The receiving interface may be configured to receive packets, and the transmitting interface may be configured to transmit packets. There may be one or more communication interfaces 820.
[0116] The memory 830 may include a volatile memory such as a random access memory (RAM). Alternatively, the memory 830 may include a non-volatile memory such as a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). Alternatively, the memory 830 may include a combination of the above types of memory. The memory 830 may, for example, also store the above correspondence between the identification information and the tunnel.
[0117] Optionally, the memory 830 stores an operating system, programs, executable modules, or data structures, or subsets thereof, or extended sets thereof. The programs may include various operation instructions used to perform various operations. The operating system may include various system programs for performing various basic services and processing hardware-based tasks. The processor 810 may read the programs in the memory 830 and implement the packet transmission method according to the embodiments of the present application.
[0118] The memory 830 may be a storage component within the communication device 800 or an independent storage device from the communication device 800.
[0119] The bus system 840 may be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The bus system 840 may be classified into an address bus, a data bus, a control bus, and the like. For ease of expression, only one thick line is used to represent this bus in FIG. 8, but this does not mean that there is only one bus or only one type of bus.
[0120] FIG. 9 is a schematic diagram showing the structure of another communication device 900 according to the embodiments of the present application. The communication device 900 may be configured as the ingress node 201, the transit node 202, or the egress node 203 in the above embodiments, or may be the first network device, the second network device, or the third network device in the above embodiments, or may be the device implementation of the packet transmission device 700 in the embodiment shown in FIG. 7.
[0121] The communication device 900 includes a main control board 910 and an interface board 930.
[0122] The main control board 910 is also referred to as a main processing unit (MPU) or a route processor card. The main control board 910 controls and manages components within the communication device 900, such as functions of route calculation, device management, device maintenance, and protocol processing. The main control board 910 includes a central processing unit 911 and a memory 912.
[0123] The interface board 930 is also referred to as a line processing unit (LPU), a line card, or a service board. The interface board 930 is configured to provide various service interfaces and transfer data packets. The service interfaces include, but are not limited to, an Ethernet interface and a POS (Packet over SONET / SDH) interface. The Ethernet interface is, for example, a Flexible Ethernet Client (FlexE Client). The interface board 930 includes a central processing unit 931, a network processor 932, a forwarding entry memory 934, and a physical interface card (PIC) 933.
[0124] The central processing unit 931 on the interface board 930 is configured to control and manage the interface board 930 and communicate with the central processing unit 911 on the main control board 910.
[0125] The network processor 932 is configured to perform packet transfer processing. The form of the network processor 932 may be a transfer chip. Specifically, the processing of uplink packets includes the processing of the inbound interface of the packet and the search of the transfer table, and the processing of downlink packets includes the search of the transfer table and the like.
[0126] The physical interface card 933 is configured to perform the interconnection function at the physical layer. The original traffic enters the interface board 930 from the physical interface card 933, and the processed packets are transmitted 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 ... sa The physical interface card 933, also called a bu card, may be installed in the interface board 930, and is responsible for converting optical / electrical signals into packets, performing a validity check on the packets, and transferring the packets to the network processor 932 for processing. In some embodiments, the interface board 930 The central processing unit 931 on the above may also execute the functions of the network processor 932, such as performing software transfer based on a general-purpose CPU. In this case, the network processor 932 is not necessary in the physical interface card 933.
[0127] Optionally, the communication device 900 includes a plurality of interface boards. For example, the communication device 900 further includes an interface board 940. The interface board 940 includes a central processing unit 941, a network processor 942, a transfer entry memory 944, and a physical interface card 943.
[0128] Optionally, the communication device 900 further includes a switching board 920. The switching board 920 may also be referred to as a switch fabric unit (SFU). When a network device has multiple interface boards 930, the switching board 920 is configured to complete data exchange between the interface boards. For example, the interface board 930 and the interface board 940 may communicate with each other using the switching board 920.
[0129] The main control board 910 and the interface board 930 are coupled. For example, the main control board 910, the interface board 930, the interface board 940, and the switching board 920 are connected to the system backplane via a system bus to perform interoperability. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 910 and the interface board 930, and the main control board 910 and the interface board 930 communicate with each other via the IPC channel.
[0130] Logically, communication device 900 includes a control plane and a forwarding plane. The control plane includes a main control board 910 and a central processing unit 931. The forwarding plane includes components used for forwarding, such as a forwarding entry memory 934, a physical interface card 933, and a network processor 932. The control plane performs functions such as generating a forwarding table, processing signaling and protocol packets, and setting and maintaining the status of the device, such as the functions of a router. The control plane delivers the generated forwarding table to the forwarding plane. In the forwarding plane, the network processor 932 searches the forwarding table delivered from the control plane and forwards the packets received by the physical interface card 933. The forwarding table delivered from the control plane may be stored in the forwarding entry memory 934. In some embodiments, the control plane and the forwarding plane may be completely separated and not on the same device.
[0131] When communication device 900 is configured as a first network device, the central processing unit 911 may obtain control items and determine target control items based on the device identifier of a second network device. The network processor 932 may trigger the physical interface card 933 to send a second packet including the target control items to the second network device.
[0132] When communication device 900 is configured as a second network device, the central processing unit 911 may determine a second tunnel based on the identifier information in the packet. The network processor 932 may trigger the physical interface card 933 to determine target control items based on the determined device identifier of a third network device and send a packet including the target control items to the third network device.
[0133] It should be understood that the transmission unit 703 of the packet transmission device 700 may be equivalent to the physical interface card 933 or the physical interface card 943 of the communication device 900. The acquisition unit 701 and the determination unit 702 of the packet transmission device 700 may be equivalent to the central processing unit 911 or the central processing unit 931 of the communication device 900.
[0134] In this embodiment of the present application, it should be understood that the operations executed on the interface board 940 do not conflict with the operations executed on the interface board 930. For the sake of brevity, details will not be described. It should be understood that the communication device 900 of this embodiment may correspond to the first network device or the second network device in the embodiment of the above method. The main control board 910 of the communication device 900, as well as the interface board 930 and / or the interface board 940, may implement the functions and / or steps implemented by the first network device or the second network device in the embodiment of the above method. For the sake of brevity, details will not be described in this specification.
[0135] 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 also be one or more interface boards, and network devices with stronger data processing capabilities provide more interface boards. In addition, there may be one or more physical interface cards on the interface board. There may be no switching board, or there may be one or more switching boards. When there are multiple switching boards, load sharing and redundant backup may be implemented by those switching boards. In a centralized transfer architecture, a network device may not require a switching board, and the interface board provides the function of processing the service data of the entire system. In a distributed transfer architecture, a network device may have at least one switching board, and data exchange between multiple interface boards is implemented using the switching board to provide high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with a distributed architecture are better than those of devices with a centralized architecture. Optionally, alternatively, the network device may be in a form with only one card. Specifically, there is no switching board, and the functions of the interface board and the main control board are integrated into the card. In this case, the central processing unit on the interface board and the central processing unit on the main control board are combined into one central processing unit on the card, and the functions obtained after the two central processing units are combined are executed. Devices in this form (such as network devices such as low-end switches or routers) have relatively weak data exchange and processing capabilities. Which architecture is specifically used is determined by individual networking deployment scenarios.
[0136] In some possible embodiments, the first network device or the second network device may be implemented as a virtualized device. For example, the virtualized device may be a virtual machine (VM) on which a program having a packet transmission function is executed, and the virtual machine is introduced into a hardware device (e.g., a physical server). The virtual machine is simulated by software and is a complete computer system having the functions of a complete hardware system and operating 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 may be implemented based on a general-purpose physical server combined with network functions 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 having the above functions on a general-purpose physical server with reference to NFV technology after reading this application. Details are not described herein.
[0137] It should be understood that the network device in the above product form separately has any function of the first network device or the second network device in the embodiment of the above method. Details are not described herein.
[0138] Embodiments of the present application further provide a chip including a processor and an interface circuit. The interface circuit is configured to receive instructions and transmit the instructions to the processor. The processor may be, for example, a specific implementation form of the packet transmission device 700 shown in FIG. 7, and may be configured to execute the above packet transmission method. The processor is coupled to a memory, and the memory is configured to store programs or instructions. When the programs or instructions are executed by the processor, the chip system can implement any one of the method embodiments of the above method.
[0139] Optionally, there may be one or more processors in the chip system. The processor may be implemented using hardware, software or may be implemented using ware. When the processor is implemented using hardware, the processor may be, for example, a logic circuit or an integrated circuit. When the processor is implemented using software, the processor may be a general-purpose processor and is implemented by reading software code stored in a memory.
[0140] Optionally, there may be one or more memories in the chip system. The memory may be integrated with the processor or may be disposed separately from the processor. This is not limited in the present application. For example, the memory may be non-temporary memory and may be, for example, a read-only memory ROM. The memory and the processor may be integrated on the same chip or may be separately disposed on different chips. The type of the memory and the method of disposing the memory and the processor are not particularly limited in the present application.
[0141] For example, the chip system may be a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a system on chip (SoC), a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or another integrated chip.
[0142] Embodiments of the present application further provide a computer-readable storage medium including instructions or a computer program. When the instructions or the computer program are executed on a computer, the computer can execute the packet transmission method according to the above embodiments.
[0143] Embodiments of the present application further provide a computer program product including instructions or a computer program. When the computer program product is executed on a computer, the computer can execute the packet transmission method according to the above embodiments.
[0144] The embodiments of the present application are described in sequence, and each embodiment focuses on the differences from other embodiments. It should be noted that for the same or similar parts in the embodiments, refer to those embodiments. The system or device disclosed in the embodiments corresponds to the method disclosed in the embodiments, so it is briefly described. For related parts, refer to the description of the method.
[0145] In this application, it should be understood that "at least one" means one or more, and "a plurality of" means two or more. The term "and / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can indicate three cases: when only A exists, when only B exists, and when both A and B exist, where A and B can be singular or plural. The character " / " generally indicates an "or" relationship between related objects. "At least one of the following items (parts)", or similar expressions, indicates any combination of those items, including any combination of one item (part) or multiple parts (items). For example, "at least one of a, b, or c" may indicate a, b, c, "a and b", "a and c", "b and c", or "a, b, and c", where a, b, and c can be singular or plural.
[0146] In this specification, relative terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and it should be noted that it is not necessarily required or meant that there is any actual relationship or order between those entities or operations. Further, the terms "comprising" or "having", or any variations thereof, are intended to cover non-exclusive inclusion, so a process, method, article, or device that includes the listed elements does not contain only those elements, but also includes other elements not explicitly listed, or elements specific to those processes, methods, articles, or devices. The element described as "comprising..." does not exclude the existence of multiple same elements in the process, method, article, or device that includes that element, provided there are no further restrictions.
[0147] The steps of the methods or algorithms described in the embodiments disclosed in this specification may be implemented directly by hardware, by software modules executed by a processor, or by a combination of hardware and software modules. The software modules may be configured in random access memory (RAM), 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.
[0148] The embodiments disclosed above are described so as to enable those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the present application range of Thus, the present application is not limited to the embodiments described herein, but is applied to the broadest scope that conforms to the principles and novelty disclosed herein.
Claims
1. A packet transmission method, the method comprising: obtaining, by a first network device, at least one control item, wherein the at least one control item is located in at least one first packet, and each of the at least one first packet includes a device identifier of a network device to which the first packet needs to be transmitted, and the first network device is used as a route reflector (RR); determining, by the first network device, a target control item to be transmitted to a second network device based on that a device identifier included in a part or all of the at least one first packet is a device identifier of the second network device, wherein the target control item is one or more of the at least one control item; transmitting, by the first network device, at least one second packet to the second network device, wherein the target control item is located in the at least one second packet, and each of the at least one second packet includes the device identifier of the second network device; and the device identifier of the second network device is a router identifier (Router-ID) of the second network device; the control item is a flow specification (flowspec), a segment routing (SR) policy, or a route policy distribution (RPD). A packet transmission method.
2. The method according to claim 1, wherein the second network device is a route reflection device, or the second network device is a client of the first network device.
3. When the second network device is a route reflection device, the at least one second packet 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 item to be transmitted from the target control item to the third network device based on the device identifier of the third network device. The method according to claim 2.
4. The at least one second packet is a Border Gateway Protocol (BGP) packet, and the device identifier of the second network device is separately located within an extended community attribute of the at least one second packet. The method according to claim 1.
5. The method includes Before the first network device acquires the at least one control item, receiving, by the first network device, a third packet transmitted from the second network device, the third packet including the device identifier of the second network device. The method further includes Based on that a device identifier included in part or all of the at least one first packet is the device identifier of the second network device, the step of determining, by the first network device, a target control item to be transmitted to the second network device Based on that the device identifier of the second network device received from the third packet matches the device identifier of the second network device in one or more first packets to which the target control item belongs, the step of determining, by the first network device, a target control item to be transmitted to the second network device from the one or more first packets. The method according to claim 1.
6. The method according to claim 1, wherein the at least one control item is obtained by the first network device from a controller or a server, or the at least one control item is received by the first network device from a fourth network device, or the at least one control item is locally set by the first network device.
7. The method according to claim 6, wherein when the at least one control item is received by the first network device from the fourth network device, the at least one control item is determined by the fourth network device based on the device identifier of the first network device.
8. A packet transmission device, the device comprising: a processor and 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, and the device: obtains at least one control item, the at least one control item being located in at least one first packet, each of the at least one first packets including a device identifier of a network device to which the first packet needs to be transmitted, and the packet transmission device being used as a route reflector (RR); determines a target control item to be transmitted to the second network device based on that a device identifier included in a part or all of the at least one first packet is a device identifier of a second network device, the target control item being one or more of the at least one control item; transmits at least one second packet to the second network device, the target control item being located in the at least one second packet, each of the at least one second packets including the device identifier of the second network device; the device identifier of the second network device being a router identifier (Router-ID) of the second network device; to enable this. The packet transmission device, wherein the control item is a flow specification (flowspec), a segment routing (SR) policy, or a route policy distribution (RPD). **Claim 9** The apparatus according to claim 8, wherein the second network device is a route reflection device, or the second network device is a client of the packet transmission device. **Claim 10** The apparatus according to claim 9, when the second network device is a route reflection device, the at least one second packet 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 item transmitted from the target control item to the third network device based on the device identifier of the third network device. **Claim 11** The apparatus according to claim 8, wherein the at least one second packet is a Border Gateway Protocol (BGP) packet, and the device identifier of the second network device is separately located within an extended community attribute of the at least one second packet. **Claim 12** The processor is configured to read the computer-readable instruction or the computer program, and the apparatus receives a third packet transmitted from the second network device, the third packet includes a device identifier of the second network device, Based on that the device identifier of the second network device received from the third packet matches the device identifier of the second network device in one or more first packets to which the target control item belongs, the apparatus according to claim 8 is capable of determining the target control item transmitted to the second network device from the one or more first packets. **Claim 13** The apparatus according to claim 8, wherein the at least one control item is obtained by the apparatus from a controller or a server, or the at least one control item is received by the apparatus from a fourth network device, or the at least one control item is locally set by the packet transmission device.
14. A computer-readable storage medium including instructions or a computer program, which, when executed on a computer, enable the computer to execute the packet transmission method according to any one of claims 1 to 7.
Citation Information
Patent Citations
VPLS (Virtual Private LAN Service) output route filtering method and device based on BGP (Border Gateway Protocol)
CN102611632A
Routing information transmitting method and system and route reflector
CN104753794A
Route injection method and device
CN106059922A
Method to scale hierarchical route reflectors using automated outbound route filtering-list mechanism
US20060245374A1
Message processing method and apparatus, and relevant devices
WO2020043107A1