WO2023005927A1 - Srv6-based tunnel quality measurement method and related apparatus - Google Patents

Srv6-based tunnel quality measurement method and related apparatus Download PDF

Info

Publication number
WO2023005927A1
WO2023005927A1 PCT/CN2022/107929 CN2022107929W WO2023005927A1 WO 2023005927 A1 WO2023005927 A1 WO 2023005927A1 CN 2022107929 W CN2022107929 W CN 2022107929W WO 2023005927 A1 WO2023005927 A1 WO 2023005927A1
Authority
WO
WIPO (PCT)
Prior art keywords
network device
detection message
tunnel
detection
list path
Prior art date
Application number
PCT/CN2022/107929
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 WO2023005927A1 publication Critical patent/WO2023005927A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/087Jitter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks

Definitions

  • the present application relates to the communication field, in particular to a tunnel quality detection method and a related device based on Internet Protocol Version 6 Segment Routing SRv6.
  • SRv6 is a segment routing (segment routing, SR) technology based on Internet protocol version 6 (IPv6) technology. Specifically, by adding one or more IPv6-based segment lists ( segment list) to implement the routing of data packets. After the SRv6-based tunnel is created, the service-level agreement (service-level agreement, SLA) quality of the tunnel needs to be detected, but currently there is no effective means to detect the SLA quality of the tunnel.
  • SLA service-level agreement
  • Embodiments of the present application provide an SRv6-based tunnel quality detection method and a related device for detecting the SLA quality of a tunnel.
  • the first aspect of the present application provides an SRv6-based tunnel quality detection method.
  • the first network device generates a first detection message, wherein the first detection message carries the first list path and the second The segment list path, the first segment list path is used to represent the first tunnel, the second segment list path is used to represent the second tunnel, the first tunnel is the tunnel from the first network device to the second network device, and the second tunnel is the tunnel from the A tunnel from the second network device to the first network device.
  • the first detection packet will be sent to the second network device according to the first list path, and then returned to the first network device according to the second list path. Since the first network device monitors the first detection packet after sending it, when the first network device receives the first detection packet, it can detect the SLA quality of the first tunnel and the second tunnel.
  • the SLA quality includes packet loss rate, delay and jitter.
  • the first network device may send multiple detection packets, these detection packets have the same quintuple (or the same quintuple and session identifier), and the first detection packet includes the multiple a detection message. After receiving the first detection packets, the first network device checks the number of the received first detection packets to determine the packet loss rate.
  • the first network device sends the first detection message through the tunnel interface of the first tunnel, and the first tunnel is a tunnel created according to the first segment list path, so as to ensure that the SLA quality of the first tunnel can be detected .
  • the first segment of the list path and the second segment of the list path share forward and reverse paths, so as to more accurately detect the SLA quality of the specified tunnel.
  • the first network device receives the first detection message, and the first network device determines the first detection message according to the receiving time point of receiving the first detection message and the sending time stamp of the first detection message.
  • the two-way delay of the document can be used to calculate the delay in the SLA quality.
  • the two-way delay of the first detection packet the receiving time point of the first detection packet ⁇ the sending timestamp of the first detection packet.
  • Jitter is delay jitter, which is used to characterize the variation of delay.
  • the first network device may determine the jitter of the first tunnel or the second tunnel according to the delay (or two-way delay).
  • the first network device receives the second detection message, and obtains the session identifier and the quintuple of the second detection message, if the session identifier and the quintuple of the second detection message are the same as the first detection message If the session identifier and the quintuple of the packets are the same, the first network device determines whether the second detection packet is the first detection packet, so as to determine whether the first detection packet is received.
  • the first detection message is a TWAMP message and takes effect
  • TWAMP is configured and takes effect in the first network device
  • TWAMP is not configured or takes effect in the second network device, that is, one-armed TWAMP
  • the first detection report In the header of the message, the first list path and the second list path are pushed successively, and the destination address of the first detection message is the local address of the first network device. Since TWAMP only needs to be configured on the first network device, There is no need to configure TWAMP on the second network device, the configuration is simpler, and the feasibility is improved.
  • the second-segment list path is compressed in a binding segment identifier (binding segment identifier, BSID), so that the forwarded first detection message is smaller and the bandwidth requirement is reduced.
  • binding segment identifier binding segment identifier
  • the expansion manner of the BSID is an encapsulation (encaps) manner or an insertion (insert) manner, so that the second network device can acquire the information of the second segment list path in the BSID.
  • the way of encaps is to use the current first detection message as the payload, thereby encapsulating to obtain a new first detection message, and then in the new first detection message, push the first value in the BSID.
  • Two-part list path Two-part list path.
  • the method of insert is to directly expand on the position of BSID on the basis of the current first detection message to obtain a new first detection message, and then in the new first detection message, the first The second-segment list path is inserted directly on the first-segment list path.
  • the first detection message is a TWAMP message
  • TWAMP is configured and effective in the first network device and the first network device
  • the first segment list path is pushed in the header of the first detection message
  • the second list path is carried in the payload of the first detection message
  • the second network device can obtain the information of the second list path from the load, and return the first detection message according to the second list path, thereby realizing Detect the SLA quality of the first tunnel and the second tunnel.
  • the present application provides a network device, where the network device is specifically a first network device, and the first network device is configured to perform the method described in any possible implementation manner of the foregoing first aspect.
  • the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes any possible implementation of the above-mentioned first aspect. method described in the method.
  • the fourth aspect of the present application provides a computer program product, the computer program product includes computer-executable instructions, and the computer-executable instructions are stored in a computer-readable storage medium; at least one processor of the device can read the computer-readable storage medium.
  • the computer executes the instruction, and at least one processor executes the computer-executed instruction to make the device implement the method provided by the above first aspect or any possible implementation manner of the first aspect.
  • a fifth aspect of the present application provides a network device, where the network device may include at least one processor, a memory, and a communication interface. At least one processor is coupled with memory and a communication interface. The memory is used to store instructions, at least one processor is used to execute the instructions, and the communication interface is used to communicate with other network devices under the control of the at least one processor. When executed by at least one processor, the instruction causes at least one processor to execute the method in the first aspect or any possible implementation manner of the first aspect.
  • a sixth aspect of the present application provides a system-on-a-chip, where the system-on-a-chip includes a processor, configured to support a first network terminal to implement the functions involved in the first aspect or any possible implementation manner of the first aspect.
  • the chip system may further include a memory, and the memory is used to store necessary program instructions and data of the first network terminal.
  • the system-on-a-chip may consist of chips, or may include chips and other discrete devices.
  • FIG. 1 is a schematic diagram of a system architecture involved in an embodiment of the present application
  • Figure 2-2 is a schematic diagram of the forwarding process of the first detection message among ACC, MC1, P1 and PE3;
  • Figure 2-3 is another schematic diagram of the forwarding process of the first detection message among ACC, MC1, P1 and PE3;
  • Figure 2-4 is another schematic diagram of the forwarding process of the first detection message among ACC, MC1, P1 and PE3;
  • Figure 2-5 is another schematic diagram of the forwarding process of the first detection message among ACC, MC1, P1 and PE3;
  • Figure 2-6 is another schematic diagram of the forwarding process of the first detection message among ACC, MC1, P1 and PE3;
  • Figure 2-7 is another schematic diagram of the forwarding process of the first detection message among ACC, MC1, P1 and PE3;
  • FIG. 3 is a schematic structural diagram of a network device provided in an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • Embodiments of the present application provide an SRv6-based tunnel quality detection method and a related device for detecting the SLA quality of a tunnel.
  • FIG. 1 shows a schematic diagram of a system architecture involved in an embodiment of the present application.
  • the system architecture includes a communication network 100, and at least two user equipments communicatively connected to the communication network 100.
  • the at least two user equipments any two user equipments can transmit service reports through the communication network 100. arts.
  • the at least two user equipments include user equipments 200-500 (that is, user equipment 200, user equipment 300, user equipment 400, and user equipment 500), and the user equipment 200 communicates to the user through the communication network 100
  • the device 300 transmits service packets as an example for description, that is, the user equipment 200 is used as a sending device and the user equipment 300 is a receiving device as an example for description.
  • a communication network 100 includes a controller 101 and a plurality of network devices communicatively connected to the controller 101 , and the network devices are used to forward service packets under the control of the controller 101 .
  • the multiple network devices may include an ingress device, an egress device, and at least one transit device between the ingress device and the egress device.
  • the multiple network devices include network devices 102-114 (that is, network device 102, network device 103, network device 104, network device 105, network device 106, network device 107, network device 108 , network equipment 109, network equipment 110, network equipment 111, network equipment 112, network equipment 113 and network equipment 114), user equipment 200 and user equipment 300 are communicatively connected with network equipment 102 in the communication network 100, user equipment 400 and The communication connection between the user equipment 500 and the network device 113 in the communication network 100 is described as an example.
  • the network device 102 may be an ingress device
  • the network device 113 may be an egress device
  • the network devices 103-113 may be transit devices .
  • network devices are also called network nodes, gateway devices, routing nodes or routing devices, etc.
  • entrance devices are also called head nodes
  • exit devices are also called tail nodes
  • transit devices are also called transit nodes or intermediate nodes.
  • the network device 102 and the network device 114 may be customer edge routers (customer edge, CE), wherein the network device 102 is CE1, and the network device 114 is CE2.
  • the network device 103 can be an access router (access router, ACC); the network device 103 and the network device 104 can be an aggregation router (aggregation router, AGG), wherein, the network device 103 is AGG1, and the network device 104 is AGG2; network equipment 105 and network equipment 106 can be metro core routers (metro core router, MC), wherein, network equipment 105 is MC1, and network equipment 106 is MC2; Network equipment 107 and network equipment 108 can be operator edge Router (provider edge router, PE), wherein, network equipment 107 is PE1, and network equipment 108 is PE2; Network equipment 109 and network equipment 110 can be backbone router (provider router, P), wherein, network equipment 109 is P1, and the network device 110 is P2; the network device 111 and the network device 112 may
  • the controller 101 is the brain of the future cloud network, integrating functions such as network management, service control, and network analysis, and is the core enabling system for realizing network resource pooling, network connection automation and self-optimization, and operation and maintenance automation.
  • the controller 101 may be a functional module deployed in a server, or a server, or a server cluster composed of several servers, or a cloud computing service center, which is not limited in this embodiment of the present application.
  • a server also called a server, is a device that provides computing services. Since the server needs to respond to service requests and process them to provide reliable services, generally speaking, the server should have the ability to undertake and guarantee services. The server needs to have strong processing capabilities, high stability, high reliability, and high security.
  • the server may be an x86 server, and an x86 server is also called a complex instruction set computer (CISC) architecture server, which is commonly referred to as a personal computer (personal computer, PC) server, which is Based on the PC architecture, use Intel (intel) or other processor chips compatible with the x86 instruction set and the server of the Windows operating system.
  • CISC complex instruction set computer
  • each network device in the network devices 102-114 can be a switch or a router (router) and other devices used to forward service packets in a communication network, and the network devices 102-114 can be the same network device, for example, a network All of the devices 102-114 may be routers, or, the network devices 102-114 may be different network devices, for example, some of the network devices 102-114 are routers, and the other part is a switch.
  • a router is a hardware device that connects two or more communication networks, and acts as a gateway between communication networks. The router can read the destination address in the business message and decide how to transmit the service message according to the destination address.
  • Dedicated intelligent network equipment; routers can understand different protocols, such as the Ethernet protocol used by a local area network, the transmission control protocol/internet protocol (transmission control protocol/internet protocol, TCP/IP) protocol used by the Internet, etc., so that the router It can analyze the destination addresses of business messages from various types of networks, convert non-TCP/IP addresses into TCP/IP addresses, or vice versa; and then route each business message according to the optimal transmission path according to the selected routing algorithm Send to the destination address, so the router can connect the non-TCP/IP network to the Internet.
  • the communication connection between the controller 101 and each network device is shown in the form of dotted double arrows in FIG. 1, and, in some scenarios, the implementation of this application
  • the transmission path mentioned in the example may also be called a communication link, a communication path, a communication tunnel or a tunnel path, and the like.
  • each of the user equipments 200-500 may be a communication device having a wireless communication function, for example, each of the user equipments 200-500 may be a desktop computer, an Internet of Things (Internet of Things, IoT) device etc., and the user equipments 200-500 may be the same communication equipments, for example, the user equipments 200-500 may all be desktop computers, or the user equipments 200-500 may be different communication equipments, for example, the user equipments 200-500 may be One part is a desktop computer and the other part is an IoT device.
  • IoT Internet of Things
  • the communication network 100 in the system architecture shown in FIG. 1 is only used as an example, and is not used to limit the technical solution of the embodiment of the present application.
  • the communication network may also include other devices, and can be based on Required to configure the number of network devices.
  • SRv6 is a segment routing (segment routing, SR) technology based on Internet protocol version 6 (IPv6) technology. Specifically, by adding one or more IPv6-based segment lists ( segment list) to implement the routing of data packets. Specifically, the routing mode of the SRv6-based data packet is described in detail in the following steps 201-208, and will not be repeated here.
  • IPv6 Internet protocol version 6
  • Each network device in the communication network shown in FIG. 1 is configured with SRv6, and a tunnel can be created based on SRv6.
  • a tunnel can be created based on SRv6.
  • the above two tunnels can be active and standby for each other to achieve load sharing.
  • After the tunnel is created it is necessary to detect the service level agreement (service-level agreement, SLA) quality of the tunnel.
  • SLA service-level agreement
  • the SLA quality may include packet loss rate, delay and jitter.
  • the detection methods for SLA quality include bidirectional forwarding detection (bidirectional forwarding detection, BFD), in-situ flow information telemetry (IFIT), and two-way active measurement protocol (TWAMP). wait.
  • BFD bidirectional forwarding detection
  • IFIT in-situ flow information telemetry
  • TWAMP two-way active measurement protocol
  • the current BFD can only detect the continuity of the tunnel, but cannot measure the SLA quality of the tunnel.
  • the current IFIT and TWAMP can only detect the SLA quality based on the service, but cannot detect the SLA quality of the tunnel. For example, if a certain network device in the tunnel fails, if the current IFIT and TWAMP are used, the data packet will select another tunnel to send the data packet to the destination network device. To sum up, currently there is no corresponding technical solution for detecting the SLA quality of the tunnel.
  • this application proposes an SRv6-based tunnel quality detection method.
  • the first network device generates the first detection message, wherein the first detection message carries the first list path and the second list path, and the first list path is used to represent the first tunnel , the second segment list path is used to represent the second tunnel, the first tunnel is a tunnel from the first network device to the second network device, and the second tunnel is a tunnel from the second network device to the first network device. Then, after the first network device sends the first detection packet, the first detection packet will be sent to the second network device according to the first list path, and then returned to the first network device according to the second list path. Since the first network device monitors the first detection packet after sending it, when the first network device receives the first detection packet, it can detect the SLA quality of the first tunnel and the second tunnel.
  • the first detection message may be a TWAMP-based detection message or an IFIT-based detection message, which is not limited here.
  • description is made by taking the first detection packet as a TWAMP-based detection packet as an example.
  • FIG. 2-1 is the specific implementation steps of an SRv6-based tunnel quality detection method proposed in this application. This method can be applied to the communication network 100 shown in FIG. 1 , and the communication network 100
  • the multiple network devices include a first network device and a second network device, and at least one transit device between the first network device and the second network device.
  • the first network device and the second network device can be any two non-adjacent network devices in the communication network 100.
  • ACC in FIG. 1 is used as the first network device
  • PE3 is used as the second network device.
  • Network equipment is taken as an example for description.
  • the method may include the following steps:
  • the first network device configures TWAMP.
  • TWAMP may be configured on both the first network device and the second network device, which is referred to as bilateral TWAMP hereinafter.
  • a TWAMP module (physical or virtual) is built in the first network device (or, the first network device and/or the second network device), and a TWAMP instance can be created through the TWAMP module.
  • the first network device generates a first detection packet.
  • the first detection message includes a load (payload), a source address (source address, SA), a destination address (destination address, DA) and an SRv6-based segment routing header (segment routing header, SRH), Each will be described below.
  • the payload in the first detection message may not carry any valid information, and may also carry other necessary information. information, not limited here. For example, the information carried in the payload of the first detection packet is "00000000". In some possible implementation manners, if both the first network device and the second network device are configured with TWAMP and take effect, the payload of the first detection message may carry the information of the second list path.
  • the SA and DA of the first detection packet are both set to the local address of the first network device.
  • the values of SA and DA are both IPv6 addresses. For example, if the local address of the first network device is 1::1, then both SA and DA can be set to 1::1, then before the stack segment list is pushed, the first detection message can be as shown in Table 1 below:
  • 1::1 is the IPv6 address used by the first network device to advertise the route.
  • the SRH based on SRv6 includes a segment left (segment left, SL) and multiple segment lists (segment lists), and the value of the segment list can be an IPv6 address of a network device or a link.
  • the segment list in the scenario of the one-armed TWAMP, includes a first segment list path and a second segment list path.
  • the segment list In the scenario of bilateral TWAMP, the segment list only includes the path in the first segment list, and the payload of the first detection message carries information about the path in the second segment list.
  • multiple segment lists may include a first segment list path and a second segment list path, and the first segment list path is the path from the first network device to the second network device The path, the second segment list path is a path from the second network device to the first network device, wherein the first segment list path is used to represent the first tunnel, and the second segment list path is used to represent the second tunnel.
  • the first list path is "MC1->P1->PE3" or “MC2->P1->PE3"
  • the first tunnel represented is "ACC->MC1->P1- >PE3" or "ACC->MC2->P1->PE3”
  • the second list path is "MC1->P1->ACC” or "MC2->P1->ACC”
  • the second tunnel represented is "PE3->P1->MC1->ACC” or "PE3->P1->MC2->ACC".
  • the first segment of the list path and the second segment of the list path may share forward and reverse paths.
  • the first list path is "MC1->P1->PE3”
  • the first tunnel represented is “ACC->MC1->P1->PE3”
  • the second list path is "MC1->P1 ->ACC”
  • the first list path is "MC2->P1->PE3”
  • the first tunnel represented is "ACC->MC2->P1->PE3”
  • the second list path is "MC2->P1 ->ACC"
  • the second tunnel represented by "PE3->MC2->P1->ACC the second tunnel represented by "PE3->MC2->P1->ACC.
  • first tunnel represented by the path in the first segment of the list and the second tunnel represented by the path in the second segment of the list may be created in advance.
  • first list path or the second list path can be a strict path, a loose path, or a mixed strict and loose path, which is not limited here.
  • Forwarding between two adjacent network devices in the first segment list path or the second segment list path can be implemented through policies, or through best-effort (best effect, BE) forwarding, which is not limited here.
  • the first network device when the first network device generates the first detection packet, it may successively push the first segment list path and the second segment list path in the header of the first detection packet.
  • the IPv6 address pushed first will be read first, and the IPv6 address pushed later will be read last.
  • the first detection message shown in Table 1 the first list path and the second list path are successively pushed, and the first detection message may be as shown in Table 2 below:
  • the first segment list path includes multiple segment lists: MC1.END, P1.END, and PE3.END.
  • the second list path includes multiple segment lists: PE3.END, P1.END, MC1.END, and 1::1.
  • SL is used to indicate which segment list is currently pointed to.
  • ACC::1 represents the IPv6 address that needs to be filled in SA when encapsulating the first detection message based on SRv6 address.
  • ACC::1 can take the value 1::1.
  • .END represents a type of segment identifier (SID), and represents an IPv6 address of a network device.
  • SID segment identifier
  • MC1.END indicates the IPv6 address of MC1
  • PE3.END indicates the IPv6 address of PE3.
  • a segment list includes a SID.
  • the second segment list path is compressed onto a binding segment identifier (BSID).
  • BSID represents a type of segment identifier (SID), which represents a SID with specific information built in.
  • the BSID may be an index, and the network device may query corresponding information according to the index (for example, the information of the BSID corresponding to the second segment list path). For example, the information corresponding to a BSID is published on the network by flooding in advance, then the network device can save the BSID information, and when receiving the BSID, it can be obtained from the stored information.
  • the network device may also query the network controller for information corresponding to the BSID, which is not limited here.
  • encaps or insert the manner of encaps or insert, and the forwarding process of the first detection message will be described in detail in the following steps 205-207, and will not be repeated here.
  • any continuous IPv6 addresses of multiple network devices shown in Table 2 can be compressed into one BSID, which is not limited here.
  • BSID then update the pointing of the value of SL to obtain the first detection message shown in Table 4:
  • P1.END and MC1 are obtained by reading PE3.BSID.
  • the value of END, the expansion mode of PE3.BSID can be encaps or insert, which will be described in step 206 below.
  • the SRH may include the first list path, and carry the information of the second list path through the payload.
  • the first network device when the first network device generates the first detection packet, it only needs to push the first segment of the list path in the first detection packet, and then carry the information of the second segment of the list path in the payload.
  • the second network device receives the first detection message, it obtains the information of the second list path from the payload, then pushes the second list path into the first detection message, and forwards it to the first detection message.
  • a detection message is a detection message.
  • the first network device sets the DA of the first detection message as the IPv6 address of the second network device, such as 1::2, then before pushing the stack segment list, the first detection message can be as shown in Table 6 below :
  • the first network device when the first network device generates the first detection message, it pushes the first list path in the header of the first detection message.
  • the first list path is pushed, and the first detection message can be as shown in Table 7 below:
  • the second list path may be carried in the payload, including the IPv6 addresses of PE3, P1, and ACC.
  • DA is set to 1::2.
  • PE3 the second network device
  • the DA is changed to the IPv6 address of MC1, represented by MC1.END.
  • any consecutive IPv6 addresses of multiple network devices as shown in Table 7 can be compressed into one BSID. I won't go into details.
  • the first detection message may also carry a quintuple (source network protocol (internet protocol, IP) address, source port, destination IP address, destination port and transport layer protocol).
  • a quintuple source network protocol (internet protocol, IP) address, source port, destination IP address, destination port and transport layer protocol.
  • the first detection message can also carry a session identifier (session id), then when the five-tuple and the session identifier of the two detection messages are the same, they can be regarded as belonging to the same TWAMP instance . Then, when the quintuples of two detection messages are different but the session IDs are the same, or when the quintuples of two TWAMP-based detection messages are the same but the session IDs are different, they are also regarded as belonging to two different sessions. TWAMP instance. Then, by setting the session identifier, let all TWAMP instances use the same source port number or the same destination port number, thereby saving the use of port numbers.
  • session id session identifier
  • the first network device sends a first detection packet.
  • the first detection packet may include multiple detection packets, and these detection packets have the same quintuple (or have the same quintuple and session identifier).
  • a sending timestamp may be added to the first detection packet.
  • the first network device may continuously send a plurality of detection packets in the first detection packet in a short period of time, for example, 10 within 1 second, or may send the detection packets in the first detection packet at regular intervals. Multiple detection packets, for example, one detection packet is sent every 0.1 seconds.
  • the sending time stamp is used to calculate the delay.
  • the sending time point in the first detection message can be determined by receiving the first detection message. Timestamp, calculate the time delay of the first detection message.
  • the tunnel identifier can be obtained, and the first network device can allocate a tunnel interface for the first tunnel.
  • the first network device sends the first detection packet through the tunnel interface of the first tunnel.
  • the first network device monitors the first detection packet.
  • the first network device after the first network device sends the first detection message, it can monitor the first detection message.
  • two detection packets belonging to the same TWAMP instance are regarded as the same detection packets. For example, if the quintuples of the two detection packets are the same, they are regarded as belonging to the same TWAMP instance, that is, they are regarded as the same detection packets. Or, if the quintuples and session identifiers of the two detection packets are the same, they are considered to belong to the same TWAMP instance, that is, they are regarded as the same detection packets.
  • the first network device when the first network device receives the second detection message, if the DA of the second detection message is the local address of the first network device, further obtain the quintuple of the second detection message, and The group query calculation is published to determine whether the second detection packet is a TWAMP packet. If there is a hit in the calculation table, it is determined that the second detection packet is a TWAMP packet. Next, the first network device obtains the session identifier of the second detection message, and then queries the corresponding session table of the TWAMP according to the session identifier. If a specific TWAMP instance is hit, and the first detection packet belongs to the TWAMP instance, then it is determined that the second detection packet is regarded as the first detection packet.
  • the second network device receives the first detection packet.
  • FIG. 2-2 it is a schematic diagram of the forwarding process of the first detection message between the first network device (ACC), MC1, P1 and the second network device (PE3).
  • FIG. 1 there may be two paths from the first network device (ACC) to MC1, one is ACC->AGG1->MC1, and the other is ACC->AGG2->MC2->MC1.
  • the first network device (ACC) may select one of the paths, for example, ACC->AGG1->MC1 is selected.
  • PE3 is the next destination network device. Then, P1 forwards the first detection packet to PE3. It can be known from FIG. 1 that PE3 is a network device adjacent to P1, and P1 directly forwards the first detection message to PE3 through a corresponding interface. In some possible implementation manners, if the link between PE3 and P1 fails, PE3 may also forward the first detection packet to P1 through the standby link.
  • the second network device (PE3) receives the first detection message. It should be noted that if the SLA quality of the tunnel is poor, packet loss may occur in each step of the above process. If packet loss occurs, the first detection packet cannot be sent to the second network device (PE3). In some possible implementation manners, since the first detection packet is a UDP packet, if packet loss occurs, retransmission will not be performed.
  • the forwarding process of the first detection message in Table 3 is shown in Figure 2-3, which is similar to the above forwarding process and will not be repeated here.
  • the forwarding process of the first detection message in Table 4 or 5 is similar to the forwarding process of the first detection message in Table 2 or Table 3, and will not be repeated here.
  • the processing method of the BSID in the first detection message with the BSID shown in Table 4 or 5 please refer to the following step 206, which will not be repeated here.
  • the second network device forwards the first detection packet according to the second list path.
  • the second network device after receiving the first detection packet, forwards the first detection packet according to the second list path.
  • the method for forwarding the first detection packet by the second network device in the scenarios of the one-armed TWAMP and the bilateral TWAMP is described respectively below.
  • FIG. 2-4 it is a schematic diagram of the forwarding process of the first detection message between the second network device (PE3), P1, MC1 and the first network device (ACC).
  • the first network device (ACC) receives the first detection message. It should be noted that if the SLA quality of the tunnel is poor, packet loss may occur in each step of the above process. If packet loss occurs, the first detection packet cannot be sent to the first network device (ACC).
  • PE3.BSID indicates the second list path
  • the second network device (PE3) can expand PE3.BSID to obtain the information of the second list path.
  • the second network device (PE3) may be expanded by means of encapsulation (encaps) or insertion (insert). The following describes the encaps method or insert method respectively.
  • the way of encaps is to use the current first detection message as the payload, thereby encapsulating to obtain a new first detection message, and then in the new first detection message, push the first value in the BSID.
  • Two-part list path Exemplarily, as shown in FIG. 2-5 , it is a schematic diagram of the forwarding process of the first detection message between the second network device (PE3), P1, MC1 and the first network device (ACC).
  • the load in the first detection message as shown in Table 9 is the first detection message as shown in Table 8
  • the first detection message as shown in Table 10 is obtained:
  • PE3 forwards the first detection packet to P1.
  • P1 is a network device adjacent to PE3, and PE3 directly forwards the first detection message to P1 through a corresponding interface.
  • PE3 may also forward the first detection packet to P1 through the standby link.
  • MC1 when MC1 sends the first detection message to the first network device (ACC), MC1 executes the ultimate segment pop of the SRH (USP) at the last hop, and obtains the information shown in Table 11.
  • the first detection message :
  • MC1.END is used as the PSP mode as an example, that is, MC1 forwards the first detection message shown in Table 12 to the first network device (ACC).
  • MC1 sends the first detection message to the first network device (ACC)
  • MC1.END is no PSP mode, then MC1 does not need to strip the SRH of the first detection message, that is, it is forwarded to the first network device (ACC) ), that is, the first detection message shown in Table 11.
  • the first network device (ACC) receives the first detection message. It should be noted that if the SLA quality of the tunnel is poor, packet loss may occur in each step of the above process. If packet loss occurs, the first detection packet cannot be sent to the first network device (ACC). Similarly, the forwarding process of the first detection message in Table 4 and Table 5 is similar to the above forwarding process, and will not be repeated here.
  • the method of insert is to directly expand on the position of BSID on the basis of the current first detection message to obtain a new first detection message, and then in the new first detection message, the first The second-segment list path is inserted directly on the first-segment list path.
  • FIG. 2-6 it is a schematic diagram of the forwarding process of the first detection message between the second network device (PE3), P1, MC1 and the first network device (ACC).
  • PE3 second network device
  • P1, MC1 the first network device
  • ACC the first network device
  • MC1.END If MC1.END is in PSP mode, then MC1 strips the SRH of the first detection message to obtain the first detection message shown in Table 12, and then forwards it to the first network device (ACC).
  • ACC the first network device
  • MC1 sent the first detection message to the first network equipment (ACC) if MC1.END was the reciprocal no PSP pattern, then MC1 did not need to strip the SRH of the first detection message, that is, forwarded to the first network equipment ( ACC), that is, the first detection message shown in Table 15:
  • the first network device (ACC) receives the first detection message. It should be noted that if the SLA quality of the tunnel is poor, packet loss may occur in each step of the above process. If packet loss occurs, the first detection packet cannot be sent to the first network device (ACC).
  • the encaps manner or the insert manner is used, and the second network device (PE3) can decide by itself.
  • the method of using encaps or insert may also be determined in the first detection message.
  • the way to use encaps or the way to insert can also be determined by the controller.
  • the second network device (PE3) inquires the controller to determine the way to use encaps or the way to insert . It is not limited here.
  • FIG. 2-7 it is a schematic diagram of the forwarding process of the first detection message between the second network device (PE3), P1, MC1 and the first network device (ACC).
  • the first detection message is as shown in Table 7, then when the second network device (PE3) receives the first detection message, it obtains the information of the second list path from the load of the first detection message: "P1 ->MC1->ACC", and then the second network device can generate the first detection message as shown in Table 16:
  • the second network device (PE3) forwards the first detection packet to P1, P1 forwards the first detection packet to MC1 according to the SRH, and MC1 forwards the first detection packet to the ACC according to the SRH.
  • the specific process of forwarding the first detection message among the second network device (PE3), P1, MC1 and ACC is similar to the foregoing content, and will not be repeated here.
  • any segment in the second list path can be compressed into the BSID, and then for any network device that receives the first detection message, if the value of SL points to the BSID, the BSID is expanded, and the expanded path information is used to The first detection packet is forwarded.
  • the specific way of expanding the BSID (the way of encaps or the way of insert) and the corresponding forwarding method are similar to the foregoing content, and will not be repeated here.
  • the first network device receives the first detection packet.
  • the first network device obtains the quintuple (or quintuple and session identifier) in the received detection message, and determines that the first detection message is received according to the quintuple (or quintuple and session identifier) .
  • the first network device detects the SLA quality of the first tunnel and the second tunnel.
  • the SLA quality includes packet loss rate, delay and jitter. Each will be described below.
  • the first network device may send multiple detection packets, these detection packets have the same quintuple (or the same quintuple and session identifier), and the first detection packet includes the multiple a detection message.
  • the first network device After receiving the first detection packets, the first network device checks the number of the received first detection packets to determine the packet loss rate. For example, the first network device sends 100 first detection packets, and if 99 first detection packets are received, it is determined that the packet loss rate is 1%.
  • the first network device may send multiple first detection packets multiple times, and then calculate the packet loss rate each time, and then take an average value to obtain a relatively accurate packet loss rate.
  • the first network device determines the two-way delay of the first detection packet according to the receiving time point of receiving the first detection packet and the sending timestamp of the first detection packet.
  • the Two-way delay receiving time point of the first detection message - sending time stamp of the first detection message.
  • the jitter is the delay jitter, which is used to characterize the variation of the delay.
  • the first network device may determine the jitter of the first tunnel or the second tunnel according to the delay (or two-way delay).
  • a network device 300 provided by an embodiment of the present application is used as a first network device and may include: a transceiver module 301 and a processing module 302 . in,
  • the processing module 302 is configured to generate a first detection message, the first detection message carries a first list path and a second list path, the first list path is used to represent the first tunnel, and the second list path is used for To characterize the second tunnel, the first tunnel is a tunnel from the first network device to the second network device, and the second tunnel is a tunnel from the second network device to the first network device.
  • a transceiver module 301 configured to send a first detection message.
  • the transceiver module 301 is also configured to monitor the first detection message.
  • the transceiver module 301 is specifically configured to: send the first detection packet through the tunnel interface of the first tunnel, where the first tunnel is a tunnel created according to the first segment list path.
  • the first segment of the list path and the second segment of the list path share forward and reverse paths.
  • the transceiver module 301 is further configured to receive the first detection message.
  • the processing module 302 is further configured to determine the two-way delay of the first detection message according to the receiving time point of receiving the first detection message and the sending timestamp of the first detection message.
  • the transceiver module 301 is further configured to receive the second detection message.
  • the processing module 302 is further configured to acquire the session identifier and the quintuple of the second detection message.
  • the processing module 302 is further configured to determine that the second detection packet is the first detection packet if the session identifier and quintuple of the second detection packet are the same as the session identifier and quintuple of the first detection packet.
  • the first detection message is a TWAMP message and takes effect
  • TWAMP is configured and takes effect in the first network device
  • TWAMP is not configured or takes effect in the second network device.
  • the first detection message carries the first list path and the second list path, specifically including: the first list path and the second list path are successively pushed in the header of the first detection message, and the first detection message
  • the destination address of the file is the local address of the first network device.
  • the first detection packet is a TWAMP packet
  • TWAMP is configured and takes effect on the first network device and the first network device.
  • Carrying the first segment of the list path and the second segment of the list path in the first detection message includes: pushing the first segment of the list path in the header of the first detection message, and carrying the second segment in the payload of the first detection message list path.
  • the embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a program, and the program executes some or all of the steps described in the above method embodiments.
  • the network device 400 includes:
  • a receiver 401 , a transmitter 402 , a processor 403 and a memory 404 (the number of processors 403 in the network device 400 may be one or more, one processor is taken as an example in FIG. 4 ).
  • the receiver 401 , the transmitter 402 , the processor 403 and the memory 404 may be connected through a bus or in other ways, wherein connection through a bus is taken as an example in FIG. 4 .
  • the memory 404 may include read-only memory and random-access memory, and provides instructions and data to the processor 403 .
  • a part of the memory 404 may also include a non-volatile random access memory (non-volatile random access memory, NVRAM).
  • NVRAM non-volatile random access memory
  • the memory 404 stores operating systems and operating instructions, executable modules or data structures, or their subsets, or their extended sets, wherein the operating instructions may include various operating instructions for implementing various operations.
  • the operating system may include various system programs for implementing various basic services and processing hardware-based tasks.
  • the processor 403 controls the operation of the network device 400, and the processor 403 may also be called a central processing unit (central processing unit, CPU).
  • CPU central processing unit
  • various components of the network device 400 are coupled together through a bus system, where the bus system may include a power bus, a control bus, and a status signal bus in addition to a data bus.
  • the various buses are referred to as bus systems in the figures.
  • the methods disclosed in the foregoing embodiments of the present application may be applied to the processor 403 or implemented by the processor 403 .
  • the processor 403 may be an integrated circuit chip and has a signal processing capability. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 403 or an instruction in the form of software.
  • the above-mentioned processor 403 may be a general-purpose processor, a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or Other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
  • the storage medium is located in the memory 404, and the processor 403 reads the information in the memory 404, and completes the steps of the above method in combination with its hardware.
  • the receiver 401 can be used to receive input digital or character information, and generate signal input related to network equipment settings and function control.
  • the transmitter 402 can include a display device such as a display screen.
  • the transmitter 402 can be used to output digital data through an external interface. or character information.
  • the processor 403 is configured to execute the SRv6-based tunnel quality detection method executed by the foregoing network device 400 .
  • the network device when it is a chip, it includes: a processing unit and a communication unit, the processing unit may be, for example, a processor, and the communication unit may be, for example, an input/output interface, a pin or a circuit wait.
  • the processing unit may execute the computer-executed instructions stored in the storage unit, so that the chip in the terminal executes the method for sending wireless report information according to any one of the above-mentioned first aspects.
  • the storage unit is a storage unit in the chip, such as a register, a cache, etc.
  • the storage unit may also be a storage unit in the terminal located outside the chip, such as a read-only memory (read -only memory, ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM), etc.
  • ROM read-only memory
  • RAM random access memory
  • the processor mentioned above can be a general-purpose central processing unit, microprocessor, ASIC, or one or more integrated circuits for controlling the program execution of the above method.
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be A physical unit can be located in one place, or it can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • the connection relationship between the modules indicates that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.
  • the essence of the technical solution of this application or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, such as a floppy disk of a computer , U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the method described in each embodiment of the present application .
  • a computer device which can be a personal computer, a server, or a network device, etc.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server, or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • wired eg, coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless eg, infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that can be stored by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (Solid State Disk, SSD)), etc.

Abstract

Disclosed in the embodiments of the present application are an SRv6-based tunnel quality measurement method and a related apparatus, which are used for measuring the SLA quality of a tunnel. In the present application, a first network device generates a first test packet, wherein the first test packet carries a first segment list path and a second segment list path, the first segment list path is used for representing a first tunnel, the second segment list path is used for representing a second tunnel, the first tunnel is a tunnel from the first network device to a second network device, and the second tunnel is a tunnel from the second network device to the first network device. Thus, after the first network device sends the first test packet, the first test packet is sent to the second network device according to the first segment list path, and is then returned to the first network device according to the second segment list path. Since the first network device monitors the first test packet after sending same, the first network device can measure the SLA quality of the first tunnel and the second tunnel upon reception of the first test packet.

Description

一种基于SRv6的隧道质量检测方法和相关装置A SRv6-Based Tunnel Quality Detection Method and Related Devices
本申请要求于2021年7月29日提交中国专利局、申请号为202110864909.1、发明名称为“一种基于SRv6的隧道质量检测方法和相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110864909.1 and the title of the invention "An SRv6-Based Tunnel Quality Inspection Method and Related Devices" submitted to the China Patent Office on July 29, 2021, the entire contents of which are incorporated by reference incorporated in this application.
技术领域technical field
本申请涉及通信领域,尤其涉及一种基于互联网协议第6版分段路由SRv6的隧道质量检测方法和相关装置。The present application relates to the communication field, in particular to a tunnel quality detection method and a related device based on Internet Protocol Version 6 Segment Routing SRv6.
背景技术Background technique
SRv6是基于互联网协议第6版(internet protocol version 6,IPv6)技术实现的分段路由(segment routing,SR)技术,具体的,通过在数据报文中添加一个或多个基于IPv6的段列表(segment list),实现对数据报文的路由。当基于SRv6的隧道创建完成后,需要对隧道的服务水平协议(service-level agreement,SLA)质量进行检测,但是当前缺少有效手段检测隧道的SLA质量。SRv6 is a segment routing (segment routing, SR) technology based on Internet protocol version 6 (IPv6) technology. Specifically, by adding one or more IPv6-based segment lists ( segment list) to implement the routing of data packets. After the SRv6-based tunnel is created, the service-level agreement (service-level agreement, SLA) quality of the tunnel needs to be detected, but currently there is no effective means to detect the SLA quality of the tunnel.
发明内容Contents of the invention
本申请实施例提供了一种基于SRv6的隧道质量检测方法和相关装置,用于检测隧道的SLA质量。Embodiments of the present application provide an SRv6-based tunnel quality detection method and a related device for detecting the SLA quality of a tunnel.
本申请第一方面提供了一种基于SRv6的隧道质量检测方法,在本申请中,第一网络设备生成第一检测报文,其中,第一检测报文中携带第一段列表路径和第二段列表路径,第一段列表路径用于表征第一隧道,第二段列表路径用于表征第二隧道,第一隧道为从第一网络设备到第二网络设备的隧道,第二隧道为从第二网络设备到第一网络设备的隧道。那么,当第一网络设备发送第一检测报文后,第一检测报文会根据第一段列表路径发送到第二网络设备,然后根据第二段列表路径回到第一网络设备。由于第一网络设备发送第一检测报文后对其进行监听,当第一网络设备接收到第一检测报文时,即可对第一隧道和第二隧道的SLA质量进行检测。The first aspect of the present application provides an SRv6-based tunnel quality detection method. In this application, the first network device generates a first detection message, wherein the first detection message carries the first list path and the second The segment list path, the first segment list path is used to represent the first tunnel, the second segment list path is used to represent the second tunnel, the first tunnel is the tunnel from the first network device to the second network device, and the second tunnel is the tunnel from the A tunnel from the second network device to the first network device. Then, after the first network device sends the first detection packet, the first detection packet will be sent to the second network device according to the first list path, and then returned to the first network device according to the second list path. Since the first network device monitors the first detection packet after sending it, when the first network device receives the first detection packet, it can detect the SLA quality of the first tunnel and the second tunnel.
在一些可能的实现方式中,SLA质量包括丢包率、时延和抖动。In some possible implementations, the SLA quality includes packet loss rate, delay and jitter.
在一些可能的实现方式中,第一网络设备可以发送多个检测报文,这些检测报文具有相同的五元组(或相同的五元组和会话标识),第一检测报文包括该多个检测报文。第一网络设备接收到第一检测报文后,检查接收到的第一检测报文的数量,以确定丢包率。In some possible implementation manners, the first network device may send multiple detection packets, these detection packets have the same quintuple (or the same quintuple and session identifier), and the first detection packet includes the multiple a detection message. After receiving the first detection packets, the first network device checks the number of the received first detection packets to determine the packet loss rate.
在一些可能的实现方式中,第一网络设备通过第一隧道的隧道接口发送第一检测报文,第一隧道为根据第一段列表路径创建的隧道,从而保障可以检测第一隧道的SLA质量。In some possible implementation manners, the first network device sends the first detection message through the tunnel interface of the first tunnel, and the first tunnel is a tunnel created according to the first segment list path, so as to ensure that the SLA quality of the first tunnel can be detected .
在一些可能的实现方式中,第一段列表路径和第二段列表路径正反向共路,从而更准确地检测指定隧道的SLA质量。In some possible implementation manners, the first segment of the list path and the second segment of the list path share forward and reverse paths, so as to more accurately detect the SLA quality of the specified tunnel.
在一些可能的实现方式中,第一网络设备接收第一检测报文,第一网络设备根据接收到第一检测报文的接收时间点和第一检测报文的发送时戳确定第一检测报文的双向时延, 从而可以计算SLA质量中的时延。In some possible implementation manners, the first network device receives the first detection message, and the first network device determines the first detection message according to the receiving time point of receiving the first detection message and the sending time stamp of the first detection message. The two-way delay of the document can be used to calculate the delay in the SLA quality.
示例性的,第一检测报文的双向时延=第一检测报文的接收时间点–第一检测报文的发送时戳。抖动即时延抖动,用于表征时延的变化。Exemplarily, the two-way delay of the first detection packet=the receiving time point of the first detection packet−the sending timestamp of the first detection packet. Jitter is delay jitter, which is used to characterize the variation of delay.
在一些可能的实现方式中,第一网络设备可以根据时延(或双向时延)确定第一隧道或第二隧道的抖动。In some possible implementation manners, the first network device may determine the jitter of the first tunnel or the second tunnel according to the delay (or two-way delay).
在一些可能的实现方式中,第一网络设备接收第二检测报文,获取第二检测报文的会话标识和五元组,若第二检测报文的会话标识和五元组与第一检测报文的会话标识和五元组均相同,则第一网络设备确定第二检测报文为第一检测报文,以此判断是否接收到第一检测报文。In some possible implementations, the first network device receives the second detection message, and obtains the session identifier and the quintuple of the second detection message, if the session identifier and the quintuple of the second detection message are the same as the first detection message If the session identifier and the quintuple of the packets are the same, the first network device determines whether the second detection packet is the first detection packet, so as to determine whether the first detection packet is received.
当两个检测报文的五元组不同、而会话标识相同时,或者两个基于双向主动测量协议(two-way active measurement protocol,TWAMP)的检测报文的五元组相同、而会话标识不同时,同样视为分属两个不同的TWAMP实例。那么,通过设置会话标识,让所有TWAMP实例使用相同的源端口号或相同的目的端口号,从而节约了端口号的使用。When the quintuples of two detection messages are different but the session identifiers are the same, or the quintuples of two detection packets based on two-way active measurement protocol (TWAMP) are the same but the session identifiers are different At the same time, it is also regarded as belonging to two different TWAMP instances. Then, by setting the session identifier, let all TWAMP instances use the same source port number or the same destination port number, thereby saving the use of port numbers.
在一些可能的实现方式中,第一检测报文为TWAMP报文并生效,第一网络设备中配置且生效TWAMP,第二网络设备未配置或未生效TWAMP,即单臂TWAMP,第一检测报文的报头中先后压栈第一段列表路径和第二段列表路径,且第一检测报文的目的地址为第一网络设备的本机地址,由于仅需在第一网络设备上配置TWAMP,而无需在第二网络设备配置TWAMP,配置更简单,提高了可行性。In some possible implementations, the first detection message is a TWAMP message and takes effect, TWAMP is configured and takes effect in the first network device, TWAMP is not configured or takes effect in the second network device, that is, one-armed TWAMP, and the first detection report In the header of the message, the first list path and the second list path are pushed successively, and the destination address of the first detection message is the local address of the first network device. Since TWAMP only needs to be configured on the first network device, There is no need to configure TWAMP on the second network device, the configuration is simpler, and the feasibility is improved.
在一些可能的实现方式中,第二段列表路径压缩在绑定段标识(binding segment identifier,BSID)中,使得转发的第一检测报文更小,减轻对带宽的要求。In some possible implementation manners, the second-segment list path is compressed in a binding segment identifier (binding segment identifier, BSID), so that the forwarded first detection message is smaller and the bandwidth requirement is reduced.
在一些可能的实现方式中,BSID的展开方式为封装(encaps)方式或插入(insert)方式,从而实现将第二网络设备可以获取BSID中的第二段列表路径的信息。In some possible implementation manners, the expansion manner of the BSID is an encapsulation (encaps) manner or an insertion (insert) manner, so that the second network device can acquire the information of the second segment list path in the BSID.
需要说明的是,encaps的方式为以当前的第一检测报文作为负载,从而进行封装,得到新的第一检测报文,然后在新的第一检测报文中,压栈BSID中的第二段列表路径。It should be noted that the way of encaps is to use the current first detection message as the payload, thereby encapsulating to obtain a new first detection message, and then in the new first detection message, push the first value in the BSID. Two-part list path.
需要说明的是,insert的方式为在当前的第一检测报文的基础上,在BSID的位置上直接展开,得到新的第一检测报文,然后在新的第一检测报文中,第二段列表路径直接插入到第一段列表路径上。It should be noted that the method of insert is to directly expand on the position of BSID on the basis of the current first detection message to obtain a new first detection message, and then in the new first detection message, the first The second-segment list path is inserted directly on the first-segment list path.
在一些可能的实现方式中,第一检测报文为TWAMP报文,第一网络设备和第一网络设备中配置且生效TWAMP,第一检测报文的报头中压栈第一段列表路径,且在第一检测报文的负载中携带第二段列表路径,那么第二网络设备可以从负载中获取第二段列表路径的信息,并根据第二段列表路径返回第一检测报文,从而实现检测第一隧道和第二隧道的SLA质量。In some possible implementations, the first detection message is a TWAMP message, TWAMP is configured and effective in the first network device and the first network device, the first segment list path is pushed in the header of the first detection message, and The second list path is carried in the payload of the first detection message, then the second network device can obtain the information of the second list path from the load, and return the first detection message according to the second list path, thereby realizing Detect the SLA quality of the first tunnel and the second tunnel.
第二方面,本申请提供一种网络设备,所述网络设备具体为第一网络设备,所述第一网络设备用于执行前述第一方面中任一项可能的实现方式所述的方法。In a second aspect, the present application provides a network device, where the network device is specifically a first network device, and the first network device is configured to perform the method described in any possible implementation manner of the foregoing first aspect.
第三方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面中任一项可能的实现方式所述的方法。In a third aspect, the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes any possible implementation of the above-mentioned first aspect. method described in the method.
本申请第四方面提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中;设备的至少一个处理器可以从计算机可读存储介质读取该计算机执行指令,至少一个处理器执行该计算机执行指令使得设备实施上述第一方面或者第一方面的任一种可能的实现方式所提供的方法。The fourth aspect of the present application provides a computer program product, the computer program product includes computer-executable instructions, and the computer-executable instructions are stored in a computer-readable storage medium; at least one processor of the device can read the computer-readable storage medium. The computer executes the instruction, and at least one processor executes the computer-executed instruction to make the device implement the method provided by the above first aspect or any possible implementation manner of the first aspect.
本申请第五方面提供一种网络设备,该网络设备可以包括至少一个处理器、存储器和通信接口。至少一个处理器与存储器和通信接口耦合。存储器用于存储指令,至少一个处理器用于执行该指令,通信接口用于在至少一个处理器的控制下与其他网络设备进行通信。该指令在被至少一个处理器执行时,使至少一个处理器执行第一方面或第一方面的任意可能的实现方式中的方法。A fifth aspect of the present application provides a network device, where the network device may include at least one processor, a memory, and a communication interface. At least one processor is coupled with memory and a communication interface. The memory is used to store instructions, at least one processor is used to execute the instructions, and the communication interface is used to communicate with other network devices under the control of the at least one processor. When executed by at least one processor, the instruction causes at least one processor to execute the method in the first aspect or any possible implementation manner of the first aspect.
本申请第六方面提供了一种芯片系统,该芯片系统包括处理器,用于支持第一网络终端实现上述第一方面或第一方面任意一种可能的实现方式中所涉及的功能。A sixth aspect of the present application provides a system-on-a-chip, where the system-on-a-chip includes a processor, configured to support a first network terminal to implement the functions involved in the first aspect or any possible implementation manner of the first aspect.
在一种可能的设计中,芯片系统还可以包括存储器,存储器,用于保存第一网络终端必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。In a possible design, the chip system may further include a memory, and the memory is used to store necessary program instructions and data of the first network terminal. The system-on-a-chip may consist of chips, or may include chips and other discrete devices.
其中,第二至第六方面或者其中任一种可能实现方式所带来的技术效果可参见第一方面或第一方面不同可能实现方式所带来的技术效果,此处不再赘述。Wherein, the technical effects brought about by the second to sixth aspects or any one of the possible implementations may refer to the first aspect or the technical effects brought about by different possible implementations of the first aspect, which will not be repeated here.
附图说明Description of drawings
图1为本申请实施例所涉及的一种系统架构的示意图;FIG. 1 is a schematic diagram of a system architecture involved in an embodiment of the present application;
图2-1本申请提出了一种基于SRv6的隧道质量检测方法;Figure 2-1 This application proposes a tunnel quality detection method based on SRv6;
图2-2为ACC、MC1、P1和PE3之间对第一检测报文的转发过程示意图;Figure 2-2 is a schematic diagram of the forwarding process of the first detection message among ACC, MC1, P1 and PE3;
图2-3为ACC、MC1、P1和PE3之间对第一检测报文的转发过程的另一示意图;Figure 2-3 is another schematic diagram of the forwarding process of the first detection message among ACC, MC1, P1 and PE3;
图2-4为ACC、MC1、P1和PE3之间对第一检测报文的转发过程的另一示意图;Figure 2-4 is another schematic diagram of the forwarding process of the first detection message among ACC, MC1, P1 and PE3;
图2-5为ACC、MC1、P1和PE3之间对第一检测报文的转发过程的另一示意图;Figure 2-5 is another schematic diagram of the forwarding process of the first detection message among ACC, MC1, P1 and PE3;
图2-6为ACC、MC1、P1和PE3之间对第一检测报文的转发过程的另一示意图;Figure 2-6 is another schematic diagram of the forwarding process of the first detection message among ACC, MC1, P1 and PE3;
图2-7为ACC、MC1、P1和PE3之间对第一检测报文的转发过程的另一示意图;Figure 2-7 is another schematic diagram of the forwarding process of the first detection message among ACC, MC1, P1 and PE3;
图3为本申请实施例提供的一种网络设备的结构示意图;FIG. 3 is a schematic structural diagram of a network device provided in an embodiment of the present application;
图4为本申请实施例提供的一种网络设备的结构示意图。FIG. 4 is a schematic structural diagram of a network device provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请实施例提供了一种基于SRv6的隧道质量检测方法和相关装置,用于检测隧道的SLA质量。Embodiments of the present application provide an SRv6-based tunnel quality detection method and a related device for detecting the SLA quality of a tunnel.
下面结合附图,对本申请的实施例进行描述。Embodiments of the present application are described below in conjunction with the accompanying drawings.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没 有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。The terms "first", "second" and the like in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, and this is merely a description of the manner in which objects with the same attribute are described in the embodiments of the present application. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, product, or apparatus comprising a series of elements is not necessarily limited to those elements, but may include elements not expressly included. Other elements listed explicitly or inherent to the process, method, product, or apparatus.
请参考图1,其示出了本申请实施例所涉及的一种系统架构的示意图。参见图1,该系统架构包括通信网络100,以及,与该通信网络100通信连接的至少两个用户设备,该至少两个用户设备中,任意两个用户设备可以通过该通信网络100传输业务报文。示例地,本申请实施例以该至少两个用户设备包括用户设备200~500(也即是用户设备200、用户设备300、用户设备400和用户设备500),用户设备200通过通信网络100向用户设备300传输业务报文为例说明,也即是,以用户设备200为发送设备,用户设备300为接收设备为例说明。Please refer to FIG. 1 , which shows a schematic diagram of a system architecture involved in an embodiment of the present application. Referring to FIG. 1 , the system architecture includes a communication network 100, and at least two user equipments communicatively connected to the communication network 100. Among the at least two user equipments, any two user equipments can transmit service reports through the communication network 100. arts. Exemplarily, in this embodiment of the present application, the at least two user equipments include user equipments 200-500 (that is, user equipment 200, user equipment 300, user equipment 400, and user equipment 500), and the user equipment 200 communicates to the user through the communication network 100 The device 300 transmits service packets as an example for description, that is, the user equipment 200 is used as a sending device and the user equipment 300 is a receiving device as an example for description.
如图1所示,通信网络100包括控制器101以及与控制器101通信连接的多个网络设备,网络设备用于在控制器101的控制下转发业务报文。并且,按照业务报文的流向以及传输路径,多个网络设备可以包括入口(ingress)设备、出口(egress)设备以及位于该入口设备与该出口设备之间的至少一个中转(transit)设备。As shown in FIG. 1 , a communication network 100 includes a controller 101 and a plurality of network devices communicatively connected to the controller 101 , and the network devices are used to forward service packets under the control of the controller 101 . Moreover, according to the flow direction and transmission path of the service message, the multiple network devices may include an ingress device, an egress device, and at least one transit device between the ingress device and the egress device.
示例地,本申请实施例以该多个网络设备包括网络设备102~114(也即是网络设备102、网络设备103、网络设备104、网络设备105、网络设备106、网络设备107、网络设备108、网络设备109、网络设备110、网络设备111、网络设备112、网络设备113和网络设备114),用户设备200和用户设备300与该通信网络100中的网络设备102通信连接,用户设备400和用户设备500与该通信网络100中的网络设备113通信连接为例说明。容易理解,在用户设备200通过通信网络100向用户设备300传输业务报文的示例中,该网络设备102可以是入口设备,该网络设备113可以是出口设备,网络设备103~113可以是中转设备。其中,网络设备又称为网络节点、网关设备、路由节点或路由设备等,入口设备又称为首节点,出口设备又称为尾节点,中转设备又称为中转节点或中间节点。Exemplarily, in this embodiment of the present application, the multiple network devices include network devices 102-114 (that is, network device 102, network device 103, network device 104, network device 105, network device 106, network device 107, network device 108 , network equipment 109, network equipment 110, network equipment 111, network equipment 112, network equipment 113 and network equipment 114), user equipment 200 and user equipment 300 are communicatively connected with network equipment 102 in the communication network 100, user equipment 400 and The communication connection between the user equipment 500 and the network device 113 in the communication network 100 is described as an example. It is easy to understand that in the example where the user equipment 200 transmits service packets to the user equipment 300 through the communication network 100, the network device 102 may be an ingress device, the network device 113 may be an egress device, and the network devices 103-113 may be transit devices . Among them, network devices are also called network nodes, gateway devices, routing nodes or routing devices, etc., entrance devices are also called head nodes, exit devices are also called tail nodes, and transit devices are also called transit nodes or intermediate nodes.
示例性的,网络设备102和网络设备114可以为用户边缘路由器(customer edge,CE),其中,网络设备102为CE1,网络设备114为CE2。示例性的,网络设备103可以为接入路由器(access router,ACC);网络设备103和网络设备104可以为聚合路由器(aggregation router,AGG),其中,网络设备103为AGG1,和网络设备104为AGG2;网络设备105和网络设备106可以为城域核心路由器(metro core router,MC),其中,网络设备105为MC1,和网络设备106为MC2;网络设备107和网络设备108可以为运营商边缘路由器(provider edge router,PE),其中,网络设备107为PE1,和网络设备108为PE2;网络设备109和网络设备110可以为骨干路由器(provider router,P),其中,网络设备109为P1,和网络设备110为P2;网络设备111和网络设备112可以为PE,其中,网络设备111为PE3,和网络设备112为PE4。Exemplarily, the network device 102 and the network device 114 may be customer edge routers (customer edge, CE), wherein the network device 102 is CE1, and the network device 114 is CE2. Exemplarily, the network device 103 can be an access router (access router, ACC); the network device 103 and the network device 104 can be an aggregation router (aggregation router, AGG), wherein, the network device 103 is AGG1, and the network device 104 is AGG2; network equipment 105 and network equipment 106 can be metro core routers (metro core router, MC), wherein, network equipment 105 is MC1, and network equipment 106 is MC2; Network equipment 107 and network equipment 108 can be operator edge Router (provider edge router, PE), wherein, network equipment 107 is PE1, and network equipment 108 is PE2; Network equipment 109 and network equipment 110 can be backbone router (provider router, P), wherein, network equipment 109 is P1, and the network device 110 is P2; the network device 111 and the network device 112 may be PEs, wherein the network device 111 is PE3, and the network device 112 is PE4.
其中,控制器101是未来云化网络的大脑,融合了网络管理、业务控制和网络分析等功能,是实现网络资源池化、网络连接自动化和自优化以及运维自动化的核心使能系统。该控制器101可以是部署在服务器中的功能模块,或者是一台服务器,或者由若干台服务器组成的服务器集群,或者是一个云计算服务中心,本申请实施例对此不做限定。其中,服务器也称伺服器,是提供计算服务的设备。由于服务器需要响应服务请求并进行处理,提供可靠的服务,因此一般来说服务器应具备承担服务并且保障服务的能力,该服务器需 要具备较强的处理能力、高稳定性、高可靠性、高安全性、可扩展性以及可管理性。在本申请实施例中,所述服务器可以是x86服务器,x86服务器又称复杂指令集(complex instruction set computer,CISC)架构服务器,即通常所讲的个人计算机(personal computer,PC)服务器,它是基于PC机体系结构,使用英特尔(intel)或其它兼容x86指令集的处理器芯片和windows操作系统的服务器。Among them, the controller 101 is the brain of the future cloud network, integrating functions such as network management, service control, and network analysis, and is the core enabling system for realizing network resource pooling, network connection automation and self-optimization, and operation and maintenance automation. The controller 101 may be a functional module deployed in a server, or a server, or a server cluster composed of several servers, or a cloud computing service center, which is not limited in this embodiment of the present application. Wherein, a server, also called a server, is a device that provides computing services. Since the server needs to respond to service requests and process them to provide reliable services, generally speaking, the server should have the ability to undertake and guarantee services. The server needs to have strong processing capabilities, high stability, high reliability, and high security. performance, scalability, and manageability. In the embodiment of the present application, the server may be an x86 server, and an x86 server is also called a complex instruction set computer (CISC) architecture server, which is commonly referred to as a personal computer (personal computer, PC) server, which is Based on the PC architecture, use Intel (intel) or other processor chips compatible with the x86 instruction set and the server of the Windows operating system.
其中,网络设备102~114中的每个网络设备可以是交换机或路由器(router)等在通信网络中用于转发业务报文的设备,网络设备102~114可以是相同的网络设备,例如,网络设备102~114均可以是路由器,或者,网络设备102~114可以是不同的网络设备,例如,网络设备102~114中的一部分为路由器,另一部分为交换机。其中,路由器是连接两个或多个通信网络的硬件设备,在通信网络间起网关的作用,路由器是能够读取业务报文中的目的地址并决定如何根据该目的地址传送该业务报文的专用智能性的网络设备;路由器能够理解不同的协议,例如某个局域网使用的以太网协议,因特网使用的传输控制协议/互联协议(transmission control protocol/internet protocol,TCP/IP)协议等,这样路由器可以分析各种不同类型网络传来的业务报文的目的地址,把非TCP/IP地址转换成TCP/IP地址,或者反之;再根据选定的路由算法把各个业务报文按最佳传输路径传送到目的地址,所以路由器可以把非TCP/IP网络连接到因特网上。需要指出的是,为了区别于业务报文的传输路径,图1中以虚线双箭头的形式示出了控制器101与各个网络设备之间的通信连接,并且,在一些场景中,本申请实施例所述的传输路径也可以称为通信链路、通信通路、通信隧道或隧道通路等。Wherein, each network device in the network devices 102-114 can be a switch or a router (router) and other devices used to forward service packets in a communication network, and the network devices 102-114 can be the same network device, for example, a network All of the devices 102-114 may be routers, or, the network devices 102-114 may be different network devices, for example, some of the network devices 102-114 are routers, and the other part is a switch. Among them, a router is a hardware device that connects two or more communication networks, and acts as a gateway between communication networks. The router can read the destination address in the business message and decide how to transmit the service message according to the destination address. Dedicated intelligent network equipment; routers can understand different protocols, such as the Ethernet protocol used by a local area network, the transmission control protocol/internet protocol (transmission control protocol/internet protocol, TCP/IP) protocol used by the Internet, etc., so that the router It can analyze the destination addresses of business messages from various types of networks, convert non-TCP/IP addresses into TCP/IP addresses, or vice versa; and then route each business message according to the optimal transmission path according to the selected routing algorithm Send to the destination address, so the router can connect the non-TCP/IP network to the Internet. It should be pointed out that in order to distinguish from the transmission path of service packets, the communication connection between the controller 101 and each network device is shown in the form of dotted double arrows in FIG. 1, and, in some scenarios, the implementation of this application The transmission path mentioned in the example may also be called a communication link, a communication path, a communication tunnel or a tunnel path, and the like.
其中,用户设备200~500中的每个用户设备可以是具备无线通信功能的通信设备,例如,用户设备200~500中的每个用户设备可以台式计算机、物联网(internet of things,IoT)设备等,且用户设备200~500可以是相同的通信设备,例如,用户设备200~500均可以是台式计算机,或者,用户设备200~500可以是不同的通信设备,例如,用户设备200~500中的一部分是台式计算机,另一部分是IoT设备。Wherein, each of the user equipments 200-500 may be a communication device having a wireless communication function, for example, each of the user equipments 200-500 may be a desktop computer, an Internet of Things (Internet of Things, IoT) device etc., and the user equipments 200-500 may be the same communication equipments, for example, the user equipments 200-500 may all be desktop computers, or the user equipments 200-500 may be different communication equipments, for example, the user equipments 200-500 may be One part is a desktop computer and the other part is an IoT device.
需要指出的是,图1所示系统架构中的通信网络100仅用于举例,并非用于限制本申请实施例的技术方案,在具体实现过程中,通信网络还可能包括其他设备,并且可以根据需要来配置网络设备的数量。It should be pointed out that the communication network 100 in the system architecture shown in FIG. 1 is only used as an example, and is not used to limit the technical solution of the embodiment of the present application. In the specific implementation process, the communication network may also include other devices, and can be based on Required to configure the number of network devices.
SRv6是基于互联网协议第6版(internet protocol version 6,IPv6)技术实现的分段路由(segment routing,SR)技术,具体的,通过在数据报文中添加一个或多个基于IPv6的段列表(segment list),实现对数据报文的路由。具体的,基于SRv6的数据报文的路由方式,在下述步骤201-208中有详细描述,此处不作赘述。SRv6 is a segment routing (segment routing, SR) technology based on Internet protocol version 6 (IPv6) technology. Specifically, by adding one or more IPv6-based segment lists ( segment list) to implement the routing of data packets. Specifically, the routing mode of the SRv6-based data packet is described in detail in the following steps 201-208, and will not be repeated here.
在如图1所示的通信网络的各个网络设备都配置了SRv6,可以基于SRv6创建隧道。例如,如图1所示,ACC和PE3之间可以有多种隧道:ACC->AGG1->MC1->PE1->P1->PE3、ACC->AGG2->MC2->PE2->PE1->P1->PE3。上述两条隧道可以互为主备,实现负载分担。当创建隧道后,需要对隧道的服务水平协议(service-level agreement,SLA)质量进行检测。需要说明的是,SLA质量可以包括丢包率、时延和抖动。Each network device in the communication network shown in FIG. 1 is configured with SRv6, and a tunnel can be created based on SRv6. For example, as shown in Figure 1, there can be multiple tunnels between ACC and PE3: ACC->AGG1->MC1->PE1->P1->PE3, ACC->AGG2->MC2->PE2->PE1- >P1->PE3. The above two tunnels can be active and standby for each other to achieve load sharing. After the tunnel is created, it is necessary to detect the service level agreement (service-level agreement, SLA) quality of the tunnel. It should be noted that the SLA quality may include packet loss rate, delay and jitter.
当前,对SLA质量的检测手段有双向转发检测(bidirectional forwarding detection, BFD)、带内流信息测量(in-situ flow information telemetry,IFIT)和双向主动测量协议(two-way active measurement protocol,TWAMP)等。其中,当前的BFD只能检测隧道的通断,无法测量隧道的SLA质量。当前的IFIT和TWAMP只能检测基于业务的SLA质量,无法检测隧道的SLA质量。例如,隧道中的某个网络设备发生故障,若使用当前的IFIT和TWAMP,数据报文会选择其他隧道将数据报文发送到目的网络设备。综上所述,当前缺乏相应的技术方案对检测隧道的SLA质量。Currently, the detection methods for SLA quality include bidirectional forwarding detection (bidirectional forwarding detection, BFD), in-situ flow information telemetry (IFIT), and two-way active measurement protocol (TWAMP). wait. Among them, the current BFD can only detect the continuity of the tunnel, but cannot measure the SLA quality of the tunnel. The current IFIT and TWAMP can only detect the SLA quality based on the service, but cannot detect the SLA quality of the tunnel. For example, if a certain network device in the tunnel fails, if the current IFIT and TWAMP are used, the data packet will select another tunnel to send the data packet to the destination network device. To sum up, currently there is no corresponding technical solution for detecting the SLA quality of the tunnel.
为此,本申请提出了一种基于SRv6的隧道质量检测方法。For this reason, this application proposes an SRv6-based tunnel quality detection method.
在本申请实施例中,第一网络设备生成第一检测报文,其中,第一检测报文中携带第一段列表路径和第二段列表路径,第一段列表路径用于表征第一隧道,第二段列表路径用于表征第二隧道,第一隧道为从第一网络设备到第二网络设备的隧道,第二隧道为从第二网络设备到第一网络设备的隧道。那么,当第一网络设备发送第一检测报文后,第一检测报文会根据第一段列表路径发送到第二网络设备,然后根据第二段列表路径回到第一网络设备。由于第一网络设备发送第一检测报文后对其进行监听,当第一网络设备接收到第一检测报文时,即可对第一隧道和第二隧道的SLA质量进行检测。In this embodiment of the present application, the first network device generates the first detection message, wherein the first detection message carries the first list path and the second list path, and the first list path is used to represent the first tunnel , the second segment list path is used to represent the second tunnel, the first tunnel is a tunnel from the first network device to the second network device, and the second tunnel is a tunnel from the second network device to the first network device. Then, after the first network device sends the first detection packet, the first detection packet will be sent to the second network device according to the first list path, and then returned to the first network device according to the second list path. Since the first network device monitors the first detection packet after sending it, when the first network device receives the first detection packet, it can detect the SLA quality of the first tunnel and the second tunnel.
在一些可行的实现方式中,第一检测报文可以是基于TWAMP的检测报文,也可以是基于IFIT的检测报文,此处不做限定。在本申请实施例中,以第一检测报文为基于TWAMP的检测报文为例进行说明。示例性的,请参考图2-1,为本申请提出的一种基于SRv6的隧道质量检测方法的具体实施步骤,该方法可以应用于如图1所示的通信网络100,该通信网络100中的多个网络设备包括第一网络设备和第二网络设备,以及位于第一网络设备和第二网络设备之间的至少一个中转设备。In some feasible implementation manners, the first detection message may be a TWAMP-based detection message or an IFIT-based detection message, which is not limited here. In the embodiment of the present application, description is made by taking the first detection packet as a TWAMP-based detection packet as an example. Exemplarily, please refer to FIG. 2-1 , which is the specific implementation steps of an SRv6-based tunnel quality detection method proposed in this application. This method can be applied to the communication network 100 shown in FIG. 1 , and the communication network 100 The multiple network devices include a first network device and a second network device, and at least one transit device between the first network device and the second network device.
在本申请实施例中,第一网络设备和第二网络设备可以为通信网络100中的任意两个不相邻的网络设备,下面以图1中的ACC作为第一网络设备、PE3作为第二网络设备为例进行说明。In the embodiment of the present application, the first network device and the second network device can be any two non-adjacent network devices in the communication network 100. In the following, ACC in FIG. 1 is used as the first network device, and PE3 is used as the second network device. Network equipment is taken as an example for description.
参见图2-1,该方法可以包括如下步骤:Referring to Figure 2-1, the method may include the following steps:
201、第一网络设备配置TWAMP。201. The first network device configures TWAMP.
在一些可能的实现方式中,可以对第一网络设备和第二网络设备均配置TWAMP,下面称为双边TWAMP。在一些可能的实现方式中,也可以仅对第一网络设备配置且生效TWAMP,而不为第二网络设备配置TWAMP,或者第二网络设备也配置了TWAMP,但是不生效,下面称为单臂TWAMP。在一些可能的实现方式中,第一网络设备(或,第一网络设备和或第二网络设备)中内置有TWAMP模块(实体或虚拟),可以通过TWAMP模块创建TWAMP实例。In some possible implementation manners, TWAMP may be configured on both the first network device and the second network device, which is referred to as bilateral TWAMP hereinafter. In some possible implementations, it is also possible to configure TWAMP only for the first network device and take effect, without configuring TWAMP for the second network device, or to configure TWAMP for the second network device, but it does not take effect, hereinafter referred to as single-arm TWAMP. In some possible implementation manners, a TWAMP module (physical or virtual) is built in the first network device (or, the first network device and/or the second network device), and a TWAMP instance can be created through the TWAMP module.
202、第一网络设备生成第一检测报文。202. The first network device generates a first detection packet.
在本申请实施例中,第一检测报文包括负载(payload)、源地址(source address,SA)、目的地址(destination address,DA)和基于SRv6的段路由报头(segment routing header,SRH),以下分别进行描述。In the embodiment of the present application, the first detection message includes a load (payload), a source address (source address, SA), a destination address (destination address, DA) and an SRv6-based segment routing header (segment routing header, SRH), Each will be described below.
一、负载。1. Load.
在一些可能的实现方式中,若第一网络设备配置并生效TWAMP,而第二网络设备未配置或未生效TWAMP,第一检测报文中负载可以不携带任何有效信息,也可以携带其他必要的 信息,此处不做限定。例如,第一检测报文的负载中携带的信息为“00000000”。在一些可能的实现方式中,若第一网络设备和第二网络设备均配置并生效TWAMP,第一检测报文的负载中可以携带第二段列表路径的信息。In some possible implementations, if the first network device is configured and takes effect of TWAMP, but the second network device is not configured or does not take effect of TWAMP, the payload in the first detection message may not carry any valid information, and may also carry other necessary information. information, not limited here. For example, the information carried in the payload of the first detection packet is "00000000". In some possible implementation manners, if both the first network device and the second network device are configured with TWAMP and take effect, the payload of the first detection message may carry the information of the second list path.
二、SA和DA。Two, SA and DA.
当生成第一检测报文时,第一检测报文的SA和DA均设置为第一网络设备的本机地址。需要说明的是,在本申请实施例中,SA和DA的值均为IPv6地址。例如,第一网络设备的本机地址为1::1,那么可以将SA和DA均设置为1::1,那么在压栈段列表之前,第一检测报文可以如下表1所示:When the first detection packet is generated, the SA and DA of the first detection packet are both set to the local address of the first network device. It should be noted that, in this embodiment of the application, the values of SA and DA are both IPv6 addresses. For example, if the local address of the first network device is 1::1, then both SA and DA can be set to 1::1, then before the stack segment list is pushed, the first detection message can be as shown in Table 1 below:
表1Table 1
DA=1::1DA=1::1
SA=1::1SA=1::1
负载load
需要说明的是,1::1为第一网络设备发布路所使用的IPv6地址。It should be noted that 1::1 is the IPv6 address used by the first network device to advertise the route.
三、基于SRv6的SRH。3. SRH based on SRv6.
需要说明的是,基于SRv6的SRH包括段剩余(segment left,SL)和多个段列表(segment list),段列表的值可以为网络设备或链路的IPv6地址。It should be noted that the SRH based on SRv6 includes a segment left (segment left, SL) and multiple segment lists (segment lists), and the value of the segment list can be an IPv6 address of a network device or a link.
在本申请实施例中,在单臂TWAMP的场景下,段列表包括第一段列表路径和第二段列表路径。在双边TWAMP的场景下,段列表仅包括第一段列表路径,且在第一检测报文的负载中携带第二段列表路径的信息。下面对单臂TWAMP和双边TWAMP的场景下的SRH分别进行描述。In the embodiment of the present application, in the scenario of the one-armed TWAMP, the segment list includes a first segment list path and a second segment list path. In the scenario of bilateral TWAMP, the segment list only includes the path in the first segment list, and the payload of the first detection message carries information about the path in the second segment list. The following describes the SRH in the scenarios of single-arm TWAMP and bilateral TWAMP respectively.
(一)单臂TWAMP的场景。(1) The scene of one-arm TWAMP.
在本申请实施例中,在单臂TWAMP的场景下,多个段列表可以包括第一段列表路径和第二段列表路径,第一段列表路径为从第一网络设备到第二网络设备的路径,第二段列表路径为从第二网络设备到第一网络设备的路径,其中,第一段列表路径用于表征第一隧道,第二段列表路径用于表征第二隧道。In the embodiment of the present application, in the scenario of one-armed TWAMP, multiple segment lists may include a first segment list path and a second segment list path, and the first segment list path is the path from the first network device to the second network device The path, the second segment list path is a path from the second network device to the first network device, wherein the first segment list path is used to represent the first tunnel, and the second segment list path is used to represent the second tunnel.
例如,如图1所示,第一段列表路径为“MC1->P1->PE3”或“MC2->P1->PE3”,所表征的第一隧道为“ACC->MC1->P1->PE3”或“ACC->MC2->P1->PE3”;第二段列表路径为“MC1->P1->ACC”或“MC2->P1->ACC”,所表征的第二隧道为“PE3->P1->MC1->ACC”或“PE3->P1->MC2->ACC”。For example, as shown in Figure 1, the first list path is "MC1->P1->PE3" or "MC2->P1->PE3", and the first tunnel represented is "ACC->MC1->P1- >PE3" or "ACC->MC2->P1->PE3"; the second list path is "MC1->P1->ACC" or "MC2->P1->ACC", and the second tunnel represented is "PE3->P1->MC1->ACC" or "PE3->P1->MC2->ACC".
在一些可行的实现方式中,第一段列表路径和第二段列表路径可以正反向共路。例如,第一段列表路径为“MC1->P1->PE3”,所表征的第一隧道为“ACC->MC1->P1->PE3”,而第二段列表路径为“MC1->P1->ACC”,所表征的第二隧道为“PE3->MC1->P1->ACC”。或者,第一段列表路径为“MC2->P1->PE3”,所表征的第一隧道为“ACC->MC2->P1->PE3”,而第二段列表路径为“MC2->P1->ACC”,所表征的第二隧道为“PE3->MC2->P1->ACC”。In some feasible implementation manners, the first segment of the list path and the second segment of the list path may share forward and reverse paths. For example, the first list path is "MC1->P1->PE3", the first tunnel represented is "ACC->MC1->P1->PE3", and the second list path is "MC1->P1 ->ACC", the second tunnel represented by "PE3->MC1->P1->ACC". Or, the first list path is "MC2->P1->PE3", the first tunnel represented is "ACC->MC2->P1->PE3", and the second list path is "MC2->P1 ->ACC", the second tunnel represented by "PE3->MC2->P1->ACC".
需要说明的是,第一段列表路径所表征的第一隧道和第二段列表路径所表征的第二隧道可以预先创建。在一些可能的实现方式中,第一段列表路径或第二段列表路径可以为严 格路径,也可以为松散路径,也可以为严格与松散混合的路径,此处不做限定。第一段列表路径或第二段列表路径中相邻的两个网络设备之间可以通过策略实现转发,也可以通过尽力服务(best effect,BE)实现转发,此处不作限定。It should be noted that the first tunnel represented by the path in the first segment of the list and the second tunnel represented by the path in the second segment of the list may be created in advance. In some possible implementations, the first list path or the second list path can be a strict path, a loose path, or a mixed strict and loose path, which is not limited here. Forwarding between two adjacent network devices in the first segment list path or the second segment list path can be implemented through policies, or through best-effort (best effect, BE) forwarding, which is not limited here.
在本申请实施例中,第一网络设备生成第一检测报文时,可以在第一检测报文的报头中先后压栈第一段列表路径和第二段列表路径。需要说明的是,在SRv6的SRH中,先压栈的IPv6地址会被先读取,后压栈的IPv6地址会被后读取。例如,在如表1所示的第一检测报文中先后压栈第一段列表路径和第二段列表路径,第一检测报文可以如下表2所示:In this embodiment of the present application, when the first network device generates the first detection packet, it may successively push the first segment list path and the second segment list path in the header of the first detection packet. It should be noted that in the SRH of SRv6, the IPv6 address pushed first will be read first, and the IPv6 address pushed later will be read last. For example, in the first detection message shown in Table 1, the first list path and the second list path are successively pushed, and the first detection message may be as shown in Table 2 below:
表2Table 2
Figure PCTCN2022107929-appb-000001
Figure PCTCN2022107929-appb-000001
如表2所示,第一段列表路径包括多个segment list:MC1.END、P1.END和PE3.END。第二段列表路径包括多个segment list:PE3.END、P1.END、MC1.END和1::1。另外,SL用于指示当前指向哪个segment list。As shown in Table 2, the first segment list path includes multiple segment lists: MC1.END, P1.END, and PE3.END. The second list path includes multiple segment lists: PE3.END, P1.END, MC1.END, and 1::1. In addition, SL is used to indicate which segment list is currently pointed to.
示例性的,在如表2所示的第一检测报文中,令SA=ACC::1,其中,ACC::1表示封装基于SRv6的第一检测报文时需要在SA上填写的IPv6地址。在一些可行的实现方式,ACC::1可以取值为1::1。Exemplarily, in the first detection message shown in Table 2, set SA=ACC::1, where ACC::1 represents the IPv6 address that needs to be filled in SA when encapsulating the first detection message based on SRv6 address. In some feasible implementations, ACC::1 can take the value 1::1.
示例性的,当SL=5,指向MC1.END;当SL=4,指向P1;当SL=3,指向PE3.END;当SL=2,指向P1.END;当SL=1,指向MC1.END;当SL=0,指向1::1,即第一网络设备(ACC)的IPv6地址。其中,SL=5指向的MC1.END、SL=4指向的P1.END和SL=3指向的PE3.END组成第一段列表路径,SL=3指向的PE3.END、SL=2指向的P1.END、SL=1指向的PE3.END和SL=0指向的1::1(即ACC的IPv6地址)组成第二段列表路径。Exemplarily, when SL=5, point to MC1.END; when SL=4, point to P1; when SL=3, point to PE3.END; when SL=2, point to P1.END; when SL=1, point to MC1. END; when SL=0, point to 1::1, which is the IPv6 address of the first network device (ACC). Among them, MC1.END pointed to by SL=5, P1.END pointed to by SL=4, and PE3.END pointed to by SL=3 form the first list path, PE3.END pointed to by SL=3, and P1 pointed to by SL=2 .END, PE3.END pointed to by SL=1, and 1::1 pointed to by SL=0 (that is, the IPv6 address of the ACC) form the second list path.
需要说明的是,如表1所示,DA被设置为1::1,在先后压栈第一段列表路径和第二段列表路径之后,得到表2,将DA设置为SL=5所指向的位置,即MC1.END,并将SL=0所指向的位置设置为DA原来的值1::1,以作为最终的目的地址。需要说明的是,在第一检测报文的转发过程中,DA的值随着SL的值的改变而改变,即指向不同的segment list,从而指导第一检测报文的转发。It should be noted that, as shown in Table 1, DA is set to 1::1. After pushing the first list path and the second list path successively, Table 2 is obtained, and DA is set to point to SL=5 The location of MC1.END, and the location pointed to by SL=0 is set to the original value of DA 1::1 as the final destination address. It should be noted that, during the forwarding process of the first detection message, the value of DA changes with the value of SL, that is, points to different segment lists, thereby guiding the forwarding of the first detection message.
需要说明的是,“.END”表示一种段标识(segment identifier,SID)的类型,表示一个网络设备的IPv6地址。例如MC1.END指示MC1的IPv6地址,PE3.END指示PE3的IPv6地址。其中,一个segment list包括一个SID。It should be noted that ".END" represents a type of segment identifier (SID), and represents an IPv6 address of a network device. For example, MC1.END indicates the IPv6 address of MC1, and PE3.END indicates the IPv6 address of PE3. Among them, a segment list includes a SID.
在一些可行的实现方式中,第二段列表路径压缩到绑定段标识符(binding segment identifier,BSID)上。“.BSID”表示一种段标识(segment identifier,SID)的类型,表示内置了特定信息的SID。在一些可能的实现方式中,BSID可以是一个索引,网络设备可以根据这个索引查询对应的信息(例如BSID对应第二段列表路径的信息)。例如,一个BSID所对应的信息预先通过泛洪的方式在网络上公布,那么网络设备可以保存BSID的信息,当接收到BSID时,可以从存储的信息中查询得到。在一些可能的实现方式中,在网络设备接收到BSID时,网络设备也可以向网络控制器询问该BSID对应的信息,此处不做限定。In some possible implementations, the second segment list path is compressed onto a binding segment identifier (BSID). ".BSID" represents a type of segment identifier (SID), which represents a SID with specific information built in. In some possible implementation manners, the BSID may be an index, and the network device may query corresponding information according to the index (for example, the information of the BSID corresponding to the second segment list path). For example, the information corresponding to a BSID is published on the network by flooding in advance, then the network device can save the BSID information, and when receiving the BSID, it can be obtained from the stored information. In some possible implementation manners, when the network device receives the BSID, the network device may also query the network controller for information corresponding to the BSID, which is not limited here.
例如,将如表2所示的第一检测报文中,将表示第二段列表中SL=2指向的P1.END和SL=1指向的MC1.END压缩在BSID中,然后更新SL的值的指向,得到表3所示的第一检测报文:For example, in the first detection message shown in Table 2, the P1.END pointed to by SL=2 and the MC1.END pointed to by SL=1 in the second segment list are compressed in the BSID, and then the value of SL is updated Pointing to, the first detection message shown in Table 3 is obtained:
表3table 3
Figure PCTCN2022107929-appb-000002
Figure PCTCN2022107929-appb-000002
那么,当PE3接收到第一检测报文时,将SL=2改为SL=1,则指向PE3.BSID,通过读取PE3.BSID的值,获取P1.END和MC1.END的值,然后可以通过encaps或insert的方式压栈在第一检测报文中,以指示第一检测报文回程。具体的,encaps或insert的方式,以及第一检测报文的转发过程,将在下述步骤205-207中进行详细描述,此处不作赘述。Then, when PE3 receives the first detection message, change SL=2 to SL=1, then point to PE3.BSID, obtain the values of P1.END and MC1.END by reading the value of PE3.BSID, and then It may be pushed into the first detection packet by way of encaps or insert, so as to indicate the return of the first detection packet. Specifically, the manner of encaps or insert, and the forwarding process of the first detection message will be described in detail in the following steps 205-207, and will not be repeated here.
在一些可能的实现方式中,如表2所示的任意连续的多个网络设备的IPv6地址都可以压缩在一个BSID中,此处不作限定。例如,在如表2所示的第一检测报文中,将表示第二段列表中SL=3指向的PE3.END、SL=2指向的P1.END和SL=1指向的MC1.END压缩在BSID中,然后更新SL的值的指向,得到表4所示的第一检测报文:In some possible implementation manners, any continuous IPv6 addresses of multiple network devices shown in Table 2 can be compressed into one BSID, which is not limited here. For example, in the first detection message shown in Table 2, PE3.END pointed to by SL=3, P1.END pointed to by SL=2, and MC1.END pointed to by SL=1 in the second segment list are compressed In the BSID, then update the pointing of the value of SL to obtain the first detection message shown in Table 4:
表4Table 4
Figure PCTCN2022107929-appb-000003
Figure PCTCN2022107929-appb-000003
那么,当P1接收到第一检测报文时,并准备转发时,SL=2改为SL=1,指向PE3.BSID,通过读取PE3.BSID,获取PE3.END、P1.END和MC1.END的值,PE3.BSID的展开方式可以为encaps或insert,下面步骤206中分别进行描述。Then, when P1 receives the first detection message and prepares to forward it, SL=2 is changed to SL=1, pointing to PE3.BSID, and PE3.END, P1.END and MC1 are obtained by reading PE3.BSID. The value of END, the expansion mode of PE3.BSID can be encaps or insert, which will be described in step 206 below.
又例如,在如表2所示的第一检测报文中,将表示第二段列表中SL=3指向的PE3.END和SL=2指向的P1.END压缩在BSID中,然后更新SL的值的指向,得到表5所示的第一检测报文:For another example, in the first detection message shown in Table 2, the PE3.END pointed to by SL=3 and the P1.END pointed to by SL=2 in the second segment list are compressed in the BSID, and then the SL's Pointing to the value, the first detection message shown in Table 5 is obtained:
表5table 5
Figure PCTCN2022107929-appb-000004
Figure PCTCN2022107929-appb-000004
那么,当P1接收到第一检测报文时,并准备转发时,SL的值由3变为2,指向P1.BSID,通过读取P1.BSID,通过encaps或insert的方式展开,获取PE3.END和P1.END的值,然后压栈在第一检测报文中,以指示第一检测报文继续转发。Then, when P1 receives the first detection message and prepares to forward it, the value of SL changes from 3 to 2, pointing to P1.BSID. By reading P1.BSID and expanding it by encaps or insert, PE3 is obtained. The values of END and P1.END are then pushed into the first detection message to indicate that the first detection message continues to be forwarded.
(二)双边TWAMP的场景。(2) Bilateral TWAMP scenario.
在本申请实施例中,对于双边TWAMP的场景,SRH中可以包括第一段列表路径,而通过负载携带第二段列表路径的信息。示例性的,第一网络设备生成第一检测报文时,在第一检测报文中仅需压栈第一段列表路径,然后在负载中携带第二段列表路径的信息。那么,当第二网络设备接收到的第一检测报文后,从负载中获取第二段列表路径的信息,然后将第二段列表路径压栈到第一检测报文中,并转发给第一检测报文。In the embodiment of the present application, for a bilateral TWAMP scenario, the SRH may include the first list path, and carry the information of the second list path through the payload. Exemplarily, when the first network device generates the first detection packet, it only needs to push the first segment of the list path in the first detection packet, and then carry the information of the second segment of the list path in the payload. Then, when the second network device receives the first detection message, it obtains the information of the second list path from the payload, then pushes the second list path into the first detection message, and forwards it to the first detection message. A detection message.
例如,第一网络设备将第一检测报文的DA设置为第二网络设备的IPv6地址,例如为1::2,那么在压栈段列表之前,第一检测报文可以如下表6所示:For example, the first network device sets the DA of the first detection message as the IPv6 address of the second network device, such as 1::2, then before pushing the stack segment list, the first detection message can be as shown in Table 6 below :
表6Table 6
DA=1::2DA=1::2
SA=1::1SA=1::1
负载load
然后,当第一网络设备生成第一检测报文时,在第一检测报文的报头中压栈第一段列表路径。例如,在如表6所示的第一检测报文中压栈第一段列表路径,第一检测报文可以如下表7所示:Then, when the first network device generates the first detection message, it pushes the first list path in the header of the first detection message. For example, in the first detection message shown in Table 6, the first list path is pushed, and the first detection message can be as shown in Table 7 below:
表7Table 7
Figure PCTCN2022107929-appb-000005
Figure PCTCN2022107929-appb-000005
如表7所示的第一检测报文时,当SL=2,所指向的IPv6地址为MC1的IPv6地址;当SL=1,指向P1.END;当SL=0时,指向1::2(即PE3的IPv6地址)。其中,SL=2指向的MC1.END、SL=1指向的P1.END和SL=0指向的PE3.END表示第一段列表路径。在本申请实施例中,第二段列表路径可以携带在负载中,包括PE3、P1和ACC的IPv6地址。When the first detection message shown in Table 7, when SL=2, the IPv6 address pointed to is the IPv6 address of MC1; when SL=1, point to P1.END; when SL=0, point to 1::2 (that is, the IPv6 address of PE3). Wherein, MC1.END pointed to by SL=2, P1.END pointed to by SL=1, and PE3.END pointed to by SL=0 represent the first segment list path. In this embodiment of the present application, the second list path may be carried in the payload, including the IPv6 addresses of PE3, P1, and ACC.
需要说明的是,如表6所示,DA被设置为1::2,在压栈第一段列表路径之后,得到表7,将DA设置为SL=0所指向的位置,即MC1.END,并将SL=0所指向的位置设置为1::2。当第二网络设备(PE3)生成如表7所示的第一检测报文时,由于当前SL=5,因此将DA改为MC1的IPv6地址,用MC1.END表示。It should be noted that, as shown in Table 6, DA is set to 1::2. After pushing the first segment of the list path, Table 7 is obtained, and DA is set to the position pointed to by SL=0, that is, MC1.END , and set the location pointed to by SL=0 to 1::2. When the second network device (PE3) generates the first detection message shown in Table 7, since the current SL=5, the DA is changed to the IPv6 address of MC1, represented by MC1.END.
在一些可能的实现方式中,如表7所示的任意连续的多个网络设备的IPv6地址都可以压缩在一个BSID中,具体的实施方式请参考前述单臂TWAMP的场景下的描述,此处不作赘述。In some possible implementations, any consecutive IPv6 addresses of multiple network devices as shown in Table 7 can be compressed into one BSID. I won't go into details.
四、五元组。Four and five-tuples.
在本申请实施例中,第一检测报文还可以携带五元组(源网络协议(internet protocol,IP)地址,源端口,目的IP地址,目的端口和传输层协议)。在一些可行的实现方式中,若两个检测报文的五元组相同,即可视为属于同一个TWAMP实例。In the embodiment of the present application, the first detection message may also carry a quintuple (source network protocol (internet protocol, IP) address, source port, destination IP address, destination port and transport layer protocol). In some feasible implementation manners, if the quintuples of the two detection packets are the same, they can be regarded as belonging to the same TWAMP instance.
五、会话标识(session id)。Five, session identification (session id).
在一些可行的实现方式中,第一检测报文还可以携带会话标识(session id),那么当两个检测报文的五元组和会话标识均相同时,即可视为属于同一个TWAMP实例。那么,当两个检测报文的五元组不同、而会话标识相同时,或者两个基于TWAMP的检测报文的五元组相同、而会话标识不同时,同样视为分属两个不同的TWAMP实例。那么,通过设置会话标识,让所有TWAMP实例使用相同的源端口号或相同的目的端口号,从而节约了端口号的使用。In some feasible implementations, the first detection message can also carry a session identifier (session id), then when the five-tuple and the session identifier of the two detection messages are the same, they can be regarded as belonging to the same TWAMP instance . Then, when the quintuples of two detection messages are different but the session IDs are the same, or when the quintuples of two TWAMP-based detection messages are the same but the session IDs are different, they are also regarded as belonging to two different sessions. TWAMP instance. Then, by setting the session identifier, let all TWAMP instances use the same source port number or the same destination port number, thereby saving the use of port numbers.
203、第一网络设备发送第一检测报文。203. The first network device sends a first detection packet.
在一些可行的实现方式中,第一检测报文可以包括多个检测报文,这些检测报文具有相同的五元组(或具有相同的五元组以及会话标识)。In some feasible implementation manners, the first detection packet may include multiple detection packets, and these detection packets have the same quintuple (or have the same quintuple and session identifier).
需要说明的是,在发送第一检测报文时,可以为该第一检测报文上添加发送时间戳。在一些可行的实现方式中,第一网络设备可以在短时间,连续发送第一检测报文中的多个检测报文,例如1秒内发送10个,或者可以定时发送第一检测报文中的多个检测报文,例如每0.1秒发送一个检测报文。需要说明的是,发送时间戳用于计算时延,当第一网络设 备接收到第一检测报文时,可以通过接收到第一检测报文的接收时间点,第一检测报文中的发送时间戳,计算出该第一检测报文的时延。It should be noted that, when the first detection packet is sent, a sending timestamp may be added to the first detection packet. In some feasible implementation manners, the first network device may continuously send a plurality of detection packets in the first detection packet in a short period of time, for example, 10 within 1 second, or may send the detection packets in the first detection packet at regular intervals. Multiple detection packets, for example, one detection packet is sent every 0.1 seconds. It should be noted that the sending time stamp is used to calculate the delay. When the first network device receives the first detection message, the sending time point in the first detection message can be determined by receiving the first detection message. Timestamp, calculate the time delay of the first detection message.
在一些可行的实现方式中,当第一隧道创建完成后,可以得到隧道标识,在第一网络设备中可以为该第一隧道分配隧道接口。将隧道标识和隧道接口对应,为了保障通过第一隧道发送数据报文,第一网络设备通过第一隧道的隧道接口发送第一检测报文。In some feasible implementation manners, after the first tunnel is created, the tunnel identifier can be obtained, and the first network device can allocate a tunnel interface for the first tunnel. Corresponding the tunnel identifier with the tunnel interface, in order to ensure that the data packet is sent through the first tunnel, the first network device sends the first detection packet through the tunnel interface of the first tunnel.
204、第一网络设备监听第一检测报文。204. The first network device monitors the first detection packet.
在本申请实施例中,当第一网络设备发送第一检测报文后,即可监听第一检测报文。在一些可能的实现方式中,属于相同TWAMP实例的两个检测报文,则视为相同的检测报文。例如,若两个检测报文的五元组相同,则视为属于相同的TWAMP实例,即视为相同的检测报文。或者,若两个检测报文的五元组和会话标识都相同,则视为属于相同的TWAMP实例,即视为相同的检测报文。In the embodiment of the present application, after the first network device sends the first detection message, it can monitor the first detection message. In some possible implementation manners, two detection packets belonging to the same TWAMP instance are regarded as the same detection packets. For example, if the quintuples of the two detection packets are the same, they are regarded as belonging to the same TWAMP instance, that is, they are regarded as the same detection packets. Or, if the quintuples and session identifiers of the two detection packets are the same, they are considered to belong to the same TWAMP instance, that is, they are regarded as the same detection packets.
举例说明,当第一网络设备接收第二检测报文时,若第二检测报文的DA为第一网络设备的本机地址,进一步获取第二检测报文的五元组,并根据五元组查询算发表,以确定该第二检测报文是否为TWAMP报文。若在算发表中命中,则确定该第二检测报文为TWAMP报文。接着第一网络设备获取第二检测报文的会话标识,然后根据会话标识查询对应的TWAMP的会话表。若命中特定的TWAMP实例,而第一检测报文属于该TWAMP实例,那么确定第二检测报文视为第一检测报文。For example, when the first network device receives the second detection message, if the DA of the second detection message is the local address of the first network device, further obtain the quintuple of the second detection message, and The group query calculation is published to determine whether the second detection packet is a TWAMP packet. If there is a hit in the calculation table, it is determined that the second detection packet is a TWAMP packet. Next, the first network device obtains the session identifier of the second detection message, and then queries the corresponding session table of the TWAMP according to the session identifier. If a specific TWAMP instance is hit, and the first detection packet belongs to the TWAMP instance, then it is determined that the second detection packet is regarded as the first detection packet.
205、第二网络设备接收第一检测报文。205. The second network device receives the first detection packet.
举例说明,如图2-2所示,为第一网络设备(ACC)、MC1、P1和第二网络设备(PE3)之间对第一检测报文的转发过程示意图。当第一网络设备准备发送如表2所示第一检测报文时,根据SRH中的段列表和SL=5,则指向MC1.END,则将DA设置为“DA=MC1.END”,即MC1为下一个目的网络设备。根据图1可知,第一网络设备(ACC)到MC1可以有两个路径,一个是ACC->AGG1->MC1,一个是ACC->AGG2->MC2->MC1。通过预设策略,或者BE的方式,第一网络设备(ACC)可以选择其中一条路径,例如选择了ACC->AGG1->MC1。For example, as shown in FIG. 2-2, it is a schematic diagram of the forwarding process of the first detection message between the first network device (ACC), MC1, P1 and the second network device (PE3). When the first network device is ready to send the first detection message as shown in Table 2, according to the segment list and SL=5 in the SRH, it points to MC1.END, and then DA is set to "DA=MC1.END", that is MC1 is the next destination network device. According to FIG. 1 , there may be two paths from the first network device (ACC) to MC1, one is ACC->AGG1->MC1, and the other is ACC->AGG2->MC2->MC1. By means of a preset policy or BE, the first network device (ACC) may select one of the paths, for example, ACC->AGG1->MC1 is selected.
当MC1接收到第一检测报文后,令SL=4,则指向P1.END,则将DA设置为“DA=P1.END”,即P1为下一个目的网络设备。然后,MC1向P1转发第一检测报文。根据图1可知,MC1到P1可以有两个路径,一个是MC1->PE1->P1,一个是MC1->MC2->PE2->PE1->P1。通过预设策略,或者BE的方式,MC1可以选择其中一条路径,例如选择了MC1->PE1->P1。When MC1 receives the first detection message, set SL=4 to point to P1.END, then set DA to "DA=P1.END", that is, P1 is the next destination network device. Then, MC1 forwards the first detection message to P1. According to Figure 1, it can be seen that there are two paths from MC1 to P1, one is MC1->PE1->P1, and the other is MC1->MC2->PE2->PE1->P1. MC1 can choose one of the paths through a preset strategy or BE, for example, MC1->PE1->P1 is selected.
当P1接收到第一检测报文后,令SL=3,则指向PE3.END,则将DA设置为“DA=PE3.END”,即PE3为下一个目的网络设备。然后,P1向PE3转发第一检测报文。根据图1可知,PE3为P1相邻的网络设备,P1直接通过相应的接口向PE3转发第一检测报文。在一些可能的实现方式中,若PE3和P1之间的链路发生故障,PE3也可以通过备用链路向P1转发第一检测报文。When P1 receives the first detection message, set SL=3, point to PE3.END, then set DA to "DA=PE3.END", that is, PE3 is the next destination network device. Then, P1 forwards the first detection packet to PE3. It can be known from FIG. 1 that PE3 is a network device adjacent to P1, and P1 directly forwards the first detection message to PE3 through a corresponding interface. In some possible implementation manners, if the link between PE3 and P1 fails, PE3 may also forward the first detection packet to P1 through the standby link.
通过上述转发过程,第二网络设备(PE3)则接收到第一检测报文。需要说明的是,如果隧道的SLA质量较差,上述过程的每一步都有机会发生丢包。如果发生丢包,则第一检 测报文无法发送到达第二网络设备(PE3)。在一些可能的实现方式中,由于第一检测报文为一种UDP报文,如果发生丢包,也不会进行重发。Through the foregoing forwarding process, the second network device (PE3) receives the first detection message. It should be noted that if the SLA quality of the tunnel is poor, packet loss may occur in each step of the above process. If packet loss occurs, the first detection packet cannot be sent to the second network device (PE3). In some possible implementation manners, since the first detection packet is a UDP packet, if packet loss occurs, retransmission will not be performed.
类似的,对于表3的第一检测报文的转发过程如图2-3所示,与上述转发过程类似,此处不作赘述。对于表4或5的第一检测报文的转发过程与对表2或表3的第一检测报文的转发过程类似,此处不作赘述。其中,对于如表4或5所示的具有BSID的第一检测报文中,对BSID的处理方法,请参阅下述步骤206,此处不作赘述。Similarly, the forwarding process of the first detection message in Table 3 is shown in Figure 2-3, which is similar to the above forwarding process and will not be repeated here. The forwarding process of the first detection message in Table 4 or 5 is similar to the forwarding process of the first detection message in Table 2 or Table 3, and will not be repeated here. Wherein, for the processing method of the BSID in the first detection message with the BSID shown in Table 4 or 5, please refer to the following step 206, which will not be repeated here.
206、第二网络设备根据第二段列表路径转发第一检测报文。206. The second network device forwards the first detection packet according to the second list path.
在本申请实施例中,当第二网络设备接收到第一检测报文后,根据第二段列表路径转发第一检测报文。下面对单臂TWAMP和双边TWAMP的场景下第二网络设备对第一检测报文的转发方法分别进行描述。In this embodiment of the present application, after receiving the first detection packet, the second network device forwards the first detection packet according to the second list path. The method for forwarding the first detection packet by the second network device in the scenarios of the one-armed TWAMP and the bilateral TWAMP is described respectively below.
(一)单臂TWAMP的场景。(1) The scene of one-arm TWAMP.
举例说明,如图2-4所示,为第二网络设备(PE3)、P1、MC1和第一网络设备(ACC)之间对第一检测报文的转发过程示意图。For example, as shown in FIG. 2-4, it is a schematic diagram of the forwarding process of the first detection message between the second network device (PE3), P1, MC1 and the first network device (ACC).
若第一检测报文如表2所示,当第二网络设备(PE3)接收到第一检测报文后,令SL=2,则指向P1.END,则将DA设置为“DA=P1.END”,即P1为下一个目的网络设备。然后,第二网络设备(PE3)向P1转发第一检测报文。根据图1可知,P1为PE3相邻的网络设备,PE3直接通过相应的接口向P1转发第一检测报文。在一些可能的实现方式中,若P1和PE3之间的链路发生故障,P1也可以通过备用链路向PE3转发第一检测报文。If the first detection message is as shown in Table 2, after the second network equipment (PE3) receives the first detection message, make SL=2, then point to P1.END, then DA is set to "DA=P1. END", that is, P1 is the next destination network device. Then, the second network device (PE3) forwards the first detection packet to P1. It can be seen from FIG. 1 that P1 is a network device adjacent to PE3, and PE3 directly forwards the first detection message to P1 through a corresponding interface. In some possible implementation manners, if the link between P1 and PE3 fails, P1 may also forward the first detection packet to PE3 through the backup link.
当P1接收到第一检测报文后,令SL=1,则指向MC1.END,则将DA设置为“DA=MC1.END”,即MC1为下一个目的网络设备。然后,P1向MC1转发第一检测报文。根据图1可知,P1到MC1可以有两个路径,一个是P1->PE1->MC1,一个是P1->PE1->PE2->MC2->MC1。通过预设策略,或者BE的方式,P1可以选择其中一条路径,例如选择了P1->PE1->MC1。When P1 receives the first detection message, set SL=1, point to MC1.END, then set DA to "DA=MC1.END", that is, MC1 is the next destination network device. Then, P1 forwards the first detection message to MC1. According to Figure 1, it can be known that there are two paths from P1 to MC1, one is P1->PE1->MC1, and the other is P1->PE1->PE2->MC2->MC1. Through the preset strategy or BE, P1 can choose one of the paths, for example, P1->PE1->MC1 is selected.
当MC1接收到第一检测报文后,令SL=0,则指向1::1,则将DA设置为“DA=1::1”,即IPv6地址为1::1的网络设备(即ACC,第一网络设备)为下一个目的网络设备。然后,MC1向第一网络设备(ACC)转发第一检测报文。根据图1可知,MC1到ACC可以有两个路径,一个是MC1->AGG1->ACC,一个是MC1->MC2->AGG2->AGG1->ACC。通过预设策略,或者BE的方式,MC1可以选择其中一条路径,例如选择了MC1->AGG1->ACC。After MC1 receives the first detection message, make SL=0, then point to 1::1, then DA is set to " DA=1::1 ", promptly IPv6 address is the network equipment of 1::1 (namely ACC, the first network device) is the next destination network device. Then, MC1 forwards the first detection packet to the first network device (ACC). It can be seen from Figure 1 that there are two paths from MC1 to ACC, one is MC1->AGG1->ACC, and the other is MC1->MC2->AGG2->AGG1->ACC. MC1 can choose one of the paths through a preset policy or BE, for example, MC1->AGG1->ACC.
通过上述转发过程,第一网络设备(ACC)则接收到第一检测报文。需要说明的是,如果隧道的SLA质量较差,上述过程的每一步都有机会发生丢包。如果发生丢包,则第一检测报文无法发送到达第一网络设备(ACC)。Through the foregoing forwarding process, the first network device (ACC) receives the first detection message. It should be noted that if the SLA quality of the tunnel is poor, packet loss may occur in each step of the above process. If packet loss occurs, the first detection packet cannot be sent to the first network device (ACC).
类似的,对于表7的第一检测报文,其转发过程与上述转发过程类似,此处不作赘述。Similarly, for the first detection message in Table 7, its forwarding process is similar to the above forwarding process, and will not be repeated here.
再举例说明,若第一检测报文如表3所示,那么当第二网络设备(PE3)接收到第一检测报文后,令SL=1,则指向PE3.BSID,那么第二网络设备(PE3)获取PE3.BSID中指示的段列表路径。如表3所示的例子中,PE3.BSID指示第二段列表路径,那么第二网络设备(PE3) 可以展开PE3.BSID,从而得到第二段列表路径的信息。在一些可能的实现方式中,第二网络设备(PE3)可以通过封装(encaps)的方式或者插入(insert)的方式展开。下面对encaps的方式或者insert的方式分别进行描述。For another example, if the first detection message is as shown in Table 3, then when the second network device (PE3) receives the first detection message, make SL=1, then point to PE3.BSID, then the second network device (PE3) (PE3) Obtain the segment list path indicated in PE3.BSID. In the example shown in Table 3, PE3.BSID indicates the second list path, then the second network device (PE3) can expand PE3.BSID to obtain the information of the second list path. In some possible implementation manners, the second network device (PE3) may be expanded by means of encapsulation (encaps) or insertion (insert). The following describes the encaps method or insert method respectively.
(1)encaps的方式。(1) The way of encaps.
需要说明的是,encaps的方式为以当前的第一检测报文作为负载,从而进行封装,得到新的第一检测报文,然后在新的第一检测报文中,压栈BSID中的第二段列表路径。示例性的,如图2-5所示,为第二网络设备(PE3)、P1、MC1和第一网络设备(ACC)之间对第一检测报文的转发过程示意图。It should be noted that the way of encaps is to use the current first detection message as the payload, thereby encapsulating to obtain a new first detection message, and then in the new first detection message, push the first value in the BSID. Two-part list path. Exemplarily, as shown in FIG. 2-5 , it is a schematic diagram of the forwarding process of the first detection message between the second network device (PE3), P1, MC1 and the first network device (ACC).
对于如表3所示的第一检测报文,令SL=0,即则指向1::1,则将DA设置为“DA=1::1”,即IPv6地址为1::1的网络设备(即ACC,第一网络设备)为下一个目的网络设备,得到如表8所示的第一检测报文:For the first detection message shown in Table 3, let SL=0, that is, point to 1::1, then set DA to "DA=1::1", that is, the network whose IPv6 address is 1::1 The equipment (i.e. ACC, the first network equipment) is the next destination network equipment, and obtains the first detection message as shown in Table 8:
表8Table 8
Figure PCTCN2022107929-appb-000006
Figure PCTCN2022107929-appb-000006
然后通过encaps的方式将BSID展开得到如表9所示的第一检测报文:Then expand the BSID by means of encaps to obtain the first detection message shown in Table 9:
表9Table 9
Figure PCTCN2022107929-appb-000007
Figure PCTCN2022107929-appb-000007
其中,如表9所示的第一检测报文中的负载为如表8所示的第一检测报文,则得到如表10所示的第一检测报文:Wherein, the load in the first detection message as shown in Table 9 is the first detection message as shown in Table 8, then the first detection message as shown in Table 10 is obtained:
表10Table 10
Figure PCTCN2022107929-appb-000008
Figure PCTCN2022107929-appb-000008
那么,如表9(或表10)所示,由于SL=2,则指向P1.END,则将DA设置为“DA=P1.END”,即P1为下一个目的网络设备。然后,第二网络设备(PE3)向P1转发第一检测报文。根据图1可知,P1为PE3相邻的网络设备,PE3直接通过相应的接口向P1转发第一检测报文。在一些可能的实现方式中,若PE3和P1之间的链路发生故障,PE3也可以通过备用链路向P1转发第一检测报文。Then, as shown in Table 9 (or Table 10), since SL=2, it points to P1.END, and DA is set to "DA=P1.END", that is, P1 is the next destination network device. Then, the second network device (PE3) forwards the first detection packet to P1. It can be seen from FIG. 1 that P1 is a network device adjacent to PE3, and PE3 directly forwards the first detection message to P1 through a corresponding interface. In some possible implementation manners, if the link between PE3 and P1 fails, PE3 may also forward the first detection packet to P1 through the standby link.
当P1接收到第一检测报文后,令SL=1,则指向MC1.END,则将DA设置为“DA=MC1.END”,即MC1为下一个目的网络设备。然后,P1向MC1转发第一检测报文。根据图1可知,P1到MC1可以有两个路径,一个是P1->PE1->MC1,一个是P1->PE1->PE2->MC2->MC1。通过预设策略,或者BE的方式,P1可以选择其中一条路径,例如选择了P1->PE1->MC1。When P1 receives the first detection message, set SL=1, point to MC1.END, then set DA to "DA=MC1.END", that is, MC1 is the next destination network device. Then, P1 forwards the first detection message to MC1. According to Figure 1, it can be known that there are two paths from P1 to MC1, one is P1->PE1->MC1, and the other is P1->PE1->PE2->MC2->MC1. Through the preset strategy or BE, P1 can choose one of the paths, for example, P1->PE1->MC1 is selected.
当MC1接收到第一检测报文后,令SL=0,则指向1::1,则将DA设置为“DA=1::1”,即IPv6地址为1::1的网络设备(即ACC,第一网络设备)为下一个目的网络设备。然后,MC1向第一网络设备(ACC)转发第一检测报文。根据图1可知,MC1到ACC可以有两个路径,一个是MC1->AGG1->ACC,一个是MC1->MC2->AGG2->AGG1->ACC。通过预设策略,或者BE的方式,MC1可以选择其中一条路径,例如选择了MC1->AGG1->ACC。After MC1 receives the first detection message, make SL=0, then point to 1::1, then DA is set to " DA=1::1 ", promptly IPv6 address is the network equipment of 1::1 (namely ACC, the first network device) is the next destination network device. Then, MC1 forwards the first detection packet to the first network device (ACC). It can be seen from Figure 1 that there are two paths from MC1 to ACC, one is MC1->AGG1->ACC, and the other is MC1->MC2->AGG2->AGG1->ACC. MC1 can choose one of the paths through a preset policy or BE, for example, MC1->AGG1->ACC.
需要说明的是,当MC1向第一网络设备(ACC)发送第一检测报文时,MC1执行最后一跳SRH段信息弹出(ultimate segment pop of the SRH,USP),得到如表11所示的第一检测报文:It should be noted that when MC1 sends the first detection message to the first network device (ACC), MC1 executes the ultimate segment pop of the SRH (USP) at the last hop, and obtains the information shown in Table 11. The first detection message:
表11Table 11
Figure PCTCN2022107929-appb-000009
Figure PCTCN2022107929-appb-000009
如果MC1.END是倒数第二段弹出(penultimate segment pop,PSP)模式,那么MC1剥除第一检测报文的SRH,得到如表12所示的第一检测报文:If MC1.END is the penultimate segment pop (PSP) mode, then MC1 strips the SRH of the first detection message to obtain the first detection message as shown in Table 12:
表12Table 12
Figure PCTCN2022107929-appb-000010
Figure PCTCN2022107929-appb-000010
图2-5中以MC1.END为PSP模式为例,即MC1将如表12所示的第一检测报文转发给第一网络设备(ACC)。当MC1向第一网络设备(ACC)发送第一检测报文时,如果MC1.END是no PSP模式,那么MC1不需要剥除第一检测报文的SRH,即转发给第一网络设备(ACC),即如表11所示的第一检测报文。In Fig. 2-5, MC1.END is used as the PSP mode as an example, that is, MC1 forwards the first detection message shown in Table 12 to the first network device (ACC). When MC1 sends the first detection message to the first network device (ACC), if MC1.END is no PSP mode, then MC1 does not need to strip the SRH of the first detection message, that is, it is forwarded to the first network device (ACC) ), that is, the first detection message shown in Table 11.
通过上述转发过程,第一网络设备(ACC)则接收到第一检测报文。需要说明的是,如果隧道的SLA质量较差,上述过程的每一步都有机会发生丢包。如果发生丢包,则第一检测报文无法发送到达第一网络设备(ACC)。类似的,对于表4和表5的第一检测报文的转发过程与上述转发过程类似,此处不作赘述。Through the foregoing forwarding process, the first network device (ACC) receives the first detection message. It should be noted that if the SLA quality of the tunnel is poor, packet loss may occur in each step of the above process. If packet loss occurs, the first detection packet cannot be sent to the first network device (ACC). Similarly, the forwarding process of the first detection message in Table 4 and Table 5 is similar to the above forwarding process, and will not be repeated here.
(2)insert的方式。(2) The way of insert.
需要说明的是,insert的方式为在当前的第一检测报文的基础上,在BSID的位置上直接展开,得到新的第一检测报文,然后在新的第一检测报文中,第二段列表路径直接插入到第一段列表路径上。It should be noted that the method of insert is to directly expand on the position of BSID on the basis of the current first detection message to obtain a new first detection message, and then in the new first detection message, the first The second-segment list path is inserted directly on the first-segment list path.
示例性的,如图2-6所示,为第二网络设备(PE3)、P1、MC1和第一网络设备(ACC)之间对第一检测报文的转发过程示意图。对于如表3所示的第一检测报文,通过encaps的 方式将BSID展开,得到如表13所示的第一检测报文:Exemplarily, as shown in FIG. 2-6, it is a schematic diagram of the forwarding process of the first detection message between the second network device (PE3), P1, MC1 and the first network device (ACC). For the first detection message as shown in Table 3, the BSID is expanded by means of encaps to obtain the first detection message as shown in Table 13:
表13Table 13
Figure PCTCN2022107929-appb-000011
Figure PCTCN2022107929-appb-000011
其中,设置SA为第二网络设备的本机地址,即PE3.END,将MC1.END和ACC.END先后压栈到1::1之上,修改SL的指向(如表14所示),令SL=2(即指向1::1上的SID),设置DA为SL=2所指向的segment list,即P1.END,即P1为下一个目的网络设备。然后,第二网络设备(PE3)向P1转发第一检测报文。根据图1可知,P1为PE3相邻的网络设备,PE3直接通过相应的接口向P1转发第一检测报文。在一些可能的实现方式中,若PE3和P1之间的链路发生故障,PE3也可以通过备用链路向P1转发第一检测报文。Among them, set SA as the local address of the second network device, that is, PE3.END, push MC1.END and ACC.END onto 1::1 successively, and modify the direction of SL (as shown in Table 14), Let SL=2 (that is, point to the SID on 1::1), set DA as the segment list pointed to by SL=2, that is, P1.END, that is, P1 is the next destination network device. Then, the second network device (PE3) forwards the first detection packet to P1. It can be seen from FIG. 1 that P1 is a network device adjacent to PE3, and PE3 directly forwards the first detection message to P1 through a corresponding interface. In some possible implementation manners, if the link between PE3 and P1 fails, PE3 may also forward the first detection packet to P1 through the standby link.
当P1接收到第一检测报文后,令SL=1,则指向MC1.END,则将DA设置为“DA=MC1.END”,即MC1为下一个目的网络设备。然后,P1向MC1转发第一检测报文。根据图1可知,P1到MC1可以有两个路径,一个是P1->PE1->MC1,一个是P1->PE1->PE2->MC2->MC1。通过预设策略,或者BE的方式,P1可以选择其中一条路径,例如选择了P1->PE1->MC1。When P1 receives the first detection message, set SL=1, point to MC1.END, then set DA to "DA=MC1.END", that is, MC1 is the next destination network device. Then, P1 forwards the first detection message to MC1. According to Figure 1, it can be known that there are two paths from P1 to MC1, one is P1->PE1->MC1, and the other is P1->PE1->PE2->MC2->MC1. Through the preset strategy or BE, P1 can choose one of the paths, for example, P1->PE1->MC1 is selected.
当MC1接收到第一检测报文后,令SL=0,则指向1::1,则将DA设置为“DA=1::1”,即IPv6地址为1::1的网络设备(即ACC,第一网络设备)为下一个目的网络设备。然后,MC1向第一网络设备(ACC)转发第一检测报文。根据图1可知,MC1到ACC可以有两个路径,一个是MC1->AGG1->ACC,一个是MC1->MC2->AGG2->AGG1->ACC。通过预设策略,或者BE的方式,MC1可以选择其中一条路径,例如选择了MC1->AGG1->ACC。After MC1 receives the first detection message, make SL=0, then point to 1::1, then DA is set to " DA=1::1 ", promptly IPv6 address is the network equipment of 1::1 (namely ACC, the first network device) is the next destination network device. Then, MC1 forwards the first detection packet to the first network device (ACC). It can be seen from Figure 1 that there are two paths from MC1 to ACC, one is MC1->AGG1->ACC, and the other is MC1->MC2->AGG2->AGG1->ACC. MC1 can choose one of the paths through a preset policy or BE, for example, MC1->AGG1->ACC.
当MC1向第一网络设备(ACC)发送第一检测报文时,MC1执行USP,得到如表14所示的第一检测报文:When MC1 sends the first detection message to the first network device (ACC), MC1 executes the USP to obtain the first detection message shown in Table 14:
表14Table 14
Figure PCTCN2022107929-appb-000012
Figure PCTCN2022107929-appb-000012
Figure PCTCN2022107929-appb-000013
Figure PCTCN2022107929-appb-000013
如果MC1.END是PSP模式,那么MC1剥除第一检测报文的SRH,得到如表12所示的第一检测报文,然后转发给第一网络设备(ACC)。当MC1向第一网络设备(ACC)发送第一检测报文时,如果MC1.END是倒数no PSP模式,那么MC1不需要剥除第一检测报文的SRH,即转发给第一网络设备(ACC),即如表15所示的第一检测报文:If MC1.END is in PSP mode, then MC1 strips the SRH of the first detection message to obtain the first detection message shown in Table 12, and then forwards it to the first network device (ACC). When MC1 sent the first detection message to the first network equipment (ACC), if MC1.END was the reciprocal no PSP pattern, then MC1 did not need to strip the SRH of the first detection message, that is, forwarded to the first network equipment ( ACC), that is, the first detection message shown in Table 15:
表15Table 15
Figure PCTCN2022107929-appb-000014
Figure PCTCN2022107929-appb-000014
通过上述转发过程,第一网络设备(ACC)则接收到第一检测报文。需要说明的是,如果隧道的SLA质量较差,上述过程的每一步都有机会发生丢包。如果发生丢包,则第一检测报文无法发送到达第一网络设备(ACC)。Through the foregoing forwarding process, the first network device (ACC) receives the first detection message. It should be noted that if the SLA quality of the tunnel is poor, packet loss may occur in each step of the above process. If packet loss occurs, the first detection packet cannot be sent to the first network device (ACC).
在一些可能的实现方式中,使用encaps的方式或者insert的方式,第二网络设备(PE3)可以自己决定。在一些可能的实现方式中,使用encaps的方式或者insert的方式,也可以在第一检测报文中确定好。在一些可能的实现方式中,使用encaps的方式或者insert的方式,也可以由控制器决定,示例性的,第二网络设备(PE3)向控制器询问,以确定使用encaps的方式或者insert的方式。此处不作限定。In some possible implementation manners, the encaps manner or the insert manner is used, and the second network device (PE3) can decide by itself. In some possible implementation manners, the method of using encaps or insert may also be determined in the first detection message. In some possible implementations, the way to use encaps or the way to insert can also be determined by the controller. For example, the second network device (PE3) inquires the controller to determine the way to use encaps or the way to insert . It is not limited here.
(二)双边TWAMP的场景。(2) Bilateral TWAMP scenario.
举例说明,如图2-7所示,为第二网络设备(PE3)、P1、MC1和第一网络设备(ACC)之间对第一检测报文的转发过程示意图。若第一检测报文如表7所示,那么当第二网络设备(PE3)接收到第一检测报文后,从第一检测报文的负载中获取第二段列表路径的信息:“P1->MC1->ACC”,然后第二网络设备可以生成如表16所示第一检测报文:For example, as shown in FIG. 2-7, it is a schematic diagram of the forwarding process of the first detection message between the second network device (PE3), P1, MC1 and the first network device (ACC). If the first detection message is as shown in Table 7, then when the second network device (PE3) receives the first detection message, it obtains the information of the second list path from the load of the first detection message: "P1 ->MC1->ACC", and then the second network device can generate the first detection message as shown in Table 16:
表16Table 16
Figure PCTCN2022107929-appb-000015
Figure PCTCN2022107929-appb-000015
其中,SL=2,即设置“DA=P1.END”,即P1为下一个目的网络设备。然后,第二网络设备(PE3)向P1转发第一检测报文,P1根据SRH向MC1转发第一检测报文,MC1根据SRH向ACC转发第一检测报文。第二网络设备(PE3)、P1、MC1和ACC之间的转发第一检测报文的具体过程,与前述内容类似,此处不作赘述。其中,第二段列表路径中的任意一段都可以压缩到BSID中,然后对于接收到第一检测报文的任意网络设备,若SL的值指向BSID,则展开BSID,根据展开后的路径信息对第一检测报文进行转发。具体的BSID的展开方式(encaps的方式或者insert的方式)与对应的转发方法,与前述内容类似,此处不作赘述。Wherein, SL=2, that is, set "DA=P1.END", that is, P1 is the next destination network device. Then, the second network device (PE3) forwards the first detection packet to P1, P1 forwards the first detection packet to MC1 according to the SRH, and MC1 forwards the first detection packet to the ACC according to the SRH. The specific process of forwarding the first detection message among the second network device (PE3), P1, MC1 and ACC is similar to the foregoing content, and will not be repeated here. Wherein, any segment in the second list path can be compressed into the BSID, and then for any network device that receives the first detection message, if the value of SL points to the BSID, the BSID is expanded, and the expanded path information is used to The first detection packet is forwarded. The specific way of expanding the BSID (the way of encaps or the way of insert) and the corresponding forwarding method are similar to the foregoing content, and will not be repeated here.
207、第一网络设备接收第一检测报文。207. The first network device receives the first detection packet.
举例说明,若在单臂TWAMP的场景下,第一网络设备在步骤202中生成并发送如表2所示的第一检测报文,第一网络设备接收到第一检测报文时,SL=0,指向1::1,即将DA设置为得到如下表17所示的第一检测报文:For example, if in the one-armed TWAMP scenario, the first network device generates and sends the first detection message shown in Table 2 in step 202, when the first network device receives the first detection message, SL= 0, pointing to 1::1, that is, setting DA to obtain the first detection message as shown in Table 17 below:
表17Table 17
Figure PCTCN2022107929-appb-000016
Figure PCTCN2022107929-appb-000016
由于SL=0,第一网络设备执行最后一段执行外层IPv6解封装(ultimate segment decapsulation,USD),即去除第一检测报文中的SRH,得到如表18所示:Since SL=0, the first network device performs the last segment to perform outer layer IPv6 decapsulation (ultimate segment decapsulation, USD), that is, removes the SRH in the first detection message, and obtains as shown in Table 18:
表18Table 18
DA=1::1DA=1::1
SA=ACC::1SA=ACC::1
负载load
又举例说明,若在双边TWAMP的场景下,第一网络设备在步骤202中生成并发送如表7所示的第一检测报文,第一网络设备接收到第一检测报文时,SL=0,指向1::1,即将DA设置为得到如下表19所示的第一检测报文:As another example, if in the scenario of bilateral TWAMP, the first network device generates and sends the first detection message shown in Table 7 in step 202, when the first network device receives the first detection message, SL= 0, pointing to 1::1, that is, setting DA to obtain the first detection message as shown in Table 19 below:
表19Table 19
Figure PCTCN2022107929-appb-000017
Figure PCTCN2022107929-appb-000017
由于SL=0,第一网络设备执行最后一段执行外层IPv6解封装(ultimate segment decapsulation,USD),即去除第一检测报文中的SRH,得到如表20所示:Since SL=0, the first network device performs the last segment to perform outer layer IPv6 decapsulation (ultimate segment decapsulation, USD), that is, removes the SRH in the first detection message, and obtains as shown in Table 20:
表20Table 20
DA=1::1DA=1::1
SA=PE3::1SA=PE3::1
负载load
然后,第一网络设备获取接收到的检测报文中的五元组(或五元组和会话标识),并根据五元组(或五元组和会话标识)确定接收到第一检测报文。Then, the first network device obtains the quintuple (or quintuple and session identifier) in the received detection message, and determines that the first detection message is received according to the quintuple (or quintuple and session identifier) .
需要说明的是,对于第一网络设备发送的如表3、表4或表5中的第一检测报文,当第一网络设备接收到第一检测报文时,其处理方式与前述内容类似,此处不作赘述。It should be noted that, for the first detection message sent by the first network device as shown in Table 3, Table 4 or Table 5, when the first network device receives the first detection message, its processing method is similar to the foregoing , which will not be described here.
208、第一网络设备检测第一隧道和第二隧道的SLA质量。208. The first network device detects the SLA quality of the first tunnel and the second tunnel.
在本申请实施例中,SLA质量包括丢包率、时延和抖动。下面分别进行说明。In this embodiment of the application, the SLA quality includes packet loss rate, delay and jitter. Each will be described below.
1、丢包率。1. Packet loss rate.
在一些可能的实现方式中,第一网络设备可以发送多个检测报文,这些检测报文具有相同的五元组(或相同的五元组和会话标识),第一检测报文包括该多个检测报文。第一网络设备接收到第一检测报文后,检查接收到的第一检测报文的数量,以确定丢包率。例如,第一网络设备发送了100个第一检测报文,若接收到99个第一检测报文,则确定丢包率为1%。在一些可能的实现方式中,第一网络设备可以多次发送多个第一检测报文,然后每次统计丢包率,然后取平均值,得到较为准确的丢包率。In some possible implementation manners, the first network device may send multiple detection packets, these detection packets have the same quintuple (or the same quintuple and session identifier), and the first detection packet includes the multiple a detection message. After receiving the first detection packets, the first network device checks the number of the received first detection packets to determine the packet loss rate. For example, the first network device sends 100 first detection packets, and if 99 first detection packets are received, it is determined that the packet loss rate is 1%. In some possible implementation manners, the first network device may send multiple first detection packets multiple times, and then calculate the packet loss rate each time, and then take an average value to obtain a relatively accurate packet loss rate.
2、时延。2. Time delay.
举例说明,第一网络设备根据接收到第一检测报文的接收时间点和第一检测报文的发送时戳确定第一检测报文的双向时延,示例性的,第一检测报文的双向时延=第一检测报文的接收时间点–第一检测报文的发送时戳。For example, the first network device determines the two-way delay of the first detection packet according to the receiving time point of receiving the first detection packet and the sending timestamp of the first detection packet. Exemplarily, the Two-way delay = receiving time point of the first detection message - sending time stamp of the first detection message.
3、抖动。3. Jitter.
需要说明的是,抖动即时延抖动,用于表征时延的变化。在一些可能的实现方式中,第一网络设备可以根据时延(或双向时延)确定第一隧道或第二隧道的抖动。It should be noted that the jitter is the delay jitter, which is used to characterize the variation of the delay. In some possible implementation manners, the first network device may determine the jitter of the first tunnel or the second tunnel according to the delay (or two-way delay).
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为 依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that for the foregoing method embodiments, for the sake of simple description, they are expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Depending on the application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions and modules involved are not necessarily required by this application.
为便于更好的实施本申请实施例的上述方案,下面还提供用于实施上述方案的相关装置。In order to facilitate better implementation of the above solutions in the embodiments of the present application, related devices for implementing the above solutions are also provided below.
请参阅图3所示,本申请实施例提供的一种网络设备300,用作第一网络设备,可以包括:收发模块301和处理模块302。其中,Referring to FIG. 3 , a network device 300 provided by an embodiment of the present application is used as a first network device and may include: a transceiver module 301 and a processing module 302 . in,
处理模块302,用于生成第一检测报文,第一检测报文中携带第一段列表路径和第二段列表路径,第一段列表路径用于表征第一隧道,第二段列表路径用于表征第二隧道,第一隧道为从第一网络设备到第二网络设备的隧道,第二隧道为从第二网络设备到第一网络设备的隧道。收发模块301,用于发送第一检测报文。收发模块301,还用于监听第一检测报文。The processing module 302 is configured to generate a first detection message, the first detection message carries a first list path and a second list path, the first list path is used to represent the first tunnel, and the second list path is used for To characterize the second tunnel, the first tunnel is a tunnel from the first network device to the second network device, and the second tunnel is a tunnel from the second network device to the first network device. A transceiver module 301, configured to send a first detection message. The transceiver module 301 is also configured to monitor the first detection message.
在一些可能的实现方式中,收发模块301,具体用于:通过第一隧道的隧道接口发送第一检测报文,第一隧道为根据第一段列表路径创建的隧道。In some possible implementation manners, the transceiver module 301 is specifically configured to: send the first detection packet through the tunnel interface of the first tunnel, where the first tunnel is a tunnel created according to the first segment list path.
在一些可能的实现方式中,第一段列表路径和第二段列表路径正反向共路。In some possible implementation manners, the first segment of the list path and the second segment of the list path share forward and reverse paths.
在一些可能的实现方式中,收发模块301,还用于接收第一检测报文。处理模块302,还用于根据接收到第一检测报文的接收时间点和第一检测报文的发送时戳确定第一检测报文的双向时延。In some possible implementation manners, the transceiver module 301 is further configured to receive the first detection message. The processing module 302 is further configured to determine the two-way delay of the first detection message according to the receiving time point of receiving the first detection message and the sending timestamp of the first detection message.
在一些可能的实现方式中,收发模块301,还用于接收第二检测报文。处理模块302,还用于获取第二检测报文的会话标识和五元组。处理模块302,还用于若第二检测报文的会话标识和五元组与第一检测报文的会话标识和五元组均相同,则确定第二检测报文为第一检测报文。In some possible implementation manners, the transceiver module 301 is further configured to receive the second detection message. The processing module 302 is further configured to acquire the session identifier and the quintuple of the second detection message. The processing module 302 is further configured to determine that the second detection packet is the first detection packet if the session identifier and quintuple of the second detection packet are the same as the session identifier and quintuple of the first detection packet.
在一些可能的实现方式中,第一检测报文为TWAMP报文并生效,第一网络设备中配置且生效TWAMP,第二网络设备未配置或未生效TWAMP。第一检测报文中携带第一段列表路径和第二段列表路径,具体包括:第一检测报文的报头中先后压栈第一段列表路径和第二段列表路径,且第一检测报文的目的地址为第一网络设备的本机地址。In some possible implementation manners, the first detection message is a TWAMP message and takes effect, TWAMP is configured and takes effect in the first network device, and TWAMP is not configured or takes effect in the second network device. The first detection message carries the first list path and the second list path, specifically including: the first list path and the second list path are successively pushed in the header of the first detection message, and the first detection message The destination address of the file is the local address of the first network device.
在一些可能的实现方式中,第一检测报文为TWAMP报文,第一网络设备和第一网络设备中配置且生效TWAMP。第一检测报文中携带第一段列表路径和第二段列表路径包括:第一检测报文的报头中压栈第一段列表路径,且在第一检测报文的负载中携带第二段列表路径。In some possible implementation manners, the first detection packet is a TWAMP packet, and TWAMP is configured and takes effect on the first network device and the first network device. Carrying the first segment of the list path and the second segment of the list path in the first detection message includes: pushing the first segment of the list path in the header of the first detection message, and carrying the second segment in the payload of the first detection message list path.
需要说明的是,上述装置各模块/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其带来的技术效果与本申请方法实施例相同,具体内容可参见本申请前述所示的方法实施例中的叙述,此处不再赘述。It should be noted that the information interaction and execution process between the modules/units of the above-mentioned device are based on the same concept as the method embodiment of the present application, and the technical effect it brings is the same as that of the method embodiment of the present application. The specific content can be Refer to the descriptions in the foregoing method embodiments of the present application, and details are not repeated here.
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储有程序,该程序执行包括上述方法实施例中记载的部分或全部步骤。The embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a program, and the program executes some or all of the steps described in the above method embodiments.
接下来介绍本申请实施例提供的另一种网络设备400,用作第一网络设备,请参阅图4 所示,网络设备400包括:Next, another network device 400 provided by the embodiment of the present application is introduced, which is used as the first network device. Please refer to FIG. 4, the network device 400 includes:
接收器401、发射器402、处理器403和存储器404(其中网络设备400中的处理器403的数量可以一个或多个,图4中以一个处理器为例)。在本申请的一些实施例中,接收器401、发射器402、处理器403和存储器404可通过总线或其它方式连接,其中,图4中以通过总线连接为例。A receiver 401 , a transmitter 402 , a processor 403 and a memory 404 (the number of processors 403 in the network device 400 may be one or more, one processor is taken as an example in FIG. 4 ). In some embodiments of the present application, the receiver 401 , the transmitter 402 , the processor 403 and the memory 404 may be connected through a bus or in other ways, wherein connection through a bus is taken as an example in FIG. 4 .
存储器404可以包括只读存储器和随机存取存储器,并向处理器403提供指令和数据。存储器404的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。存储器404存储有操作系统和操作指令、可执行模块或者数据结构,或者它们的子集,或者它们的扩展集,其中,操作指令可包括各种操作指令,用于实现各种操作。操作系统可包括各种系统程序,用于实现各种基础业务以及处理基于硬件的任务。The memory 404 may include read-only memory and random-access memory, and provides instructions and data to the processor 403 . A part of the memory 404 may also include a non-volatile random access memory (non-volatile random access memory, NVRAM). The memory 404 stores operating systems and operating instructions, executable modules or data structures, or their subsets, or their extended sets, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks.
处理器403控制网络设备400的操作,处理器403还可以称为中央处理单元(central processing unit,CPU)。具体的应用中,网络设备400的各个组件通过总线系统耦合在一起,其中总线系统除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都称为总线系统。The processor 403 controls the operation of the network device 400, and the processor 403 may also be called a central processing unit (central processing unit, CPU). In a specific application, various components of the network device 400 are coupled together through a bus system, where the bus system may include a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, the various buses are referred to as bus systems in the figures.
上述本申请实施例揭示的方法可以应用于处理器403中,或者由处理器403实现。处理器403可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器403中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器403可以是通用处理器、数字信号处理器(digital signal processing,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器404,处理器403读取存储器404中的信息,结合其硬件完成上述方法的步骤。The methods disclosed in the foregoing embodiments of the present application may be applied to the processor 403 or implemented by the processor 403 . The processor 403 may be an integrated circuit chip and has a signal processing capability. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 403 or an instruction in the form of software. The above-mentioned processor 403 may be a general-purpose processor, a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or Other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory 404, and the processor 403 reads the information in the memory 404, and completes the steps of the above method in combination with its hardware.
接收器401可用于接收输入的数字或字符信息,以及产生与网络设备的相关设置以及功能控制有关的信号输入,发射器402可包括显示屏等显示设备,发射器402可用于通过外接接口输出数字或字符信息。The receiver 401 can be used to receive input digital or character information, and generate signal input related to network equipment settings and function control. The transmitter 402 can include a display device such as a display screen. The transmitter 402 can be used to output digital data through an external interface. or character information.
本申请实施例中,处理器403,用于执行前述网络设备400执行的基于SRv6的隧道质量检测方法。In the embodiment of the present application, the processor 403 is configured to execute the SRv6-based tunnel quality detection method executed by the foregoing network device 400 .
在另一种可能的设计中,当网络设备为芯片时,包括:处理单元和通信单元,所述处理单元例如可以是处理器,所述通信单元例如可以是输入/输出接口、管脚或电路等。该处理单元可执行存储单元存储的计算机执行指令,以使该终端内的芯片执行上述第一方面任意一项的无线报告信息的发送方法。可选地,所述存储单元为所述芯片内的存储单元,如寄存器、缓存等,所述存储单元还可以是所述终端内的位于所述芯片外部的存储单元,如 只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)等。In another possible design, when the network device is a chip, it includes: a processing unit and a communication unit, the processing unit may be, for example, a processor, and the communication unit may be, for example, an input/output interface, a pin or a circuit wait. The processing unit may execute the computer-executed instructions stored in the storage unit, so that the chip in the terminal executes the method for sending wireless report information according to any one of the above-mentioned first aspects. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc., and the storage unit may also be a storage unit in the terminal located outside the chip, such as a read-only memory (read -only memory, ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM), etc.
其中,上述任一处提到的处理器,可以是一个通用中央处理器,微处理器,ASIC,或一个或多个用于控制上述方法的程序执行的集成电路。Wherein, the processor mentioned above can be a general-purpose central processing unit, microprocessor, ASIC, or one or more integrated circuits for controlling the program execution of the above method.
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。In addition, it should be noted that the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be A physical unit can be located in one place, or it can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the device embodiments provided in the present application, the connection relationship between the modules indicates that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、ROM、RAM、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general-purpose hardware, and of course it can also be realized by special hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, Special components, etc. to achieve. In general, all functions completed by computer programs can be easily realized by corresponding hardware, and the specific hardware structure used to realize the same function can also be varied, such as analog circuits, digital circuits or special-purpose circuit etc. However, for this application, software program implementation is a better implementation mode in most cases. Based on this understanding, the essence of the technical solution of this application or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, such as a floppy disk of a computer , U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the method described in each embodiment of the present application .
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server, or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be stored by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (Solid State Disk, SSD)), etc.

Claims (20)

  1. 一种基于互联网协议第6版分段路由SRv6的隧道质量检测方法,其特征在于,包括:A tunnel quality detection method based on Internet Protocol version 6 segment routing SRv6, characterized in that it comprises:
    第一网络设备生成第一检测报文,所述第一检测报文中携带第一段列表路径和第二段列表路径,所述第一段列表路径用于表征第一隧道,所述第二段列表路径用于表征第二隧道,所述第一隧道为从所述第一网络设备到第二网络设备的隧道,所述第二隧道为从所述第二网络设备到所述第一网络设备的隧道;The first network device generates a first detection message, the first detection message carries a first list path and a second list path, the first list path is used to represent the first tunnel, and the second The segment list path is used to represent a second tunnel, the first tunnel is a tunnel from the first network device to the second network device, and the second tunnel is a tunnel from the second network device to the first network device tunnel;
    所述第一网络设备发送所述第一检测报文;The first network device sends the first detection message;
    所述第一网络设备监听所述第一检测报文。The first network device monitors the first detection packet.
  2. 根据权利要求1所述方法,其特征在于,所述第一网络设备发送所述第一检测报文包括:The method according to claim 1, wherein the sending of the first detection message by the first network device comprises:
    所述第一网络设备通过第一隧道的隧道接口发送所述第一检测报文,所述第一隧道为根据所述第一段列表路径创建的隧道。The first network device sends the first detection packet through a tunnel interface of a first tunnel, where the first tunnel is a tunnel created according to the first segment list path.
  3. 根据权利要求1或2所述方法,其特征在于,所述第一段列表路径和所述第二段列表路径正反向共路。The method according to claim 1 or 2, characterized in that, the first list path and the second list path share forward and reverse directions.
  4. 根据权利要求1-3中任一项所述方法,其特征在于,所述第一网络设备监听所述第一检测报文之后,还包括:The method according to any one of claims 1-3, wherein after the first network device monitors the first detection message, further comprising:
    所述第一网络设备接收所述第一检测报文;The first network device receives the first detection message;
    所述第一网络设备根据接收到所述第一检测报文的接收时间点和所述第一检测报文的发送时戳确定所述第一检测报文的双向时延。The first network device determines the two-way delay of the first detection packet according to the receiving time point of receiving the first detection packet and the sending timestamp of the first detection packet.
  5. 根据权利要求4所述方法,其特征在于,所述第一网络设备接收所述第一检测报文包括:The method according to claim 4, wherein the first network device receiving the first detection message comprises:
    所述第一网络设备接收第二检测报文;The first network device receives a second detection packet;
    所述第一网络设备获取所述第二检测报文的会话标识和五元组;The first network device obtains the session identifier and the quintuple of the second detection message;
    若所述第二检测报文的会话标识和五元组与所述第一检测报文的会话标识和五元组均相同,则所述第一网络设备确定所述第二检测报文为所述第一检测报文。If the session identifier and quintuple of the second detection packet are the same as the session identifier and quintuple of the first detection packet, then the first network device determines that the second detection packet is the Describe the first detection packet.
  6. 根据权利要求1-5中任一项所述方法,其特征在于,所述第一检测报文为双向主动测量协议TWAMP报文并生效,所述第一网络设备中配置且生效TWAMP,所述第二网络设备未配置或未生效TWAMP;The method according to any one of claims 1-5, wherein the first detection message is a two-way active measurement protocol TWAMP message and takes effect, TWAMP is configured and takes effect in the first network device, and the The second network device is not configured or TWAMP is not effective;
    所述第一检测报文中携带第一段列表路径和第二段列表路径,具体包括:The first detection message carries the first segment list path and the second segment list path, specifically including:
    所述第一检测报文的报头中先后压栈所述第一段列表路径和所述第二段列表路径,且所述第一检测报文的目的地址为所述第一网络设备的本机地址。The header of the first detection message successively pushes the first list path and the second list path, and the destination address of the first detection message is the local machine of the first network device address.
  7. 根据权利要求1-6中任一项所述方法,其特征在于,所述第二段列表路径压缩在绑定段标识BSID中。The method according to any one of claims 1-6, wherein the second segment list path is compressed in a binding segment identifier BSID.
  8. 根据权利要求7所述方法,其特征在于,所述BSID的展开方式为封装encaps方式或插入insert方式。The method according to claim 7, characterized in that, the expansion of the BSID is encaps or insert.
  9. 根据权利要求1-5中任一项所述方法,其特征在于,所述第一检测报文为TWAMP报文,所述第一网络设备和所述第一网络设备中配置且生效TWAMP;The method according to any one of claims 1-5, wherein the first detection message is a TWAMP message, and TWAMP is configured and effective in the first network device and the first network device;
    所述第一检测报文中携带第一段列表路径和第二段列表路径包括:Carrying the first segment list path and the second segment list path in the first detection message includes:
    所述第一检测报文的报头中压栈所述第一段列表路径,且在所述第一检测报文的负载中携带所述第二段列表路径。Pushing the first list path in the header of the first detection message, and carrying the second list path in the payload of the first detection message.
  10. 一种网络设备,其特征在于,用作第一网络设备,包括:A network device, characterized in that it is used as a first network device, comprising:
    处理模块,用于生成第一检测报文,所述第一检测报文中携带第一段列表路径和第二段列表路径,所述第一段列表路径用于表征第一隧道,所述第二段列表路径用于表征第二隧道,所述第一隧道为从所述第一网络设备到第二网络设备的隧道,所述第二隧道为从所述第二网络设备到所述第一网络设备的隧道;A processing module, configured to generate a first detection message, where the first detection message carries a first list path and a second list path, the first list path is used to represent the first tunnel, and the first list path The two-segment list path is used to represent a second tunnel, the first tunnel is a tunnel from the first network device to the second network device, and the second tunnel is a tunnel from the second network device to the first Tunnels for network devices;
    收发模块,用于发送所述第一检测报文;A transceiver module, configured to send the first detection message;
    所述收发模块,还用于监听所述第一检测报文。The transceiver module is further configured to monitor the first detection message.
  11. 根据权利要求10所述网络设备,其特征在于,所述收发模块,具体用于:The network device according to claim 10, wherein the transceiver module is specifically used for:
    通过第一隧道的隧道接口发送所述第一检测报文,所述第一隧道为根据所述第一段列表路径创建的隧道。Sending the first detection packet through a tunnel interface of a first tunnel, where the first tunnel is a tunnel created according to the first segment list path.
  12. 根据权利要求10或11所述网络设备,其特征在于,所述第一段列表路径和所述第二段列表路径正反向共路。The network device according to claim 10 or 11, wherein the path in the first segment list and the path in the second segment list share forward and reverse paths.
  13. 根据权利要求10-12中任一项所述网络设备,其特征在于,The network device according to any one of claims 10-12, characterized in that,
    所述收发模块,还用于接收所述第一检测报文;The transceiver module is further configured to receive the first detection message;
    所述处理模块,还用于根据接收到所述第一检测报文的接收时间点和所述第一检测报文的发送时戳确定所述第一检测报文的双向时延。The processing module is further configured to determine the two-way delay of the first detection message according to the receiving time point of receiving the first detection message and the sending timestamp of the first detection message.
  14. 根据权利要求13所述网络设备,其特征在于,The network device according to claim 13, characterized in that,
    所述收发模块,还用于接收第二检测报文;The transceiver module is also used to receive a second detection message;
    所述处理模块,还用于获取所述第二检测报文的会话标识和五元组;The processing module is further configured to obtain the session identifier and the quintuple of the second detection message;
    所述处理模块,还用于若所述第二检测报文的会话标识和五元组与所述第一检测报文的会话标识和五元组均相同,则确定所述第二检测报文为所述第一检测报文。The processing module is further configured to determine that the second detection message has the same session identifier and quintuple as the session identifier and quintuple of the first detection message. is the first detection packet.
  15. 根据权利要求10-14中任一项所述网络设备,其特征在于,所述第一检测报文为TWAMP报文并生效,所述第一网络设备中配置且生效TWAMP,所述第二网络设备未配置或未生效TWAMP;The network device according to any one of claims 10-14, wherein the first detection message is a TWAMP message and takes effect, TWAMP is configured and takes effect in the first network device, and the second network The device is not configured or TWAMP is not in effect;
    所述第一检测报文中携带第一段列表路径和第二段列表路径,具体包括:The first detection message carries the first segment list path and the second segment list path, specifically including:
    所述第一检测报文的报头中先后压栈所述第一段列表路径和所述第二段列表路径,且所述第一检测报文的目的地址为所述第一网络设备的本机地址。The header of the first detection message successively pushes the first list path and the second list path, and the destination address of the first detection message is the local machine of the first network device address.
  16. 根据权利要求10-14中任一项所述网络设备,其特征在于,所述第一检测报文为TWAMP报文,所述第一网络设备和所述第一网络设备中配置且生效TWAMP;The network device according to any one of claims 10-14, wherein the first detection message is a TWAMP message, and TWAMP is configured and effective in the first network device and the first network device;
    所述第一检测报文中携带第一段列表路径和第二段列表路径包括:Carrying the first segment list path and the second segment list path in the first detection message includes:
    所述第一检测报文的报头中压栈所述第一段列表路径,且在所述第一检测报文的负载中携带所述第二段列表路径。Pushing the first list path in the header of the first detection message, and carrying the second list path in the payload of the first detection message.
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有程序,所述程序使得计算机设备执行如权利要求1-9中任一项的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a program, and the program causes a computer device to execute the method according to any one of claims 1-9.
  18. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机执行指令,所述计算机执行指令存储在计算机可读存储介质中;设备的至少一个处理器从所述计算机可读存储介质中读取所述计算机执行指令,所述至少一个处理器执行所述计算机执行指令使得所述设备执行如权利要求1-9中任一项的方法。A computer program product, characterized in that the computer program product includes computer-executable instructions stored in a computer-readable storage medium; at least one processor of the device reads from the computer-readable storage medium Taking the computer-executable instructions, execution of the computer-executable instructions by the at least one processor causes the device to perform the method according to any one of claims 1-9.
  19. 一种网络设备,其特征在于,所述网络设备包括至少一个处理器、存储器和通信接口;A network device, characterized in that the network device includes at least one processor, a memory, and a communication interface;
    所述至少一个处理器与所述存储器和所述通信接口耦合;the at least one processor is coupled to the memory and the communication interface;
    所述存储器用于存储指令,所述处理器用于执行所述指令,所述通信接口用于在所述至少一个处理器的控制下与其他网络设备进行通信;The memory is used to store instructions, the processor is used to execute the instructions, and the communication interface is used to communicate with other network devices under the control of the at least one processor;
    所述指令在被所述至少一个处理器执行时,使所述至少一个处理器执行如权利要求1-9中任一项的方法。The instructions, when executed by the at least one processor, cause the at least one processor to perform the method according to any one of claims 1-9.
  20. 一种芯片系统,其特征在于,所述芯片系统包括处理器和存储器,所述存储器和所述处理器通过线路互联,所述存储器中存储有指令,所述处理器用于执行如权利要求1-9中任一项的方法。A chip system, characterized in that, the chip system includes a processor and a memory, the memory and the processor are interconnected by a line, instructions are stored in the memory, and the processor is used to execute claims 1- 9 methods.
PCT/CN2022/107929 2021-07-29 2022-07-26 Srv6-based tunnel quality measurement method and related apparatus WO2023005927A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110864909.1 2021-07-29
CN202110864909.1A CN115695246A (en) 2021-07-29 2021-07-29 Tunnel quality detection method based on SRv and related device

Publications (1)

Publication Number Publication Date
WO2023005927A1 true WO2023005927A1 (en) 2023-02-02

Family

ID=85058823

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/107929 WO2023005927A1 (en) 2021-07-29 2022-07-26 Srv6-based tunnel quality measurement method and related apparatus

Country Status (2)

Country Link
CN (1) CN115695246A (en)
WO (1) WO2023005927A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110855531A (en) * 2019-12-02 2020-02-28 锐捷网络股份有限公司 Forwarding path detection method and device
CN110971433A (en) * 2018-09-29 2020-04-07 华为技术有限公司 Method, device and system for acquiring SRv6 tunnel information
US20200204469A1 (en) * 2018-12-21 2020-06-25 Cisco Technology, Inc. End-to-end path delay measurements in a network
CN112994961A (en) * 2019-12-02 2021-06-18 华为技术有限公司 Transmission quality detection method, device, system and storage medium
CN114650242A (en) * 2020-12-21 2022-06-21 华为技术有限公司 Path fault detection method, device, related equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971433A (en) * 2018-09-29 2020-04-07 华为技术有限公司 Method, device and system for acquiring SRv6 tunnel information
US20200204469A1 (en) * 2018-12-21 2020-06-25 Cisco Technology, Inc. End-to-end path delay measurements in a network
CN110855531A (en) * 2019-12-02 2020-02-28 锐捷网络股份有限公司 Forwarding path detection method and device
CN112994961A (en) * 2019-12-02 2021-06-18 华为技术有限公司 Transmission quality detection method, device, system and storage medium
CN114650242A (en) * 2020-12-21 2022-06-21 华为技术有限公司 Path fault detection method, device, related equipment and storage medium

Also Published As

Publication number Publication date
CN115695246A (en) 2023-02-03

Similar Documents

Publication Publication Date Title
CN108574616B (en) Method, equipment and system for processing route
CN109391560B (en) Network congestion notification method, proxy node and computer equipment
US11050586B2 (en) Inter-cloud communication method and related device, and inter-cloud communication configuration method and related device
CN111682952B (en) On-demand probing for quality of experience metrics
KR101900536B1 (en) Implementing a 3g packet core in a cloud computer with openflow data and control planes
US9231820B2 (en) Methods and apparatus for controlling wireless access points
US10085253B2 (en) Methods and apparatus for controlling wireless access points
US9438496B2 (en) Monitoring link quality between network devices
CN107078963B (en) Route tracing in virtual extensible local area networks
US11172054B2 (en) Cross-device segmentation offload
US20130182601A1 (en) System and Method for Aggregating and Estimating the Bandwidth of Multiple Network Interfaces
US11165693B2 (en) Packet forwarding
US10469362B1 (en) Network routing utilization of application programming interfaces
CN111371634B (en) Communication method, device and system
CN112956159A (en) Active directional data plane traffic monitoring for wireline networks
CN105637819A (en) Methods and systems for transmitting broadcast data
WO2021139304A1 (en) Method and device for multi-cloud interconnection
CN113055293B (en) Routing method and device in software defined wide area network and communication system
US8675669B2 (en) Policy homomorphic network extension
US20230327983A1 (en) Performance measurement in a segment routing network
WO2023005927A1 (en) Srv6-based tunnel quality measurement method and related apparatus
WO2022121638A1 (en) Packet processing method and device
US11489714B2 (en) Method and system for performing network fault analysis
WO2024001701A1 (en) Data processing method, apparatus and system
WO2019184652A1 (en) Data transmission method and related 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: 22848532

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE