Route notification method and related device
The route announcement method in cloud computing systems simplifies network configuration by aggregating routes and using IGP packets with network slice identifiers, reducing tunnel complexity and enhancing packet forwarding efficiency.
Patent Information
- Application Number
- JP2023503021
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-11-11
- Filing Date
- 2021-07-19
- Publication Date
- 2024-09-09
- Estimated Expiration
- 2041-07-19
AI Technical Summary
Establishing end-to-end connectivity tunnels between user terminals and cloud servers in cloud computing systems requires complex configuration, leading to network configuration complexity.
A route announcement method that involves network devices advertising routes with subnet prefixes and route identifiers, allowing for reduced configuration complexity by aggregating routes and using Interior Gateway Protocol (IGP) packets, and incorporating network slice identifiers to facilitate packet forwarding based on network slice requirements.
Reduces the number of tunnels and configuration complexity in networks by enabling efficient packet forwarding based on subnet prefixes and network slice identifiers, improving packet transfer efficiency and reducing management overhead.
Smart Images

Figure 0007547606000005 
Figure 0007547606000007 
Figure 0007547606000003
Abstract
Description
[Technical field]
[0001] This application claims priority to Chinese Patent Application No. 202010692883.2, filed on July 17, 2020, and entitled "ROUTING POLICY CONTROL METHOD, APPARATUS, AND SYSTEM," Chinese Patent Application No. 202011248687.2, filed on November 10, 2020, and entitled "DATA PROCESSING METHOD AND RELATED DEVICE," Chinese Patent Application No. 202011254841.7, filed on November 11, 2020, and entitled "ROUTE ADVERTISEMENT METHOD AND RELATED DEVICE," all of which are incorporated by reference in their entireties herein.
[0002] The present application relates to the field of communication technologies, and in particular to a route announcement method and related device. [Background technology]
[0003] Cloud computing is a new computing model in which computing tasks are distributed to a resource pool containing a large number of computers, so that various application systems can obtain computing power, storage space, and various software services as needed. In a cloud computing system, a cloud server may be centrally located, and all application systems run on the cloud server, so that users (such as individual users or enterprise users) use terminals to access the cloud server.
[0004] The method in which a user uses a terminal to access a cloud server is to typically establish an end-to-end connection tunnel between a metropolitan area network in which the user's terminal is located and a backbone network in which the cloud service is located, so that the user accesses the cloud server based on the tunnel.
[0005] However, a large amount of configuration is required to establish a tunnel in this manner, which leads to configuration complexity. Summary of the Invention
[0006] The present application provides a route advertisement method and related apparatus to reduce associated configuration in a network. [Means for solving the problem]
[0007] According to a first aspect, a route advertisement method is provided, the method including: a first network device obtaining a first route, the first route including a first route prefix; the first network device advertising a second route, the second route including a subnetwork prefix and a route identifier, the range of the subnetwork prefix including the range of the first route prefix.
[0008] The subnet prefixes and route identifiers are advertised in a route advertisement manner, which can reduce the configuration required in the network, especially the tunnel-related configuration in the network.
[0009] In a possible embodiment, the first network device further obtains a third route, the third route including the second route prefix. The first network device obtains a subnet prefix based on the second route prefix and the first route prefix. The route is advertised in an aggregated manner, which can further reduce the number of tunnels in the network.
[0010] In a possible embodiment, the path identifier includes a network slice identifier.
[0011] In a possible embodiment, the network slice identifier includes a flexible algorithm identifier.
[0012] The network slice identifier is carried in the route, so that devices in the network can further forward corresponding packets based on the network slice identifier, thereby further reducing the complexity of the network configuration.
[0013] In a possible embodiment, the second route is advertised using Interior Gateway Protocol (IGP) packets, which are used for advertisement, which can reduce the difficulty of implementing this solution.
[0014] In a possible embodiment, the first route is advertised by a second network device.
[0015] In a possible embodiment, the second network device and the first network device belong to different IGP domains, or the second network device and the first network device belong to different BGP domains.
[0016] Routes from different domains can be installed and then published, thereby reducing the complexity of inter-network configurations.
[0017] According to a second aspect, a route advertisement apparatus is provided, the apparatus including: a receiving unit configured to obtain a first route advertised by a second network device, the first route including a first route prefix, and a sending unit configured to advertise a second route, the second route including a subnetwork prefix and a route identifier, and a range of the subnetwork prefix including a range of the first route prefix.
[0018] In a possible embodiment, the apparatus further includes a processing unit. The receiving unit is further configured to obtain a third route, the third route including a second route prefix. The processing unit is configured to obtain a subnet prefix based on the second route prefix and the first route prefix.
[0019] In a possible embodiment, the path identifier includes a network slice identifier.
[0020] In a possible embodiment, the network slice identifier includes a flexible algorithm identifier.
[0021] In a possible embodiment, the second route is advertised using Interior Gateway Protocol (IGP) packets.
[0022] According to a third aspect, there is provided a network device including a processor and a communications interface, the processor configured to execute instructions such that the network device performs the method according to the first aspect.
[0023] According to a fourth aspect, there is provided a network system, the network system including the network device of the second or third aspect.
[0024] According to a fifth aspect, a data processing method is provided, the method including: a first network device obtaining a first subnet prefix, the first subnet prefix being a destination identifier of a traffic engineering tunnel, the subnet prefix may include two fields, namely an IP address and a mask. For example, the subnet prefix may be A1::1 / 32. The first network device performs data processing based on the obtained first subnet prefix. Since the destination identifier of the traffic engineering tunnel includes the subnet prefix, the traffic engineering tunnel can match multiple packets having different destination addresses, so that the number of traffic engineering tunnels in a network may be reduced and configuration or management complexity may be avoided.
[0025] In a possible embodiment, the first network device performing data processing based on the first subnet prefix includes the first network device obtaining a first packet, and if there is a longest match between the first address and the first subnet prefix, the first network device transmits the first packet through the traffic engineering tunnel, where the first address is obtained based on a destination address of the first packet.
[0026] In possible implementations, the first address comprises a destination address of the first packet or a next hop forwarding address determined by the first network device based on the first packet.
[0027] When forwarding a packet, the network device forwards the packet based on the longest match between the packet's forwarding information and the subnet prefix, thereby avoiding configuring related information such as tunnels one by one based on the characteristics of the packet, reducing the number of tunnels and improving packet forwarding efficiency.
[0028] In possible implementations, the traffic engineering tunnel may include a segment routing policy (SR Policy) or a segment routing traffic engineering (SR TE tunnel).
[0029] In a possible implementation, the first network device performing data processing based on the first subnet prefix includes the first network device advertising a first routing packet based on the first subnet prefix, the first routing packet including a second subnet prefix, and the range of the second subnet prefix including the range of the first subnet prefix.
[0030] In a possible embodiment, the first routing packet comprises an Interior Gateway Protocol (IGP) packet.
[0031] In a possible embodiment, the first routing packet further comprises a route identifier.
[0032] In a possible embodiment, the route identifier includes a segment identifier SID included in the first network device, and the first route further includes a mapping relationship between the SID and the network slice identifier.
[0033] According to a sixth aspect, there is provided a data processing method, the method including: a first network device sending a traffic engineering tunnel to a second network device, a destination identifier of the traffic engineering tunnel including a subnetwork prefix.
[0034] The traffic engineering tunnel may be used to allow a second network device to match the traffic engineering tunnel on a longest subnet prefix basis, thereby reducing the number of tunnels in the network.
[0035] In a possible embodiment, the traffic engineering tunnel comprises a segment routing policy (SR Policy) or a segment routing traffic engineering (SR TE) tunnel.
[0036] According to a seventh aspect, a data processing method is provided, the method including: a first network device obtaining a first route published by a second network device, the first route including a first route prefix and a first address; the first network device obtaining a second route published by an intermediate network device, the second route including a first subnet prefix and a route identifier; a range of the first subnet prefix including the first address; the first network device receiving a first packet, where there is a longest match between a destination address of the first packet and the first route prefix; the first network device updating the first packet to obtain a second packet; the first network device sending the second packet via an egress, the egress being determined by the first network device based on the route identifier.
[0037] In a manner in which the second route issued by the intermediate network device corresponds to the first route issued by the second network device, after receiving a packet, the first network device may determine to forward the packet using the second route based on the destination address of the packet corresponding to the first route. That is, in the network, a tunnel or a route for transmitting the packet is determined in the manner of a subnet prefix, which can reduce the number of tunnels or traffic engineering tunnels in the network and avoid the complexity of configuration or management.
[0038] In a possible embodiment, the first address includes a next hop address or a first segment identifier (SID).
[0039] In a possible implementation, the first network device updating the first packet to obtain the second packet includes the first network device determining, based on a longest match between a destination address of the first packet and the first route prefix, that a next hop address corresponding to the first packet is the first SID. The first network device updates the first packet to obtain the second packet, the second packet including the first SID.
[0040] After determining that the destination address of the first packet matches the first route prefix in a longest match manner, the first network device encapsulates a first SID in the packet to indicate forwarding, thereby ensuring that a subsequent network device can forward the packet based on the first SID, and ensuring that the first packet can be forwarded based on the first SID, improving the feasibility of the solution. In a possible embodiment, the path identifier includes the first network slice identifier or the second SID, and the second SID is an SID of an intermediate network device.
[0041] In a possible embodiment, when the path identifier is a second SID, the second route further includes a mapping relationship between the second SID and a second network slice identifier.
[0042] The first network slice identifier or the second SID is used to represent the path identifier, so that modifications to conventional technology can be minimized, improving the practicability of this solution.
[0043] In a possible embodiment, the second packet further includes a path identifier. If the path identifier is a network slice identifier, the hop-by-hop header of the second packet includes the network slice identifier.
[0044] In a possible implementation, before the first network device transmits the second packet via the egress, the method further includes the first network device generating a correspondence between the first address and a route identifier based on a longest match between the first address and the first subnet prefix.
[0045] The first network device pre-generates a correspondence between the first SID and a route identifier, so that when the first network device obtains a second packet including the first SID, the first network device can determine an exit corresponding to the route identifier based on the correspondence, thereby saving the time of matching the first SID and the route identifier and improving forwarding efficiency.
[0046] In a possible implementation, the method further includes the first network device generating a correspondence between the first address and the egress identifier based on a longest match between the first address and the first subnet prefix.
[0047] The first network device pre-generates a correspondence between the first SID and an egress, so that when the first network device obtains a second packet including the first SID, the first network device can determine an egress corresponding to the first SID based on the correspondence, which saves route calculation time during forwarding and improves forwarding efficiency.
[0048] In a possible embodiment, the path identifier includes a network slice identifier or a second SID included in the intermediate network device. The network slice identifier may be, for example, a FlexAlgo ID, and the second SID may be, for example, an END SID.
[0049] In a possible embodiment, the second packet further includes a route identifier.
[0050] In a possible embodiment, the path identifier includes a network slice identifier, and the network slice identifier is carried in a hop-by-hop header of the second packet.
[0051] In a possible embodiment, the second route is an Interior Gateway Protocol (IGP) route. The intermediate network device publishes an IGP route to the first network device according to an IGP protocol, so that the modification to the prior art can be minimized, and the practicability of this solution is improved.
[0052] In a possible embodiment, the intermediate network device is disposed between a first network device and a second network device, the first network device and the second network device belong to different IGP domains, the first network device and the intermediate network device belong to the same IGP domain, and the intermediate network device is a border network device in the IGP domain.
[0053] In a possible embodiment, the first network device comprises a provider edge (PE) device.
[0054] In a possible embodiment, the second network device comprises a segment routing PE device.
[0055] In a possible implementation, the first SID includes a virtual private network (VPN) segment identifier VPN SID.
[0056] According to an eighth aspect, there is provided a data processing method, the method including: an intermediate network device obtaining a first subnet prefix and a route identifier, the first subnet prefix being a destination identifier of a first traffic engineering tunnel, the first traffic engineering tunnel corresponding to the route identifier; and the intermediate network device issuing a route advertisement packet, the route advertisement packet including a second subnet prefix and the route identifier, the range of the second subnet prefix including the range of the first subnet prefix.
[0057] After obtaining the first traffic engineering tunnel including the second subnet prefix, the intermediate network device issues a route advertisement packet carrying the first subnet prefix, and the range of the first subnet prefix includes the range of the second subnet prefix, so that upon receiving a packet whose destination address matches the second subnet prefix, the network device receiving the route advertisement packet can send the packet to the intermediate network device, which then forwards the packet based on the first traffic engineering tunnel, thereby reducing the number of tunnels or traffic engineering tunnels in the network and avoiding the complexity of configuration or management.
[0058] In a possible embodiment, the first traffic engineering tunnel further includes a segment identifier list, and after the step of issuing the route announcement packet, the method further includes the intermediate network device receiving the first packet, updating the first packet based on a longest match between the destination address of the first packet and the first subnet prefix to obtain a second packet, the second packet including the segment identifier list, and transmitting the second packet from the intermediate network device.
[0059] Upon receiving the second packet including the first SID, the intermediate network device can update the second packet based on the segment identifier list included in the first traffic engineering tunnel to obtain a third packet, and the intermediate network device can forward the third packet based on the segment identifier list, thereby ensuring that the third packet can be forwarded to the second network device.
[0060] In a possible embodiment, the destination address of the first packet includes the first segment identifier SID.
[0061] In a possible embodiment, the route advertisement packet is generated by the first network device in response to obtaining the first traffic engineering tunnel and route identifier.
[0062] In a possible embodiment, the intermediate network device determines that the second subnet prefix corresponds to the route identifier based on the correspondence relationship.
[0063] In a possible embodiment, the first traffic engineering tunnel includes a segment routing policy (SR Policy), the SR Policy includes a color identifier, and the correspondence includes a correspondence between the color identifier and a route identifier.
[0064] In a possible embodiment, the correspondence includes a correspondence between a first subnet prefix and a route identifier.
[0065] The intermediate network device can determine the route identifier corresponding to the SR policy based on the correspondence between the route identifier and the color identifier, thereby improving the feasibility of this solution.
[0066] In a possible embodiment, the first traffic engineering tunnel includes an SR policy, and before the intermediate network device issues the route announcement packet, the method further includes the intermediate network device obtaining a correspondence between the first subnet prefix and a route identifier. The intermediate network device determines that the SR policy corresponds to the route identifier based on the first subnet prefix and the correspondence.
[0067] In a possible implementation, before the intermediate network device issues the route advertisement packet, the method further includes the intermediate network device obtaining a second traffic engineering tunnel, the second traffic engineering tunnel including a third subnet prefix. The intermediate network device determines that the second traffic engineering tunnel corresponds to the route identifier. The intermediate network device determines a second subnet prefix based on the first subnet prefix and the third subnet prefix, the range of the second subnet prefix including the range of the first subnet prefix and the range of the third subnet prefix.
[0068] After obtaining multiple traffic engineering tunnels, the intermediate network device can obtain an aggregated subnet prefix based on the subnet prefixes of the multiple traffic engineering tunnels, and the resulting aggregated subnet prefix is carried in the process of issuing route announcement packets, thereby reducing the number of route announcement packets and saving packet overhead.
[0069] In a possible embodiment, the path identifier includes a first network slice identifier or a second SID, where the second SID is an SID of an intermediate network device.
[0070] In a possible embodiment, when the path identifier is a second SID included in the intermediate network device, the second route further includes a mapping relationship between the second SID and the second network slice identifier.
[0071] In a possible embodiment, the intermediate network device publishes route advertisement packets in the IGP domain in which the intermediate network device is located.
[0072] According to a fifth aspect, a data processing method is provided, the method including: a first network device obtaining a subnet prefix and a segment identifier list, the subnet prefix being a destination identifier of a traffic engineering tunnel. The first network device receives a first route published by a second network device, the first route including a route prefix and a first address, the subnet prefix range including the first address. The first network device receives a first packet, and there is a longest match between a destination address of the first packet and the route prefix. The first network device updates the first packet to obtain a second packet, the second packet including a SID and a segment identifier list. The first network device transmits the second packet.
[0073] In a possible embodiment, the first address comprises a next hop address or a segment identifier SID of the second network device.
[0074] In a possible implementation, if the first address is a SID, the second packet further includes the SID.
[0075] In a possible implementation, the method further includes the first network device generating a correspondence including a route prefix and a segment identifier list based on a longest match between the next hop address and the subnet prefix.
[0076] The first network device pre-generates a correspondence between a route prefix and a segment identifier list, so that when receiving a packet whose destination address matches a route prefix, the first network device can determine the corresponding segment identifier list to forward the packet, thereby improving packet forwarding efficiency.
[0077] In a possible implementation, the first network device updating the first packet includes the first network device updating a segment identifier list in the first packet based on a longest match and correspondence between a destination address and a route prefix of the first packet to obtain the second packet.
[0078] In a possible embodiment, the traffic engineering tunnel includes an SR policy, the SR policy further includes a color identifier, and the first route further includes a route identifier, and before the first network device updates the first packet, the method further includes the first network device determining that the first route corresponds to the traffic engineering tunnel based on the route identifier corresponding to the color identifier.
[0079] In the process of determining whether the first route matches the traffic engineering tunnel, the color identifier in the traffic engineering tunnel is further compared with the route identifier to ensure that the service request corresponding to the traffic engineering tunnel is the same as the service request corresponding to the route identifier, thereby ensuring the packet forwarding quality.
[0080] In a possible implementation, the path identifier comprises a network slice identifier or a color identifier.
[0081] In a possible embodiment, the traffic engineering tunnel comprises a segment routing traffic engineering (SR TE) tunnel.
[0082] In a possible embodiment, the SID comprises a virtual private network segment identifier VPN SID.
[0083] In a possible embodiment, the first network device comprises a PE device.
[0084] In a possible embodiment, the second network device comprises a PE device.
[0085] According to a ninth aspect, there is provided a network device including a processor and a communications interface, the processor configured to execute instructions such that the network device performs a method according to any implementation of the first aspect.
[0086] According to a tenth aspect, there is provided a network device including a processor and a communications interface, the processor configured to execute instructions such that the network device performs a method according to any implementation of the second aspect.
[0087] According to an eleventh aspect, there is provided a communication system, the network system including a network device according to the sixth aspect and a network device according to the seventh aspect.
[0088] According to a twelfth aspect, there is provided a network device including a processor and a communications interface, the processor configured to execute instructions such that the network device performs a method according to any implementation of the third aspect.
[0089] According to a thirteenth aspect, there is provided an intermediate network device including a processor and a communications interface, the processor configured to execute instructions such that the intermediate network device performs a method according to any implementation of the fourth aspect.
[0090] According to a fourteenth aspect, there is provided a network device including a processor and a communications interface, the processor configured to execute instructions such that the network device performs a method according to any implementation of the fifth aspect.
[0091] According to a fifteenth aspect, there is provided a network system, the network system including a network device according to the ninth aspect and / or an intermediate network device according to the tenth aspect.
[0092] In a possible embodiment, the network system further comprises a network device according to the eleventh aspect.
[0093] According to a sixteenth aspect, a network system is provided. The network system includes a first network device, a first intermediate network device, a second intermediate network device, and a second network device. The first intermediate network device obtains a first subnet prefix and a second subnet prefix, the first subnet prefix being a destination identifier of a first traffic engineering tunnel, and the second subnet prefix being a destination identifier of a second traffic engineering tunnel. The first intermediate network device transmits a first route advertisement packet, the first route advertisement packet including a third subnet prefix, and the first intermediate network device obtains the third subnet prefix by aggregating the first subnet prefix and the second subnet prefix. The second intermediate network device obtains the first route advertisement packet. The second intermediate network device receives the first packet transmitted by the second network device, and there is a longest match between a destination address of the packet and the third subnet prefix. The second intermediate network device obtains a second packet based on the first packet, and sends the second packet to the first intermediate network device.
[0094] In a possible implementation, before the second intermediate network device receives the packet transmitted by the second network device, the method further includes the second intermediate network device obtaining a first segment identifier SID corresponding to the third subnet prefix. The second intermediate network device issues a second route advertisement packet, the second route advertisement packet including the third subnet prefix, the first SID, and a first algorithm identifier, the first SID corresponding to the first algorithm identifier.
[0095] In a possible implementation, the first packet further includes a first SID.
[0096] In a possible embodiment, the method further includes: a second intermediate network device obtaining at least one network slice corresponding to the third subnet prefix, the at least one network slice including the second network slice. The second intermediate network device issues a third route advertisement packet, the third route advertisement packet including the third subnet prefix and an identifier of the second network slice. The second network device obtains the third route advertisement packet and determines a corresponding exit for the third subnet prefix based on the identifier of the second network slice.
[0097] In a possible implementation, the hop-by-hop header of the first packet carries an identifier of the second network slice.
[0098] In a possible embodiment, the second intermediate network device and the second network device belong to the same IGP domain, and the first network device and the second network device belong to different IGP domains.
[0099] An eighteenth aspect of the present application provides a computer storage medium. The computer storage medium may be non-volatile. The computer storage medium stores computer readable instructions. When the computer readable instructions are executed by a processor, a method according to any of the first, second, third, fourth, fifth, sixth, seventh, or eighth aspects is performed.
[0100] A nineteenth aspect of the present application provides a computer program product comprising instructions which, when run on a computer, enable the computer to perform a method according to any of the first, second, third, fourth, fifth, sixth, seventh or eighth aspects.
[0101] A twentieth aspect of the present application provides a chip system. The chip system includes a processor configured to support a network device in transmitting or processing the functions in the aforementioned aspects, such as data and / or information in the aforementioned methods. In a possible design, the chip system further includes a memory. The memory is configured to store program instructions and data for the network device. The chip system may include a chip, or may include a chip and other separate devices.
[0102] A twenty-first aspect of the present application provides a network device, the network device including a sending unit, a processing unit, and a receiving unit, the receiving unit configured to obtain a first subnet prefix, the first subnet prefix being a destination identifier of a traffic engineering tunnel, and the processing unit configured to perform data processing based on the first subnet prefix.
[0103] In a possible embodiment, the receiving unit is further configured to obtain the first packet. If there is a longest match between the first address and the first subnet prefix, the transmitting unit is configured to transmit the first packet through the traffic engineering tunnel, where the first address is obtained based on a destination address of the first packet.
[0104] In possible implementations, the first address includes a destination address of the first packet or a next hop forwarding address determined by the network device based on the destination address.
[0105] In a possible embodiment, the sending unit is further configured to advertise a first routing packet based on the first subnet prefix, the first routing packet including a second subnet prefix, and the range of the second subnet prefix including the range of the first subnet prefix.
[0106] In a possible embodiment, the first routing packet comprises an Interior Gateway Protocol (IGP) packet.
[0107] In possible embodiments, the traffic engineering tunnel comprises a segment routing policy (SR Policy) tunnel or a segment routing traffic engineering (SR TE) tunnel.
[0108] A twenty-second aspect of the present application provides a network device, the network device including a transmitting unit, a processing unit, and a receiving unit, the transmitting unit configured to transmit a traffic engineering tunnel to a second network device, the traffic engineering tunnel destination identifier including a subnet prefix.
[0109] In a possible embodiment, the traffic engineering tunnel comprises a segment routing policy (SR Policy) or a segment routing traffic engineering (SR TE) tunnel.
[0110] A twenty-third aspect of the present application provides a network device, the network device includes a sending unit, a processing unit, and a receiving unit. The receiving unit is configured to obtain a first route advertised by a second network device, the first route including a first route prefix and a first address. The receiving unit is further configured to obtain a second route published by an intermediate network device, the second route including a first subnet prefix and a route identifier, the range of the first subnet prefix including the first address. The receiving unit is configured to receive a first packet, and there is a longest match between a destination address of the first packet and the first route prefix. The processing unit is configured to update the first packet to obtain a second packet. The sending unit is configured to send the second packet via an egress, the egress being determined by the first network device based on the route identifier.
[0111] In a possible embodiment, the first address is a next hop address or a first segment identifier SID.
[0112] In a possible implementation, the processing unit is further configured to determine that an address corresponding to the first packet is the first SID based on a longest match between a destination address of the first packet and the first route prefix. The processing unit is further configured to update the first packet to obtain a second packet, the second packet including the first SID.
[0113] In a possible embodiment, the path identifier includes a first network slice identifier or a second SID, where the second SID is an SID of an intermediate network device.
[0114] In a possible embodiment, when the path identifier is a second SID, the second route further includes a mapping relationship between the second SID and a second network slice identifier.
[0115] In a possible embodiment, the second packet further includes a route identifier.
[0116] In a possible embodiment, the path identifier includes a network slice identifier and the hop-by-hop header of the second packet includes the network slice identifier.
[0117] In a possible embodiment, the second route is an Interior Gateway Protocol (IGP) route.
[0118] In a possible embodiment, the intermediate network device is disposed between a first network device and a second network device, the first network device and the second network device belong to different IGP domains, the first network device and the intermediate network device belong to the same IGP domain, and the intermediate network device is a border network device in the IGP domain.
[0119] In a possible embodiment, the first network device is a provider edge PE device.
[0120] In a possible embodiment, the second network device comprises a PE device.
[0121] In a possible embodiment, the first SID comprises a virtual private network segment identifier VPN SID.
[0122] In a possible implementation, the processing unit is further configured to generate a correspondence between the first address and the route identifier based on a longest match between the first address and the first subnet prefix.
[0123] In a possible embodiment, the processing unit is further configured to generate a correspondence between the first address and the egress identifier based on a longest match between the first address and the first subnet prefix.
[0124] A twenty-fourth aspect of the present application provides a network device, the network device including a transmitting unit, a processing unit, and a receiving unit. The receiving unit is configured to obtain a first subnet prefix and a route identifier, the first subnet prefix being a destination identifier of a first traffic engineering tunnel, the first traffic engineering tunnel corresponding to the route identifier. The transmitting unit is configured to issue a route advertisement packet, the route advertisement packet including a second subnet prefix and the route identifier, and the range of the second subnet prefix includes the range of the first subnet prefix.
[0125] In a possible embodiment, the first traffic engineering tunnel further includes a segment identifier list, and the receiving unit is further configured to receive the first packet. The processing unit is further configured to update the first packet based on a longest match between a destination address of the first packet and the first subnet prefix to obtain a second packet, the second packet including the segment identifier list. The transmitting unit is further configured to transmit the second packet.
[0126] In a possible embodiment, the destination address of the first packet includes the first segment identifier SID.
[0127] In a possible embodiment, the route advertisement packet is generated by the first network device in response to obtaining the first traffic engineering tunnel.
[0128] In a possible implementation, the processing unit is further configured to determine, based on the correspondence, that the second subnet prefix corresponds to the route identifier.
[0129] In a possible embodiment, the first traffic engineering tunnel includes a segment routing policy (SR Policy), the SR Policy includes a color identifier, and the correspondence includes a correspondence between the color identifier and a route identifier.
[0130] In a possible embodiment, the correspondence includes a correspondence between a first subnet prefix and a route identifier.
[0131] In a possible embodiment, the receiving unit is further configured to obtain a second traffic engineering tunnel, the second traffic engineering tunnel including a third subnet prefix. The processing unit is further configured to determine that the second traffic engineering tunnel corresponds to the route identifier. The processing unit is further configured to determine a second subnet prefix based on the first subnet prefix and the third subnet prefix, the range of the second subnet prefix including the range of the first subnet prefix and the range of the third subnet prefix.
[0132] In a possible embodiment, the path identifier includes a first network slice identifier or a second SID, where the second SID is an SID of an intermediate network device.
[0133] In a possible embodiment, when the path identifier is a second SID included in the intermediate network device, the second route further includes a mapping relationship between the second SID and the second network slice identifier.
[0134] In a possible embodiment, the receiving unit publishes route advertisement packets in the IGP domain in which the network device is located.
[0135] A twenty-fifth aspect of the present application provides a network device, the network device includes a sending unit, a processing unit, and a receiving unit. The receiving unit is configured to obtain a subnet prefix and a segment identifier list, the subnet prefix being a destination identifier of a traffic engineering tunnel. The receiving unit is further configured to obtain a first route, the first route including a route prefix and a first address, the range of the subnet prefix including the first address. The receiving unit is further configured to receive a first packet, where there is a longest match between the destination address of the first packet and the route prefix. The processing unit is further configured to update the first packet to obtain a second packet, the second packet including the segment identifier list. The sending unit is further configured to transmit the second packet.
[0136] In a possible embodiment, the first address comprises a next hop address or a segment identifier SID of the second network device.
[0137] In a possible implementation, if the first address is a SID, the second packet further includes the SID.
[0138] In a possible implementation, the processing unit is further configured to generate a correspondence including a root prefix and a segment identifier list based on a longest match between the first address and the subnet prefix.
[0139] In a possible implementation, the processing unit is further configured to update the segment identifier list in the first packet based on a longest match and correspondence between a destination address and a route prefix of the first packet to obtain the second packet.
[0140] In a possible embodiment, the traffic engineering tunnel includes an SR policy, the SR policy further includes a color identifier, and the first route further includes a path identifier. The processing unit is further configured to determine that the first route corresponds to the traffic engineering tunnel based on the path identifier corresponding to the color identifier.
[0141] In a possible embodiment, the path identifier comprises a color identifier.
[0142] In a possible embodiment, the traffic engineering tunnel comprises a segment routing traffic engineering (SR TE) tunnel.
[0143] In a possible embodiment, the SID comprises a virtual private network segment identifier VPN SID.
[0144] In a possible embodiment, the network device and / or the second network device comprises a PE device. [Brief description of the drawings]
[0145] [Figure 1] FIG. 1 is a schematic diagram of a network architecture according to an embodiment of the present application. [Diagram 2] 2 is a schematic flow chart of a route announcement method 200 according to an embodiment of the present application. [Diagram 3] 3 is a schematic flow chart of a data processing method 300 according to an embodiment of the present application. [Figure 4] 4 is a schematic flow chart of a data processing method 400 according to an embodiment of the present application. [Figure 5a] FIG. 2 is a schematic diagram of packet forwarding according to an embodiment of the present application; [Figure 5b] FIG. 2 is a schematic diagram of packet forwarding according to an embodiment of the present application; [Figure 6] 6 is a schematic flow chart of a data processing method 600 according to an embodiment of the present application. [Figure 7] 7 is a schematic flow chart of a data processing method 700 according to an embodiment of the present application. [Figure 8] FIG. 2 is a schematic diagram of another packet forwarding according to an embodiment of the present application; [Figure 9] 9 is a schematic diagram of the structure of a network device 900 according to an embodiment of the present application. [Figure 10] 1 is a schematic diagram of the structure of a network device 1000 according to an embodiment of the present application. [Figure 11] 11 is a schematic diagram of the structure of a network device 1100 according to an embodiment of the present application. [Figure 12] FIG. 12 is a schematic diagram of the structure of a network system 1200 according to an embodiment of the present application. [Figure 13] FIG. 13 is a schematic diagram of the structure of a network system 1300 according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0146] In the specification, claims, and accompanying drawings of this application, terms such as "first," "second," "third," and "fourth," etc. (when present) are intended to distinguish between similar objects, but do not necessarily indicate a particular order or sequence. It should be understood that such referred to data are interchangeable in appropriate circumstances, such that the embodiments of the application described herein may be performed in other orders than those illustrated or described herein. Furthermore, the terms "comprise," "correspond," and any other variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a list of steps or units is not necessarily limited to the steps or units explicitly listed, and may include other steps or units that are not explicitly listed or that are inherent to the process, method, product, or device.
[0147] In the embodiments of the present application, words such as "for example" are used to denote giving an example, illustration, or explanation. Any embodiment or design solution described in the embodiments of the present application as an "example" or "for example" should not be described as being preferred or having more advantages over another embodiment or design solution. Rather, the use of words such as "example", "for example", etc. is intended to present the relevant concept in a particular manner.
[0148] For ease of understanding, the following describes technical terms in the embodiments of this application first.
[0149] Segment Routing (SR) is a protocol designed based on the concept of source routing for forwarding data packets in a network. SR divides a network path into segments and assigns segment identifiers (SIDs) to segments and network nodes. A SID List (also called a label stack in SR-MPLS) may be obtained by sorting SIDs in order. The SID List can indicate the forwarding path. In SR technology, the nodes and paths through which a data packet carrying the SID List passes may be specified to meet traffic optimization requirements. To make an analogy, a data packet may be compared to a baggage, and SR may be compared to attaching a label to the baggage. If a baggage needs to be sent from area A through area B and area C to area D, a label indicating "first go to area B, then go to area C, and finally go to area D" may be attached to the baggage in origin area A. In this way, the label on the baggage only needs to be identified in each area, and the baggage can be forwarded from one area to another based on the label on the baggage. In SR technology, the head end adds a label to the data packet, and the intermediate node can forward the data packet to the next node based on the label until the data packet arrives at the destination node. For example,<SID 1、SID 2、SID 3> is inserted into the packet header of the data packet, and the data packet is first forwarded to the node corresponding to SID 1, then to the node corresponding to SID 2, and then to the node corresponding to SID 3. SR-MPLS is an abbreviation for Segment Routing Multi-Protocol Label Switching.
[0150] Internet Protocol Version 6 (IPv6) based segment routing (SRv6) refers to the application of SR technology to IPv6 networks. An IPv6 address (128 bits) is used to represent an SID. When forwarding a data packet, a network device supporting SRv6 queries a local segment identifier table (SID table) based on the destination address (DA) of the data packet. If there is a longest match between the destination address of the data packet and any SID in the local segment identifier table, the network device performs an action corresponding to the policy according to the policy associated with the SID in the local segment identifier table, for example, forwarding the data packet through the outbound interface corresponding to the SID. If there is no longest match between the destination address of the data packet and each SID in the local segment identifier table, the network device queries the IPv6 forwarding table and performs longest match forwarding based on the IPv6 forwarding table.
[0151] Segment Routing Header (SRH): An IPv6 packet includes an IPv6 standard header, an extension header (0, ..., n), and a payload. To implement SRv6 based on the IPv6 forwarding plane, an IPv6 extension header called the SRH extension header is added. The extension header specifies an IPv6 explicit route and stores IPv6 Segment List information. The function of the extension header is similar to the Segment List in SR-MPLS. The head end adds the SRH extension header to an IPv6 packet, so that intermediate nodes can forward the packet based on the route information included in the SRH extension header. Specifically, the SRH has two key pieces of information. One is a segment list in the IPv6 address format, which is similar to the label stack information in a multi-protocol label switching (MPLS) network. The Segment List, which contains multiple segment identifiers (Segment IDs, SIDs) arranged in order, indicates an explicit route in SR. The other is the segment left (Segment Left, SL). SL is a pointer to the current segment identifier.
[0152] In an SRv6 network, the value of the DA field in an IPv6 packet changes constantly. The value of the DA field is determined by both the SL and the Segment List. When the pointer SL points to the segment to be processed, for example, Segment List[2], the IPv6 address of Segment List[2] needs to be copied to the DA field.
[0153] In the forwarding plane, if a node supports SR and the node's segment identifier is in the destination address of the IPv6 packet, after receiving the packet, the node can decrement the SL by one, offset the pointer to the new segment, copy the segment identifier (i.e., in IPv6 address format) corresponding to the SL after the SL is decremented by one into the DA field, and then forward the packet to the next node. Usually, when the SL field is decremented to 0, the node pops up the SRH packet header and then performs the next processing on the packet. If the node does not support SR, the node does not need to process the SRH information in the IPv6 packet. Instead, the node looks up the IPv6 routing table based on the IPv6 destination address field and normally forwards the IPv6 packet.
[0154] An SR policy is a traffic engineering mechanism for SR. Typically, an SR policy includes a headend, a color identifier, a destination identifier, and a segment identifier list indicating a forwarding path. The headend identifies the headend that executes the SR policy. The color is used to associate an SR with a service attribute, such as low latency and high bandwidth, to summarize the service capability of the SR policy. The endpoint identifies the destination address of the SR policy. Typically, one SR policy is determined using (headend, color, endpoint). For the same headend, one policy may be determined instead using (color, endpoint). The SR policy may include one or more segment identifier lists to implement functions such as load balancing and multipath backup. When forwarding a packet, the headend determines the segment identifier list corresponding to the packet according to the SR policy to determine the forwarding path for forwarding the packet, and can encapsulate the segment identifier list into the packet to indicate or distribute the indicated path.
[0155] The route prefix includes an IP address and a subnet mask. In an IPv6 network, the length of the subnet mask may be 128 bits or less. In one example, the route prefix may be written as A1::1 / 32 or A1::1 / 128, where A1::1 is the IP address and 32 or 128 represents the length of the subnet mask.
[0156] A subnet prefix includes an IP address and a subnet mask, and represents a subnet. In an IPv6 network, the length of the subnet mask is less than 128 bits. In one example, a route prefix may be written as A1::1 / 32 or A1::1 / 64, where A1::1 is the IP address and 32 or 64 represents the length of the subnet mask.
[0157] The method for a user to access a cloud server is usually to establish an end-to-end connection tunnel between a metropolitan area network where a user's terminal or a company's branch office is located and a backbone network where a cloud service is located, so that the user can access the cloud server based on the tunnel. However, in order to establish a tunnel in this way, a large number of tunnels or traffic engineering tunnels usually need to be configured.
[0158] For example, FIG. 1 is a schematic diagram of a network architecture according to an embodiment of the present application. As shown in FIG. 1, the network on the left side of FIG. 1 is a metropolitan area network, and the network on the right side of FIG. 1 is a backbone network. The services and data of enterprise users are deployed in clouds connected to the backbone network. When accessing the cloud, the enterprise users need to access the data or services on the cloud from a provider edge (PE) device, i.e., PE 1 or PE 2 in the metropolitan area network on the left side, to cloud PE 1 or cloud PE 2 on the right side. Cloud PE indicates that the device is a PE device that accesses the cloud. In addition, the path from PE 1 or PE 2 to cloud PE 1 or cloud PE 2 further includes intermediate network devices, such as network device A and network device B in FIG. 1. If the enterprise users have network quality requirements for accessing the cloud, for example, the requirements of some services are low latency and the requirements of some services are high bandwidth, the path between the PE in the metropolitan area network and the cloud PE needs to be planned based on the network quality requirements.
[0159] Currently, these services have transmission quality requirements on the network, so the path between the PE and the cloud PE is usually planned and end-to-end traffic engineering is configured based on the service requirements and the network topology between the PE and the cloud PE. When the network scale is large or the network has multiple different service requirements, the configuration is complicated.
[0160] In consideration of this, an embodiment of the present application provides a route advertisement method, in which a network device advertises a route prefix acquired by the network device, so that after acquiring a route, the network device can determine a traffic engineering tunnel that matches a packet based on the longest match between an address associated with the route and a subnet prefix, thereby reducing the configuration workload.
[0161] 2 is a schematic flowchart of a route announcement method 200 according to an embodiment of the present application. As shown in FIG. 2, the route announcement method 200 includes the following steps:
[0162] Step 201: A first network device obtains a first route, where the first route includes a first route prefix.
[0163] The first network device may obtain the first route by receiving an associated configuration or by receiving the first route advertised by the second network device.
[0164] A network device may introduce any route into one or more network slices and publish the route according to an IGP protocol. The published route may carry identifiers of one or more network slices, or the route may carry a list of correspondences between one or more network slices and route identifiers. The published route may be a route of a network device outside the network slice scope. In this way, the network slice may be traversed using a route prefix corresponding to the introduced route. Alternatively, the introduced route may be an interface address of a network device in an IGP domain. In this way, traffic to access the interface address may also be forwarded within the domain based on the network slice.
[0165] The first network device may be, for example, a physical device such as a router, a switch, or a gateway, or may be a virtual device that supports route issuing and packet forwarding. In this embodiment, the specific types of the first network device and the second network device are not limited. For example, when the data processing method 200 is applied to the scenario shown in FIG. 1, the first network device may be, for example, a PE device located in the metropolitan area network shown in FIG. 1, or a network device A located in the backbone network shown in FIG. 1.
[0166] In a possible example, the first route obtained by the first network device may be distributed to the first network device by a second network device, which may be, for example, a controller or another path computation device, or may be pre-configured within the first network device.
[0167] Step 202: The first network device advertises a second route, where the second route includes a subnet prefix and a route identifier, and the range of the subnet prefix includes the range of the first route prefix.
[0168] The reference to the range of the subnet prefix including the range of the first root prefix includes, but is not limited to, the following two possible cases:
[0169] 1. The subnet prefix is the same as the first route prefix. Specifically, after obtaining the first route, the first network device can publish the first subnet prefix as the route prefix.
[0170] 2. The range of the subnet prefix is larger than the range of the first route prefix. Usually, if the subnet mask length of the subnet prefix is shorter than the subnet mask length of the first route prefix and the upper part of the IP address part of the subnet prefix and the first route prefix are the same, the range of the subnet prefix is considered to be larger than the range of the first route prefix. In one example, if the subnet prefix is, for example, A1:1:: / 32, the first route prefix is, for example, A1:1:1::1 / 64, the length of the subnet mask:32 is less than 64, and the upper part of the IP address of the subnet prefix and the first route prefix, for example, the A1:1 part, is the same, the range of the subnet prefix is considered to be larger than the range of the first route prefix. Similarly, if there is the same part between the upper part of a particular IP address and the IP address of the subnet prefix, the range of the subnet prefix may be considered to include the IP address. For example, if the IP address is A1:1:1:1::1 and the subnet prefix is A1:1::1 / 32 or A1:1:1:1::2 / 64, the range of the two subnet prefixes may be considered to include the IP address A1:1:1::1.
[0171] After obtaining the multiple routes, the first network device can aggregate route prefixes in the multiple routes to obtain a subnet prefix, and flood the subnet prefix in the IGP domain in which the first network device is located in a routing format.
[0172] Optionally, the route issued by the first network device further includes a path identifier, where the path identifier can indicate another network device for determining a forwarding path to the first network device. The path identifier includes a segment identifier or a network slice identifier of the first network device. The first network device can obtain the segment identifier or the network slice identifier in advance. The first network device can obtain the segment identifier instead based on a traffic engineering tunnel or a second subnet prefix, and issue the segment identifier using the first routing packet. The network slice identifier can be, for example, a flexible algorithm identifier (FlexAlgo ID) or another identifier capable of identifying a network slice.
[0173] The second route may further include a mapping relationship between the SID and the network slice identifier, such that a network device receiving the route identifier can determine a corresponding network slice identifier or SID based on the mapping relationship.
[0174] The path identifier can instruct another network device to determine a forwarding path to the first network device, and the path identifier corresponds to a traffic engineering tunnel. Specifically, forwarding paths determined based on the path identifier and a path indicated by the traffic engineering tunnel satisfy the same service requirement, e.g., both satisfy a low latency service requirement, or both satisfy a high bandwidth service requirement.
[0175] The scenario shown in Fig. 1 is used as an example. The first network device of the method 200 may be the PE 1 of Fig. 1, and the third network device of the method 200 may be the cloud PE 1 of Fig. 1.
[0176] For ease of understanding, the following describes an example in which the route announcement method 200 provided in this embodiment is applied to a data processing method with reference to a specific scenario.
[0177] The first network device may be further configured to forward the packet based on the traffic engineering tunnel. The first network device may receive the traffic engineering tunnel distributed by the controller, where the destination identifier of the traffic engineering tunnel is a subnetwork prefix, and the route indicated by the traffic engineering tunnel includes a route to the network device A. The subnetwork prefix may be an aggregation network segment, and the range of the aggregation network segment includes a range of addresses of the cloud PEs in the backbone network. In other words, some or all of the addresses of the cloud PEs in the backbone network are within the range of the aggregation network segment. For example, the subnetwork prefix may be A1::0 / 64. When PE 1 receives a packet destined for cloud PE 1, in other words, when the destination address of the packet is the address of cloud PE 1, PE 1 determines that the packet matches the traffic engineering tunnel based on the longest match between the destination address of the packet and the subnetwork prefix, and forwards the packet to the network device A based on the route indicated by the traffic engineering tunnel. Finally, network device A is configured to forward the packet to cloud PE 1. Because the destination identifier of the traffic engineering tunnel is a subnetwork prefix, there can be a longest match between each of the destination addresses of the packet destined for multiple or all cloud PEs in the backbone network and the subnetwork prefix. In other words, PE 1 can forward the packet destined for any cloud PE in the backbone network to network device A based on the path indicated by the traffic engineering tunnel, and finally, network device A is configured to forward the packet to the corresponding cloud PE.In this way, the number of traffic engineering tunnels in the network may be effectively reduced and configuration or management complexities may be avoided.
[0178] An example in which the first address is the destination address of the packet is used in the above description. In practical application, the first address may alternatively be a next-hop forwarding address determined by PE 1 based on the packet, such as a segment identifier or a next-hop address. For example, cloud PE 1 may issue a route to the PE. The route includes a route prefix and a segment identifier (Segment Identifier, SID). In this way, after receiving a first packet destined for cloud PE 1, PE 1 can determine that the packet needs to be forwarded based on the segment identifier based on the longest match between the destination address of the first packet and the route prefix of the route, where the segment identifier is the determined next-hop forwarding address, and then determine that the packet matches the traffic engineering tunnel based on the longest match between the segment identifier and the subnet prefix of the traffic engineering tunnel, so that PE 1 can forward the packet based on the traffic engineering tunnel. In an example, PE 1 can update the first packet. The first packet includes an SRH, which includes a segment identifier list of traffic engineering tunnels and a segment identifier issued by cloud PE 1.
[0179] The method 200 may further include the first network device further obtaining a second route, the second route including a route prefix and a first address, the first address including a next hop address or a segment identifier SID. The first network device obtains a correspondence between the route prefix and the traffic engineering tunnel based on a longest match between the first address and the first subnet prefix carried in the second route, e.g., obtains a correspondence between the route prefix and the identifier of the traffic engineering tunnel. In this manner, when determining that there is a longest match between the destination address of the first packet and the subnet prefix, the first network device may determine, via a table lookup, a route prefix corresponding to the subnet prefix in a routing table to obtain a traffic engineering tunnel used to forward the first packet, and finally forward the first packet based on the tunnel indicated by the traffic engineering tunnel.
[0180] In the following, an embodiment of the scenario-based method provided in the present application is described with reference to an exemplary application scenario. Figure 3 is a schematic flowchart of a data processing method 300 according to an embodiment of the present application. As shown in Figure 3, the data processing method 300 includes the following steps:
[0181] Step 301: A first network device obtains a first route published by a second network device, where the first route includes a first route prefix.
[0182] The first network device and the second network device may each be a physical device, such as a router, a switch, or a gateway, or may be a virtual device that supports route issuing and packet forwarding. In this embodiment, the specific types of the first network device and the second network device are not limited. For example, when the data processing method 300 is applied to the scenario shown in FIG. 1, the first network device may be, for example, a cloud PE device located in the backbone network shown in FIG. 1, and the second network device may be, for example, a PE device located in the metropolitan area network shown in FIG. 1.
[0183] A network connection is established between a first network device and a second network device, and includes one or more network devices between the first network device and the second network device, and packets transmitted between the first network device and the second network device need to pass through the one or more network devices between the first network device and the second network device.
[0184] In one example, the first network device and the second network device may be located in different network domains, for example, different IGP domains. Packets may be transmitted in different manners in the network domain in which the first network device is located and the network domain in which the second network device is located. For example, the first network device may be located in a flexible algorithm-based IGP (FlexAlgo) network or an SR network, and the first network device may perform a route calculation based on a network slice identifier, determine an exit corresponding to the packet, and transmit the packet. The second network device may be located in the SR network. In the network, a forwarding tunnel may be indicated by configuring an SR Policy or a segment routing traffic engineering (SR TE tunnel). The second network device may transmit the packet based on the indication of the segment identifier list.
[0185] In an exemplary scenario, the first network device may be, for example, a provider edge PE device of an access cloud in a backbone network, where the backbone network may be a FlexAlgo network or an SR network. The second network device may be, for example, a segment routing based PE device in a metropolitan area network. The metropolitan area network may be an SR network configured with traffic engineering, where the traffic engineering includes SR policy or SR TE tunnels.
[0186] The first network device can obtain the first route in a number of ways.
[0187] In a possible implementation, the second network device can use a route reflector to publish the first route to the first network device. Specifically, the first network device obtains the first route by receiving routing information sent by the route reflector.
[0188] In another possible embodiment, the second network device may use a device between the first network device and the second network device to issue the first route to the first network device as an alternative. Specifically, the first network device obtains the first route by receiving routing information transmitted by a device between the first network device and the second network device. The manner in which the first network device obtains the first route is not particularly limited in this specification.
[0189] The first route includes a first route prefix. The first route prefix may be a private network address of the second network device. For example, the first route prefix may be 2.2.2.2 / 24.
[0190] Step 302: The intermediate network device obtains a second subnet prefix and a route identifier, where the second subnet prefix is a destination identifier of a first traffic engineering tunnel, and the first traffic engineering tunnel corresponds to the route identifier.
[0191] The intermediate network device is located between the first network device and the second network device. The intermediate network device and the first network device may belong to the same IGP domain, and the intermediate network device may be a border network device of the IGP domain. The intermediate network device may be, for example, a physical device such as a router, a switch, or a gateway, or may be a virtual device that supports route issuing and packet forwarding. The specific type of the intermediate network device is not limited in this embodiment. For example, when the data processing method 300 is applied to the scenario shown in FIG. 1, the intermediate network device may be, for example, a device located in the backbone network shown in FIG. 1 and connected to the metropolitan area network, and the intermediate network device may be, for example, network device A located in the backbone network shown in FIG. 1.
[0192] The intermediate network device may obtain the second subnet prefix by obtaining a configuration of a traffic engineering tunnel or in another manner, which is not particularly limited in this application.
[0193] The first traffic engineering tunnel obtained by the intermediate network device may be sent to the intermediate network device by the controller or another device, or may be preconfigured in the intermediate network device. The first traffic engineering tunnel includes a second subnet prefix and a forwarding path corresponding to the second subnet prefix. The second subnet prefix may be a subnet prefix of the second network device, for example, a locator address of the second network device. In this case, the forwarding path corresponding to the second subnet prefix is a forwarding path from the intermediate network device to the second network device.
[0194] For example, the controller can send an SR policy to an intermediate network device, and the endpoint of the SR policy is an address obtained by aggregating the locator address or loopback address of the second network device. The head of the SR policy is the address of the intermediate network device, the endpoint is the locator address of the second network device (i.e., the second subnet prefix), and the segment identifier list included in the SR policy indicates a forwarding path from the intermediate network device to the second network device.
[0195] The path identifier obtained by the intermediate network device in the SR TE tunnel may be used by a network device in a network through which the forwarding path passes to determine a forwarding path to the intermediate network device. Further, the path identifier corresponds to a first traffic engineering tunnel. The forwarding path determined based on the path identifier and the forwarding path included in the first traffic engineering tunnel meet the same service requirement, e.g., both meet a low latency service requirement, or both meet a high bandwidth service requirement.
[0196] In a possible example, the route identifier includes a network slice identifier or a second SID included in an intermediate network device.
[0197] If the path identifier is a network slice identifier, the intermediate network device can determine the path identifier in multiple manners.
[0198] Method 1: When the first traffic engineering tunnel is an SR policy, the intermediate network device can determine a corresponding route identifier based on a correspondence relationship between a color identifier and a route identifier.
[0199] For example, there may be a correspondence between the color and a network slice identifier (e.g., FlexAlgo ID) in an intermediate network device of the traffic engineering tunnel. The intermediate network device may determine that the SR Policy corresponds to a path identifier based on the correspondence between the color and the network slice identifier. The path identifier may be, for example, a network slice identifier. For example, if the color of the SR Policy is 123, the intermediate network device may determine that the SR Policy corresponds to FlexAlgo 128 based on the correspondence between the color and the FlexAlgo ID.
[0200] Method 2: If the first traffic engineering tunnel is an SR policy, the intermediate network device can determine a corresponding route identifier based on the correspondence between the subnet prefix and the route identifier.
[0201] For example, if the second network device is located in the SR Policy network, the first traffic engineering tunnel may be an SR Policy. In the planning process of the SR Policy network, a subnet prefix corresponding to the network device is assigned based on a network slice identifier corresponding to the network device. For example, the subnet prefix is assigned based on a network slice identifier corresponding to a low latency service requirement. Thus, the correspondence between the subnet prefix and the network slice identifier may be preconfigured in the intermediate network device. In this way, based on the second subnet prefix and the correspondence, the intermediate network device can determine that the SR Policy corresponds to the route identifier. For example, if the subnet prefix of the SR Policy is A2::0 / 64, the intermediate network device can determine that the SR Policy corresponds to FlexAlgo 128 based on the correspondence between the subnet prefix and the FlexAlgo ID.
[0202] Method 3: If the first traffic engineering tunnel is an SR TE tunnel, the intermediate network device may determine a corresponding route identifier based on a correspondence between the SR TE tunnel and the route identifier.
[0203] For example, when the second network device is located in the SR TE tunnel network, the first traffic engineering tunnel may be an SR TE tunnel. The correspondence between the SR TE tunnel and the network slice identifier may be preconfigured in the intermediate network device. In this manner, the intermediate network device can determine that the SR TE tunnel corresponds to the route identifier based on the correspondence.
[0204] In addition, if the route identifier is a second SID included in the intermediate network device, after determining the network slice identifier corresponding to the first traffic engineering tunnel in any one of the above three manners, the intermediate network device may generate a second SID corresponding to the network slice identifier. The second SID may be, for example, an END SID of the intermediate network device. That is, the END SID and the network slice identifier may represent network quality. A network device in which the destination identifier and the intermediate network device are in the same IGP domain may forward the packet to the intermediate network device based on the END SID.
[0205] Step 303: In response to obtaining the first traffic engineering tunnel and the route identifier, the intermediate network device may issue a route advertisement packet in an IGP domain in which the intermediate network device is located, the route advertisement packet including a first subnet prefix and the route identifier, and the range of the first subnet prefix includes the range of the second subnet prefix.
[0206] In one example, a first subnet prefix in the route announcement packet issued by the intermediate network device may be the same as a second subnet prefix in the first traffic engineering tunnel and received by the intermediate network device. Specifically, the intermediate network device issues a corresponding route announcement packet based on the acquired traffic engineering tunnel. In another example, the first subnet prefix may alternatively be different from the second subnet prefix. In this case, the range of the first subnet prefix includes the range of the second subnet prefix. Specifically, the intermediate network device generates a new subnet prefix (i.e., the second subnet prefix) based on the multiple subnet prefixes included in the multiple acquired traffic engineering tunnels, and issues a corresponding route announcement packet.
[0207] The intermediate network device may determine, based on the correspondence, that the first subnet prefix corresponds to the route identifier.
[0208] In one example, the correspondence includes a correspondence between the second subnet prefix and the route identifier. The intermediate network device may be statically configured with the correspondence between the subnet prefix and the route identifier, or the controller may distribute the correspondence between the subnet prefix and the route identifier to the intermediate network device, and the intermediate network device may determine to obtain the correspondence between the second subnet prefix and the route identifier based on the correspondence.
[0209] In another example, the first traffic engineering tunnel may be a segment routing policy (SR Policy), and the SR Policy includes a color identifier. The intermediate network device may determine that the first subnet prefix corresponds to the path identifier based on the correspondence including the color identifier and the path identifier. The intermediate network device may be statically configured with the correspondence between the color identifier and the path identifier, or the controller distributes the correspondence between the color identifier and the path identifier to the intermediate network device. Thus, the intermediate network device may determine that the first subnet prefix corresponds to the path identifier based on the color identifier and the correspondence included in the SR Policy.
[0210] For example, before issuing the route announcement packet, the intermediate network device obtains a second traffic engineering tunnel, the second traffic engineering tunnel including a third subnet prefix, the intermediate network device determines that the second traffic engineering tunnel corresponds to the route identifier, the intermediate network device determines a first subnet prefix based on the second subnet prefix and the third subnet prefix, and the range of the first subnet prefix includes the range of the second subnet prefix and the range of the third subnet prefix.
[0211] In other words, when the intermediate network device obtains multiple traffic engineering tunnels, if the multiple traffic engineering tunnels correspond to the same route identifier, the intermediate network device can aggregate the subnet prefixes in the multiple traffic engineering tunnels into one subnet prefix and include the aggregated subnet prefix in the issued route advertisement packet. In this way, for multiple traffic engineering tunnels with the same route identifier, the intermediate network device can issue one route advertisement packet only in the IGP domain to reduce the overhead of the advertisement packets. In addition, the multiple subnet prefixes are aggregated into a broader range subnet prefix, so that the route management of the first network device can be further reduced and the number of tunnels can be reduced accordingly.
[0212] In another example, when the first traffic engineering tunnel is sent to the intermediate network device by a border device in a network domain in which the first network device is located, the border device may alternatively receive multiple traffic engineering tunnels having the same route identifier and generate the first traffic engineering tunnel based on the multiple traffic engineering tunnels. In other words, the border device may aggregate subnet prefixes in the multiple traffic engineering tunnels received by the border device into one subnet prefix and send the aggregated subnet prefix carried in the first traffic engineering tunnel to the intermediate network device.
[0213] In one example, when the route identifier is a second SID included in the intermediate network device, the second route further includes a mapping relationship between the SID and the network slice identifier. In this way, the network device that receives the route announcement packet can generate a corresponding mapping relationship table based on the mapping relationship, so that when the network device receives a packet including the SID, the network device can determine the corresponding network slice identifier based on the SID and the mapping relationship table.
[0214] Step 304: The first network device obtains a second route published by the intermediate network device, where the second route includes the first subnet prefix and a route identifier.
[0215] After the intermediate network device issues a route announcement packet in the IGP domain, the first network device can receive a second route including the first subnet prefix and a route identifier, and the second route is, for example, an IGP route. For example, if there is another network device between the first network device and the intermediate network device, the second route may be sent to the first network device by a neighboring device of the first network device based on the route announcement packet.
[0216] In one example, the range of the first subnet prefix includes the range of the first route prefix. Specifically, the first network device performs a longest match operation based on the first route prefix in the first route to match the first subnet prefix. In this manner, the first network device can establish an association relationship between the first route and the second route based on the longest match between the first route prefix and the first subnet prefix.
[0217] In another example, the first route received by the first network device further includes a first address, and there is a longest match between the first address and the first subnet prefix. In other words, the first network device can establish an association relationship between the first route and the second route based on the longest match between the first address and the first subnet prefix.
[0218] Optionally, the first address may include a next hop address or a first SID of the second network device. The first SID may indicate a location of the second network device in a network or a network service provided by the second network device. For example, the first SID may be a virtual private network segment identifier VPN SID or another SID that may indicate a location of the second network device. For example, the first SID may be a VPN SID assigned to a locator network segment of the second network device.
[0219] It should be noted that in this embodiment, there is no order between step 301 and step 304. Step 301 may be performed before step 304, or step 304 may be performed before step 301, or step 301 and step 304 may be performed simultaneously, which is not particularly limited in this embodiment.
[0220] Step 305: A first network device receives a first packet.
[0221] In this embodiment, the first packet may be, for example, a service packet received by a first network device and destined for a second network device.
[0222] Step 306: The first network device updates the first packet to obtain the second packet.
[0223] In one example, if the range of the first subnet prefix includes the range of the first route prefix, the first network device may determine that the first packet may be transmitted based on a route identifier in the second route based on the longest match between the destination address of the first packet and the first route prefix and the longest match between the first route prefix and the first subnet prefix. The first network device may update the route identifier to the first packet to obtain the second packet. The route identifier may include, for example, a network slice identifier or a second SID, for example, an END SID, included in the intermediate network device.
[0224] In another example, when the first route further includes a first address and there is a longest match between the first address and the first subnet prefix, the first network device may determine that the first packet may be transmitted based on the route identifier of the second route based on the longest match between the destination address of the first packet and the first route prefix. The first network device may update the route identifier to the first packet to obtain the second packet. In addition, when the first address is the first SID, the first network device may further update the first SID to the first packet to obtain the second packet. That is, the updated second packet includes the first SID and the route identifier.
[0225] It should be understood that if the path identifier is a network slice identifier (e.g., a FlexAlgo ID), the path identifier may be carried in a hop by hop options header of the second packet.
[0226] In one example, after receiving the first route, the first network device can generate a corresponding routing or forwarding table, the table including the first route prefix and the first SID. In this way, after obtaining the first packet, the first network device can determine, by table lookup, that there is a longest match between the destination address of the first packet and the first route prefix to determine the first SID corresponding to the first packet, and encapsulate the first SID in the first packet to obtain a second packet.
[0227] In another example, the first network device may obtain a first SID corresponding to a first route prefix from a different table to obtain the second packet.
[0228] Step 307: The first network device sends the second packet via an egress, where the egress is determined by the first network device based on the path identifier.
[0229] In this embodiment, before transmitting the second packet via an egress, the first network device may determine the egress for transmitting the second packet based on the first address in the second packet.
[0230] The first network device can determine the exit in a number of ways.
[0231] In one example, the first network device may generate a correspondence between the first address and the route identifier based on the longest match between the first address and the first subnet prefix. Thus, the first network device may determine the route identifier based on the first address in the second packet and the correspondence. If the route identifier is a network slice identifier, the first network device may obtain an egress for transmitting the second packet based on the network slice identifier. If the route identifier is a second SID included in the intermediate network device, the second route issued by the intermediate network device may further include a mapping relationship between the second SID and the network slice identifier. The first network device may determine a corresponding network slice identifier based on the mapping relationship between the second SID and the second route, and then determine a corresponding egress based on the obtained network slice identifier.
[0232] In one example, the first network device may perform path computation in advance based on the network slice identifier to determine an exit corresponding to the network slice identifier, and store a correspondence between the network slice identifier and the identifier of the exit. In this case, the first network device may obtain the identifier of the exit based on the correspondence between the first subnet prefix and the network slice identifier and the correspondence between the network slice identifier and the exit identifier, and determine the exit.
[0233] In another example, when the first network device obtains an egress corresponding to the network slice identifier and there is a longest match between the first SID and the first subnet prefix, the first network device generates a correspondence between the first SID and the egress identifier. In this way, the first network device can determine the egress of the second packet based on the first SID in the second packet and the correspondence. Step 308: The intermediate network device receives the second packet.
[0234] If there is no other network device between the first network device and the intermediate network device, the first network device may send the second packet to the intermediate network device via the egress.
[0235] If there is another network device between the first network device and the intermediate network device, the network device in the IGP domain in which the first network device is located will also receive the route announcement packet sent by the intermediate network device, so that similarly, after the first network device sends the second packet via the egress, the network device between the first network device and the intermediate network device can forward the second packet based on the route identifier in the second packet to ultimately ensure that the intermediate network device receives the second packet.
[0236] Step 309: The intermediate network device updates the second packet to obtain a third packet, where the third packet includes the segment identifier list.
[0237] After receiving the second packet, the intermediate network device may determine a corresponding traffic engineering tunnel based on the second packet, such that the intermediate network device may forward the second packet based on the determined traffic engineering tunnel.
[0238] The intermediate network device may perform a longest match operation based on a destination address of the second packet and determine to forward the second packet based on the traffic engineering tunnel based on the longest match between the destination address of the second packet and a second subnet prefix included in the traffic engineering tunnel.
[0239] In one example, the destination address of the second packet may be the first SID. Specifically, the intermediate network device may perform a longest match operation based on the first SID and determine to forward the second packet based on the traffic engineering tunnel based on the longest match between the first SID and a second subnet prefix included in the traffic engineering tunnel.
[0240] In another example, the destination address of the second packet may not be the first SID, i.e., the destination address of the second packet is the same as the destination address of the first packet, and the first network device does not update the destination address of the first packet.
[0241] It should be understood that in scheme 2, there may be two cases where the destination address of the second packet is not the first SID.
[0242] Case 1: The range of the first subnet prefix in the second route includes the range of the first route prefix in the first route. In other words, the range of the second subnet prefix in the traffic engineering tunnel includes the range of the first route prefix, and the second subnet prefix may be an aggregation network segment obtained by aggregating multiple route prefixes.
[0243] Case 2: The first route further includes a first address, the first address is a next hop address, and there is a longest match between the first address and the first subnet prefix. In other words, the range of the second subnet prefix in the traffic engineering tunnel includes the range of the next hop address, and the second subnet prefix may be an aggregation network segment obtained by aggregating multiple next hop addresses.
[0244] In addition, as described above, the first subnet prefix and the second subnet prefix may be the same or different.
[0245] In one example, if the first subnet prefix and the second subnet prefix are the same, the intermediate network device may search for a subnet prefix corresponding to the destination address of the second packet or the first SID, according to a longest match principle, among the subnet prefixes corresponding to the one or more obtained traffic engineering tunnels, until a second subnet prefix having the highest match is found.
[0246] In another example, if the first subnet prefix and the second subnet prefix are different, the first subnet prefix may be obtained by aggregating the subnet prefixes included in the multiple traffic engineering tunnels. Similarly, the intermediate network device may search the subnet prefixes corresponding to one or more of the obtained traffic engineering tunnels for a subnet prefix corresponding to the destination address of the second packet or the first SID according to the longest match principle until a second subnet prefix having the highest match is found.
[0247] It should be understood that when searching for a route, multiple match results may usually be obtained, and the route with the longest network prefix from the multiple match results is selected. This may be called the longest match principle. A longer network prefix indicates a smaller address block and a more specific route.
[0248] If it is determined that there is a longest match between the destination address of the second packet and the first subnet prefix, the first subnet prefix is included in the first traffic engineering tunnel, and therefore the intermediate network device can determine a forwarding path included in the first traffic engineering tunnel. The forwarding path may be, for example, a segment identifier list. In this manner, the intermediate network device can update the segment identifier list to the second packet to obtain a third packet that includes the segment identifier list. The segment identifier list in the third packet indicates a network device between the second network device and the intermediate network device to forward the third packet, resulting in the third packet being forwarded to the second network device.
[0249] In a possible example, when the first traffic engineering tunnel is an SR policy, the SR policy may include multiple candidate paths to implement load sharing, and the multiple candidate paths have different weights. The intermediate network device may select a path based on the weights of the multiple candidate paths in the SR policy and obtain a segment identifier list corresponding to the path.
[0250] Step 310: The intermediate network device transmits a third packet.
[0251] The intermediate network device may send a third packet based on a destination address of the third packet, and the destination address of the third packet may be a first SID in a segment identifier list included in the third packet. Since the intermediate network device includes the segment identifier list, the third packet may be forwarded to the second network device based on a route indicated by the first traffic engineering tunnel. In this embodiment, the first network device separately obtains a first route issued by the second network device and a second route issued by the intermediate network device, and associates the first route with the second route based on a match between a route prefix in the first route or a first address and a subnet prefix in the second route, so that the first network device can determine an exit based on a route identifier in the second route and forward the packet destined for the second network device to the intermediate network device, and the intermediate network device is configured to forward the second packet to the second network device. In this manner, the number of tunnels or traffic engineering tunnels in the network may be reduced, and configuration or management complexity may be avoided.
[0252] For ease of understanding, the data processing method provided in the embodiments of the present application is described in detail below with reference to specific examples.
[0253] FIG. 4 is a schematic flowchart of a data processing method 400 according to an embodiment of the present application. As shown in FIG. 4, the network architecture of FIG. 4 is similar to the network architecture shown in FIG. 1. For ease of drawing, the network devices between network device 1 and network device 3 are not shown, and the network devices between network device 2 and network device 3 are not shown. The backbone network in which network device 1 is located may be a FlexAlgo network or a SR network, and the metropolitan area network in which network device 2 is located may be a SR network configured with traffic engineering. The traffic engineering includes SR Policy or SR TE tunnels. For ease of explanation, the following uses an example in which the backbone network supports a FlexAlgo network and the metropolitan area network is configured with an SR Policy network to describe the data processing method 400.
[0254] As shown in FIG. 4, the data processing method 400 includes the following steps.
[0255] Step 401: Network device 2 publishes route 1 to network device 1 using a route reflector.
[0256] Case 1: Route 1 includes Route Prefix 1, and Route Prefix 1 indicates that Route 1 is the routing information of a packet whose destination address has the longest match with Route Prefix 1. For example, Route Prefix 1 may be, for example, A1::1 / 84.
[0257] Optionally, Route 1 may further include the following information, as shown in the following two cases:
[0258] Case 2: Route 1 further includes a next hop address, and Route 1 indicates that a packet whose destination address corresponds to Route Prefix 1 may be sent using the device or service indicated by the next hop address. The next hop address may be, for example, a loopback address of network device 2. For example, the next hop address may be, for example, B1::1.
[0259] Case 3: Route 1 includes Route Prefix 1 and a SID, and Route 1 indicates that a packet whose destination address has the longest match with Route Prefix 1 may be sent using the device or service indicated by the SID. The SID may be a VPN SID assigned to the locator network segment corresponding to network device 1. For example, the VPN SID may be C1::1.
[0260] It will be appreciated that in addition to using a route reflector to publish routes to network device 1, network device 2 may publish routes to network device 1 in another manner, for example, using network device 3 to publish routes to network device 1. Details will not be repeated here.
[0261] Step 402: The controller transmits the SR Policy to the network device 3.
[0262] In this embodiment, the controller can calculate a forwarding path from the network device 3 to the network device 2 based on a service request to obtain a corresponding SR policy, and deliver the SR policy obtained by the calculation to the network device 3. For example, the controller calculates a forwarding path from the network device 3 to the network device 2 based on a low latency requirement to obtain the SR policy. The head end of the SR policy is the address of the network device 3, and the endpoint is a subnet prefix. The SR policy further includes a segment identifier list indicating a forwarding path from the network device 3 to the network device 2.
[0263] For example, in case 1 where route 1 includes route prefix 1, the scope of the endpoint of the SR policy may include the scope of route prefix 1. For example, the endpoint may be A1::0 / 64.
[0264] In case 2, where route 1 further includes a next hop address, the range of the endpoint of the SR policy may include the range of the next hop address. For example, the endpoint may be B1::0 / 64.
[0265] In case 3, where route 1 further includes an SID, the range of the endpoint of the SR policy may include the range of the SID. For example, the endpoint may be C1::0 / 64.
[0266] The SR Policy further includes a color, and the color is associated with a service requirement corresponding to the SR Policy. For example, the color 123 can identify that the service requirement corresponding to the SR Policy is a low latency requirement.
[0267] In one example, the correspondence between the color and the network slice identifier is preset in the network device 3. Specifically, the network device 3 can determine a network slice identifier corresponding to the SR policy based on the color and the correspondence in the SR policy. For example, the color of the SR policy may be, for example, 123. In this case, the network device 3 can determine that the corresponding network slice identifier is FlexAlgo 128 based on the correspondence. The route obtained by performing route calculation based on the network slice identifier also meets the service requirement corresponding to the SR policy, specifically, meets the low latency requirement.
[0268] In another example, the correspondence between the color and the network slice identifier is preset in the network device 3. After determining the network slice identifier corresponding to the SR policy based on the color and the correspondence in the SR policy, the network device 3 can further assign a corresponding SID to the network slice identifier. The SID may be, for example, an END SID. In addition, the network device 3 can generate a mapping relationship between the network slice identifier and the SID. For example, a mapping relationship table showing the mapping relationship between the network slice identifier and the SID may be shown in Table 1.
[0269] [Table 1]
[0270] Step 403: Network device 3 issues a route advertisement packet, so that network device 1 receives route 2.
[0271] In response to obtaining the SR policy, the intermediate network device may generate a route advertisement packet and publish the route advertisement packet in the IGP domain in which the intermediate network device is located.
[0272] In an embodiment, the route prefix 2 in the route announcement packet may be an endpoint of the SR policy, for example, A1::0 / 64, B1::0 / 64, or C1::0 / 64. The route announcement packet may further carry a path identifier corresponding to the SR policy, for example, a network slice identifier (e.g., FlexAlgo 128), or a SID assigned by the network device 3 based on the network slice identifier. The network slice identifier indicates a network device along the path to perform a path calculation for the route prefix 2 based on the indication of the network slice identifier, determine a corresponding exit, and forward the packet to the network device 3.
[0273] In one example, when the route identifier is a SID assigned by the network device 3 based on the network slice identifier, the route announcement packet may further include a mapping relationship between the network slice identifier and the SID. The network device that receives the route announcement packet may generate a corresponding mapping relationship table based on the mapping relationship, so that when a packet including a SID is received, the network device may determine the corresponding network slice identifier based on the SID and the mapping relationship table.
[0274] In another embodiment, when network device 3 receives multiple SR policies addressed to the network domain in which network device 2 is located, and these SR policies have the same color, network device 3 can aggregate the endpoints of these SR policies to obtain an aggregation network segment, and the range of the aggregation network segment includes the ranges of the endpoints of the multiple SR policies. For example, the aggregation network segment may be A1::0 / 48, and the endpoint of the SR policy corresponding to network device 2 is A1::0 / 64. Obviously, the range of A1::0 / 48 includes the range of A1::0 / 64.
[0275] After the network device 3 publishes a route advertisement packet in the IGP domain, the network device 1 can receive the corresponding route 2, where the route 2 includes a route prefix 2 and a route identifier. The route prefix 2 may be an endpoint of an SR policy, or may be an aggregation network segment obtained based on multiple SR policies.
[0276] Step 404: Network device 1 receives packet 1.
[0277] Packet 1 is a service traffic bound for network device 2. Specifically, there is a longest match between the destination address of packet 1 and the prefix address of the destination route published by network device 2. Step 405: Network device 1 updates packet 1 to obtain packet 2, and packet 2 carries a route identifier.
[0278] In case 1, where route 1 includes route prefix 1, network device 1 may perform a longest match operation based on the destination address of packet 1 to determine that there is a longest match between the destination address of packet 1 and route prefix 2. In this case, network device 1 updates the path identifier of route 1 to packet 1.
[0279] In case 2, where route 1 includes a next hop address, network device 1 may determine, based on the destination address of packet 1, that there is a longest match between the next hop address for forwarding packet 1 and route prefix 2. In this case, network device 1 updates the path identifier of route 1 to packet 1.
[0280] In case 3, where route 1 includes a SID, network device 1 may perform a longest match operation based on the destination address of packet 1 to determine that the next hop address for forwarding packet 1 is the SID, and there is a longest match between the SID and route prefix 2. In this case, network device 1 updates the route identifier and the SID in route 1 to packet 1.
[0281] In one example, after receiving route 1 and route 2, network device 1 can establish an association relationship between the next hop address or SID and route 2 based on the longest match between the next hop address or SID in route 1 and route prefix 2 in route 2, so that when it determines that the next hop address for forwarding packet 1 is the next hop address or SID, network device 1 can determine the corresponding route 2 based on the association relationship to avoid performing the longest match operation again.
[0282] Network device 1 can update packet 1 in two ways.
[0283] Method 1: If the path identifier is a network slice identifier, network device 1 can encapsulate the network slice identifier into a hop-by-hop header of packet 1 to obtain packet 2.
[0284] Method 2: When the route identifier is an SID, network device 1 may encapsulate the SID in a Segment Routing Header (SRH) extension header of packet 1 to obtain packet 2.
[0285] Step 406: The network device 1 sends the packet 2 via an egress. The egress is obtained by the network device 1 by performing a route calculation based on the route identifier corresponding to the packet 2, and the route identifier corresponding to the packet 2 is the route identifier carried in the route 2.
[0286] In one example, after receiving the route 2, the network device 1 can perform a route calculation based on the route identifier in the route 2 to obtain a corresponding exit. In this way, after generating the packet 2 including the route identifier, the network device 1 can determine the exit to be used to transmit the packet 2 based on the exit corresponding to the route identifier in the packet 2.
[0287] There may be two ways in which the network device 1 performs a path calculation based on the path identifier to obtain an exit.
[0288] Method 1: The route identifier is an SID. The route 2 received by the network device 1 includes an SID and a mapping relationship between the SID and the network slice identifier. The network device 1 can determine the network slice identifier corresponding to the SID based on the SID and the mapping relationship, and then perform a route calculation based on the network slice identifier to obtain an exit corresponding to the SID.
[0289] Method 2: The route identifier is a network slice identifier. The route 2 received by the network device 1 includes a network slice identifier. The network device 1 can perform route computation based on the network slice identifier to obtain an exit corresponding to the network slice identifier.
[0290] Step 407: Network device 3 updates packet 2 to obtain packet 3.
[0291] Since network devices in the IGP domain in which network device 1 is located also receive the route announcement packet sent by network device 3, similarly, after network device 1 sends packet 2 via an exit, network devices between network device 1 and network device 3 can also determine an exit for forwarding packet 2 based on the route identifier of packet 2, so that network device 3 can receive packet 2.
[0292] For example, if the route identifier in packet 2 is a network slice identifier, the network devices between network device 1 and network device 3 can perform route calculation based on the network slice identifier in the hop-by-hop header of packet 2 to obtain an egress for forwarding packet 2. If the route identifier in packet 2 is a SID, the network devices between network device 1 and network device 3 can obtain the SID at the outermost layer in the SRH extension header of packet 2, determine the network slice identifier corresponding to the SID based on the SID and the mapping relationship between the SID and the network slice identifier, and then perform route calculation based on the network slice identifier to obtain an egress for forwarding packet 2.
[0293] After receiving packet 2, the network device 3 may perform a longest match operation based on the destination address of packet 2, which may or may not be an SID. If the destination address of packet 2 carries an SID, the network device 3 may perform a longest match operation based on the SID and determine, for example, the longest match between an SID (C1::1) and an endpoint (C1::0 / 64) in the traffic engineering tunnel, to forward packet 2 based on the traffic engineering tunnel based on the longest match between the SID and an endpoint included in the traffic engineering tunnel.
[0294] After determining the traffic engineering tunnel that corresponds to packet 2, network device 3 may update the segment identifier list in the traffic engineering tunnel to packet 2 to retrieve packet 3.
[0295] Step 408: Network device 3 transmits packet 3.
[0296] After obtaining packet 3 through the update, network device 3 can forward packet 3 based on the segment identifier list in packet 3. In addition, a network device between network device 3 and network device 2 can also forward packet 3 based on the segment identifier list in packet 3, so that packet 3 is finally forwarded to network device 2.
[0297] Specifically, Fig. 5a is a schematic diagram of packet forwarding according to an embodiment of the present application. As shown in Fig. 5a, the packet forwarding process described in Fig. 5a is based on the embodiment corresponding to Fig. 4. A network device A is further included between network device 1 and network device 2, and a network device B and a network device C are further included between network device 3 and network device 2.
[0298] Packet 2 transmitted by network device 1 includes a VPN SID (C1::1) and an END SID (B1:1:1:1:1). Network device 1 determines an egress for packet 2 based on the END SID, and transmits packet 2 to network device A. Similarly, network device A can determine an egress based on the END SID in packet 2 and the mapping relationship between the SID and the network slice identifier, and transmit packet 2 to network device 3.
[0299] After receiving packet 2, network device 3 can determine, based on the VPN SID in packet 2, the SR Policy and the segment identifier list {4::4, 3::3, 2::2, 1::1} corresponding to the SR Policy. The segment identifiers corresponding to network device 3, network device B, network device C, and network device A are 4::4, 3::3, 2::2, and 1::1, respectively. Therefore, network device 3 encapsulates the obtained segment identifier list into packet 2 to obtain packet 3 including the segment identifier list. In this way, network device 2, network device B, and network device C can forward packet 3 to network device 2 based on the instruction of the segment identifier list.
[0300] 5b is a schematic diagram of another packet forwarding according to an embodiment of the present application. As shown in FIG. 5b, the packet forwarding process described in FIG. 5b is also based on the embodiment corresponding to FIG. 4. In the packet 2 sent by the network device 1, the packet 2 includes a VPN SID (C1::1) and a network slice identifier (FlexAlgo 128). The network device 1 determines an egress of the packet 2 based on the network slice identifier and sends the packet 2 to the network device A. Similarly, the network device A can determine an egress based on the network slice identifier in the packet 2 and sends the packet 2 to the network device 3.
[0301] The above describes a process of forwarding a packet from a FlexAlgo network to a SR network. The following describes a process of forwarding a packet from a SR network to a FlexAlgo network. It should be understood that SR may also be performed regardless of the FlexAlgo network described in the above embodiments or the FlexAlgo network described herein, and the network and the above SR network are mainly different IGP domains.
[0302] 6 is a schematic flowchart of a data processing method 600 according to an embodiment of the present application. As shown in FIG. 6, the data processing method 600 includes the following steps:
[0303] Step 601: A first network device obtains a subnet prefix and a segment identifier list, where the subnet prefix is a destination identifier of a traffic engineering tunnel, and the traffic engineering tunnel includes the segment identifier list.
[0304] The first network device may be, for example, a physical device such as a router, switch, or gateway, or may be a virtual device supporting route issuing and packet forwarding. For example, when the data processing method 600 is applied to the scenario shown in Figure 1, the first network device may be, for example, a PE device located in the metropolitan area network shown in Figure 1, and the metropolitan area network in which the first network device is located may be an SR network configured with traffic engineering, where the traffic engineering includes SR Policy or SR TE tunnel.
[0305] The traffic engineering tunnel obtained by the first network device may be sent to the intermediate network device by the controller or another device, or may be preconfigured in the intermediate network device. The traffic engineering tunnel includes a subnet prefix and a segment identifier list. The subnet prefix may be an address of the second network device, for example, a loopback address of the second network device. The segment identifier list indicates a forwarding path from the first network device to the intermediate network device, the intermediate network device being located between the first network device and the second network device. The segment identifier list may include one or more segment identifiers.
[0306] Step 602: A first network device obtains a first route associated with a second network device, the first route including a route prefix and a first address, and there is a longest match between the first address and the subnet prefix.
[0307] The second network device may be, for example, a physical device such as a router, switch, or gateway, or may be a virtual device that supports route issuing and packet forwarding. For example, when the data processing method 600 is applied to the scenario shown in Figure 1, the second network device may be, for example, a cloud PE device located in the backbone network shown in Figure 1, and the backbone network in which the second network device is located may be a FlexAlgo network or an SR network.
[0308] In this embodiment, a network connection is established between a first network device and a second network device, and one or more network devices are included between the first network device and the second network device, and packets transmitted between the first network device and the second network device need to pass through one or more network devices between the first network device and the second network device.
[0309] A second network device in the backbone network can publish the first route to the first network device using a route reflector or another network device between the second network device and the first network device.
[0310] In one example, the first route obtained by the first network device may be a route published by the second network device, or the first route may be a route generated after the first network device receives a route published by the second network device.
[0311] A route prefix in the first route indicates address information of the second network device, and the route prefix may be, for example, D1::1.
[0312] In one example, the first address in the first route may include a next hop address of the network device or a SID of the second network device, where the next hop address may be, for example, a loopback address of the second network device. The SID of the second network device may indicate a location of the second network device in a network or a network service provided by the second network device, such as a VPN SID or another SID that may indicate the location of the second network device.
[0313] In a possible example, after receiving the first route and the traffic engineering tunnel, the first network device may perform route iteration, in other words, match the traffic engineering tunnel corresponding to the first route.
[0314] For example, the first network device may determine, based on a first address in the first route, a subnet prefix that is in the traffic engineering tunnel and that matches the first address. If the first network device determines that there is a longest match between the first address of the first route and a subnet prefix of the traffic engineering tunnel, the first network device may generate a correspondence between the route prefix in the first route and a segment identifier list in the traffic engineering tunnel.
[0315] When the traffic engineering tunnel is an SR policy, the subnet prefix may be an endpoint of the SR policy, and the SR policy further includes a color. The color may be associated with a service requirement, indicating that the SR policy is obtained by calculation based on the service requirement, such as low latency or high bandwidth. The first route further includes a route identifier, and the route identifier may be, for example, a color. It will be understood that when the SID of the second network device is configured, the route identifier corresponding to the second network device may be determined based on the service requirement corresponding to the second network device, and the SID corresponding to the route identifier is configured for the second network device, i.e., a correspondence relationship between the SID and the route identifier is established, so that all routes calculated by another network device for the SID meet the requirement of the route identifier.
[0316] In this case, in addition to determining whether the first address of the first route matches the subnet prefix of the SR policy, the first network device can further determine whether the route identifier in the first route matches the color included in the SR policy. If it determines that the route identifier matches the color included in the SR policy, the first network device determines that the first route corresponds to the SR policy, so as to generate a correspondence between the route prefix in the first route and the segment identifier list in the SR policy.
[0317] For example, if the route identifier is a color, the first network device can determine whether the two match by comparing whether the color in the first route is the same as the color included in the SR Policy.
[0318] In addition, the first network device may alternatively be statically configured with a correspondence between a route identifier and a subnet prefix. Specifically, the first network device may determine a corresponding route identifier based on the correspondence and the subnet prefix in the traffic engineering tunnel. The route identifier may be, for example, an algorithm identifier. In this manner, when transmitting a packet based on the traffic engineering tunnel, the first network device may include an algorithm identifier corresponding to the traffic engineering tunnel in the packet.
[0319] In this embodiment, the subnet prefix in the traffic engineering tunnel may be an aggregation network segment of the network domain in which the second network device is located. In other words, the addresses of all network devices in the network domain in which the second network device is located are within the range of the subnet prefix. In other words, for any network device in the network domain in which the second network device is located, the next hop address in a route issued by the network device can match the subnet prefix, and the traffic engineering tunnel can match routes issued by multiple network devices. For example, the subnet prefix in the traffic engineering tunnel may be D1::0 / 64, the next hop address in a first route issued by the second network device is D1::10, and the next hop address in a second route issued by another network device in the network domain in which the second network device is located is D1::20, and D1::10 and D1::20 are within the range of D1::0 / 64.
[0320] In a possible example, if the traffic engineering tunnel is an SR policy, the color included in the SR policy may be assigned based on the area and service requirement, and the endpoint of the SR policy is 0::0. For example, if the color included in the SR policy received by the first network device is configured as 123, the color with value 123 may be assigned to all network devices whose service requirement is low latency in the network domain in which the second network device is located. In this way, the next hop addresses carried in the routes issued by these network devices can be reliably matched with the endpoint of the SR policy, and the colors carried in those routes can also be matched with the colors included in the SR policy. In this way, the routes issued by these network devices can be matched with the SR policy.
[0321] Step 603: A first network device receives a first packet, and there is a longest match between a destination address of the first packet and a route prefix.
[0322] In this embodiment, the first packet may be, for example, a service traffic received by the first network device and destined for the second network device. Specifically, the destination address of the first packet is the destination address of the second network device. Thus, there is a longest match between the destination address of the first packet and the route prefix in the first route issued by the second network device.
[0323] Step 604: The first network device updates the first packet to obtain the second packet.
[0324] In one example, based on the longest match between the destination address and the route prefix of the first packet, the first network device can determine a segment identifier list and a SID corresponding to the first packet based on the aforementioned correspondence relationship, and add the segment identifier list and the SID to the first packet to obtain a second packet.
[0325] Step 605: The first network device transmits a second packet.
[0326] Because the segment identifier list indicates a route from the first network device to the intermediate network device, both the first network device and a network device between the first network device and the intermediate network device can transmit the second packet based on the segment identifier list in the second packet to forward the second packet to the intermediate network device.
[0327] Step 606: The intermediate network device updates the second packet to obtain the third packet.
[0328] After receiving the second packet, the intermediate network device can identify, based on the segment identifier list in the second packet, that the intermediate network device is the last network device indicated in the segment identifier list, in which case the intermediate network device can decapsulate the segment identifier list in the second packet to obtain a third packet, where the third packet further includes the aforementioned segment identifier.
[0329] Step 607: The intermediate network device forwards the third packet to the second network device.
[0330] In this embodiment, the second network device and the intermediate network device may be located in the same IGP domain, and the second network device may pre-publish a route carrying the SID in the IGP domain. Furthermore, each network device in the IGP domain is configured with a correspondence between the SID and the network slice identifier. In this way, the network device in the IGP domain can perform a route calculation based on the network slice identifier corresponding to the SID and obtain the corresponding exit. Specifically, the manner in which the network device in the IGP domain determines the exit is similar to the manner in step 307. Details are not repeated here.
[0331] In other words, both the intermediate network device and the network device between the second network device and the intermediate network device can determine a corresponding exit based on the SID, send the third packet, and finally forward the third packet to the second network device.
[0332] For ease of understanding, the data processing method provided in the embodiments of the present application is described in detail below with reference to specific examples.
[0333] FIG. 7 is a schematic flowchart of a data processing method 600 according to an embodiment of the present application. As shown in FIG. 7, the network architecture of FIG. 7 is similar to the network architecture shown in FIG. 1. For ease of drawing, the network devices between the network device 1 and the network device 3 are not shown, and the network devices between the network device 2 and the network device 3 are not shown. The metropolitan area network in which the network device 1 is located may be an SR network configured with traffic engineering, where the traffic engineering includes an SR Policy or an SR TE tunnel. The backbone network in which the network device 2 is located may be a FlexAlgo network or an SR network. For ease of explanation, an example in which the backbone network supports a FlexAlgo network and the metropolitan area network is configured with an SR Policy network is used hereinafter to describe the data processing method 700.
[0334] Step 701: The controller sends the SR Policy to the network device 1.
[0335] In this embodiment, the controller may calculate one or more routes from network device 1 to network device 3 based on the service requirement of network device 1 to obtain the SR policy. The head of the SR policy may be the address of network device 1, and the endpoint may be the aggregation network segment of the network domain in which network device 2 is located. The range of the aggregation network segment includes the range of the address of network device 2. For example, the address of network device 2 may be D1::10, and the endpoint of the SR policy may be D1::0 / 64. The color of the SR policy corresponds to the service requirement of network device 1. For example, if the service requirement of network device 1 is low latency, the value of color may be 123, which indicates low latency. The SR policy further includes a segment identifier list, and the route corresponding to the SR policy may be represented using the segment identifier list.
[0336] Step 702: Network device 2 sends route 2 to network device 1 using the route reflector.
[0337] Route 2 includes a route prefix and a first address, and the first address may include a next hop address or a SID. Network device 2 uses a route reflector to send route 2, and the route reflector does not change the next hop address in the route. Therefore, the next hop address in route 2 is the next hop address of network device 2, and may be, for example, D1::10. The SID of route 2 may be a VPN SID and indicates the location information of the second network device in the SR FlexAlgo network. For example, the SID may be D1::1.
[0338] After obtaining route 2, the network device 1 performs route iteration, in other words, associates route 2 with an SR policy. Specifically, the network device 1 matches an endpoint of the SR policy in a longest mask match manner based on the first address in route 2. If the next hop address of route 2 successfully matches an endpoint of the SR policy, the network device 1 can associate route 2 with the SR policy.
[0339] In addition, route 2 may further carry a color. In this case, when performing route iteration, the network device 1 needs to further match the color of route 2 in addition to the next hop address of route 2. In other words, if the network device 1 determines that the next hop address of route 2 successfully matches the endpoint of the SR policy and the color of route 2 also successfully matches the color of the SR policy, the network device 1 may associate route 2 with the SR policy.
[0340] Step 703: Network device 1 receives packet 4.
[0341] Packet 4 may be a packet destined for network device 2. Specifically, the destination address of packet 4 is the destination address of network device 2, and network device 1 may determine that packet 4 may match route 2 based on a match between the destination address of packet 4 and the route prefix of route 2.
[0342] Step 704: Network device 1 updates packet 4 to obtain packet 5.
[0343] After receiving route 2, network device 1 associates route 2 with the SR policy. Thus, if network device 1 determines that packet 4 matches route 2, it can update packet 4 based on route 2 and the SR policy. Specifically, network device 1 can encapsulate the SID of route 2 and the segment identifier list included in the SR policy into packet 4 to obtain packet 5.
[0344] Step 705 : Network device 1 transmits packet 5 based on the segment identifier list in packet 5 .
[0345] After obtaining packet 5, network device 1 can transmit packet 5 based on the route indicated by the segment identifier list in packet 5. Because the segment identifier list in packet 5 indicates the route from network device 1 to network device 3, in the SR Policy network, a network device between network device 1 and network device 3 can forward packet 5 to network device 3 based on the segment identifier list in packet 5.
[0346] Step 706: Network device 3 updates packet 5 to obtain packet 6.
[0347] If network device 3 determines, based on the path indicated by the segment identifier list in packet 5, that it is the last network device in the path, then the network device decapsulates the segment identifier list in packet 5 to obtain packet 6, which includes the segment identifiers.
[0348] Step 707: Network device 3 transmits packet 6 based on the SID in packet 6.
[0349] In this embodiment, the network device 3 and the network device 2 may be located in the same IGP domain, and the network device 2 may pre-publish a route carrying the SID in the IGP domain. Furthermore, each network device in the IGP domain is configured with a correspondence between the SID and the network slice identifier. In this way, the network device in the IGP domain can perform a route calculation based on the network slice identifier corresponding to the SID and obtain the corresponding exit. Specifically, the manner in which the network device in the IGP domain determines the exit is similar to the manner in step 207. Details are not repeated here.
[0350] In this way, after receiving the packet 5, the network device 3 can detect the SID in the packet 5, determine an exit for transmitting the packet 5 based on the SID, and transmit the packet 5 via the exit. Alternatively, a network device between the network device 3 and the network device 2 may determine a corresponding exit based on the SID in the packet 5, forward the packet 5, and finally forward the packet 5 to the network device 2.
[0351] Specifically, Figure 8 is a schematic diagram of another packet forwarding according to an embodiment of the present application. As shown in Figure 8, the packet forwarding process described in Figure 8 is based on the embodiment corresponding to Figure 7. A network device A and a network device B are further included between the network device 1 and the network device 3, and a network device C is further included between the network device 3 and the network device 2.
[0352] When network device 1 transmits packet 5, packet 5 includes a segment identifier list {1::1, 2::2, 3::3, 4::4} corresponding to the SR Policy and a VPN SID (D1::1). The segment identifiers corresponding to network device 1, network device A, network device B, and network device 3 are 1::1, 2::2, 3::3, and 4::4, respectively. Therefore, network device 1, network device A, and network device B can transmit packet 5 sequentially based on the segment identifier list, and as a result, network device 3 can receive packet 5.
[0353] After receiving packet 5, network device 3 may determine, based on the indication of the segment identifier list, that network device 3 is the last network device indicated in the segment identifier list. In addition, the network device may determine an egress corresponding to packet 4 based on the VPN SID in packet 5, and transmit packet 5 based on the egress. Similarly, after receiving packet 5 transmitted by network device 3, network device A may also transmit packet 5 based on the VPN SID in packet 5, to forward packet 5 to network device 2.
[0354] The method 200, the method 300, the method 400, the method 600 and the method 700 in the embodiment of the present application are described above. The network device in the embodiment of the present application is described below. The network device described below has any function of the first network device, the second network device or the intermediate network device in the method 200, the method 300, the method 400, the method 600 and the method 700.
[0355] 9 is a schematic diagram of the structure of a network device 900 according to an embodiment of the present application. As shown in FIG. 9, the network device 900 includes: a sending unit 001 configured to perform steps 301, 303, 307, 310, 410, 402, 403, 406, 408, 602, 605, 607, 701, 702, 705 or 707; a processing unit 902 configured to perform steps 302, 304, 305, 308, 404, 601, 603 or 703; and a receiving unit 903 configured to perform steps 306, 309, 405, 407, 604, 606, 704 or 706.
[0356] The network device 900 can correspond to the first network device, the intermediate network device, or the second network device in the above-mentioned method embodiments. The units in the network device 900 and other operations and / or functions described above are used separately to implement the steps and methods implemented by the first network device, the intermediate network device, or the second network device in the method embodiments. For specific details, please refer to the method 200, the method 300, the method 400, the method 600, and the method 700. For the sake of brevity, the details will not be described again here.
[0357] When the network device 900 processes packets, the division of the above-mentioned functional modules is only used as an example for explanation. In practical application, the above-mentioned functions may be assigned to different functional modules to implement according to requirements. That is, the internal structure of the network device 900 is divided into different functional modules to implement all or part of the above-mentioned functions. In addition, the network device 900 provided in the above-mentioned embodiment belongs to the same concept as the method of the embodiment corresponding to FIG. 1 or FIG. 7. For its specific implementation process, please refer to the above-mentioned method 200, method 300, method 400, method 600, and method 700. Details will not be repeated here.
[0358] Corresponding to the method embodiment and the virtual device embodiment provided in the present application, an embodiment of the present application further provides a network device. Next, a hardware configuration of the network device will be described.
[0359] The network device 1000 or the network device 1100 described below corresponds to the first network device, the intermediate network device, or the second network device in the above-mentioned method embodiments, and the hardware, modules, and other operations and / or functions described above in the network device 1000 or the network device 1100 are used separately to implement the steps and methods performed by the first network device or the second network device in the method embodiments. For detailed procedures and specific details of how the network device 1000 or the network device 1100 processes packets, please refer to the above-mentioned method embodiments. For the sake of brevity, the details will not be described again here. The steps of the above-mentioned method 200, method 300, method 400, method 600, and method 700 are completed by using integrated logic circuits of hardware in the processor of the network device 1000 or the network device 1100, or by using instructions in the form of software. The steps in the methods disclosed with reference to the embodiments of the present application may be directly performed and completed by a hardware processor, or may be performed and completed using a combination of hardware and software modules in a processor. The software module may be located in a storage medium that is mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above-mentioned method together with the hardware of the processor. To avoid repetition, the details are not described again here.
[0360] Network device 1000 or network device 1100 corresponds to network device 900 in the above-described virtual device embodiment, and each functional module in network device 900 is implemented using software of network device 1000 or network device 1100. In other words, the functional modules included in network device 900 are generated after the processor of network device 1000 or network device 1100 reads program codes stored in a memory.
[0361] 10 is a schematic diagram of the structure of a network device 1000 according to an embodiment of the present application. The network device 1000 may be configured as a first network device, an intermediate network device, or a second network device. The network device 1000 may be implemented using a general bus architecture.
[0362] The network device 1000 includes at least one processor 1001 , a communication bus 1002 , a memory 1003 , and at least one communication interface 1004 .
[0363] The processor 1001 may be a general purpose CPU, NP, microprocessor, or one or more integrated circuits configured to implement the solutions of the present application, such as 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.
[0364] The communication bus 1002 is configured to transmit information between the aforementioned components. The communication bus 1002 may be classified as an address bus, a data bus, a control bus, etc. For ease of representation, only one bold line is used to represent a bus in the figure, but this does not mean that there is only one bus or only one type of bus.
[0365] For example, the memory 1003 may be a read-only memory (ROM) or another type of static storage device capable of storing static information and instructions, or a random access memory (RAM) or another type of dynamic storage device capable of storing information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other compact disc storage, an optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray optical discs, etc.), a magnetic disc storage medium or another magnetic storage device, or any other medium that can be configured to carry or store expected program code in the form of instructions or data structures and that can be accessed by a computer. The memory is not limited thereto. The memory 1003 may exist independently and be connected to the processor 1001 using a communication bus 1002. The memory 1003 may be integrated with the processor 1001 or the like.
[0366] The communication interface 1004 is configured to communicate with other devices or communication networks using any transceiver type device. The communication interface 1004 includes a wired communication interface and may further include a wireless communication interface. The wired communication interface may be, for example, an Ethernet interface. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof, etc.
[0367] In a specific implementation, in one embodiment, the processor 1001 may include one or more CPUs, such as CPU 0 and CPU 1 shown in FIG.
[0368] In a specific implementation, in one embodiment, the network device 1000 may include multiple processors, such as the processor 1001 and the processor 1005 shown in Figure 10. Each of the processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and / or processing cores configured to process data (such as computer program instructions).
[0369] In a specific implementation, in one embodiment, the network device 1000 may further include an output device 1006 and an input device 1007. The output device 1006 communicates with the processor 1001 and can display information in multiple ways. For example, the output device 1006 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 1007 communicates with the processor 1001 and can receive user input in multiple ways. For example, the input device 1007 may be a mouse, a keyboard, a touch screen device, or a sensing device.
[0370] In some embodiments, the memory 1003 is configured to store program code 911 for executing the solutions of the present application, and the processor 1001 can execute the program code 911 stored in the memory 1003. That is, the network device 1000 can implement the method 200, the method 300, the method 500, or the method 600 provided in the method embodiments by using the processor 1001 and the program code 911 in the memory 1003.
[0371] The network device 1000 in this embodiment of the present application may correspond to the first network device, the intermediate network device, or the second network device in the aforementioned method embodiments. In addition, the processor 1001, the communication interface 1004, etc. in the network device 1000 may implement the functions of the first network device, the intermediate network device, or the second network device, and / or the steps and methods implemented by the first network device, the intermediate network device, or the second network device in the aforementioned method embodiments. For the sake of brevity, details will not be described here.
[0372] A transmitting unit 901 and a receiving unit 90 in a network device 900 3 each corresponds to a communication interface 1004 in the network device 1000. The processing unit 902 in the network device 900 may be equivalent to the processor 1001 in the network device 1000.
[0373] 11 is a schematic diagram of a structure of a network device 1100 according to an embodiment of the present application. The network device 1100 may be configured as a first network device, an intermediate network device, or a second network device in the method 200, the method 300, the method 500, or the method 600. The network device 1100 includes a main control board 1111 and an interface board 1130.
[0374] The main control board 1111 is also called a main processing unit (MPU) or route processor card. The main control board 1111 is configured to control and manage the components in the network device 1100, including the functions of route calculation, device management, device maintenance, and protocol processing. The main control board 1111 is a central processing unit 111 1 and memory 1112.
[0375] The interface board 1130 is also called a line processing unit (LPU), a line card, or a service board. The interface board 1130 is configured to provide various service interfaces and forward data packets. The service interfaces include, but are not limited to, an Ethernet interface, a Packet over SONET / SDH (POS) interface, and the like. The Ethernet interface is, for example, a Flexible Ethernet Service Interface (Flexible Ethernet Clients, FlexE Clients). The interface board 1130 includes a central processing unit 1131, a network processor 1132, a forwarding entry memory 1134, and a physical interface card (PIC) 1133.
[0376] A central processing unit 1131 on the interface board 1130 is configured to control and manage the interface board 1130 and to communicate with a central processing unit 1112 on the main control board 1111 .
[0377] The network processor 1132 is configured to perform packet forwarding processing. The form of the network processor 1132 may be a forwarding chip. Specifically, the network processor 1132 is configured to forward the received packet based on a forwarding table stored in the forwarding entry memory 1134. If the destination address of the packet is the address of the network device 1100, the network processor sends the packet to a CPU (e.g., the central processing unit 1112) for processing. If the destination address of the packet is not the address of the network device 1100, the network processor searches the forwarding table for a next hop and an outbound interface corresponding to the destination address based on the destination address, and forwards the packet to the outbound interface corresponding to the destination address. The processing of the uplink packet includes processing of the packet incoming interface and a forwarding table lookup. The processing of the downlink packet includes a forwarding table lookup, etc.
[0378] The physical interface card 1133 is configured to realize a physical layer interconnection function. Original traffic enters the interface board 1130 from the physical interface card, and the processed packets are sent out from the physical interface card 1133. The physical interface card 1133, also called a sub card, may be installed in the interface board 1130, and is configured to convert the photoelectric signal into a packet, perform a validity check of the packet, and then forward the packet to the network processor 1132 for processing. In some embodiments, the central processing unit may also perform the function of the network processor 1132, for example, may implement software forwarding based on a general-purpose CPU. Therefore, the network processor 1132 is not required for the physical interface card 1133.
[0379] Optionally, the network device 1100 includes multiple interface boards. For example, the network device 1100 further includes an interface board 1140. The interface board 1140 includes a central processing unit 1141, a network processor 1142, a forwarding entry memory 1144, and a physical interface card 1143.
[0380] Optionally, the network device 1100 further includes a switching board 1120. The switching board 1120 may also be referred to as a switch fabric unit (SFU). When the network device has multiple interface boards 1130, the switching board 1120 is configured to complete data exchange between the interface boards. For example, the interface board 1130 and the interface board 1140 may communicate using the switching board 1120.
[0381] The main control board 1111 is coupled to the interface board 1130. For example, the main control board 1111, the interface boards 1130 and 1140, and the switching board 1120 are connected to a system backboard using a system bus for interworking. In a possible embodiment, an inter-process communication (IPC) channel is established between the main control board 1111 and the interface board 1130, and the main control board 1111 and the interface board 1130 communicate with each other via the IPC channel.
[0382] Logically, the network device 1100 includes a control plane and a forwarding plane. The control plane includes a main control board 1111 and a central processing unit 1131. The forwarding plane includes components that perform forwarding, such as a forwarding entry memory 1134, a physical interface card 1133, and a network processor 1132. The control plane performs functions such as routing, generating forwarding tables, processing signaling and protocol packets, and configuring and maintaining device status. The control plane distributes the generated forwarding tables to the forwarding plane. In the forwarding plane, the network processor 1132 looks up the forwarding table distributed by the control plane to forward packets received by the physical interface card 1133. The forwarding table distributed by the control plane may be stored in the forwarding entry memory 1134. In some embodiments, the control plane and the forwarding plane may be completely separate and are not on the same device.
[0383] When the network device 1100 is configured as a first network device, the network processor 1132 can generate a first packet and transmit the first packet from the physical interface card 1133, which results in the first packet being transmitted to a second network device.
[0384] When the network device 1100 is configured as a second network device, the physical interface card 1133 receives the first packet and sends the first packet to the network processor 1132. The network processor 1132 obtains the support status of the iFIT capability of the first network device from the first packet.
[0385] The transmitting unit 901 and the receiving unit 903 in the network device 900 may each be equivalent to a physical interface card 1133 in the network device 1100. The processing unit 902 in the network device 900 may be equivalent to a network processor 1132 or a central processing unit 1112.
[0386] The operations performed on the interface board 1140 correspond to those performed on the interface board 1130 in this embodiment of the present application. For the sake of brevity, details will not be described. The network device 1100 in this embodiment can correspond to the first network device, the intermediate network device, or the second network device in the above-mentioned method embodiments. The main control board 1111, the interface board 1130, and / or the interface board 1140 in the network device 1100 may perform the functions of the first network device, the intermediate network device, or the second network device, and / or the steps performed by the first network device, the intermediate network device, or the second network device in the above-mentioned method embodiments. For the sake of brevity, details will not be described again here.
[0387] It should be noted that there may be one or more main control boards. When there are multiple main control boards, the main control board may include a primary main control board and a secondary main control board. There may be one or more interface boards, and a network device with a stronger data processing capability provides more interface boards. There may be one or more physical interface cards on the interface board. There may be no switching board, and there may be one or more switching boards. When there are multiple switching boards, load balancing and redundant backup may be implemented together. In a centralized forwarding architecture, the network device may not require a switching board, and the interface board provides the function of processing service data of the entire system. In a distributed forwarding architecture, the network device may have at least one switching board, and data exchange between multiple interface boards is implemented using the switching board to provide large-capacity data exchange and processing capabilities. Thus, the data access and processing capabilities of the network device in the distributed architecture are superior to those of the device in the centralized architecture. Optionally, the network device may alternatively be in the form of only one card. Specifically, there is no switching board, and the functions of the interface board and the main control board are integrated on the card. In this case, the central processing unit on the interface board and the central processing unit on the main control board may be combined into one central processing unit on the card to perform the combined functions of the two central processing units. Devices of this form (e.g., network devices such as low-end switches or routers) have weak data exchange and processing capabilities. The specific architecture used depends on the specific networking deployment scenario, which is not limited here.
[0388] In some possible embodiments, the first network device, the intermediate network device, or the second network device may be implemented as a virtualization device.
[0389] For example, the virtualized device may be a virtual machine (English: Virtual Machine, VM) on which a program having packet transmission capabilities is executed, and the virtual machine is deployed on a hardware device (e.g., a physical server). A virtual machine is a complete computer system simulated by software, has complete hardware system capabilities, and operates in a completely isolated environment. The virtual machine may be configured as a first network device, an intermediate network device, or a second network device. For example, the first network device, the intermediate 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, the intermediate network device, or the second network device is a virtual host, a virtual router, or a virtual switch. After reading this application, and with reference to NFV technology, a person skilled in the art can virtualize the first network device, the intermediate network device, or the second network device having the aforementioned capabilities on a general-purpose physical server. Details will not be repeated here.
[0390] For example, the virtualization device may be a container, and a container is an entity configured to provide an isolated virtualization environment. For example, the container may be a docker container. The container may be configured as a first network device, an intermediate network device, or a second network device. For example, the first network device, the intermediate network device, or the second network device may be created using a corresponding image. For example, by using an image of a proxy-container (a container that provides a proxy service), two container instances may be created for the proxy-container, namely, a container instance proxy-container1 and a container instance proxy-container2. The container instance proxy-container1 is provided as a first network device or a first computing device. The container instance proxy-container2 is provided as a second network device or a second computing device. When container technology is used for implementation, the first network device, the intermediate network device, or the second network device may run using a kernel of a physical machine, and the multiple first network devices, the intermediate network devices, or the second network devices may share the operating system of the physical machine. Different first network devices, the intermediate network devices, or the second network devices may be isolated from each other by using container technology. The containerized first network device, the intermediate network device, or the second network device may run in a virtualized environment, for example, in a virtual machine. Alternatively, the containerized first network device, the intermediate network device, or the second network device may run directly within a physical machine.
[0391] For example, the virtualization device may be a Pod. A Pod is a basic unit of Kubernetes for deploying, managing, and orchestrating containerized applications (Kubernetes is an open source container orchestration engine from Google, and is simply called K8 in English). A Pod may contain one or more containers. All containers in the same Pod are typically deployed on the same host. Therefore, all containers in the same Pod can communicate with each other through the host and can share the host's storage and network resources. A Pod may be configured as a first network device, an intermediate network device, or a second network device. For example, specifically, a container as a service (CaaS, a container-based PaaS service) may be instructed to create a Pod, and the Pod is provided as a first network device, an intermediate network device, or a second network device.
[0392] Of course, the first network device, the intermediate network device, or the second network device may alternatively be another virtualization device not enumerated one by one herein.
[0393] In some possible embodiments, the first network device, the intermediate network device, or the second network device may alternatively be implemented by a general-purpose processor. For example, the general-purpose processor may be in the form of a chip. Specifically, a general-purpose processor implementing the first network device, the intermediate network device, or the second network device includes a processing circuit, and an input interface and an output interface internally connected to the processing circuit and communicating with the processing circuit. The processing circuit is configured to perform the packet generation step in the aforementioned method embodiment by using the input interface. The processing circuit is configured to perform the reception step in the aforementioned method embodiment by using the input interface. The processing circuit is configured to perform the transmission step in the aforementioned method embodiment by using the output interface. Optionally, the general-purpose processor may further include a storage medium. The processing circuit is configured to perform the storage step in the aforementioned method embodiment by using the storage medium. The storage medium can store instructions executed by the processing circuit. The processing circuit is configured to execute the instructions stored in the storage medium to execute the aforementioned method embodiment.
[0394] Please refer to Figure 12. An embodiment of the present application provides a network system 1200. The network system 1200 includes a first network device 1201, an intermediate network device 1202, and a second network device 1203. Optionally, the first network device 1201 is the network device 900, the network device 1000, or the network device 1100, the intermediate network device 1202 is the network device 900, the network device 1000, or the network device 1100, and the second network device 1203 is the network device 900, the network device 1000, or the network device 1100.
[0395] Please refer to Figure 13. An embodiment of the present application provides a network system 1300. The network system 1300 includes a first network device 1301, a first intermediate network device 1302, a second intermediate network device 1303, and a second network device 1304. The first network device 1301, the first intermediate network device 1302, the second intermediate network device 1303, and the second network device 1304 may each be a physical device, such as a router, a switch, or a gateway, or may be a virtual device that supports route issuing and packet forwarding. In this embodiment, the specific type of the first network device and the second network device is not limited.
[0396] For example, when the network system 1300 is applied to the scenario shown in FIG. 1, the first network device 1301 may be, for example, a PE device located in the metropolitan area network shown in FIG. 1, the first intermediate network device 1302 may be, for example, network device A shown in FIG. 1, the second intermediate network device 1303 may be, for example, network device A shown in FIG. 1, and the second network device 1304 may be, for example, a cloud PE 1 device located in the backbone network shown in FIG. 1.
[0397] Optionally, the second intermediate network device 1303 and the second network device 1304 belong to the same IGP domain, the first network device 1301 and the first intermediate network device 1302 belong to the same IGP domain, and the first network device 1301 and the second network device 1304 belong to different IGP domains.
[0398] The first intermediate network device 1302 obtains the first traffic engineering tunnel and the second traffic engineering tunnel, where the first traffic engineering tunnel includes the first subnet prefix and the second traffic engineering tunnel includes the second subnet prefix. The first traffic engineering tunnel and the second traffic engineering tunnel may be sent to the first intermediate network device 1302 by the controller or another route computation device.
[0399] The first intermediate network device 1302 issues a first route advertisement packet to the second intermediate network device 1303, where the first route advertisement packet includes a third subnet prefix, and the first intermediate network device 1302 obtains the third subnet prefix by aggregating the first subnet prefix and the second subnet prefix. After obtaining the first traffic engineering tunnel and the second traffic engineering tunnel, the first intermediate network device 1302 can aggregate the first subnet prefix and the second subnet prefix to obtain an aggregation network segment, i.e., a third subnet prefix, and advertise the aggregation network segment to the second intermediate network device 1303.
[0400] In one example, the second intermediate network device 1303 may obtain a first network slice identifier based on a route computation requirement corresponding to the third subnet prefix. The first network slice identifier may be used to compute a route satisfying the route computation requirement corresponding to the third subnet prefix, and the first network slice identifier may be, for example, a FlexAlgo ID. In addition, the second intermediate network device 1303 may assign a corresponding first SID to the first network slice identifier. The first SID may be, for example, an END SID. The second intermediate network device 1303 may associate the third subnet prefix with the first SID and issue a second route advertisement packet, such that the second network device 1304 may receive the second route advertisement packet. The second route advertisement packet includes the third subnet prefix, the first SID, and the first network slice identifier, and the first SID corresponds to the first network slice identifier. In another example, the second intermediate network device 1303 can introduce a third subnet prefix into at least one network slice, where the at least one network slice includes a first network slice and a second network slice. The second intermediate network device 1303 issues a third route advertisement packet, where the third route advertisement packet includes the third subnet prefix and an identifier of the second network slice. The second network device 1304 can obtain the third route advertisement packet and determine a corresponding exit of the third subnet prefix based on the identifier of the second network slice. In other words, for the second network device 1304, the second network device 1304 can receive different route advertisement packets issued by the second intermediate network device 1303, where the different route advertisement packets include the same subnet prefix and different network slice identifiers.The second network device 1304 can select a different network slice identifier based on the forwarding requirements of the obtained packet to determine a corresponding egress, so that the forwarding path of the packet can meet the requirements, for example, a low latency requirement or a high bandwidth requirement.
[0401] The second intermediate network device 1303 receives the first packet sent by the second network device 1304, and there is a longest match between the destination address of the first packet and a third subnet prefix.
[0402] In one example, the first packet may further include the first SID, and the second intermediate network device 1303 may determine a corresponding third subnet prefix based on the first SID in the first packet.
[0403] In another example, the hop-by-hop header of the first packet carries an identifier of a second network slice. Since the identifier of the second network slice is carried in the hop-by-hop header of the first packet, as a result, a network device between the second network device 1304 and the second intermediate network device 1303 can select a corresponding egress based on the identifier of the second network slice to forward the first packet. That is, the first packet can be transmitted on the second network slice.
[0404] The second intermediate network device 1303 obtains a second packet based on the first packet and sends the second packet to the first intermediate network device 1302. Optionally, the first packet may include a first SID, and the second intermediate network device may determine a corresponding egress based on the first network slice identifier corresponding to the first SID. Alternatively, a hop-by-hop header of the first packet may carry an identifier of the second network slice, and the second intermediate network device 1303 may determine a corresponding egress based on the identifier of the second network slice.
[0405] An embodiment of the present application provides a computer program product, which, when running on a first network device, an intermediate network device, or a second network device, enables the first network device, the intermediate network device, or the second network device to perform the method 200, the method 300, the method 400, the method 600, and the method 700 in the above-mentioned method embodiments.
[0406] The network device in the above-mentioned product form has any function of the first network device, the intermediate network device, or the second network device in the above-mentioned method embodiments separately, and the details are not repeated here.
[0407] Those skilled in the art can recognize that the method steps and units described with reference to the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination thereof. In order to clearly describe the compatibility between hardware and software, the above generally describes the steps and configurations of each embodiment based on functions. Whether a function is performed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use various methods to implement the described functions for each specific application, but the implementation should not be considered to go beyond the scope of this application.
[0408] For convenience and simple description, it will be clearly understood by those skilled in the art that for the detailed operation processes of the aforementioned systems, devices and units, please refer to the corresponding processes of the aforementioned method embodiments, and the details will not be described again here.
[0409] In some embodiments provided in the present application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the described device embodiment is merely an example. For example, the division into units is merely a logical functional division, and may be other divisions in actual implementation. For example, multiple units or components may be combined or integrated with another system, or some features may be ignored or not performed. Furthermore, the shown or described mutual couplings or direct couplings or communication connections may be implemented using some interfaces. Indirect couplings or communication connections between devices or units may be implemented in electronic, mechanical, or other forms.
[0410] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, in other words, may be located in one location or distributed over multiple network units. Some or all of the units may be selected based on the actual requirements to achieve the objectives of the solutions in the embodiments.
[0411] In addition, the functional units of the embodiments of the present application may be integrated into one processing unit, each of the units may exist physically alone, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware or a software functional unit.
[0412] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, the integrated unit may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be essentially implemented in the form of a software product, or the part that contributes to the prior art, or all or part of the technical solution may be implemented in the form of a software product. The computer software product is stored in a storage medium and includes some instructions for instructing a computer device (which may be a personal computer, a server, a network device, etc.) to execute all or part of the steps of the method in the embodiment of the present application. The aforementioned storage medium includes any medium that can store program code, such as, for example, a USB flash drive, a removable hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk. [Explanation of symbols]
[0413] 200 Route Notification Method 300 Data Processing Methods 400 Data Processing Method 600 Data Processing Methods 700 Data Processing Methods 900 Network Devices 901 Transmitter Unit 902 Processing Unit 903 Receiver Unit 1000 Network Devices 1001 Processor 1002 Communication Bus 1003 Memory 1004 Communication Interface 1005 Processor 1006 Output Device 1007 Input Devices 1010 Program Code 1100 Network Devices 1111 Main control board, central processing unit 1112 Memory 1120 Switching Board 1130 Interface Board 1131 Central Processing Unit 1132 Network Processor 1133 Physical Interface Card 1134 Forwarding Entry Memory 1140 Interface Board 1141 Central Processing Unit 1142 Network Processor 1143 Physical Interface Card 1144 Forwarding Entry Memory 1200 Network System 1201 First Network Device 1202 Intermediate Network Device 1203 Secondary Network Device 1300 Network System 1301 First Network Device 1302 first intermediate network device 1303 Second intermediate network device 1304 Secondary Network Device
Claims
1. A route announcement method, the method comprising: obtaining, by a first network device, a first route by receiving routing information, the first route including a first route prefix; advertising a second route by the first network device, the second route including a subnet prefix and a route identifier, the range of the subnet prefix including the range of the first route prefix; A route announcement method comprising:
2. obtaining, by the first network device, a third route, the third route including a second route prefix; obtaining, by the first network device, the subnet prefix based on the second route prefix and the first route prefix; The method of claim 1, further comprising:
3. The method of claim 1 or 2, wherein the path identifier comprises a network slice identifier.
4. The method of claim 3 , wherein the network slice identifier comprises a flexible algorithm identifier.
5. 3. The method of claim 1, wherein the second route is advertised by using Interior Gateway Protocol (IGP) packets.
6. The method of claim 1 or 2, wherein the first route is advertised by a second network device.
7. 7. The method of claim 6, wherein the second network device and the first network device belong to different IGP domains, or the second network device and the first network device belong to different Border Gateway Protocol (BGP) domains.
8. A route notification device, A receiving unit configured to obtain a first route by receiving routing information, the first route being configured to include a first route prefix; a sending unit configured to advertise a second route, the second route including a subnet prefix and a route identifier, the range of the subnet prefix including the range of the first route prefix; A route announcement device comprising:
9. Further comprising a processing unit, The receiving unit is configured to obtain a third route, the third route including a second route prefix; 9. The apparatus of claim 8, wherein the processing unit is configured to obtain the subnet prefix based on the second route prefix and the first route prefix.
10. The apparatus of claim 8 or 9, wherein the path identifier comprises a network slice identifier.
11. The apparatus of claim 10 , wherein the network slice identifier comprises a flexible algorithm identifier.
12. The apparatus according to claim 8 or 9, wherein the second route is advertised by using an Interior Gateway Protocol, IGP, packet.
13. The method of claim 8 or 9, wherein the first route is advertised by a second network device.
14. 8. A computer-readable storage medium having a software program stored therein, the software program being read and executed by one or more processors to perform the method of any one of claims 1 to 7.
15. A network system, the network system comprising a network device configured to perform the method according to any one of claims 1 to 7.
16. A program, which when executed by a communications device, enables the communications device to carry out the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Routing aggregation method, packet transmitting method and border router of autonomous system
CN101014014A
A method and equipment for generating route
CN110535766A
Automatic setting device of tunnel and method for automatically setting tunnel
JP2004266822A
Route information management method and management system thereof
JP2010199800A
Method, device and system for obtaining SRv6 tunnel information
JP2022501965A
