(19)
(11)EP 3 471 351 B1

(12)EUROPEAN PATENT SPECIFICATION

(45)Mention of the grant of the patent:
17.02.2021 Bulletin 2021/07

(21)Application number: 17826954.4

(22)Date of filing:  10.07.2017
(51)Int. Cl.: 
H04L 12/721  (2013.01)
H04L 12/727  (2013.01)
H04L 12/733  (2013.01)
H04L 12/801  (2013.01)
(86)International application number:
PCT/CN2017/092387
(87)International publication number:
WO 2018/010618 (18.01.2018 Gazette  2018/03)

(54)

METHOD AND DEVICE FOR ACQUIRING PATH INFORMATION ABOUT DATA PACKET

VERFAHREN UND VORRICHTUNG ZUR ERFASSUNG VON KONTEXTINFORMATIONEN ÜBER DATENPAKETE

PROCÉDÉ ET DISPOSITIF D'ACQUISITION D'INFORMATIONS DE TRAJET CONCERNANT UN PAQUET DE DONNÉES


(84)Designated Contracting States:
AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

(30)Priority: 12.07.2016 CN 201610547906

(43)Date of publication of application:
17.04.2019 Bulletin 2019/16

(73)Proprietor: Huawei Technologies Co., Ltd.
Longgang District Shenzhen, Guangdong 518129 (CN)

(72)Inventors:
  • ZHOU, Xingwang
    Shenzhen Guangdong 518129 (CN)
  • LI, Feng
    Shenzhen Guangdong 518129 (CN)
  • LI, Jin
    Shenzhen Guangdong 518129 (CN)
  • ZHU, Xia
    Shenzhen Guangdong 518129 (CN)
  • LI, Congjuan
    Shenzhen Guangdong 518129 (CN)

(74)Representative: Thun, Clemens 
Mitscherlich PartmbB Patent- und Rechtsanwälte Sonnenstraße 33
80331 München
80331 München (DE)


(56)References cited: : 
CN-A- 101 479 998
US-A1- 2008 205 292
US-B1- 8 155 126
CN-A- 101 572 649
US-A1- 2016 127 219
  
      
    Note: Within nine months from the publication of the mention of the grant of the European patent, any person may give notice to the European Patent Office of opposition to the European patent granted. Notice of opposition shall be filed in a written reasoned statement. It shall not be deemed to have been filed until the opposition fee has been paid. (Art. 99(1) European Patent Convention).


    Description

    TECHNICAL FIELD



    [0001] This application relates to the communications field, and in particular, to a method for obtaining path information of a data packet and a device.

    BACKGROUND



    [0002] A data packet is a data unit exchanged and transmitted in a network, namely a data block to be sent by a station at a time. The data packet includes complete data information to be sent. Data packets vary greatly in length, and a length of a data packet is not limited and variable. The data packet is a unit of network transmission. In a transmission process, a data packet is encapsulated into a segment, a packet, or a frame for transmission. Encapsulation is performed in a manner of adding some information segments, which are data organized in a specific format in a packet header. For example, the information segments include information such as a packet type, a packet version, a packet length, and a packet entity.

    [0003] During implementation of a prior-art solution, the following technical problems are found in the prior art:

    [0004] An AQM (English full name: Active Queue Management) mechanism of a network device, such as a router, is used to perform packet dropping when network congestion occurs, to alleviate the congestion. In the current AQM mechanism, a random dropping manner is mainly used, and a TCP congestion control algorithm is mainly used to adjust a congestion window of a TCP flow, so that a TCP sending rate best matches a physical bandwidth and a congestion status of a network. The current TCP congestion control algorithm adjusts the congestion window mainly based on the current sending rate of the TCP flow and a packet loss state, but for the network congestion, path information (for example, a hop count of routers or an RTT (English full name: Round-Trip Time) value) of a data packet is also a very important reference parameter. However, the path information of the data packet cannot be obtained in the prior art.

    [0005] US 2016/0127219 A1 refers to a method for operating a source node, the method including: receiving a data path validation request command requesting validation of a path associated with a traffic flow identified in the data path validation request command, and determining a first hop sequence in accordance with the path being validated, wherein the first hop sequence is identical to a second hop sequence associated with a non-validation request packet associated with the path being validated. The method also includes generating, by the source node, a validation request packet in accordance with the data path validation request command, the validation request packet comprises route information associated with the first hop sequence, an alert flag set to a specified value, and a path validation header specifying processing performed by nodes receiving the validation request packet, and transmitting, by the source node, the validation request packet in accordance with the route information.

    [0006] US 8,155,126 B1 refers to a method and apparatus for inferring AS paths between two endpoint nodes communicating over a network having a plurality of nodes without having access to the endpoint nodes. The method and apparatus determine routing tables of at least some of the plurality of nodes. A relationship between each node is then inferred from the routing tables. The method and apparatus then determine a path between the two endpoint nodes from the relationship and the routing table determination.

    SUMMARY



    [0007] This application provides a method for obtaining path information of a data packet and a device, to improve resource utilization of a network.

    [0008] This problem is solved by the subject matter of the independent claims. Further implementation forms are provided in the dependent claims.

    [0009] According to a first aspect, a method for obtaining path information of a data packet is provided, where the method includes the following steps: receiving, by a network device, a data packet transmitted in a network; and obtaining, by the network device, path information of the data packet from a source end to a destination end based on a source address and a destination address of the data packet, where the path information is a total hop count of routers passed through by the data packet from the source end to the destination end or a latency of the data packet from the source end to the destination end.

    [0010] According to the technical solution provided in the first aspect of this application, after the data packet is received, the source address and the destination address of the data packet are obtained, and the path information from the source end to the destination end is obtained based on the source address and the destination address, so that the network device can obtain the path information of the data packet. Therefore, the technical solution has an advantage of obtaining path information of a data packet.

    [0011] In a possible design, when the path information includes the total hop count of routers, the obtaining, by the network device, path information of the data packet from a source end to a destination end based on a source address and a destination address of the data packet specifically includes: calculating a first hop count of routers of the data packet from the source end to the network device based on a time to live value of the data packet, and finding a second hop count of routers from the network device to the destination address based on the destination address of the data packet and from a mapping relationship between an address and a hop count of routers, where a sum of the first hop count and the second hop count is the total hop count of routers passed through from the source end to the destination end.

    [0012] The possible design provides a specific manner of obtaining the total hop count of routers, supporting the network device in obtaining the path information from the source end to the destination end.

    [0013] In another possible design, when the path information includes the total hop count of routers, the obtaining, by the network device, path information of the data packet from a source end to a destination end based on a source address and a destination address of the data packet specifically includes: finding a third hop count of routers from the source end to the network device based on the source address of the data packet and from a mapping relationship between an address and a hop count of routers, and finding a fourth hop count of routers from the network device to the destination address based on the destination address of the data packet and from the mapping relationship between an address and a hop count of routers, where a sum of the third hop count and the fourth hop count is the total hop count of routers passed through from the source end to the destination end.

    [0014] The another possible design provides another specific manner of obtaining the total hop count of routers, supporting the network device in obtaining the path information from the source end to the destination end.

    [0015] In still another possible design, when the path information includes the total hop count of routers, the obtaining, by the network device, path information of the data packet from a source end to a destination end based on a source address and a destination address of the data packet specifically includes: when the data packet does not include the total hop count of routers, sending, by the network device, a query packet to find a fifth hop count from the network device to the destination end, where a sum of the fifth hop count and a sixth hop count from the source end to the network device is the total hop count of routers, and filling the total hop count of routers into an extension field of the data packet, where a destination address of the query packet and the destination address of the data packet are the same.

    [0016] The still another possible design provides still another specific manner of obtaining the total hop count of routers, supporting the network device in obtaining the path information from the source end to the destination end.

    [0017] In yet another possible design, the total hop count of routers in the foregoing possible designs may be loaded to an extension field of a service packet corresponding to the data packet

    [0018] In still yet another possible design, the mapping relationship between an address and a hop count of routers specifically includes: receiving, by the network device, a routing packet diffused in the network, where the routing packet includes an address and a hop count of network segment routers in each network segment passed through during diffusion from the address to the network device; obtaining, by the network device, a seventh hop count from the network device to an edge device based on a network topology of a network segment in which the network device is located, where a sum of the hop count of network segment routers in each network segment and the seventh hop count plus 1 gives a total hop count of routers from the network device to the address; and storing a mapping relationship between the address and the total hop count of routers of the address, where the edge device is the last device, in the network segment in which the network device is located, passed through when the data packet is sent from the network segment in which the network device is located to the address.

    [0019] The still yet another possible design provides a specific implementation of obtaining the mapping relationship between an address and a hop count of routers, supporting implementation of the possible design, the another possible design, and the still another possible design.

    [0020] In a further possible design, when network congestion occurs, the network device determines a packet dropping policy of the data packet based on the path information, or the network device determines a transmission rate of the data packet based on the path information.

    [0021] In the further possible design, the network device adjusts the packet dropping policy of the data packet or the transmission rate of the data packet based on the path information, optimizing the packet dropping policy and improving the transmission rate.

    [0022] According to a second aspect, a network device is provided, where the network device includes:

    a transceiver unit, configured to receive a data packet transmitted in a network; and

    a processing unit, configured to obtain path information of the data packet from a source end to a destination end based on a source address and a destination address of the data packet, where the path information is a total hop count of routers passed through by the data packet from the source end to the destination end or a latency of the data packet from the source end to the destination end.



    [0023] After receiving the data packet, the network device provided in the second aspect of this application obtains the source address and the destination address of the data packet, obtains the path information from the source end to the destination end based on the source address and the destination address, and can further obtain the path information of the data packet. Therefore, the network device has an advantage of obtaining path information of a data packet.

    [0024] In subsequent possible designs, the processing unit may be configured to implement the possible design, the another possible design, the still another possible design, the yet another possible design, the still yet another possible design, and the further possible design in the first aspect.

    BRIEF DESCRIPTION OF DRAWINGS



    [0025] To describe the technical solutions in the embodiments of this application more clearly, the following briefly describes the accompanying drawings required for describing the embodiments. Apparently, the accompanying drawings in the following description show merely some embodiments of this application, and persons of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.

    FIG. 1 is a schematic flowchart of a method for obtaining path information of a data packet according to this application;

    FIG. 2 is a schematic diagram of an implementation scenario of a plurality of networks according to an embodiment of this application;

    FIG. 3 is a schematic diagram of another implementation scenario of a plurality of networks according to an embodiment of this application;

    FIG. 4 is a schematic structural diagram of a network device according to this application; and

    FIG. 5 is a schematic structural diagram of hardware of a network device according to this application.


    DESCRIPTION OF EMBODIMENTS



    [0026] Referring to FIG. 1, FIG. 1 shows a method for obtaining path information of a data packet according to an embodiment of this application. The method is applied to a network device, and the network device includes but is not limited to a device such as a router, a node, or a server. As shown in FIG. 1, the method includes the following steps.

    [0027] Step 101. The network device receives a data packet transmitted in a network.

    [0028] The receiving in step 101 may be performed in a wired manner, or may certainly be performed in a wireless manner. This embodiment is not limited to the foregoing receiving manners.

    [0029] Step 102. The network device obtains path information of the data packet from a source end to a destination end based on a source address and a destination address of the data packet, where the path information may be a total hop count of routers passed through by the data packet from the source end to the destination end or a latency of the data packet from the source end to the destination end.

    [0030] When the path information may be the total hop count of routers, that the network device may obtain path information of the data packet from a source end to a destination end based on a source address and a destination address may specifically include:
    the network device obtains a TTL (English full name: Time To Live) value in the data packet, calculates a first hop count of routers of the data packet from the source end to the network device based on the TTL value, and finds a second hop count of routers from the network device to the destination address based on the destination address of the data packet and from a mapping relationship between an address and a hop count of routers, where a sum of the first hop count and the second hop count is the total hop count of routers passed through from the source end to the destination end.

    [0031] An implementation of calculating the first hop count of routers of the data packet from the source end to the network device based on the TTL value may be: According to the TCP protocol, an initial value of TTL is 64. The value decreases by 1 each time when a router is passed through. Therefore, the first hop count of routers passed through can be obtained by directly subtracting the TTL value of the data packet from 64.

    [0032] A manner of obtaining the mapping relationship between an address and a hop count of routers may specifically include:
    the network device receives a routing packet diffused in the network, where the routing packet includes an address (usually is an IP address of a source end device that diffuses the routing packet) and a hop count of network segment routers in each network segment passed through during diffusion from the address to the network device; the network device obtains a seventh hop count from the network device to an edge device based on a network topology of a network segment in which the network device is located, where a sum of the hop count of network segment routers in each network segment and the seventh hop count plus 1 gives a total hop count of routers from the network device to the address; and the network device stores a mapping relationship between the address and the total hop count of routers of the address, where the edge device is the last device, in the network segment in which the network device is located, passed through when the data packet is sent from the network segment in which the network device is located to the address.

    [0033] The foregoing routing packet may be specifically implemented by extending an IGP (English full name: Interior Gateway Protocol) routing packet. Table 1 shows a format of an extended routing packet:
    Table 1
    LS ageOptionsType: 3/4/5
    Link state ID
    Advertising Router
    LS sequence number
    LS checksum Length
    Network mask
    0 metric
    TOS TOS metric
    Distance
    ...


    [0034] For a definition of another field in Table 1, refer to a definition in the IGP routing protocol. Details are not provided herein. In this application, the hop count of network segment routers in each network segment is carried in a Distance field in Table 1.

    [0035] The hop count of network segment routers in each network segment may be obtained in the following manner: According to the IGP protocol, a router in a local network area (commonly referred to as a network segment) may sense a network topology of the local network area, and may obtain, based on the network topology and the destination address of the data packet, a hop count of routers in a network area passed through by the data packet. A specific implementation may be as follows: According to the IGP protocol, each router may learn of a network topology structure of an area in which the router is located, and may obtain a hop count of network segment routers from the router to the network segment based on the network topology structure. In this application, one Distance field is added to the routing packet, and the hop count of network segment routers in each network segment is added to the Distance field. The following uses a practical example to describe how to obtain the hop count of routers.

    [0036] Using a network shown in FIG. 3 as an example, for ease of description, the network device herein is represented by "R", and a digit behind R indicates a number of the network device. For example, "R2" indicates a second network device in the network. A specific implementation method is as follows.

    [0037] When R2 diffuses information about a 10.0.1.0/24 network segment to an AS200, a hop count of routers from R2 to the 10.0.1.0/24 network segment is added to original information of an AS_PATH property of the routing packet (as shown in the last line of the following code):

    AS path segment: 100

    path segment type: AS_SEQUENCE (2)

    path segment length: 1 AS

    path segment value: 100, 2



    [0038] In "path segment value: 100, 2", "100" indicates an identifier of a network area passed through, and "2" indicates a hop count of routers passed through by the data packet in the network area indicated by 100.

    [0039] Similarly, after R3 diffuses the information to R5, R5 calculates a hop count of routers from R5 to R3 by using the IGP of the AS200, adds the hop count to an Update packet, and diffuses the Update packet to an AS300.

    AS path segment: 100 200

    path segment type: AS_SEQUENCE (2)

    path segment length: 2 AS

    path segment value: 100, 2, 200, 3



    [0040] In "path segment value: 100, 2, 200, 3", "200" indicates an identifier of a network area in which R3 is located, and "200, 3" indicates that three routers are passed through in the network area indicated by 200. Herein, it is assumed that a network device that establishes the mapping relationship between an address and a total hop count of routers is R8, and the address carried in the routing packet is 10.0.1.0/24. For R8, a value of Distance is 2+3=5. For the AS300, the last device passed through when the data packet is sent from the AS300 to 10.0.1.0/24 is R7, so R7 is the edge device. It can be learned from a network topology that a hop count of routers from R8 to R7 is 1, and therefore a total hop count of routers passed through from R8 to 10.0.1.0/24 is 2+3+1+1=7. Then, R8 stores the mapping relationship between the total hop count of routers, which is 7, and the address 10.0.1.0/24.

    [0041] To better describe establishment of the mapping relationship, herein, R5 in the AS200 is used as an example to describe how R5 establishes a mapping relationship between 10.0.1.0/24 and a total hop count of routers. For R5, a value of Distance is 2 (indicates only a hop count of routers in an AS100), the network segment in which R5 is located is the AS200, and the last device passed through when the data packet is sent from the AS200 to 10.0.1.0/24 is R3. Based on a topology structure of the AS200, a hop count of routers passed through from R5 to R3 is 2, and therefore a total hop count of routers from R5 to 10.0.1.0/24 is 2+2+1=5. R5 stores the mapping relationship between the total hop count of routers, which is 5, and the address 10.0.1.0/24.

    [0042] If the routing information includes the total hop count of routers, the implementation method of step 102 may alternatively be specifically:
    a third hop count of routers from the source end to the network device is found based on the source address of the data packet and from a mapping relationship between an address and a hop count of routers, and a fourth hop count of routers from the network device to the destination address is found based on the destination address of the data packet and from the mapping relationship between an address and a hop count of routers, where a sum of the third hop count and the fourth hop count is the total hop count of routers passed through from the source end to the destination end.

    [0043] For the manner of obtaining the mapping relationship between an address and a hop count of routers, refer to the foregoing description. Details are not repeated herein.

    [0044] The latency from the source end to the destination end may be obtained by sending a probe packet by a source end network device or a destination end network device. For a specific manner of sending the probe packet and a specific manner of obtaining the latency, refer to definitions in the TCP protocol. Details are not provided herein. After obtaining the latency, the source end network device adds the latency to the data packet.

    [0045] Step 103 (not shown in the figure). When network congestion occurs, the network device determines a packet dropping policy of the data packet or a transmission rate of the data packet based on the path information of the data packet.

    [0046] If the path information includes the latency of the data packet from the source end to the destination end, the packet dropping policy in step 103 may specifically include the following policy:
    the network device defines that a dropping probability of a data packet with a large latency from the source end to the destination end is less than a dropping probability of a data packet with a small latency from the source end to the destination end.

    [0047] The packet dropping policy in step 103 may specifically include the following policy:
    the network device defines that a dropping probability of a data packet with a large total hop count of routers is less than a dropping probability of a data packet with a small hop count of routers.

    [0048] Certainly, the packet dropping policy in step 103 may further specifically include the following policy:

    a plurality of intervals are obtained through division based on a total hop count of routers, and a different queue length, queue threshold, and packet dropping probability are defined for each interval, where

    a queue length of an interval in which a total hop count of routers is large is greater than a queue length of an interval in which a total hop count of routers is small; a queue threshold of an interval in which a total hop count of routers is large is greater than a queue threshold of an interval in which a total hop count of routers is small; and a packet dropping probability of an interval in which a total hop count of routers is large is greater than a packet dropping probability of an interval in which a total hop count of routers is small.



    [0049] Certainly, step 103 may alternatively be replaced by the following solution: The network device determines the transmission rate of the data packet based on the path information of the data packet; or
    the network device defines that a transmission rate of a data packet with a large latency from the source end to the destination end is greater than a dropping probability of a data packet with a small latency from the source end to the destination end; or
    the network device defines that a transmission rate of a data packet with a large total hop count of routers is greater than a transmission rate of a data packet with a small total hop count of routers.

    [0050] In the technical solution provided in this application, after the data packet is received, the path information of the data packet is obtained. Therefore, the technical solution has an advantage of obtaining path information of a data packet. Then, the path information is used to determine the packet dropping policy or the transmission rate of the data packet, and therefore targeted dropping is performed on the to-be-sent data packet, and resource utilization of the network is improved as much as possible.

    [0051] The following uses FIG. 2 to describe technical effects of the technical solution provided in this embodiment of this application. FIG. 2 shows a technical solution of using path information to prevent network congestion. As shown in FIG. 2, a system shown in FIG. 2 includes six network devices. For ease of distinguishing between the six network devices, the six network devices are named R1, R2, R3, R4, R5, and R6, and their connection manners are shown by solid lines in FIG. 2. For ease of distinguishing, links between the six network devices are named L1, L2, L3, L4, and L5. Herein, it is assumed that there are only two flows among the network devices shown in FIG. 2. For ease of distinguishing, the two flows are named Flowl and Flow2. Flowl may be sent by R5 to R6 via R4, and links that Flowl passes through may be L4 and L5. Flowl may be sent by R1 to R6 via R1, R2, R3, and R4, and links that Flowl passes through may be L1, L2, L3, and L5. Herein, it is assumed that a maximum network speed of L5 is 100 Mbps, and maximum network speeds of L1, L2, L3, and L4 are all 60 Mbps.

    [0052] Herein, it is assumed that all the links shown in FIG. 2 are at the maximum network speeds. The maximum network speed of L5 is 100 Mbps, the maximum network speeds of L3 and L4 are both 60 Mbps, and a sum of the network speeds of L3 and L4 is 120 Mbps. Consequently, if all the links are at the maximum network speeds, congestion occurs on R4. In this case, to ease the congestion, a packet needs to be dropped. There are only two flows Flowl and Flow2, and R4 may choose to drop a data packet of Flowl or drop a data packet of Flow2. The following analyzes the resource utilization of the network when a data packet of Flowl or of Flow2 is dropped.

    [0053] If a packet of Flowl is dropped (a hop count of routers passed through is 1):
    the links L1, L2, and L3 are not affected. According to a definition in the TCP protocol, when a packet is dropped, a network speed of a link corresponding to the dropped packet decreases by half. Therefore, the network speed of L4 decreases to 30 Mbps, and the network speed of L5 decreases to 90 Mbps. The network speed of L5 is less than the maximum network speed 100 Mbps, and congestion does not occur. In this case, in terms of the resource utilization of the network, only resource utilization of L4 is 50%, and resource utilizations of L1, L2, and L3 are all 100%.

    [0054] If a packet of Flow2 is dropped (a hop count of routers passed through is 3):
    the L4 link is not affected, the network speeds of L1, L2, and L3 all decrease to 30 Mbps, and the network speed of L5 decreases to 90 Mbps. The network speed of L5 is less than the maximum network speed 100 Mbps, and congestion does not occur. In this case, in terms of the resource utilization of the network, the resource utilizations of L1, L2, and L3 are all 50%, and the resource utilization of L4 is 100%.

    [0055] It can be learned that the resource utilization when a packet of Flow2 is dropped is less than the resource utilization when a packet of Flowl is dropped. That is, if a data packet on a flow that passes through a larger hop count of routers is dropped, more links that are farther away from a congestion point are affected, reducing the overall resource utilization of the network. Conversely, if a data packet on a flow that passes through a smaller hop count of routers is dropped, the overall resource utilization of the network is improved.

    [0056] Referring to FIG. 4, FIG. 4 shows a network device 400 provided in this application. The network device includes but is not limited to a device that can send or forward a data packet, such as an intelligent terminal, a computer, a server, a switch, or a router. For definitions and examples of terms in this embodiment, refer to the embodiment corresponding to FIG. 1. Details are not repeated herein. The network device 400 includes:

    a transceiver unit 401, configured to receive a data packet transmitted in a network; and

    a processing unit 402, configured to obtain path information of the data packet from a source end to a destination end based on a source address and a destination address of the data packet, where the path information is a total hop count of routers passed through by the data packet from the source end to the destination end or a latency of the data packet from the source end to the destination end.



    [0057] After receiving the data packet, the network device provided in this application obtains the source address and the destination address of the data packet, obtains the path information from the source end to the destination end based on the source address and the destination address, and can further obtain the path information of the data packet. Therefore, the network device has an advantage of obtaining path information of a data packet.

    [0058] Optionally, the processing unit 402 may be further configured to perform step 102 and step 103 and implement the detailed solutions of step 102 and step 103 in the foregoing embodiment shown in FIG. 1.

    [0059] Referring to FIG. 5, FIG. 5 is a simplified schematic diagram of a network device 50 provided in an embodiment of this application. The network device 50 includes but is not limited to a device such as a mobile phone, a tablet computer, a server, a base station, or a mobile switching center. As shown in FIG. 5, the network device 50 includes a processor 501, a memory 502, a transceiver 503, and a bus 504. The transceiver 503 is configured to receive data from and send data to an external device. The network device 50 may have one or more processors 501. In some embodiments of this application, the processor 501, the memory 502, and the transceiver 503 may be connected by using a bus system or in another manner. The network device 50 may be configured to execute the method shown in FIG. 1. For definitions and examples of terms in this embodiment, refer to the embodiment corresponding to FIG. 1. Details are not repeated herein.

    [0060] The transceiver 503 is configured to receive a data packet transmitted in a network or a routing packet diffused in the network.

    [0061] The memory 502 stores program code. The processor 501 is configured to invoke the program code stored in the memory 502 to perform the following operations:
    the processing unit 501 is configured to obtain path information of the data packet from a source end to a destination end based on a source address and a destination address of the data packet, where the path information is a total hop count of routers passed through by the data packet from the source end to the destination end or a latency of the data packet from the source end to the destination end.

    [0062] Optionally, the processor 501 may be further specifically configured to perform step 102 and step 103 and implement the detailed solutions of step 102 and step 103 in the foregoing embodiment shown in FIG. 1. For a specific description of the foregoing steps, refer to the description in the embodiment shown in FIG. 1. Details are not repeated herein.

    [0063] It should be noted that the processor 501 herein may be a processing element, or may be a collective term of a plurality of processing elements. For example, the processing element may be a central processing unit (Central Processing Unit, CPU), may be an application-specific integrated circuit (Application-Specific Integrated Circuit, ASIC), or may be configured as one or more integrated circuits for implementing this embodiment of this application, for example, one or more microprocessors (digital signal processor, DSP), or one or more field programmable gate arrays (Field Programmable Gate Array, FPGA).

    [0064] The memory 503 may be a storage apparatus, or may be a collective term of a plurality of storage elements, and is configured to store executable program code, or a parameter, data, and the like that are required for running of an application program running apparatus. Moreover, the memory 503 may include a random access memory (RAM), or may include a non-volatile memory (non-volatile memory), for example, a disk memory or a flash memory (Flash).

    [0065] The bus 504 may be an industry standard architecture (Industry Standard Architecture, ISA) bus, a peripheral component interconnect (Peripheral Component, PCI) bus, an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, or the like. The bus may be classified into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used to represent the bus in FIG. 5, but this does not mean that there is only one bus or only one type of bus.

    [0066] The network device may further include an input/output apparatus that is connected to the bus 504, so as to connect to another part such as the processor 501 by using the bus. The input/output apparatus may provide an input interface for an operator, so that the operator can select a control item on the input interface, or may be another interface. The input/output apparatus may connect to another device by using the interface.

    [0067] It should be noted that, for brief description, the foregoing method embodiments are represented as a series of actions. However, persons skilled in the art should appreciate that this application is not limited to the described order of the actions, because according to this application, some steps may be performed in other orders or simultaneously. It should be further appreciated by persons skilled in the art that the embodiments described in this specification all belong to embodiments, and the involved actions and modules are not necessarily required by this application.

    [0068] In the foregoing embodiments, the description of each embodiment has respective focuses. For a part that is not described in detail in an embodiment, refer to related descriptions in other embodiments.

    [0069] Persons of ordinary skill in the art may understand that all or some of the steps of the methods in the embodiments may be implemented by a program instructing relevant hardware. The program may be stored in a computer readable storage medium. The storage medium may include a flash memory, a read-only memory (English: Read-Only Memory, ROM for short), a random access memory (English: Random Access Memory, RAM for short), a magnetic disk, an optical disc, or the like.

    [0070] The method and network device provided in the embodiments of this application are described in detail above. The principle and implementation of this application are described herein through specific examples. The description about the embodiments of this application is merely provided to help understand the method and core ideas of this application. In addition, persons of ordinary skill in the art can make variations and modifications to this application in terms of the specific implementations and application scopes according to the ideas of this application within the scope of the appended claims.


    Claims

    1. A method for determining a packet dropping policy of a data packet, wherein the method comprises the following steps:

    • receiving, by a network device, the data packet transmitted in a network (S 101);

    • obtaining, by the network device, path information of the data packet from a source end to a destination end based on a source address of the source end and a destination address of the destination end of the data packet, wherein the path information is a total hop count of routers passed through by the data packet from the source end to the destination end (S 102), wherein the obtaining, by the network device, the path information of the data packet from the source end to the destination end based on the source address and the destination address of the data packet specifically comprises:

    ∘ calculating a first hop count of routers of the data packet from the source end to the network device based on a time to live value of the data packet, and finding a second hop count of routers from the network device to the destination end based on the destination address of the data packet and from a mapping relationship between the destination address and the second hop count of routers, and

    ∘ summing the first hop count and the second hop count, thereby arriving at the total hop count of routers passed through from the source end to the destination end, and

    • determining, by the network device, the packet dropping policy of the data packet based on the path information when network congestion occurs.


     
    2. The method according to claim 1, wherein the method further comprises:
    receiving, by the network device, a routing packet diffused in the network, wherein the routing packet comprises the destination address and a third hop count of network segment routers in each network segment passed through during diffusion from the destination end to the network device; obtaining, by the network device, a fourth hop count from the network device to an edge device based on a network topology of a network segment in which the network device is located, wherein a sum of the third hop count of network segment routers in each network segment and the fourth hop count plus 1 gives the second hop count of routers from the network device to the destination end; and storing the mapping relationship between the destination address and the second hop count of routers, wherein the edge device is the last device, in the network segment in which the network device is located, passed through when the data packet is sent from the network segment in which the network device is located to the destination end.
     
    3. A network device (50, 400) configured to perform any of the methods according to claims 1 - 2.
     


    Ansprüche

    1. Verfahren zum Bestimmen einer Paketverwerfungsrichtlinie eines Datenpakets, wobei das Verfahren die folgenden Schritte umfasst:

    • Empfangen des in einem Netzwerk übertragenen Datenpakets, durch eine Netzwerkvorrichtung (S 101);

    • Erhalten von Pfadinformationen des Datenpakets, durch die Netzwerkvorrichtung, von einem Quellende zu einem Zielende basierend auf einer Quelladresse des Quellendes und einer Zieladresse des Zielendes des Datenpakets, wobei die Pfadinformationen eine Gesamtanzahl von Hops von Routern sind, die durch das Datenpaket von dem Quellende zu dem Zielende durchgeleitet werden (S 102), wobei das Erhalten der Pfadinformationen des Datenpakets, durch die Netzwerkvorrichtung, von dem Quellende zu dem Zielende basierend auf der Quelladresse und der Zieladresse des Datenpakets speziell Folgendes umfasst:

    o Berechnen einer ersten Anzahl von Hops von Routern des Datenpakets von dem Quellende zu der Netzwerkvorrichtung basierend auf einem Gültigkeitsdauerwert des Datenpakets und Feststellen einer zweiten Anzahl von Hops von Routern von der Netzwerkvorrichtung zu dem Zielende basierend auf der Zieladresse des Datenpakets und von einer Zuordnungsbeziehung zwischen der Zieladresse und der zweiten Anzahl von Hops von Routern und

    o Summieren der ersten Anzahl von Hops und der zweiten Anzahl von Hops, wobei dadurch die Gesamtanzahl von Hops von Routern erreicht wird, die von dem Quellende zu dem Zielende durchgeleitet werden, und

    • Bestimmen der Paketverwerfungsrichtlinie des Datenpakets, durch die Netzwerkvorrichtung, basierend auf den Pfadinformationen, wenn eine Netzwerküberlastung auftritt.


     
    2. Verfahren nach Anspruch 1, wobei das Verfahren ferner Folgendes umfasst:

    Empfangen eines in dem Netzwerk verbreiteten Routing-Pakets, durch die Netzwerkvorrichtung, wobei das Routing-Paket die Zieladresse und eine dritte Anzahl von Hops von Netzwerksegmentroutern in jedem Netzwerksegment, die während einer Verbreitung von dem Zielende zu der Netzwerkvorrichtung durchgeleitet werden, umfasst; Erhalten einer vierten Anzahl von Hops von der Netzwerkvorrichtung, durch die Netzwerkvorrichtung, zu einer Edge-Vorrichtung basierend auf einer Netzwerktopologie eines Netzwerksegments, in dem sich die Netzwerkvorrichtung befindet, wobei eine Summe der dritten Anzahl von Hops von Netzwerksegmentroutern in jedem Netzwerksegment und die vierte Anzahl von Hops plus 1 die zweite Anzahl von Hops von Routern von der Netzwerkvorrichtung zu dem Zielende ergeben; und

    Speichern der Zuordnungsbeziehung zwischen der Zieladresse und der zweiten Anzahl von Hops von Routern, wobei die Edge-Vorrichtung die letzte Vorrichtung in dem Netzwerksegment ist, in dem sich die Netzwerkvorrichtung befindet, die durchgeleitet wird, wenn das Datenpaket von dem Netzwerksegment, in dem sich die Netzwerkvorrichtung befindet, zu dem Zielende gesendet wird.


     
    3. Netzwerkvorrichtung (50, 400), die konfiguriert ist, um eines der Verfahren nach den Ansprüchen 1-2 durchzuführen.
     


    Revendications

    1. Procédé pour déterminer une politique d'abandon de paquet d'un paquet de données, le procédé comprenant les étapes suivantes :

    • la réception, par un dispositif de réseau, d'un paquet de données transmis dans un réseau (S 101) ;

    • l'obtention, par le dispositif de réseau, d'informations de trajet du paquet de données d'une extrémité source à une extrémité de destination sur la base d'une adresse source de l'extrémité source et d'une adresse de destination de l'extrémité de destination du paquet de données, les informations de trajet étant un nombre total de sauts de routeurs traversés par le paquet de données de l'extrémité source à l'extrémité de destination (S 102), l'obtention, par le dispositif de réseau, des informations de trajet du paquet de données de l'extrémité source à l'extrémité de destination sur la base de l'adresse source et de l'adresse de destination du paquet de données comprenant spécifiquement :

    o le calcul d'un premier nombre de sauts de routeurs du paquet de données de l'extrémité source vers le dispositif de réseau sur la base d'une valeur de durée de vie du paquet de données, et la localisation d'un deuxième nombre de sauts de routeurs du dispositif de réseau à l'extrémité de destination sur la base de l'adresse de destination du paquet de données et d'une relation de mappage entre l'adresse de destination et le deuxième nombre de sauts de routeurs, et

    o l'addition du premier nombre de sauts et du deuxième nombre de sauts, arrivant ainsi au nombre total de sauts de routeurs traversés de l'extrémité source à l'extrémité destination, et

    • la détermination, par le dispositif de réseau, de la politique d'abandon de paquet du paquet de données sur la base des informations de trajet en cas de congestion du réseau.


     
    2. Procédé selon la revendication 1, le procédé comprenant en outre :

    la réception, par le dispositif de réseau, d'un paquet de routage diffusé dans le réseau, le paquet de routage comprenant l'adresse de destination et un troisième nombre de sauts de routeurs de segments de réseau, dans chaque segment de réseau traversé pendant la diffusion de l'extrémité de destination vers le dispositif de réseau ;

    l'obtention, par le dispositif de réseau, d'un quatrième nombre de sauts du dispositif de réseau vers un dispositif de périphérie sur la base d'une topologie de réseau d'un segment de réseau dans lequel se trouve le dispositif de réseau, une somme du troisième nombre de sauts de routeurs de segment de réseau dans chaque segment de réseau et le quatrième nombre de sauts plus 1 donne le deuxième nombre de sauts de routeurs du dispositif de réseau vers l'extrémité de destination ; et le stockage de la relation de mappage entre l'adresse de destination et le deuxième nombre de sauts de routeurs, le dispositif de périphérie étant le dernier dispositif, dans le segment de réseau dans lequel le dispositif de réseau est situé, traversé lorsque le paquet de données est envoyé à partir du segment de réseau dans lequel le dispositif de réseau est situé à l'extrémité de destination.


     
    3. Dispositif de réseau (50, 400) configuré pour réaliser l'un des procédés selon les revendications 1 à 2.
     




    Drawing












    REFERENCES CITED IN THE DESCRIPTION



    This list of references cited by the applicant is for the reader's convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard.

    Patent documents cited in the description