WO2020073685A1 - Forwarding path determining method, apparatus and system, computer device, and storage medium - Google Patents

Forwarding path determining method, apparatus and system, computer device, and storage medium Download PDF

Info

Publication number
WO2020073685A1
WO2020073685A1 PCT/CN2019/092617 CN2019092617W WO2020073685A1 WO 2020073685 A1 WO2020073685 A1 WO 2020073685A1 CN 2019092617 W CN2019092617 W CN 2019092617W WO 2020073685 A1 WO2020073685 A1 WO 2020073685A1
Authority
WO
WIPO (PCT)
Prior art keywords
flow
node
flow label
destination address
address
Prior art date
Application number
PCT/CN2019/092617
Other languages
French (fr)
Chinese (zh)
Inventor
方皓
于泳
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020073685A1 publication Critical patent/WO2020073685A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/741Routing in networks with a plurality of addressing schemes, e.g. with both IPv4 and IPv6
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults

Definitions

  • the present application relates to the field of data processing technology, and in particular, to a forwarding path determination method, device, computer equipment, and storage medium.
  • data packets in the network mainly select the best path through hops, metric, cost, or comprehensive comparison.
  • Path forwarding strategies such as RIP (Routing Information Protocol), IGRP (Interior Gateway Routing Protocol, internal gateway routing protocol) and other protocols are based on the number of hops to select the best path, IS-IS and other protocols
  • the path forwarding strategy is to select the best path through the metric value.
  • the path forwarding strategy corresponding to the protocols such as EIGRP (Enhanced Interior Gateway Routing Protocol, enhanced internal gateway routing protocol) and OSPF (Open Shortest Path First) is To select the best path through generational value, there are some protocols such as BGP (Border Gateway Protocol, Border Gateway Protocol), TE and other protocols corresponding to the path forwarding strategy is a comprehensive comparison to select the best path.
  • Internal gateway protocols such as RIP, OSPF, IS-IS, IGRP, EIGRP
  • the algorithm for selecting the best path has shortcomings, such as the number of hops ignores bandwidth and delay The value, delay, bandwidth and backup path are ignored.
  • the BGP protocol has strong control capabilities in the calculation of the optimal path but lacks dynamic path calculation capabilities.
  • TE has strong path control capabilities and intelligent routing capabilities but has high complexity and weak path control capabilities.
  • Embodiments of the present application provide a forwarding path determination method, device, computer equipment, and storage medium, which enable data traffic to be forwarded according to a path where a designated key node is located, which is convenient for efficient fault location and troubleshooting.
  • an embodiment of the present application provides a method for determining a forwarding path.
  • the method includes:
  • an embodiment of the present application provides an apparatus for determining a forwarding path.
  • the apparatus includes a unit corresponding to executing the method described in the first aspect.
  • an embodiment of the present application provides a computer device, the computer device includes a memory, and a processor connected to the memory;
  • the memory is used to store a computer program, and the processor is used to run the computer program stored in the memory to perform the method described in the first aspect.
  • an embodiment of the present application provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, implements the method described in the first aspect.
  • FIG. 1 is a schematic flowchart of a forwarding path determination method provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a forwarding path determination method provided by another embodiment of the present application.
  • FIG. 3 is a schematic sub-flow diagram of a method for determining a forwarding path provided by another embodiment of the present application.
  • FIG. 4 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • FIG. 5 is a schematic block diagram of a forwarding path determination apparatus provided by an embodiment of the present application.
  • FIG. 6 is a schematic block diagram of an apparatus for determining a forwarding path according to another embodiment of the present application.
  • FIG. 7 is a schematic block diagram of a forwarding unit provided by another embodiment of the present application.
  • FIG. 8 is a schematic block diagram of a computer device provided by an embodiment of the present application.
  • the forwarding path determination method in the embodiment of the present application may be applied to a network that needs to control data traffic, such as the Internet or a local area network.
  • a network that needs to control data traffic such as the Internet or a local area network.
  • the following uses the data center Internet as an example.
  • the data center interconnection network may be the data center interconnection network where banks and large enterprises are located.
  • the data center interconnection network includes multiple data centers, distributed in different cities, and these data centers need to communicate with each other.
  • the data center interconnection network also includes multiple routers.
  • the forwarding path determination method is applied to routers in the data center interconnection network to forward data traffic from the source address to the destination address.
  • addresses in this application such as source address and destination address, are all IP addresses.
  • each router can also independently implement each step of the forwarding path determination method, that is, each router has a function of implementing each step of the forwarding path determination method.
  • FIG. 1 is a schematic flowchart of a forwarding path determination method provided by an embodiment of the present application. As shown in FIG. 1, the method includes S101-S104.
  • the router After receiving the data traffic, the router obtains the key nodes that the data traffic needs to pass through to reach the destination address and the flow labels corresponding to the key nodes before forwarding the data traffic.
  • a node refers to a router, and each router corresponds to a node.
  • the key node can also be understood as the necessary node that needs to pass through to reach the destination address.
  • each router stores a configuration file, and the configuration file stores the flow mark corresponding to the key node that the data traffic needs to pass through to reach the destination address. Set the flow mark corresponding to the key node that the data traffic needs to pass to reach the destination address in the configuration file in advance.
  • S102 Encapsulate the IPv4 format data packet corresponding to the data traffic into an IPv6 format data packet.
  • the IPv4 format data packet corresponding to the data traffic is encapsulated into an IPv6 format data packet through tunneling technology.
  • Tunneling technology refers to a mechanism that encapsulates IPv6 packets as data in IPv4 packets when necessary, so that IPv6 packets can be transmitted on existing IPv4 infrastructure (mainly IPv4 routers). That is, IPv4 is used as a tunnel carrier, and the entire IPv6 data packet is encapsulated in the IPv4 data packet, so that the encapsulated data packet can still be forwarded in the network. If node A wants to send IPv6 packets to node B, but there is a sea of IPv4 between them, first, both ends need to be configured to establish a tunnel.
  • node A when node A sends an IPv6 packet to node B, node A as the beginning of the tunnel encapsulates the IPv6 packet in an IPv4 packet that uses node B's IPv4 address as the destination address and the source address is its own IPv4 address, and It is sent out, and the sent data packet reaches the Node B through IPv4 forwarding just like a normal IPv4 data packet. After receiving this data packet, Node B releases the IPv4 encapsulation, and takes out the IPv6 data packet to be processed by its own IPv6 protocol stack.
  • IPv6 packet There is a Flow field in the IPv6 packet, which occupies fixed bits, such as 20 bits, and this field is the flow label field.
  • the domain can also be understood as a field, that is, there is a flow label field in the IPv6 data packet.
  • the Flow field in the IPv6 packet can be used to identify various forms of flow. Since the Flow field can be customized, this field is used to identify the flow label corresponding to the key node. In this way, the combination of IPv4 and IPv6 is compatible with mainstream IPv4 applications and IPv6 flow label customization.
  • the flow label corresponding to the key node is written into the flow label field, rather than the IP address corresponding to the key node is written into the flow label field, because the size of the flow label field Limited, if you write an IP address, the IP address that the flow label field can hold is limited; if you write a flow tag, you can record multiple flow tags.
  • the flow marks corresponding to the key nodes are written in the order of the key nodes that need to pass through to reach the destination address.
  • An implementation scenario of writing the flow label corresponding to the key node into the flow label field of the IPv6 format data packet is: on the interface displaying the data flow information, receiving a data flow selected by the user, and receiving the data from the user Flow setting / input key node, according to the flow mark corresponding to the pre-saved key node, write the flow mark corresponding to the set / input key node to the flow label field of the IPv6 format packet, set / The key nodes entered are saved in the configuration file. In some other implementation scenarios, it is also possible to directly read the data set in the configuration file without manual participation and complete automatically.
  • the correspondence relationship between the flow label and the node address will be set in advance, such as what is the node address corresponding to a certain flow label, and the node address is represented by an IP address.
  • the correspondence between the flow label and the node address is stored in each router.
  • a flow label corresponds to a node address, for example, the flow labels corresponding to Wuhan, Shanghai, and Beijing correspond to an IP address in Wuhan, Shanghai, and Beijing, respectively.
  • These node addresses exist in the data center interconnection network, and are hardware device addresses in the data center interconnection network, such as router IP addresses.
  • the IPv6 format data packet is first forwarded to the node address corresponding to Wuhan, and then forwarded from the node address corresponding to Wuhan to the node address corresponding to Shanghai, and then Forwarded from the node address corresponding to Shanghai to the node address corresponding to Beijing, and finally forwarded to the destination address.
  • there may be many routers between the router that forwards the data traffic and the router corresponding to the key node and there may be many routers between every two key nodes, such as between Wuhan and Shanghai There may be many routers.
  • the path forwarding strategy between the router that forwards the data traffic and the key node is forwarded according to the existing path forwarding strategy, and the path forwarding strategy between every two key nodes is also forwarded according to the existing path forwarding strategy.
  • the path forwarding strategy is a forwarding strategy corresponding to different protocols, such as RIP and OSPF.
  • FIG. 2 is a schematic flowchart of a forwarding path determination method provided by another embodiment of the present application. As shown in FIG. 2, the method includes S201-S206. In this embodiment, the differences from the embodiment in FIG. 1 are mainly explained. For the description of the same steps as in FIG. 1, please refer to the description in the embodiment in FIG. 1, which will not be repeated here.
  • the preset type may be a preset priority. If the router receives data traffic, obtain the priority of the data traffic. In some embodiments, the preset type may also be other specific types set in advance, such as a user-defined type. If the router receives data traffic, the type data of the data traffic is obtained. Among them, the preset priority and the preset specific type are saved in the configuration file.
  • the preset type is a preset priority
  • it is determined whether the type of data traffic is the preset type that is, whether the priority of the data traffic is the preset priority. If the preset type is another specific type preset by the user, then it is determined whether the type of data traffic is the preset type, that is, whether the type of the data traffic is other specific types preset. To determine whether the type of the data traffic is a preset type is to filter some data traffic, and only further processes the preset type of data traffic.
  • step S203 is executed, it can be understood that the data traffic of the preset type is simply forwarded in the order corresponding to the designated key node, and the preset data traffic type and path The corresponding association relationship of the forwarding strategy selects the corresponding path forwarding strategy for forwarding. If the type of data traffic is not the preset type, it is forwarded according to the ordinary data packet.
  • step S201 it is not necessary to determine whether the data traffic type is a preset type, that is, after step S201 is executed, then the key nodes that need to pass through the data traffic to reach the destination address and the flows corresponding to the key nodes are obtained in step S203 mark. It can be understood that all data traffic is designated as key nodes, and all data traffic is forwarded in the order corresponding to the designated key nodes, but it will also be associated with the path forwarding strategy according to the preset data traffic type. The relationship selects the corresponding path forwarding strategy for forwarding.
  • the type of the data traffic is a preset type, obtain a key node that the data traffic needs to pass through to reach the destination address and a flow mark corresponding to the key node.
  • the flow mark corresponding to the key node is stored in the configuration file.
  • the flow mark of the key node corresponding to the preset type of data traffic is stored in the configuration file.
  • the configuration file has two functions: identifying a predetermined type of data traffic, and obtaining a flow mark corresponding to a key node corresponding to the predetermined type of data traffic.
  • S204 Encapsulate the IPv4 format data packet corresponding to the data traffic into an IPv6 format data packet.
  • Each node stores the correspondence relationship between the data traffic type and the path forwarding strategy, where the nodes include key nodes.
  • different path forwarding strategies can be used for different types of data traffic.
  • the corresponding relationship between the data traffic type and the path forwarding strategy in each router can be the same or different.
  • the data traffic type is A
  • the path forwarding strategy is AA
  • the path forwarding strategy is BB.
  • the preset type of data traffic is forwarded according to the path where the designated key node is located, which is convenient for efficient fault location and troubleshooting, and the traffic analysis and reasonable prediction of the preset type of data traffic.
  • different types of data traffic are forwarded according to different path forwarding strategies, and a variety of different types of data traffic are forwarded more targeted to achieve personalized traffic forwarding to meet the needs of different users.
  • step S206 includes the following steps S301-S307.
  • next hop destination address does not really refer to the address of the next router that the data traffic needs to pass through, but the address of the router corresponding to the set key node.
  • the determined path forwarding strategy refers to the path forwarding strategy from the current router to the next router (not the router corresponding to the next hop destination address). It should be noted that there may be multiple routers, multiple forwarding paths, and multiple different path forwarding strategies between the current router and the router corresponding to the destination address of the next hop. In some other embodiments, no matter how many routers exist between the current router and the router corresponding to the destination address of the next hop, the data traffic is forwarded according to the same path forwarding strategy (determined path forwarding strategy) . In this case, it can be understood that all routers between the current router and the router corresponding to the destination address of the next hop are set to the same path forwarding strategy for the data traffic.
  • the purpose of deleting the flow label is to simplify the processing and facilitate the processing of the destination address of the next hop.
  • step S304 Determine whether the value in the flow label field is empty. If the value in the flow label field is not empty, return to step S301. If the value in the flow label field is empty, step S305 is executed.
  • the flow label field if there is a flow label in the flow label field, it means that the data packet corresponding to the data flow has not reached the destination. Since the flow label corresponding to the destination address of the next hop has been deleted, the first flow label in the flow label field is obtained, and the destination address corresponding to the first flow label is used as the destination address of the next hop. And determine the path forwarding strategy to be used to the destination address of the next hop. If the value in the flow label field is blank, it means that the data traffic has reached the destination, such as Beijing, but may not have reached the destination address, that is, the destination address in the IPV4 data packet.
  • step S305 Determine whether the current router address is the same as the destination address. If the current router address is the same as the destination address, step S306 is performed; if the current router address is not the same as the destination address, step S307 is performed. If the current router address is the same as the destination address, it means that the data traffic has reached the destination address. If the current router address is different from the destination address, it means that the data traffic has reached the destination (a destination can include multiple IP addresses, and multiple IP addresses include a destination address), but not yet Reach the destination address.
  • S307 Determine the path forwarding strategy corresponding to the IPv6 format data packet according to the correspondence relationship between the saved preset data traffic type and the path forwarding strategy, and according to the determined path forwarding strategy, convert the data in the IPv6 format The packet is sent to the destination address.
  • FIG. 4 it is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • an initial user (source address) in Shenzhen sends a data traffic
  • router A in Shenzhen receives the data traffic and finds that the data traffic needs to be sent to a destination user in Beijing.
  • the address corresponding to the destination user Is the destination address.
  • the key nodes that need to pass through include router B in Wuhan, router C in Shanghai, and router D in Beijing.
  • the key nodes corresponding to the preset types of data traffic, the flow labels corresponding to the key nodes, and the correspondence between the flow labels corresponding to the key nodes and the node addresses are stored Correspondence relationship between preset data traffic types and path forwarding strategies.
  • the IPv4 format data packet (including the destination address) corresponding to the data traffic is encapsulated into an IPv6 format data packet, and the flow label corresponding to the key node is written into the flow label field of the IPv6 format data packet.
  • Obtain the first flow label in the flow label field in the IPv6 format packet that is, the flow label corresponding to Router B.
  • the IPv6 format data packet is forwarded to the router B according to the corresponding path forwarding strategy.
  • Router B deletes the flow label corresponding to Router B from the flow label field.
  • Router B finds that the destination address is not its own, so it obtains the first flow label in the data packet, that is, the corresponding flow label of Router C. According to the correspondence between the flow label and the node address in the flow label field, the saved preset The corresponding relationship between the data traffic type and the path forwarding strategy forwards the IPv6 format data packet to Router C according to the corresponding path forwarding strategy.
  • Router D After receiving the IPv6 format packet, Router D finds that the destination address is not its own, and the value in the flow label field is empty, then Router D will change the IPv6 according to the corresponding relationship between the saved preset data traffic type and the path forwarding strategy.
  • the formatted data packet is forwarded to the destination user according to the corresponding path forwarding strategy. The destination user finds that the destination address is consistent with its own address, and then receives the data traffic.
  • each router can be implemented independently in Router A, Router B, Router C, and Router D, that is, each router can implement the sum of the functions described in the above four routers.
  • FIG. 4 is only an example, to facilitate understanding of the solution in the embodiment of the present application, in other embodiments, FIG. 4 may further include more networks and routers.
  • the key node may also be a terminal device, and the terminal device may implement a function of forwarding data traffic, and also save corresponding data.
  • the terminal equipment includes a user terminal, a server, and so on.
  • FIG. 5 is a schematic block diagram of a forwarding path determination apparatus provided by an embodiment of the present application.
  • the device includes a unit corresponding to the method for determining the forwarding path. It should be noted that since each router can implement the sum of the functions described in the above method embodiments, the device can be separately configured in a router or a terminal device, and the terminal device can implement the data traffic forwarding function Terminal Equipment. At the same time, for the convenience of understanding, the following device embodiments are still described according to the step flow. Specifically, as shown in FIG. 5, the device 50 includes a flow label acquisition unit 501, an encapsulation unit 502, a flow label writing unit 503 and a forwarding unit 504.
  • the flow label obtaining unit 501 is configured to obtain, if data traffic is received, a key node that the data traffic needs to pass through to reach the destination address and a flow label corresponding to the key node.
  • the encapsulating unit 502 is configured to encapsulate the IPv4 format data packet corresponding to the data traffic into an IPv6 format data packet. Specifically, the encapsulating unit 502 encapsulates the IPv4 format data packet corresponding to the data traffic into an IPv6 format data packet through a tunnel technology.
  • the forwarding unit 504 is configured to forward the data packet in the IPv6 format to the node corresponding to each key node according to the correspondence relationship between the flow label and the node address in the flow label field, in the order in which the flow label is written The address is finally forwarded to the destination address.
  • the device 60 includes a type acquisition unit 601, a type judgment unit 602, a flow label acquisition unit 603, a packaging unit 604, a flow label writing unit 605, and a forwarding unit 606.
  • the difference from the embodiment of FIG. 5 lies in: the type acquisition unit 601, the type judgment unit 602, and the forwarding unit 606.
  • the type acquisition unit 601, type judgment unit 602, and forwarding unit 606 will be described below. For other units, please refer to the description in the embodiment of FIG. 5, which will not be repeated here.
  • the type obtaining unit 601 is configured to obtain the type of the data flow if data flow is received.
  • the type determining unit 602 is configured to determine whether the type of the data traffic is a preset type. If the type of the data traffic is a preset type, then the flow mark acquisition unit 603 is triggered.
  • the flow label obtaining unit 603 is used to obtain the key nodes that the data traffic needs to pass through to reach the destination address and the flow labels corresponding to the key nodes.
  • the forwarding unit 606 is specifically configured to, according to the correspondence relationship between the flow label and the node address in the flow label domain, the corresponding relationship between the saved preset data traffic type and the path forwarding strategy, in order of writing the flow label
  • the data packet in the IPv6 format is forwarded to the node address corresponding to each key node according to the corresponding path forwarding strategy, and finally forwarded to the destination address.
  • the forwarding unit 606 includes a forwarding strategy determination unit 701, a forwarding next hop unit 702, a deletion unit 703, a value judgment unit 704, an address judgment unit 705, an arrival determination unit 706, and a forwarding purpose Address unit 707.
  • the forwarding strategy determination unit 701 is used to obtain the first flow label in the flow label field, and according to the correspondence between the flow label and the node address, use the node address corresponding to the first flow label as the destination address of the next hop And determine the path forwarding strategy to be used for forwarding the data packet in the IPv6 format to the destination address of the next hop according to the correspondence relationship between the saved preset data traffic type and the path forwarding strategy.
  • the forwarding next hop unit 702 is configured to forward the data packet in the IPv6 format from the current router to the destination address of the next hop according to the determined path forwarding strategy.
  • the deleting unit 703 is configured to delete the flow label corresponding to the destination address of the next hop from the flow label field after the IPv6 format data packet reaches the destination address of the next hop.
  • the value judgment unit 704 is used to judge whether the value in the flow label field is empty. If the value in the flow label field is not empty, a forwarding strategy determination unit 701 and a forwarding next hop unit 702 are triggered.
  • the address determining unit 705 is configured to determine whether the current router address is the same as the destination address if the value in the flow label field is empty.
  • the arrival determination unit 706 is configured to determine that the destination address has been reached if the current router address is the same as the destination address.
  • the forwarding destination address unit 707 is used to determine the correspondence of the IPv6 format data packet according to the correspondence relationship between the saved preset data traffic type and the path forwarding strategy if the current router address is different from the destination address A path forwarding strategy, and according to the determined path forwarding strategy, send the data packet in the IPv6 format to the destination address.
  • the above device can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in FIG. 8.
  • FIG. 8 is a schematic block diagram of a computer device provided by an embodiment of the present application.
  • the device is a router or terminal.
  • the device 80 includes a processor 802, a memory, and a network interface 803 connected through a system bus 801, where the memory may include a non-volatile storage medium 804 and an internal memory 805.
  • the non-volatile storage medium 804 may store an operating system 8041 and a computer program 8042.
  • the computer program 8042 stored in the non-volatile storage medium is executed by the processor 802, the foregoing forwarding path determination method can be implemented.
  • the processor 802 is used to provide computing and control capabilities and support the operation of the entire device 80.
  • the internal memory 805 provides an environment for the operation of the computer program in the non-volatile storage medium.
  • the processor 802 can execute the foregoing forwarding path determination method.
  • the network interface 803 is used for network communication. Those skilled in the art may understand that the structure shown in FIG.
  • the specific device 80 may Include more or less components than shown in the figure, or combine certain components, or have a different arrangement of components.
  • the processor 802 is used to run a computer program stored in a memory to implement any embodiment of the foregoing forwarding path determination method.
  • the so-called processor 802 may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP) , Application Specific Integrated Circuit (Application Program Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the computer program may be stored in a storage medium, and the storage medium may be a computer-readable storage medium.
  • the computer program is executed by at least one processor in the computer system to implement the process steps of the above method embodiments.
  • the present application also provides a storage medium.
  • the storage medium may be a computer-readable storage medium, and the computer-readable storage medium includes a non-volatile computer-readable storage medium.
  • the storage medium stores a computer program that, when executed by the processor, implements any embodiment of the foregoing forwarding path determination method.
  • the storage medium may be various computer-readable storage media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a magnetic disk, or an optical disk.
  • program codes such as a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a magnetic disk, or an optical disk.
  • the disclosed device, device, and method may be implemented in other ways.
  • the device embodiments described above are only schematic, and the division of the units is only a division of logical functions, and there may be other divisions in actual implementation.
  • the specific working processes of the devices, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, which are not repeated here.

Abstract

Embodiments of the present application provide a forwarding path determination method and apparatus, a computer device, and a storage medium. The method comprises: if a data flow is received, obtaining a key node through which the data flow reaches a destination address and a flow label corresponding to the key node; encapsulating packets of an IPv4 format corresponding to the data flow into packets of an IPv6 format; writing the flow label corresponding to the key node into a flow label field of the packets of the IPv6 format; according to the corresponding relationship between the flow label in the flow label field and a node address, forwarding the packets of the IPv6 format to the node address corresponding to each key node according to the writing order of the flow labels, and finally forwarding to the destination address.

Description

转发路径确定方法、装置、系统、计算机设备及存储介质Method, device, system, computer equipment and storage medium for determining forwarding path
本申请要求于2018年10月11日提交中国专利局、申请号为201811185377.3、发明名称为“转发路径确定方法、装置、系统、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application submitted to the China Patent Office on October 11, 2018, with the application number 201811185377.3 and the invention titled "Method, device, system, computer equipment, and storage medium for determining the forwarding path". Incorporated by reference in this application.
技术领域Technical field
本申请涉及数据处理技术领域,尤其涉及一种转发路径确定方法、装置、计算机设备及存储介质。The present application relates to the field of data processing technology, and in particular, to a forwarding path determination method, device, computer equipment, and storage medium.
背景技术Background technique
目前数据包在网络中主要通过跳数(hop)、度量值(metric)、代价值(cost)或者综合比较进行最佳路径选择。如RIP(Routing Information Protocol,路由信息协议)、IGRP(Interior Gateway Routing Protocol,内部网关路由协议)等协议所对应的路径转发策略是通过跳数来选择最佳路径,IS-IS等协议所对应的路径转发策略是通过度量值来选择最佳路径,EIGRP(Enhanced Interior Gateway Routing Protocol,增强内部网关路由协议)、OSPF(Open Shortest Path First,开放式最短路径优先)等协议所对应的路径转发策略是通过代价值来选择最佳路径,也有一些协议如BGP(Border Gateway Protocol,边界网关协议)、TE等协议所对应的路径转发策略是综合比较来选择最佳路径。内部网关协议(如RIP、OSPF、IS-IS、IGRP、EIGRP)通过虑跳数或者考虑单一影响因素来选择最佳路径,该选择最佳路径的算法存在不足,比如跳数忽略了带宽和延迟,代价值忽了延迟、带宽占用和备份路径等。BGP协议在最佳路径计算时有很强的控制能力但是缺少动态路径计算能力,TE拥有强大的路径控制能力和智能选路能力但是复杂度高、制定路径控制能力弱。At present, data packets in the network mainly select the best path through hops, metric, cost, or comprehensive comparison. Path forwarding strategies such as RIP (Routing Information Protocol), IGRP (Interior Gateway Routing Protocol, internal gateway routing protocol) and other protocols are based on the number of hops to select the best path, IS-IS and other protocols The path forwarding strategy is to select the best path through the metric value. The path forwarding strategy corresponding to the protocols such as EIGRP (Enhanced Interior Gateway Routing Protocol, enhanced internal gateway routing protocol) and OSPF (Open Shortest Path First) is To select the best path through generational value, there are some protocols such as BGP (Border Gateway Protocol, Border Gateway Protocol), TE and other protocols corresponding to the path forwarding strategy is a comprehensive comparison to select the best path. Internal gateway protocols (such as RIP, OSPF, IS-IS, IGRP, EIGRP) select the best path by considering the number of hops or considering a single influencing factor. The algorithm for selecting the best path has shortcomings, such as the number of hops ignores bandwidth and delay The value, delay, bandwidth and backup path are ignored. The BGP protocol has strong control capabilities in the calculation of the optimal path but lacks dynamic path calculation capabilities. TE has strong path control capabilities and intelligent routing capabilities but has high complexity and weak path control capabilities.
发明内容Summary of the invention
本申请实施例提供一种转发路径确定方法、装置、计算机设备及存储介质,实现了将数据流量按照指定的关键节点所在的路径进行转发,便于高效的故障定位和排查异常。Embodiments of the present application provide a forwarding path determination method, device, computer equipment, and storage medium, which enable data traffic to be forwarded according to a path where a designated key node is located, which is convenient for efficient fault location and troubleshooting.
第一方面,本申请实施例提供了一种转发路径确定方法,该方法包括:In a first aspect, an embodiment of the present application provides a method for determining a forwarding path. The method includes:
若接收到数据流量,获取所述数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记;将所述数据流量所对应的IPv4格式的数据包封装成IPv6格式的数据包;将所述关键节点所对应的流标记写入到IPv6格式的数据包的流标签域,其中,所述关键节点所对应的流标记是按照到达目的地址所需要经过的关键节点的顺序写入的;根据所述流标签域中的流标记与节点地址的对应关系,按照流标记写入的顺序将所述IPv6格式的数据包转发到每个关键节点地址,最后转发到所述目的地址。If data traffic is received, obtain the key nodes that the data traffic needs to pass to reach the destination address and the flow marks corresponding to the key nodes; encapsulate the IPv4 format data packets corresponding to the data traffic into IPv6 format data packets; Write the flow mark corresponding to the key node into the flow label field of the IPv6 format packet, wherein the flow mark corresponding to the key node is written in the order of the key nodes that need to pass through to reach the destination address ; According to the corresponding relationship between the flow label and the node address in the flow label field, forward the IPv6 format data packet to each key node address in the order in which the flow label is written, and finally forward to the destination address.
第二方面,本申请实施例提供了一种转发路径确定装置,该装置包括用于执行上述第一方面所述的方法对应的单元。In a second aspect, an embodiment of the present application provides an apparatus for determining a forwarding path. The apparatus includes a unit corresponding to executing the method described in the first aspect.
第三方面,本申请实施例提供了一种计算机设备,所述计算机设备包括存储器,以及与所述存储器相连的处理器;In a third aspect, an embodiment of the present application provides a computer device, the computer device includes a memory, and a processor connected to the memory;
所述存储器用于存储计算机程序,所述处理器用于运行所述存储器中存储的计算机程序,以执行上述第一方面所述的方法。The memory is used to store a computer program, and the processor is used to run the computer program stored in the memory to perform the method described in the first aspect.
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时,实现上述第一方面所述的方法。According to a fourth aspect, an embodiment of the present application provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, implements the method described in the first aspect.
附图说明BRIEF DESCRIPTION
图1是本申请实施例提供的转发路径确定方法的流程示意图;FIG. 1 is a schematic flowchart of a forwarding path determination method provided by an embodiment of the present application;
图2是本申请另一实施例提供的转发路径确定方法的流程示意图;2 is a schematic flowchart of a forwarding path determination method provided by another embodiment of the present application;
图3是本申请另一实施例提供的转发路径确定方法的子流程示意图;3 is a schematic sub-flow diagram of a method for determining a forwarding path provided by another embodiment of the present application;
图4是本申请实施例提供的的应用场景示意图;4 is a schematic diagram of an application scenario provided by an embodiment of the present application;
图5是本申请实施例提供的转发路径确定装置的示意性框图;5 is a schematic block diagram of a forwarding path determination apparatus provided by an embodiment of the present application;
图6是本申请另一实施例提供的转发路径确定装置的示意性框图;6 is a schematic block diagram of an apparatus for determining a forwarding path according to another embodiment of the present application;
图7是本申请另一实施例提供的转发单元的示意性框图;7 is a schematic block diagram of a forwarding unit provided by another embodiment of the present application;
图8是本申请实施例提供的一种计算机设备的示意性框图。8 is a schematic block diagram of a computer device provided by an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the scope of protection of this application.
本申请实施例中的转发路径确定方法可以应用在需要对数据流量进行控制的网络中,如互联网、局域网等。以下以数据中心互联网络为例进行说明。The forwarding path determination method in the embodiment of the present application may be applied to a network that needs to control data traffic, such as the Internet or a local area network. The following uses the data center Internet as an example.
数据中心互联网络,可以是银行和大型企业等所在的数据中心互联网络。在该数据中心互联网络中包括有多个数据中心,分布在不同的城市,这些数据中心之间需要相互进行通信。在该数据中心互联网络中,还包括有多个路由器。该转发路径确定方法应用于数据中心互联网络中的路由器中,以将数据流量从源地址转发到目的地址。其中,没有特别指明,本申请中的地址如源地址、目的地址皆为IP地址。需要指出的是,每个路由器也可以单独实现转发路径确定方法的每个步骤,即每个路由器具有实现转发路径确定方法的每个步骤的功能。The data center interconnection network may be the data center interconnection network where banks and large enterprises are located. The data center interconnection network includes multiple data centers, distributed in different cities, and these data centers need to communicate with each other. The data center interconnection network also includes multiple routers. The forwarding path determination method is applied to routers in the data center interconnection network to forward data traffic from the source address to the destination address. Among them, there is no special indication that the addresses in this application, such as source address and destination address, are all IP addresses. It should be pointed out that each router can also independently implement each step of the forwarding path determination method, that is, each router has a function of implementing each step of the forwarding path determination method.
图1是本申请实施例提供的转发路径确定方法的流程示意图。如图1所示,该方法包括S101-S104。FIG. 1 is a schematic flowchart of a forwarding path determination method provided by an embodiment of the present application. As shown in FIG. 1, the method includes S101-S104.
S101,若接收到数据流量,获取所述数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记。S101: If data traffic is received, obtain a key node that the data traffic needs to pass to reach the destination address and a flow mark corresponding to the key node.
路由器接收到数据流量后,在转发该数据流量之前,获取该数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记。其中,节点指的是路由器,每个路由器对应为一个节点。关键节点,也可以理解为到达目的地址所需要经过的必经节点。其中,每个路由器中都保存有配置文件,在配置文件中保存有数据流量到达目的地址所需要经过的关键节点所对应的流标记。预先在配置文件中设置数据流量到达目的地址所需要经过的关键节点所对应的流标记。如某数据流量从深圳的一个源地址发送到北京的一个目的地址,关键节点包括武汉、上海、北京。那么对应的流标记即为武汉、上海、北京所对应的流标记。其中,需要注意的是,数据流量以数据包的形式存在。After receiving the data traffic, the router obtains the key nodes that the data traffic needs to pass through to reach the destination address and the flow labels corresponding to the key nodes before forwarding the data traffic. Among them, a node refers to a router, and each router corresponds to a node. The key node can also be understood as the necessary node that needs to pass through to reach the destination address. Among them, each router stores a configuration file, and the configuration file stores the flow mark corresponding to the key node that the data traffic needs to pass through to reach the destination address. Set the flow mark corresponding to the key node that the data traffic needs to pass to reach the destination address in the configuration file in advance. If a certain data flow is sent from a source address in Shenzhen to a destination address in Beijing, key nodes include Wuhan, Shanghai, and Beijing. Then the corresponding flow labels are the corresponding flow labels of Wuhan, Shanghai, and Beijing. Among them, it should be noted that the data traffic exists in the form of data packets.
S102,将所述数据流量所对应的IPv4格式的数据包封装成IPv6格式的数据包。S102: Encapsulate the IPv4 format data packet corresponding to the data traffic into an IPv6 format data packet.
具体地,通过隧道技术,将数据流量所对应的IPv4格式的数据包封装成IPv6格式的数据包。隧道技术指的是,在必要时将IPv6数据包作为数据封装在IPv4数据包里,使IPv6数据包能在已有的IPv4基础设施(主要是指IPv4路由器)上传输的机制。即将IPv4作为隧道载体,将IPv6数据包整个封装在IPv4数据包中,以使封装后的数据包仍可以在网络中转发。如节点A要向节点B发送IPv6数据包,但是它们之间有一片IPv4海洋,首先两端都需要进行配置以建立一条隧道。如当节点A发送IPv6数据包给节点B时,节点A作为隧道的起始端将IPv6数据包封装在以节点B的IPv4地址为目的地址、源地址为自己的IPv4地址的IPv4数据包中,并发送出去,该发送出去的数据包和普通IPv4数据包一样经过IPv4的转发到达节点B。节点B收到此数据包之后,解除IPv4封装,取出其中的IPv6数据包交由自己的IPv6协议栈处理。Specifically, the IPv4 format data packet corresponding to the data traffic is encapsulated into an IPv6 format data packet through tunneling technology. Tunneling technology refers to a mechanism that encapsulates IPv6 packets as data in IPv4 packets when necessary, so that IPv6 packets can be transmitted on existing IPv4 infrastructure (mainly IPv4 routers). That is, IPv4 is used as a tunnel carrier, and the entire IPv6 data packet is encapsulated in the IPv4 data packet, so that the encapsulated data packet can still be forwarded in the network. If node A wants to send IPv6 packets to node B, but there is a sea of IPv4 between them, first, both ends need to be configured to establish a tunnel. For example, when node A sends an IPv6 packet to node B, node A as the beginning of the tunnel encapsulates the IPv6 packet in an IPv4 packet that uses node B's IPv4 address as the destination address and the source address is its own IPv4 address, and It is sent out, and the sent data packet reaches the Node B through IPv4 forwarding just like a normal IPv4 data packet. After receiving this data packet, Node B releases the IPv4 encapsulation, and takes out the IPv6 data packet to be processed by its own IPv6 protocol stack.
S103,将所述关键节点所对应的流标记写入到IPv6格式的数据包的流标签域。其中,所述关键节点所对应的流标记是按照到达目的地址所需要经过的关键节点的顺序写入的。S103: Write the flow label corresponding to the key node into the flow label field of the IPv6 format data packet. Wherein, the flow marks corresponding to the key nodes are written in the order of the key nodes that need to pass through to reach the destination address.
IPv6数据包中有一个Flow Label域,占用固定比特,如20个比特,该域即为流标签域。其中,域也可以理解为字段,即在IPv6数据包中有一个流标签字段。IPv6数据包中的Flow Label域可以用来标识各种不同形式的流,由于该Flow Label域可以自定义,因此将该域用来标识关键节点所对应的流标记。如此,将IPv4和IPv6结合使用,兼容IPv4主流应用与IPv6的流标签自定义功能。其中,需要说明的是,将关键节点所对应的流标记写入到流标签域中,而非是将关键节点所对应的IP地址写入到流标签域中,是因为该流标签域的大小有限,若写入IP地址,则流标签域所能保存的IP地址有限;若写入的是流标记,则可以记录多个流标记。其中,需要注意的是,关键节点所对应的流标记是按照到达目的地址所需要经过的关键节点的顺序写入的。如某数据流量从深圳的一个源地址发送到北京的一个目的地址,关键节点包括武汉、上海、北京,那么关键节点所对应的流标记也是按照武汉、上海、北京所对应的顺序写入的。There is a Flow field in the IPv6 packet, which occupies fixed bits, such as 20 bits, and this field is the flow label field. Among them, the domain can also be understood as a field, that is, there is a flow label field in the IPv6 data packet. The Flow field in the IPv6 packet can be used to identify various forms of flow. Since the Flow field can be customized, this field is used to identify the flow label corresponding to the key node. In this way, the combination of IPv4 and IPv6 is compatible with mainstream IPv4 applications and IPv6 flow label customization. Among them, it should be noted that the flow label corresponding to the key node is written into the flow label field, rather than the IP address corresponding to the key node is written into the flow label field, because the size of the flow label field Limited, if you write an IP address, the IP address that the flow label field can hold is limited; if you write a flow tag, you can record multiple flow tags. Among them, it should be noted that the flow marks corresponding to the key nodes are written in the order of the key nodes that need to pass through to reach the destination address. If a certain data flow is sent from a source address in Shenzhen to a destination address in Beijing, and the key nodes include Wuhan, Shanghai, and Beijing, the flow labels corresponding to the key nodes are also written in the order corresponding to Wuhan, Shanghai, and Beijing.
将所述关键节点所对应的流标记写入到IPv6格式的数据包的流标签域的 一个实现场景为:在显示数据流量信息的界面上,接收用户选择的一条数据流量,接收用户对该数据流量设置/输入的关键节点,根据预先保存的关键节点所对应的流标记,将所设置/所输入的关键节点所对应的流标记写入到IPv6格式的数据包的流标签域,将设置/输入的关键节点保存在配置文件中。在其他一些实现场景中,也可以无需人工参与,直接读取预先在配置文件中设置的数据,自动完成。An implementation scenario of writing the flow label corresponding to the key node into the flow label field of the IPv6 format data packet is: on the interface displaying the data flow information, receiving a data flow selected by the user, and receiving the data from the user Flow setting / input key node, according to the flow mark corresponding to the pre-saved key node, write the flow mark corresponding to the set / input key node to the flow label field of the IPv6 format packet, set / The key nodes entered are saved in the configuration file. In some other implementation scenarios, it is also possible to directly read the data set in the configuration file without manual participation and complete automatically.
S104,根据所述流标签域中的流标记与节点地址的对应关系,按照流标记写入的顺序将所述IPv6格式的数据包转发到每个关键节点所对应的节点地址,最后转发到所述目的地址。S104. According to the correspondence between the flow label and the node address in the flow label field, forward the IPv6 format data packet to the node address corresponding to each key node in the order in which the flow label is written, and finally forward to the Describe the destination address.
预先会设置流标记与节点地址的对应关系,如某个流标记所对应的节点地址是什么,节点地址以IP地址来表示。在每个路由器中都保存有流标记与节点地址的对应关系。其中,一个流标记对应一个节点地址,如武汉、上海、北京所对应的流标记分别对应武汉、上海、北京的某个IP地址。这些节点地址是存在于数据中心互联网络中的,是数据中心互联网络中的硬件设备地址,如路由器IP地址。若流标记写入的顺序为武汉、上海、北京,那么所述IPv6格式的数据包先转发到武汉所对应的节点地址,再从武汉所对应的节点地址转发到上海所对应的节点地址,再从上海所对应的节点地址转发到北京所对应的节点地址,最后转发到目的地址。其中,需要注意的是,转发该数据流量的路由器与关键节点所对应的路由器之间还可能存在很多个路由器,每两个关键节点之间也可能会存在很多个路由器,如武汉到上海之间可能存在有很多个路由器。转发该数据流量的路由器与关键节点之间的路径转发策略按照现有路径转发策略进行转发,每两个关键节点之间的路径转发策略也按照现有路径转发策略进行转发。其中,路径转发策略为不同协议所对应的转发策略,如RIP、OSPF等。The correspondence relationship between the flow label and the node address will be set in advance, such as what is the node address corresponding to a certain flow label, and the node address is represented by an IP address. The correspondence between the flow label and the node address is stored in each router. Among them, a flow label corresponds to a node address, for example, the flow labels corresponding to Wuhan, Shanghai, and Beijing correspond to an IP address in Wuhan, Shanghai, and Beijing, respectively. These node addresses exist in the data center interconnection network, and are hardware device addresses in the data center interconnection network, such as router IP addresses. If the flow mark is written in the order of Wuhan, Shanghai, and Beijing, the IPv6 format data packet is first forwarded to the node address corresponding to Wuhan, and then forwarded from the node address corresponding to Wuhan to the node address corresponding to Shanghai, and then Forwarded from the node address corresponding to Shanghai to the node address corresponding to Beijing, and finally forwarded to the destination address. Among them, it should be noted that there may be many routers between the router that forwards the data traffic and the router corresponding to the key node, and there may be many routers between every two key nodes, such as between Wuhan and Shanghai There may be many routers. The path forwarding strategy between the router that forwards the data traffic and the key node is forwarded according to the existing path forwarding strategy, and the path forwarding strategy between every two key nodes is also forwarded according to the existing path forwarding strategy. Among them, the path forwarding strategy is a forwarding strategy corresponding to different protocols, such as RIP and OSPF.
如此,实现了数据流量按照指定的关键节点所在的路径进行转发,而关键节点之间的路径转发策略不做具体限定。如若某个数据流量丢失,那么可按照该数据流量指定的关键节点的路径进行排查,便于高效的故障定位和排查异常,同时可实现对数据流量进行流量分析并作出合理预测。In this way, data traffic is forwarded according to the path where the designated key node is located, and the path forwarding strategy between key nodes is not specifically limited. If a certain data flow is lost, you can check the path of the key node specified by the data flow, which is convenient for efficient fault location and troubleshooting, and at the same time, it can analyze the data flow and make a reasonable prediction.
图2是本申请另一实施例提供的转发路径确定方法的流程示意图。如图2所示,该方法包括S201-S206。在该实施例中主要说明与图1中的实施例的不 同之处,与图1中相同步骤的描述请参看图1实施例中的描述,在此不再赘述。2 is a schematic flowchart of a forwarding path determination method provided by another embodiment of the present application. As shown in FIG. 2, the method includes S201-S206. In this embodiment, the differences from the embodiment in FIG. 1 are mainly explained. For the description of the same steps as in FIG. 1, please refer to the description in the embodiment in FIG. 1, which will not be repeated here.
S201,若接收到数据流量,获取所述数据流量的类型。S201: If data traffic is received, obtain the type of the data traffic.
预设类型可以是预设优先级。若路由器接收到数据流量,获取数据流量的优先级。在一些实施例中,预设类型也可以是预先设置的其他的特定类型,如用户自定义的类型,若路由器接收到数据流量,获取数据流量的类型数据。其中,预设优先级以及预先设置的特定的类型保存在配置文件中。The preset type may be a preset priority. If the router receives data traffic, obtain the priority of the data traffic. In some embodiments, the preset type may also be other specific types set in advance, such as a user-defined type. If the router receives data traffic, the type data of the data traffic is obtained. Among them, the preset priority and the preset specific type are saved in the configuration file.
S202,判断所述数据流量的类型是否为预设类型。S202. Determine whether the type of the data traffic is a preset type.
如若预设类型为预设优先级,那么判断数据流量的类型是否为预设类型,即判断该数据流量的优先级是否是预设优先级。如若预设类型为用户预先设置的其他特定类型,那么判断数据流量的类型是否为预设类型,即判断该数据流量的类型是否为预先设置的其他特定类型。判断该数据流量的类型是否为预设类型,是为了过滤一些数据流量,只对预设类型的数据流量进行进一步的处理。若数据流量的类型为预设类型,执行步骤S203,那么可理解为,只是将预设类型的数据流量按照所指定的关键节点所对应的顺序进行转发,同时会根据预设数据流量类型与路径转发策略的对应关联关系选择对应的路径转发策略进行转发。若数据流量的类型不为预设类型,则按照普通数据包进行转发。If the preset type is a preset priority, it is determined whether the type of data traffic is the preset type, that is, whether the priority of the data traffic is the preset priority. If the preset type is another specific type preset by the user, then it is determined whether the type of data traffic is the preset type, that is, whether the type of the data traffic is other specific types preset. To determine whether the type of the data traffic is a preset type is to filter some data traffic, and only further processes the preset type of data traffic. If the type of data traffic is the preset type, step S203 is executed, it can be understood that the data traffic of the preset type is simply forwarded in the order corresponding to the designated key node, and the preset data traffic type and path The corresponding association relationship of the forwarding strategy selects the corresponding path forwarding strategy for forwarding. If the type of data traffic is not the preset type, it is forwarded according to the ordinary data packet.
在其他实施例中,无需判断数据流量类型是否为预设类型,即执行步骤S201后,接着执行步骤S203中的获取所述数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记。那么可理解为,将所有的数据流量都指定关键节点,并将所有的数据流量按照所指定的关键节点所对应的顺序进行转发,但是也会根据预设数据流量类型与路径转发策略的对应关联关系选择对应的路径转发策略进行转发。In other embodiments, it is not necessary to determine whether the data traffic type is a preset type, that is, after step S201 is executed, then the key nodes that need to pass through the data traffic to reach the destination address and the flows corresponding to the key nodes are obtained in step S203 mark. It can be understood that all data traffic is designated as key nodes, and all data traffic is forwarded in the order corresponding to the designated key nodes, but it will also be associated with the path forwarding strategy according to the preset data traffic type. The relationship selects the corresponding path forwarding strategy for forwarding.
S203,若所述数据流量的类型为预设类型,获取所述数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记。S203. If the type of the data traffic is a preset type, obtain a key node that the data traffic needs to pass through to reach the destination address and a flow mark corresponding to the key node.
关键节点所对应的流标记保存在配置文件中,在本实施例中,配置文件中保存的是预设类型的数据流量所对应的关键节点的流标记。如此,配置文件的作用有两个:识别预设类型的数据流量,以及得到该预设类型的数据流量所对应的关键节点所对应的流标记。The flow mark corresponding to the key node is stored in the configuration file. In this embodiment, the flow mark of the key node corresponding to the preset type of data traffic is stored in the configuration file. In this way, the configuration file has two functions: identifying a predetermined type of data traffic, and obtaining a flow mark corresponding to a key node corresponding to the predetermined type of data traffic.
S204,将所述数据流量所对应的IPv4格式的数据包封装成IPv6格式的数 据包。S204: Encapsulate the IPv4 format data packet corresponding to the data traffic into an IPv6 format data packet.
S205,将所述关键节点所对应的流标记写入到IPv6格式的数据包的流标签域。其中,所述关键节点所对应的流标记是按照到达目的地址所需要经过的关键节点的顺序写入的。S205. Write the flow label corresponding to the key node to the flow label field of the IPv6 format data packet. Wherein, the flow marks corresponding to the key nodes are written in the order of the key nodes that need to pass through to reach the destination address.
S206,根据所述流标签域中的流标记与节点地址的对应关系、每个节点中保存的数据流量类型与路径转发策略的对应关联关系,按照流标记写入的顺序,将所述IPv6格式的数据包根据所对应的路径转发策略转发到每个关键节点所对应的节点地址,并最终转发到所述目的地址。S206, according to the correspondence relationship between the flow label and the node address in the flow label field, the correspondence relationship between the data traffic type and the path forwarding policy saved in each node, and according to the order of writing the flow label, the IPv6 format The data packet is forwarded to the node address corresponding to each key node according to the corresponding path forwarding strategy, and finally forwarded to the destination address.
每个节点(路由器)中保存有数据流量类型与路径转发策略的对应关联关系,其中,节点包括关键节点。可以理解为,对于不同的数据流量类型可以使用不同的路径转发策略。其中,每个路由器中数据流量类型与路径转发策略之间的对应关联关系可以相同,也可以不同,如在某一个路由器中,数据流量类型为A,路径转发策略为AA,在另外一个路由器中,数据流量为A,路径转发策略为BB。其中,需要注意的是,转发该数据流量的路由器与关键节点所对应的路由器之间、每两个关键节点之间还可能存在很多个路由器和转发路径。Each node (router) stores the correspondence relationship between the data traffic type and the path forwarding strategy, where the nodes include key nodes. It can be understood that different path forwarding strategies can be used for different types of data traffic. Among them, the corresponding relationship between the data traffic type and the path forwarding strategy in each router can be the same or different. For example, in a router, the data traffic type is A, and the path forwarding strategy is AA. In another router , The data traffic is A, and the path forwarding strategy is BB. Among them, it should be noted that there may be many routers and forwarding paths between the router that forwards the data traffic and the router corresponding to the key node, and between every two key nodes.
如此,实现了将预设类型的数据流量按照指定的关键节点所在的路径进行转发,便于高效的故障定位和排查异常,以及对预设类型的数据流量进行流量分析并作出合理预测。同时将不同类型的数据流量按照不同的路径转发策略进行转发,更有针对性的转发各种不同类型的数据流量,实现了个性化的流量转发,满足不同用户的需求。In this way, the preset type of data traffic is forwarded according to the path where the designated key node is located, which is convenient for efficient fault location and troubleshooting, and the traffic analysis and reasonable prediction of the preset type of data traffic. At the same time, different types of data traffic are forwarded according to different path forwarding strategies, and a variety of different types of data traffic are forwarded more targeted to achieve personalized traffic forwarding to meet the needs of different users.
在一实施例中,如图3所示,步骤S206包括以下步骤S301-S307。In an embodiment, as shown in FIG. 3, step S206 includes the following steps S301-S307.
S301,获取所述流标签域中的第一个流标记,根据流标记与节点地址的对应关系,将第一个流标记所对应的节点地址作为下一跳的目的地址,并根据保存的预设数据流量类型与路径转发策略的对应关联关系,确定所述IPv6格式的数据包转发到所述下一跳的目的地址所需要使用的路径转发策略。S301: Obtain the first flow label in the flow label field, and according to the correspondence between the flow label and the node address, use the node address corresponding to the first flow label as the destination address of the next hop, and according to the saved It is assumed that the correspondence relationship between the data traffic type and the path forwarding strategy determines the path forwarding strategy required for the IPv6 format data packet to be forwarded to the destination address of the next hop.
需要注意的是,该下一跳目的地址并不真正指的是该数据流量所需要经过的下一个路由器地址,而是设置的关键节点所对应的路由器的地址。It should be noted that the next hop destination address does not really refer to the address of the next router that the data traffic needs to pass through, but the address of the router corresponding to the set key node.
S302,按照确定的路径转发策略,将所述IPv6格式的数据包从当前路由器转发到所述下一跳的目的地址。S302. Forward the data packet in the IPv6 format from the current router to the destination address of the next hop according to the determined path forwarding strategy.
该确定的路径转发策略,指的是当前路由器到下一个路由器(而非下一跳目的地址所对应的路由器)的路径转发策略。需要说明的是,在当前路由器与下一跳的目的地址所对应的路由器之间还可能存在有多个的路由器、多个转发路径以及多个不同的路径转发策略。在其他一些实施例中,无论当前路由器与下一跳的目的址所对应的路由器之间还存在多少个路由器,那么对该数据流量都按照同一个路径转发策略(确定的路径转发策略)进行转发。在该种情况下,可以理解为,当前路由器与下一跳的目的址所对应的路由器之间的所有路由器中,对该数据流量都设置为一样的路径转发策略。The determined path forwarding strategy refers to the path forwarding strategy from the current router to the next router (not the router corresponding to the next hop destination address). It should be noted that there may be multiple routers, multiple forwarding paths, and multiple different path forwarding strategies between the current router and the router corresponding to the destination address of the next hop. In some other embodiments, no matter how many routers exist between the current router and the router corresponding to the destination address of the next hop, the data traffic is forwarded according to the same path forwarding strategy (determined path forwarding strategy) . In this case, it can be understood that all routers between the current router and the router corresponding to the destination address of the next hop are set to the same path forwarding strategy for the data traffic.
S303,所述IPv6格式的数据包到达所述下一跳的目的地址之后,将所述下一跳的目的地址所对应的流标记从所述流标签域中删除。S303: After the IPv6 format data packet reaches the destination address of the next hop, delete the flow label corresponding to the destination address of the next hop from the flow label field.
由于是在网络中,网络的情况非常复杂。删除流标记的目的是为了简化处理,方便下一个下一跳目的地址的处理。Because it is in the network, the network situation is very complicated. The purpose of deleting the flow label is to simplify the processing and facilitate the processing of the destination address of the next hop.
S304,判断所述流标签域中的值是否为空。若所述流标签域中的值不为空,返回执行步骤S301。若所述流标签域中的值为空,执行步骤S305。S304: Determine whether the value in the flow label field is empty. If the value in the flow label field is not empty, return to step S301. If the value in the flow label field is empty, step S305 is executed.
其中,若流标签域中还有流标记,意味着该数据流量所对应的数据包并没有达到目的地。由于已经将下一跳目的地址所对应的流标记删除,因此获取流标签域中的第一个流标记,将该第一个流标记所对应的目的地址作为下一跳的目的地址。并确定到下一跳的目的地址所需要使用的路径转发策略。若所述流标签域中的值为空,说明数据流量已经达到目的地如已经到达了北京,但可能还没有到达目的地址,即IPV4数据包中的目的地址。Among them, if there is a flow label in the flow label field, it means that the data packet corresponding to the data flow has not reached the destination. Since the flow label corresponding to the destination address of the next hop has been deleted, the first flow label in the flow label field is obtained, and the destination address corresponding to the first flow label is used as the destination address of the next hop. And determine the path forwarding strategy to be used to the destination address of the next hop. If the value in the flow label field is blank, it means that the data traffic has reached the destination, such as Beijing, but may not have reached the destination address, that is, the destination address in the IPV4 data packet.
S305,判断当前路由器的地址是否与所述目的地址相同。若当前路由器的地址与所述目的地址相同,则执行步骤S306;若当前路由器的地址与所述目的地址不相同,则执行步骤S307。若当前路由器的地址与所述目的地址相同,则意味着该数据流量已经到达目的地址。若当前路由器的地址与所述目的地址不相同,则意味着该数据流量已经到达了目的地(一个目的地中可包括多个IP地址,多个IP地址中包括有目的地址),但还没有到达目的地址。S305: Determine whether the current router address is the same as the destination address. If the current router address is the same as the destination address, step S306 is performed; if the current router address is not the same as the destination address, step S307 is performed. If the current router address is the same as the destination address, it means that the data traffic has reached the destination address. If the current router address is different from the destination address, it means that the data traffic has reached the destination (a destination can include multiple IP addresses, and multiple IP addresses include a destination address), but not yet Reach the destination address.
S306,确定已经到达所述目的地址。可以理解为,该目的地址即为关键节点所对应的地址。S306. Determine that the destination address has been reached. It can be understood that the destination address is the address corresponding to the key node.
S307,根据保存的预设数据流量类型与路径转发策略的对应关联关系,确 定所述IPv6格式的数据包所对应的路径转发策略,并根据所确定的路径转发策略,将所述IPv6格式的数据包发送到所述目的地址。S307: Determine the path forwarding strategy corresponding to the IPv6 format data packet according to the correspondence relationship between the saved preset data traffic type and the path forwarding strategy, and according to the determined path forwarding strategy, convert the data in the IPv6 format The packet is sent to the destination address.
如图4所示,为本申请实施例提供的一种应用场景示意图。在该应用场景中,深圳的一个初始用户(源地址)发送一个数据流量,深圳的路由器A接收到数据流量,发现需要将该数据流量发送到北京的一个目的用户,该目的用户所对应的地址为目的地址。其中,所需要经过的关键节点包括武汉的路由器B、上海的路由器C、北京的路由器D。在路由器A、路由器B、路由器C、路由器D中都保存有预设类型的数据流量所对应的关键节点、关键节点所对应的流标记、关键节点所对应的流标记与节点地址的对应关系、预设数据流量类型与路径转发策略的对应关联关系。As shown in FIG. 4, it is a schematic diagram of an application scenario provided by an embodiment of the present application. In this application scenario, an initial user (source address) in Shenzhen sends a data traffic, and router A in Shenzhen receives the data traffic and finds that the data traffic needs to be sent to a destination user in Beijing. The address corresponding to the destination user Is the destination address. Among them, the key nodes that need to pass through include router B in Wuhan, router C in Shanghai, and router D in Beijing. In Router A, Router B, Router C, and Router D, the key nodes corresponding to the preset types of data traffic, the flow labels corresponding to the key nodes, and the correspondence between the flow labels corresponding to the key nodes and the node addresses are stored Correspondence relationship between preset data traffic types and path forwarding strategies.
在路由器A中将数据流量所对应的IPv4格式的数据包(包括有目的地址)封装成IPv6格式的数据包,将关键节点所对应的流标记写入到IPv6格式的数据包的流标签域。获取IPv6格式的数据包中的流标签域中的第一个流标签,即路由器B所对应的流标签,根据流标签域中的流标记与节点地址的对应关系、保存的预设数据流量类型与路径转发策略的对应关联关系,将IPv6格式的数据包按照对应的路径转发策略转发到路由器B。路由器B接收到IPv6格式的数据包后,将路由器B所对应的流标记从流标签域中删除。路由器B发现目的地址并不是自己,于是再获取数据包中的第一个流标签,即路由器C所对应的流标签,根据流标签域中的流标记与节点地址的对应关系、保存的预设数据流量类型与路径转发策略的对应关联关系,将IPv6格式的数据包按照对应的路径转发策略转发到路由器C。按照同样的方法将数据流量从路由器C转发到路由器D。路由器D接收到IPv6格式的数据包后,发现目的地址并不是自己,同时流标签域中的值为空,那么路由器D根据保存的预设数据流量类型与路径转发策略的对应关联关系,将IPv6格式的数据包按照对应的路径转发策略转发到目的用户,目的用户发现目的地址与自己的地址一致,则接收该数据流量。In Router A, the IPv4 format data packet (including the destination address) corresponding to the data traffic is encapsulated into an IPv6 format data packet, and the flow label corresponding to the key node is written into the flow label field of the IPv6 format data packet. Obtain the first flow label in the flow label field in the IPv6 format packet, that is, the flow label corresponding to Router B. According to the correspondence between the flow label and the node address in the flow label field, the preset data traffic type saved Correspondence relationship with the path forwarding strategy, the IPv6 format data packet is forwarded to the router B according to the corresponding path forwarding strategy. After receiving the IPv6 format data packet, Router B deletes the flow label corresponding to Router B from the flow label field. Router B finds that the destination address is not its own, so it obtains the first flow label in the data packet, that is, the corresponding flow label of Router C. According to the correspondence between the flow label and the node address in the flow label field, the saved preset The corresponding relationship between the data traffic type and the path forwarding strategy forwards the IPv6 format data packet to Router C according to the corresponding path forwarding strategy. Follow the same method to forward data traffic from router C to router D. After receiving the IPv6 format packet, Router D finds that the destination address is not its own, and the value in the flow label field is empty, then Router D will change the IPv6 according to the corresponding relationship between the saved preset data traffic type and the path forwarding strategy. The formatted data packet is forwarded to the destination user according to the corresponding path forwarding strategy. The destination user finds that the destination address is consistent with its own address, and then receives the data traffic.
需要说明的是,路由器A与路由器B、路由器B与路由器C、路由器C与路由器D之间可能存在多个路由器、转发路径等。同时需要说明的是,在路由器A、路由器B、路由器C、路由器D中可以单独实现以上描述的每个路由器中实现的功能,即每个路由器可以实现以上四个路由器中描述的功能的总和。It should be noted that there may be multiple routers and forwarding paths between Router A and Router B, Router B and Router C, and Router C and Router D. It should also be noted that the functions implemented in each router described above can be implemented independently in Router A, Router B, Router C, and Router D, that is, each router can implement the sum of the functions described in the above four routers.
需要指出的是,图4中的示意图仅仅只是示例,以为了方便理解本申请实施例中的方案,在其他实施例中,图4还可以包括更多的网络和路由器等。It should be noted that the schematic diagram in FIG. 4 is only an example, to facilitate understanding of the solution in the embodiment of the present application, in other embodiments, FIG. 4 may further include more networks and routers.
在一些实施例中,关键节点还可以是终端设备,该终端设备可以实现数据流量的转发功能,同时也保存有对应的数据等。该终端设备包括用户终端、服务器等。In some embodiments, the key node may also be a terminal device, and the terminal device may implement a function of forwarding data traffic, and also save corresponding data. The terminal equipment includes a user terminal, a server, and so on.
图5是本申请实施例提供的转发路径确定装置的示意性框图。该装置包括用于执行上述转发路径确定方法所对应的单元。需要注意的是,由于每个路由器中都可以实现上述方法实施例中描述的功能的总和,因此该装置可以被单独配置于一个路由器或者一个终端设备中,终端设备是可以实现数据流量转发功能的终端设备。同时,为了理解的方便,以下装置实施例中仍然按照步骤流程的角度来描述。具体地,如图5所示,该装置50包括流标记获取单元501、封装单元502、流标记写入单元503以及转发单元504。FIG. 5 is a schematic block diagram of a forwarding path determination apparatus provided by an embodiment of the present application. The device includes a unit corresponding to the method for determining the forwarding path. It should be noted that since each router can implement the sum of the functions described in the above method embodiments, the device can be separately configured in a router or a terminal device, and the terminal device can implement the data traffic forwarding function Terminal Equipment. At the same time, for the convenience of understanding, the following device embodiments are still described according to the step flow. Specifically, as shown in FIG. 5, the device 50 includes a flow label acquisition unit 501, an encapsulation unit 502, a flow label writing unit 503 and a forwarding unit 504.
流标记获取单元501,用于若接收到数据流量,获取所述数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记。The flow label obtaining unit 501 is configured to obtain, if data traffic is received, a key node that the data traffic needs to pass through to reach the destination address and a flow label corresponding to the key node.
封装单元502,用于将所述数据流量所对应的IPv4格式的数据包封装成IPv6格式的数据包。具体地,封装单元502是通过隧道技术将所述数据流量所对应的IPv4格式的数据包封装成IPv6格式的数据包的。The encapsulating unit 502 is configured to encapsulate the IPv4 format data packet corresponding to the data traffic into an IPv6 format data packet. Specifically, the encapsulating unit 502 encapsulates the IPv4 format data packet corresponding to the data traffic into an IPv6 format data packet through a tunnel technology.
流标记写入单元503,用于将所述关键节点所对应的流标记写入到IPv6格式的数据包的流标签域,其中,所述关键节点所对应的流标记是按照到达目的地址所需要经过的关键节点的顺序写入的。A flow mark writing unit 503, used to write the flow mark corresponding to the key node into the flow label field of the IPv6 format packet, wherein the flow mark corresponding to the key node is required to reach the destination address Written by the order of key nodes.
转发单元504,用于根据所述流标签域中的流标记与节点地址的对应关系,按照流标记写入的顺序,以将所述IPv6格式的数据包转发到每个关键节点所对应的节点地址,最后转发到所述目的地址。The forwarding unit 504 is configured to forward the data packet in the IPv6 format to the node corresponding to each key node according to the correspondence relationship between the flow label and the node address in the flow label field, in the order in which the flow label is written The address is finally forwarded to the destination address.
图6是本申请另一实施例提供的转发路径确定装置的示意性框图。具体地,如图6所示,该装置60包括类型获取单元601、类型判断单元602、流标记获取单元603、封装单元604、流标记写入单元605以及转发单元606。其中,与图5实施例的不同之处在于:类型获取单元601、类型判断单元602以及转发单元606的不同。下面将介绍类型获取单元601、类型判断单元602以及转发单元606。其他单元请参看图5实施例中的描述,在此不再赘述。6 is a schematic block diagram of a forwarding path determination apparatus provided by another embodiment of the present application. Specifically, as shown in FIG. 6, the device 60 includes a type acquisition unit 601, a type judgment unit 602, a flow label acquisition unit 603, a packaging unit 604, a flow label writing unit 605, and a forwarding unit 606. Among them, the difference from the embodiment of FIG. 5 lies in: the type acquisition unit 601, the type judgment unit 602, and the forwarding unit 606. The type acquisition unit 601, type judgment unit 602, and forwarding unit 606 will be described below. For other units, please refer to the description in the embodiment of FIG. 5, which will not be repeated here.
类型获取单元601,用于若接收到数据流量,获取所述数据流量的类型。The type obtaining unit 601 is configured to obtain the type of the data flow if data flow is received.
类型判断单元602,用于判断所述数据流量的类型是否为预设类型。若所述数据流量的类型为预设类型,接着触发流标记获取单元603。The type determining unit 602 is configured to determine whether the type of the data traffic is a preset type. If the type of the data traffic is a preset type, then the flow mark acquisition unit 603 is triggered.
流标记获取单元603,用于获取所述数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记。The flow label obtaining unit 603 is used to obtain the key nodes that the data traffic needs to pass through to reach the destination address and the flow labels corresponding to the key nodes.
转发单元606,具体用于根据所述流标签域中的流标记与节点地址的对应关系、保存的预设数据流量类型与路径转发策略的对应关联关系,按照流标记写入的顺序,以将所述IPv6格式的数据包根据所对应的路径转发策略转发到每个关键节点所对应的节点地址,并最终转发到所述目的地址。The forwarding unit 606 is specifically configured to, according to the correspondence relationship between the flow label and the node address in the flow label domain, the corresponding relationship between the saved preset data traffic type and the path forwarding strategy, in order of writing the flow label The data packet in the IPv6 format is forwarded to the node address corresponding to each key node according to the corresponding path forwarding strategy, and finally forwarded to the destination address.
在一实施例中,如图7所示,转发单元606包括转发策略确定单元701、转发下一跳单元702、删除单元703、值判断单元704、地址判断单元705、到达确定单元706以及转发目的地址单元707。In an embodiment, as shown in FIG. 7, the forwarding unit 606 includes a forwarding strategy determination unit 701, a forwarding next hop unit 702, a deletion unit 703, a value judgment unit 704, an address judgment unit 705, an arrival determination unit 706, and a forwarding purpose Address unit 707.
转发策略确定单元701,用于获取所述流标签域中的第一个流标记,根据流标记与节点地址的对应关系,将第一个流标记所对应的节点地址作为下一跳的目的地址,并根据保存的预设数据流量类型与路径转发策略的对应关联关系,确定所述IPv6格式的数据包转发到所述下一跳的目的地址所需要使用的路径转发策略。The forwarding strategy determination unit 701 is used to obtain the first flow label in the flow label field, and according to the correspondence between the flow label and the node address, use the node address corresponding to the first flow label as the destination address of the next hop And determine the path forwarding strategy to be used for forwarding the data packet in the IPv6 format to the destination address of the next hop according to the correspondence relationship between the saved preset data traffic type and the path forwarding strategy.
转发下一跳单元702,用于按照确定的路径转发策略,将所述IPv6格式的数据包从当前路由器转发到所述下一跳的目的地址。The forwarding next hop unit 702 is configured to forward the data packet in the IPv6 format from the current router to the destination address of the next hop according to the determined path forwarding strategy.
删除单元703,用于所述IPv6格式的数据包到达所述下一跳的目的地址之后,将所述下一跳的目的地址所对应的流标记从所述流标签域中删除。The deleting unit 703 is configured to delete the flow label corresponding to the destination address of the next hop from the flow label field after the IPv6 format data packet reaches the destination address of the next hop.
值判断单元704,用于判断所述流标签域中的值是否为空。若所述流标签域中的值不为空,触发转发策略确定单元701、转发下一跳单元702。The value judgment unit 704 is used to judge whether the value in the flow label field is empty. If the value in the flow label field is not empty, a forwarding strategy determination unit 701 and a forwarding next hop unit 702 are triggered.
地址判断单元705,用于若所述流标签域中的值为空,判断当前路由器的地址是否与所述目的地址相同。The address determining unit 705 is configured to determine whether the current router address is the same as the destination address if the value in the flow label field is empty.
到达确定单元706,用于若当前路由器的地址与所述目的地址相同,则确定已经到达所述目的地址。The arrival determination unit 706 is configured to determine that the destination address has been reached if the current router address is the same as the destination address.
转发目的地址单元707,用于若当前路由器的地址与所述目的地址不相同,则根据保存的预设数据流量类型与路径转发策略的对应关联关系,确定所述 IPv6格式的数据包所对应的路径转发策略,并根据所确定的路径转发策略,将所述IPv6格式的数据包发送到所述目的地址。The forwarding destination address unit 707 is used to determine the correspondence of the IPv6 format data packet according to the correspondence relationship between the saved preset data traffic type and the path forwarding strategy if the current router address is different from the destination address A path forwarding strategy, and according to the determined path forwarding strategy, send the data packet in the IPv6 format to the destination address.
需要说明的是,所属领域的技术人员可以清楚地了解到,上述装置和各单元的具体实现过程,可以参考前述方法实施例中的相应描述,为了描述的方便和简洁,在此不再赘述。It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above device and each unit can refer to the corresponding descriptions in the foregoing method embodiments.
上述装置可以实现为一种计算机程序的形式,计算机程序可以在如图8所示的计算机设备上运行。The above device can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in FIG. 8.
图8为本申请实施例提供的一种计算机设备的示意性框图。该设备为路由器或者终端。该设备80包括通过系统总线801连接的处理器802、存储器和网络接口803,其中,存储器可以包括非易失性存储介质804和内存储器805。FIG. 8 is a schematic block diagram of a computer device provided by an embodiment of the present application. The device is a router or terminal. The device 80 includes a processor 802, a memory, and a network interface 803 connected through a system bus 801, where the memory may include a non-volatile storage medium 804 and an internal memory 805.
该非易失性存储介质804可存储操作系统8041和计算机程序8042。该非易失性存储介质中所存储的计算机程序8042被处理器802执行时,可实现上述所述的转发路径确定方法。该处理器802用于提供计算和控制能力,支撑整个设备80的运行。该内存储器805为非易失性存储介质中的计算机程序的运行提供环境,该计算机程序被处理器802执行时,可使得处理器802执行上述所述的转发路径确定方法。该网络接口803用于进行网络通信。本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的设备80的限定,具体的设备80可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。The non-volatile storage medium 804 may store an operating system 8041 and a computer program 8042. When the computer program 8042 stored in the non-volatile storage medium is executed by the processor 802, the foregoing forwarding path determination method can be implemented. The processor 802 is used to provide computing and control capabilities and support the operation of the entire device 80. The internal memory 805 provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor 802, the processor 802 can execute the foregoing forwarding path determination method. The network interface 803 is used for network communication. Those skilled in the art may understand that the structure shown in FIG. 8 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the device 80 to which the solution of the present application is applied. The specific device 80 may Include more or less components than shown in the figure, or combine certain components, or have a different arrangement of components.
其中,所述处理器802用于运行存储在存储器中的计算机程序,以实现前述转发路径确定方法的任一实施例。Wherein, the processor 802 is used to run a computer program stored in a memory to implement any embodiment of the foregoing forwarding path determination method.
应当理解,在本申请实施例中,所称处理器802可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(应用程序lication Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that in the embodiment of the present application, the so-called processor 802 may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP) , Application Specific Integrated Circuit (Application Program Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
本领域普通技术人员可以理解的是实现上述实施例的方法中的全部或部分 流程,是可以通过计算机程序来指令相关的硬件来完成。该计算机程序可存储于一存储介质中,该存储介质可以为计算机可读存储介质。该计算机程序被该计算机系统中的至少一个处理器执行,以实现上述方法的实施例的流程步骤。A person of ordinary skill in the art may understand that all or part of the processes in the method for implementing the above embodiments may be completed by instructing relevant hardware through a computer program. The computer program may be stored in a storage medium, and the storage medium may be a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the above method embodiments.
因此,本申请还提供了一种存储介质。该存储介质可以为计算机可读存储介质,该计算机可读存储介质包括非易失性计算机可读存储介质。该存储介质存储有计算机程序,该计算机程序当被处理器执行时实现前述转发路径确定方法的任一实施例。Therefore, the present application also provides a storage medium. The storage medium may be a computer-readable storage medium, and the computer-readable storage medium includes a non-volatile computer-readable storage medium. The storage medium stores a computer program that, when executed by the processor, implements any embodiment of the foregoing forwarding path determination method.
所述存储介质可以是U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的计算机可读存储介质。The storage medium may be various computer-readable storage media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a magnetic disk, or an optical disk.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置、设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置、设备和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。In the several embodiments provided in this application, it should be understood that the disclosed device, device, and method may be implemented in other ways. For example, the device embodiments described above are only schematic, and the division of the units is only a division of logical functions, and there may be other divisions in actual implementation. Those skilled in the art can clearly understand that for the convenience and conciseness of the description, the specific working processes of the devices, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, which are not repeated here. The above is only the specific implementation of this application, but the scope of protection of this application is not limited to this, any person skilled in the art can easily think of various equivalents within the technical scope disclosed in this application Modifications or replacements, these modifications or replacements should be covered within the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (20)

  1. 一种转发路径确定方法,包括:A method for determining a forwarding path includes:
    若接收到数据流量,获取所述数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记;If data traffic is received, obtain the key nodes that the data traffic needs to pass to reach the destination address and the flow labels corresponding to the key nodes;
    将所述数据流量所对应的IPv4格式的数据包封装成IPv6格式的数据包;Encapsulate the data packet in the IPv4 format corresponding to the data flow into a data packet in the IPv6 format;
    将所述关键节点所对应的流标记写入到IPv6格式的数据包的流标签域,其中,所述关键节点所对应的流标记是按照到达目的地址所需要经过的关键节点的顺序写入的;Write the flow mark corresponding to the key node into the flow label field of the IPv6 format packet, wherein the flow mark corresponding to the key node is written in the order of the key nodes that need to pass through to reach the destination address ;
    根据所述流标签域中的流标记与节点地址的对应关系,按照流标记写入的顺序将所述IPv6格式的数据包转发到每个关键节点所对应的节点地址,最后转发到所述目的地址。According to the correspondence relationship between the flow label and the node address in the flow label field, the IPv6 format data packet is forwarded to the node address corresponding to each key node in the order in which the flow label is written, and finally forwarded to the destination address.
  2. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1, wherein the method further comprises:
    若接收到数据流量,获取所述数据流量的类型;If data traffic is received, obtain the type of data traffic;
    所述根据所述流标签域中的流标记与节点地址的对应关系,按照流标记写入的顺序将所述IPv6格式的数据包转发到每个关键节点所对应的节点地址,最后转发到所述目的地址,包括:According to the correspondence between the flow label and the node address in the flow label field, the IPv6 format data packet is forwarded to the node address corresponding to each key node in the order in which the flow label is written, and finally forwarded to the Describe the destination address, including:
    根据所述流标签域中的流标记与节点地址的对应关系、每个节点中保存的预设数据流量类型与路径转发策略的对应关联关系,按照流标记写入的顺序,将所述IPv6格式的数据包根据所对应的路径转发策略转发到每个关键节点所对应的节点地址,并最终转发到所述目的地址。According to the correspondence relationship between the flow label and the node address in the flow label field, the corresponding relationship between the preset data traffic type and the path forwarding policy saved in each node, according to the order in which the flow label is written, the IPv6 format The data packet is forwarded to the node address corresponding to each key node according to the corresponding path forwarding strategy, and finally forwarded to the destination address.
  3. 根据权利要求2所述的方法,其中,所述根据所述流标签域中的流标记与节点地址的对应关系、每个节点中保存的预设数据流量类型与路径转发策略的对应关联关系,按照流标记写入的顺序,将所述IPv6格式的数据包根据所对应的路径转发策略转发到每个关键节点所对应的节点地址,并最终转发到所述目的地址,包括:The method according to claim 2, wherein, according to the correspondence relationship between the flow label and the node address in the flow label field, the correspondence relationship between the preset data traffic type saved in each node and the path forwarding policy, According to the order in which the flow tags are written, the IPv6 format data packets are forwarded to the node address corresponding to each key node according to the corresponding path forwarding strategy and finally forwarded to the destination address, including:
    获取所述流标签域中的第一个流标记,根据流标记与节点地址的对应关系,将第一个流标记所对应的节点地址作为下一跳的目的地址,并根据保存的预设数据流量类型与路径转发策略的对应关联关系,确定所述IPv6格式的数据包转 发到所述下一跳的目的地址所需要使用的路径转发策略;Obtain the first flow label in the flow label field, and use the node address corresponding to the first flow label as the destination address of the next hop according to the correspondence between the flow label and the node address, and according to the saved preset data The corresponding relationship between the traffic type and the path forwarding strategy determines the path forwarding strategy required for forwarding the IPv6 formatted data packet to the destination address of the next hop;
    按照确定的路径转发策略,将所述IPv6格式的数据包从当前路由器转发到所述下一跳的目的地址;Forward the data packet in the IPv6 format from the current router to the destination address of the next hop according to the determined path forwarding strategy;
    所述IPv6格式的数据包到达所述下一跳的目的地址之后,将所述下一跳的目的地址所对应的流标记从所述流标签域中删除;After the IPv6 format data packet reaches the destination address of the next hop, delete the flow label corresponding to the destination address of the next hop from the flow label field;
    判断所述流标签域中的值是否为空;Determine whether the value in the flow label field is empty;
    若所述流标签域中的值不为空,返回执行获取流标签域中的第一个流标记的步骤;If the value in the flow label field is not empty, return to the step of obtaining the first flow label in the flow label field;
    若所述流标签域中的值为空,判断当前路由器的地址是否与所述目的地址相同;If the value in the flow label field is empty, determine whether the current router address is the same as the destination address;
    若当前路由器的地址与所述目的地址相同,则确定已经到达所述目的地址。If the address of the current router is the same as the destination address, it is determined that the destination address has been reached.
  4. 根据权利要求3所述的方法,其中,所述方法还包括:The method of claim 3, wherein the method further comprises:
    若当前路由器的地址与所述目的地址不相同,则根据保存的预设数据流量类型与路径转发策略的对应关联关系,确定所述IPv6格式的数据包所对应的路径转发策略,并根据所确定的路径转发策略,将所述IPv6格式的数据包发送到所述目的地址。If the current router address is not the same as the destination address, the path forwarding strategy corresponding to the IPv6 format data packet is determined according to the correspondence relationship between the saved preset data traffic type and the path forwarding strategy, and according to the determined Path forwarding strategy, sending the IPv6 format data packet to the destination address.
  5. 根据权利要求2所述的方法,其中,在所述获取所述数据流量的类型的步骤之后,所述方法还包括:The method according to claim 2, wherein after the step of acquiring the type of the data traffic, the method further comprises:
    判断所述数据流量的类型是否为预设类型;Determine whether the type of the data flow is a preset type;
    若所述数据流量的类型为预设类型,则执行所述获取所述数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记的步骤。If the type of the data traffic is a preset type, the step of acquiring the key node that the data traffic needs to pass through to reach the destination address and the flow label corresponding to the key node is performed.
  6. 根据权利要求1所述的方法,其中,所述将所述数据流量所对应的IPv4格式的数据包封装成IPv6格式的数据包,包括:The method according to claim 1, wherein the encapsulating the IPv4 format data packet corresponding to the data traffic into an IPv6 format data packet includes:
    通过隧道技术将所述数据流量所对应的IPv4格式的数据包封装成IPv6格式的数据包。The IPv4 format data packet corresponding to the data traffic is encapsulated into an IPv6 format data packet through tunneling technology.
  7. 根据权利要求1所述的方法,其中,在所述若接收到数据流量,获取所述数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记的步骤之前,所述方法还包括:The method according to claim 1, wherein, before the step of acquiring the data node, the key node that the data traffic needs to pass through to reach the destination address and the flow label corresponding to the key node are acquired, the method further include:
    在配置文件中设置数据流量到达目的地址所需要经过的关键节点所对应的 流标记,并将所述配置文件进行保存。Set the flow mark corresponding to the key node that the data flow needs to pass through to reach the destination address in the configuration file, and save the configuration file.
  8. 根据权利要求1所述的方法,其中,所述将所述关键节点所对应的流标记写入到IPv6格式的数据包的流标签域,包括:The method according to claim 1, wherein the writing of the flow mark corresponding to the key node to the flow label field of the IPv6 format packet includes:
    接收用户对IPv6格式的数据包所设置或者所输入的关键节点;Receiving key nodes set or input by users on IPv6 format data packets;
    根据预先保存的关键节点所对应的流标记,将所设置或者所输入的关键节点所对应的流标记写入到IPv6格式的数据包的流标签域。According to the flow mark corresponding to the pre-stored key node, the flow mark corresponding to the set or input key node is written into the flow label field of the IPv6 format data packet.
  9. 一种转发路径确定装置,包括:A forwarding path determination device, including:
    流标记获取单元,用于若接收到数据流量,获取所述数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记;A flow mark obtaining unit, used to obtain the key node that the data flow needs to pass through to reach the destination address and the flow mark corresponding to the key node if the data flow is received;
    封装单元,用于将所述数据流量所对应的IPv4格式的数据包封装成IPv6格式的数据包;An encapsulation unit, configured to encapsulate the IPv4 format data packet corresponding to the data flow into an IPv6 format data packet;
    流标记写入单元,用于将所述关键节点所对应的流标记写入到IPv6格式的数据包的流标签域,其中,所述关键节点所对应的流标记是按照到达目的地址所需要经过的关键节点的顺序写入的;A flow mark writing unit, used to write the flow mark corresponding to the key node into the flow label field of the IPv6 format packet, wherein the flow mark corresponding to the key node is passed according to the need to reach the destination address The order of the key nodes is written;
    转发单元,用于根据所述流标签域中的流标记与节点地址的对应关系,按照流标记写入的顺序将所述IPv6格式的数据包转发到每个关键节点所对应的节点地址,最后转发到所述目的地址。The forwarding unit is used to forward the IPv6 format data packet to the node address corresponding to each key node according to the correspondence relationship between the flow label and the node address in the flow label field in the order in which the flow label is written Forward to the destination address.
  10. 根据权利要求9所述的转发路径确定装置,其中,所述转发路径确定装置还包括:The forwarding path determination device according to claim 9, wherein the forwarding path determination device further comprises:
    类型获取单元,用于若接收到数据流量,获取所述数据流量的类型;A type obtaining unit, configured to obtain the type of the data flow if data flow is received;
    所述转发单元,具体用于根据所述流标签域中的流标记与节点地址的对应关系、保存的预设数据流量类型与路径转发策略的对应关联关系,按照流标记写入的顺序,以将所述IPv6格式的数据包根据所对应的路径转发策略转发到每个关键节点所对应的节点地址,并最终转发到所述目的地址。The forwarding unit is specifically configured to, according to the correspondence relationship between the flow label and the node address in the flow label field, the corresponding relationship between the saved preset data traffic type and the path forwarding strategy, in order of writing the flow label The IPv6 format data packet is forwarded to the node address corresponding to each key node according to the corresponding path forwarding strategy, and finally forwarded to the destination address.
  11. 一种计算机设备,所述计算机设备包括存储器,以及与所述存储器相连的处理器;其中,所述存储器用于存储计算机程序;所述处理器用于运行所述存储器中存储的计算机程序,以执行如下步骤:A computer device including a memory and a processor connected to the memory; wherein the memory is used to store a computer program; the processor is used to run the computer program stored in the memory to execute The following steps:
    若接收到数据流量,获取所述数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记;If data traffic is received, obtain the key nodes that the data traffic needs to pass to reach the destination address and the flow labels corresponding to the key nodes;
    将所述数据流量所对应的IPv4格式的数据包封装成IPv6格式的数据包;Encapsulate the data packet in the IPv4 format corresponding to the data flow into a data packet in the IPv6 format;
    将所述关键节点所对应的流标记写入到IPv6格式的数据包的流标签域,其中,所述关键节点所对应的流标记是按照到达目的地址所需要经过的关键节点的顺序写入的;Write the flow mark corresponding to the key node into the flow label field of the IPv6 format packet, wherein the flow mark corresponding to the key node is written in the order of the key nodes that need to pass through to reach the destination address ;
    根据所述流标签域中的流标记与节点地址的对应关系,按照流标记写入的顺序将所述IPv6格式的数据包转发到每个关键节点所对应的节点地址,最后转发到所述目的地址。According to the correspondence relationship between the flow label and the node address in the flow label field, the IPv6 format data packet is forwarded to the node address corresponding to each key node in the order in which the flow label is written, and finally forwarded to the destination address.
  12. 根据权利要求11所述的计算机设备,其中,所述处理器还执行如下步骤:The computer device according to claim 11, wherein the processor further performs the following steps:
    若接收到数据流量,获取所述数据流量的类型;If data traffic is received, obtain the type of data traffic;
    所述处理器在执行所述根据所述流标签域中的流标记与节点地址的对应关系,按照流标记写入的顺序将所述IPv6格式的数据包转发到每个关键节点所对应的节点地址,最后转发到所述目的地址的步骤时,具体执行如下步骤:The processor executes the forwarding of the IPv6 format data packet to the node corresponding to each key node according to the correspondence relationship between the flow label and the node address in the flow label field When the address is finally forwarded to the destination address, the specific steps are as follows:
    根据所述流标签域中的流标记与节点地址的对应关系、每个节点中保存的预设数据流量类型与路径转发策略的对应关联关系,按照流标记写入的顺序,将所述IPv6格式的数据包根据所对应的路径转发策略转发到每个关键节点所对应的节点地址,并最终转发到所述目的地址。According to the correspondence relationship between the flow label and the node address in the flow label field, the corresponding relationship between the preset data traffic type and the path forwarding policy saved in each node, according to the order in which the flow label is written, the IPv6 format The data packet is forwarded to the node address corresponding to each key node according to the corresponding path forwarding strategy, and finally forwarded to the destination address.
  13. 根据权利要求12所述的计算机设备,其中,所述处理器在执行所述根据所述流标签域中的流标记与节点地址的对应关系、每个节点中保存的预设数据流量类型与路径转发策略的对应关联关系,按照流标记写入的顺序,将所述IPv6格式的数据包根据所对应的路径转发策略转发到每个关键节点所对应的节点地址,并最终转发到所述目的地址的步骤时,具体执行如下步骤:The computer device according to claim 12, wherein the processor performs the preset data traffic type and path stored in each node according to the correspondence between the flow label and the node address in the flow label field The corresponding association relationship of the forwarding strategy, according to the order in which the flow tags are written, forwards the IPv6 format data packet to the node address corresponding to each key node according to the corresponding path forwarding strategy, and finally forwards to the destination address The specific steps are as follows:
    获取所述流标签域中的第一个流标记,根据流标记与节点地址的对应关系,将第一个流标记所对应的节点地址作为下一跳的目的地址,并根据保存的预设数据流量类型与路径转发策略的对应关联关系,确定所述IPv6格式的数据包转发到所述下一跳的目的地址所需要使用的路径转发策略;Obtain the first flow label in the flow label field, and use the node address corresponding to the first flow label as the destination address of the next hop according to the correspondence between the flow label and the node address, and according to the saved preset data The corresponding relationship between the traffic type and the path forwarding strategy determines the path forwarding strategy required for forwarding the IPv6 formatted data packet to the destination address of the next hop;
    按照确定的路径转发策略,将所述IPv6格式的数据包从当前路由器转发到所述下一跳的目的地址;Forward the data packet in the IPv6 format from the current router to the destination address of the next hop according to the determined path forwarding strategy;
    所述IPv6格式的数据包到达所述下一跳的目的地址之后,将所述下一跳的 目的地址所对应的流标记从所述流标签域中删除;After the IPv6 format data packet reaches the destination address of the next hop, delete the flow label corresponding to the destination address of the next hop from the flow label field;
    判断所述流标签域中的值是否为空;Determine whether the value in the flow label field is empty;
    若所述流标签域中的值不为空,返回执行获取流标签域中的第一个流标记的步骤;If the value in the flow label field is not empty, return to the step of obtaining the first flow label in the flow label field;
    若所述流标签域中的值为空,判断当前路由器的地址是否与所述目的地址相同;If the value in the flow label field is empty, determine whether the current router address is the same as the destination address;
    若当前路由器的地址与所述目的地址相同,则确定已经到达所述目的地址。If the address of the current router is the same as the destination address, it is determined that the destination address has been reached.
  14. 根据权利要求13所述的计算机设备,其中,所述处理器还执行如下步骤:The computer device according to claim 13, wherein the processor further performs the following steps:
    若当前路由器的地址与所述目的地址不相同,则根据保存的预设数据流量类型与路径转发策略的对应关联关系,确定所述IPv6格式的数据包所对应的路径转发策略,并根据所确定的路径转发策略,将所述IPv6格式的数据包发送到所述目的地址。If the current router address is not the same as the destination address, the path forwarding strategy corresponding to the IPv6 format data packet is determined according to the correspondence relationship between the saved preset data traffic type and the path forwarding strategy, and according to the determined Path forwarding strategy, sending the IPv6 format data packet to the destination address.
  15. 根据权利要求12所述的计算机设备,其中,所述处理器在执行所述获取所述数据流量的类型的步骤之后,所述处理器还执行如下步骤:The computer device according to claim 12, wherein after the processor performs the step of acquiring the type of the data traffic, the processor further performs the following steps:
    判断所述数据流量的类型是否为预设类型;Determine whether the type of the data flow is a preset type;
    若所述数据流量的类型为预设类型,则所述处理器执行所述获取所述数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记的步骤。If the type of the data traffic is a preset type, the processor executes the step of acquiring a key node that the data traffic needs to pass through to reach the destination address and a flow label corresponding to the key node.
  16. 根据权利要求11所述的计算机设备,其中,所述处理器在执行所述将所述数据流量所对应的IPv4格式的数据包封装成IPv6格式的数据包的步骤时,具体执行如下步骤:The computer device according to claim 11, wherein the processor specifically performs the following steps when performing the step of encapsulating the IPv4 format data packet corresponding to the data traffic into an IPv6 format data packet:
    通过隧道技术将所述数据流量所对应的IPv4格式的数据包封装成IPv6格式的数据包。The IPv4 format data packet corresponding to the data traffic is encapsulated into an IPv6 format data packet through tunneling technology.
  17. 根据权利要求11所述的计算机设备,其中,在所述处理器执行所述若接收到数据流量,获取所述数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记的步骤之前,所述处理器还执行如下步骤:The computer device according to claim 11, wherein the processor executes the step of acquiring, if data traffic is received, a key node that the data traffic needs to pass through to reach the destination address and a flow label corresponding to the key node Previously, the processor also performed the following steps:
    在配置文件中设置数据流量到达目的地址所需要经过的关键节点所对应的流标记,并将所述配置文件进行保存。Set the flow mark corresponding to the key node that the data flow needs to pass through to reach the destination address in the configuration file, and save the configuration file.
  18. 根据权利要求11所述的计算机设备,其中,所述处理器在执行所述将所述关键节点所对应的流标记写入到IPv6格式的数据包的流标签域的步骤时,具体执行如下步骤:The computer device according to claim 11, wherein the processor specifically executes the following steps when performing the step of writing the flow tag corresponding to the key node to the flow label field of the IPv6 format packet :
    接收用户对IPv6格式的数据包所设置或者所输入的关键节点;Receiving key nodes set or input by users on IPv6 format data packets;
    根据预先保存的关键节点所对应的流标记,将所设置或者所输入的关键节点所对应的流标记写入到IPv6格式的数据包的流标签域。According to the flow mark corresponding to the pre-stored key node, the flow mark corresponding to the set or input key node is written into the flow label field of the IPv6 format data packet.
  19. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时,实现如下步骤:A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
    若接收到数据流量,获取所述数据流量到达目的地址所需要经过的关键节点以及关键节点所对应的流标记;If data traffic is received, obtain the key nodes that the data traffic needs to pass to reach the destination address and the flow labels corresponding to the key nodes;
    将所述数据流量所对应的IPv4格式的数据包封装成IPv6格式的数据包;Encapsulate the data packet in the IPv4 format corresponding to the data flow into a data packet in the IPv6 format;
    将所述关键节点所对应的流标记写入到IPv6格式的数据包的流标签域,其中,所述关键节点所对应的流标记是按照到达目的地址所需要经过的关键节点的顺序写入的;Write the flow mark corresponding to the key node into the flow label field of the IPv6 format packet, wherein the flow mark corresponding to the key node is written in the order of the key nodes that need to pass through to reach the destination address ;
    根据所述流标签域中的流标记与节点地址的对应关系,按照流标记写入的顺序将所述IPv6格式的数据包转发到每个关键节点所对应的节点地址,最后转发到所述目的地址。According to the correspondence relationship between the flow label and the node address in the flow label field, the IPv6 format data packet is forwarded to the node address corresponding to each key node in the order in which the flow label is written, and finally forwarded to the destination address.
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述处理器还实现如下步骤:The computer-readable storage medium of claim 19, wherein the processor further implements the following steps:
    若接收到数据流量,获取所述数据流量的类型;If data traffic is received, obtain the type of data traffic;
    所述处理器在执行所述根据所述流标签域中的流标记与节点地址的对应关系,按照流标记写入的顺序将所述IPv6格式的数据包转发到每个关键节点所对应的节点地址,最后转发到所述目的地址的步骤时,具体实现如下步骤:The processor executes the forwarding of the IPv6 format data packet to the node corresponding to each key node according to the correspondence relationship between the flow label and the node address in the flow label field When the address is finally forwarded to the destination address, the specific steps are as follows:
    根据所述流标签域中的流标记与节点地址的对应关系、每个节点中保存的预设数据流量类型与路径转发策略的对应关联关系,按照流标记写入的顺序,将所述IPv6格式的数据包根据所对应的路径转发策略转发到每个关键节点所对应的节点地址,并最终转发到所述目的地址。According to the correspondence relationship between the flow label and the node address in the flow label field, the corresponding relationship between the preset data traffic type and the path forwarding policy saved in each node, according to the order in which the flow label is written, the IPv6 format The data packet is forwarded to the node address corresponding to each key node according to the corresponding path forwarding strategy, and finally forwarded to the destination address.
PCT/CN2019/092617 2018-10-11 2019-06-25 Forwarding path determining method, apparatus and system, computer device, and storage medium WO2020073685A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811185377.3 2018-10-11
CN201811185377.3A CN109039919B (en) 2018-10-11 2018-10-11 Forwarding path determining method, device, system, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2020073685A1 true WO2020073685A1 (en) 2020-04-16

Family

ID=64616338

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/092617 WO2020073685A1 (en) 2018-10-11 2019-06-25 Forwarding path determining method, apparatus and system, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN109039919B (en)
WO (1) WO2020073685A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114244743A (en) * 2021-12-10 2022-03-25 北京天融信网络安全技术有限公司 Data packet transmission method, device, equipment and medium for resource pool
CN114338516A (en) * 2021-12-28 2022-04-12 中国电信股份有限公司 Traffic forwarding and policy determining method and device
CN115462049A (en) * 2020-05-18 2022-12-09 阿里巴巴集团控股有限公司 Forwarding path planning method of large-scale data network center
CN116614315A (en) * 2023-07-19 2023-08-18 国家计算机网络与信息安全管理中心江西分中心 IPv6 security protection method for realizing application cloud security hosting

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109039919B (en) * 2018-10-11 2021-09-21 平安科技(深圳)有限公司 Forwarding path determining method, device, system, computer equipment and storage medium
CN113055268A (en) * 2019-12-26 2021-06-29 中国移动通信集团有限公司 Method, device, equipment and medium for tunnel traffic load balancing
CN113746654B (en) * 2020-05-29 2024-01-12 中国移动通信集团河北有限公司 IPv6 address management and flow analysis method and device
CN114363236B (en) * 2021-12-20 2023-10-20 鹏城实验室 Flow control method based on explicit path and related equipment
CN115567443A (en) * 2022-09-23 2023-01-03 中国联合网络通信集团有限公司 Service data transmission method and device, gateway equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050147051A1 (en) * 2004-01-07 2005-07-07 Cisco Technology, Inc. Detection of forwarding problems for external prefixes
CN1707978A (en) * 2004-06-11 2005-12-14 华为技术有限公司 Method and apparatus for obtaining constrained path of loose routing in intelligent optical network
CN101682541A (en) * 2007-04-13 2010-03-24 Hart通信基金会 Use directed graph route bag on network
CN101714953A (en) * 2009-12-15 2010-05-26 中兴通讯股份有限公司 Method and device for obtaining traffic engineering label switched path (TE LSP)
CN102638388A (en) * 2011-02-09 2012-08-15 华为技术有限公司 Flow label negotiating method, relevant device and system
CN105357332A (en) * 2015-10-30 2016-02-24 北京数码视讯科技股份有限公司 Network address translation method and device
CN109039919A (en) * 2018-10-11 2018-12-18 平安科技(深圳)有限公司 Forward-path determines method, apparatus, system, computer equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1283071C (en) * 2003-02-20 2006-11-01 华为技术有限公司 Method for assigning route in network
CN101247308B (en) * 2007-02-13 2011-04-27 上海亿人通信终端有限公司 Tunnel packet processing method for implementing IPv6 traversing IPv4 based on network processor
CN101119376B (en) * 2007-09-14 2010-06-16 杭州华三通信技术有限公司 Method and network appliance for preventing IPv6 packet attack
US8989029B2 (en) * 2011-06-10 2015-03-24 Comcast Cable Communications, Llc Quality of service in packet networks
CN102882790A (en) * 2012-10-12 2013-01-16 北京锐安科技有限公司 IPv6 (Internet Protocol version 6) real-time dataflow processing method
US9716653B2 (en) * 2014-11-18 2017-07-25 Hauwei Technologies Co., Ltd. System and method for flow-based addressing in a mobile environment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050147051A1 (en) * 2004-01-07 2005-07-07 Cisco Technology, Inc. Detection of forwarding problems for external prefixes
CN1707978A (en) * 2004-06-11 2005-12-14 华为技术有限公司 Method and apparatus for obtaining constrained path of loose routing in intelligent optical network
CN101682541A (en) * 2007-04-13 2010-03-24 Hart通信基金会 Use directed graph route bag on network
CN101714953A (en) * 2009-12-15 2010-05-26 中兴通讯股份有限公司 Method and device for obtaining traffic engineering label switched path (TE LSP)
CN102638388A (en) * 2011-02-09 2012-08-15 华为技术有限公司 Flow label negotiating method, relevant device and system
CN105357332A (en) * 2015-10-30 2016-02-24 北京数码视讯科技股份有限公司 Network address translation method and device
CN109039919A (en) * 2018-10-11 2018-12-18 平安科技(深圳)有限公司 Forward-path determines method, apparatus, system, computer equipment and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115462049A (en) * 2020-05-18 2022-12-09 阿里巴巴集团控股有限公司 Forwarding path planning method of large-scale data network center
CN115462049B (en) * 2020-05-18 2024-03-08 阿里巴巴(中国)有限公司 Forwarding path planning method for large-scale data network center
CN114244743A (en) * 2021-12-10 2022-03-25 北京天融信网络安全技术有限公司 Data packet transmission method, device, equipment and medium for resource pool
CN114244743B (en) * 2021-12-10 2022-10-21 北京天融信网络安全技术有限公司 Method, device, equipment and medium for transmitting data packets of resource pool
CN114338516A (en) * 2021-12-28 2022-04-12 中国电信股份有限公司 Traffic forwarding and policy determining method and device
CN114338516B (en) * 2021-12-28 2023-09-29 中国电信股份有限公司 Traffic forwarding and policy determining method and device
CN116614315A (en) * 2023-07-19 2023-08-18 国家计算机网络与信息安全管理中心江西分中心 IPv6 security protection method for realizing application cloud security hosting
CN116614315B (en) * 2023-07-19 2023-10-27 国家计算机网络与信息安全管理中心江西分中心 IPv6 security protection method for realizing application cloud security hosting

Also Published As

Publication number Publication date
CN109039919B (en) 2021-09-21
CN109039919A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
WO2020073685A1 (en) Forwarding path determining method, apparatus and system, computer device, and storage medium
US11876883B2 (en) Packet processing method, network node, and system
US20200169432A1 (en) Bridging of non-capable subnetworks in bit indexed explicit replication
WO2021063232A1 (en) Method, apparatus and system for establishing bier forwarding table entry
CN109218178B (en) Message processing method and network equipment
EP3879759A1 (en) Optimized datapath troubleshooting with trace policy engine
WO2020182156A1 (en) Message forwarding method in network, network node and network system
RU2493677C2 (en) Method and router for implementing mirroring
US9019814B1 (en) Fast failover in multi-homed ethernet virtual private networks
US7944854B2 (en) IP security within multi-topology routing
CN108809759A (en) Detect the method, apparatus and router of link state
CN102857491A (en) Management schemes for filter sets
US11349749B2 (en) Node protection for bum traffic for multi-homed node failure
WO2021088433A1 (en) Message processing method, device and system
CN112134776B (en) Method for generating multicast forwarding table item and access gateway
US20230300070A1 (en) Packet Sending Method, Device, and System
CN105471747A (en) Intelligent router routing method and apparatus thereof
WO2022083563A1 (en) Link detection method, link detection apparatus, terminal device and storage medium
CN107294856A (en) Determine the method, equipment and system of change in topology
US8923303B2 (en) Method, system and installation for forwarding data transmission frames
US20120170581A1 (en) Policy homomorphic network extension
US11811901B2 (en) Platform agnostic abstraction for forwarding equivalence classes with hierarchy
WO2022007550A1 (en) Load balancing method, apparatus, network device, and system
CN109347734A (en) A kind of file transmitting method, device, the network equipment and computer-readable medium
WO2018024189A1 (en) Loopback detection method and apparatus

Legal Events

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

Ref document number: 19870767

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC ( EPO FORM 1205A DATED 12/07/2021 )

122 Ep: pct application non-entry in european phase

Ref document number: 19870767

Country of ref document: EP

Kind code of ref document: A1