WO2023279990A1 - 报文传输方法、装置和系统、网络设备及存储介质 - Google Patents

报文传输方法、装置和系统、网络设备及存储介质 Download PDF

Info

Publication number
WO2023279990A1
WO2023279990A1 PCT/CN2022/101240 CN2022101240W WO2023279990A1 WO 2023279990 A1 WO2023279990 A1 WO 2023279990A1 CN 2022101240 W CN2022101240 W CN 2022101240W WO 2023279990 A1 WO2023279990 A1 WO 2023279990A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
network device
indication information
packet
error message
Prior art date
Application number
PCT/CN2022/101240
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to EP22836744.7A priority Critical patent/EP4333382A1/en
Publication of WO2023279990A1 publication Critical patent/WO2023279990A1/zh
Priority to US18/406,468 priority patent/US20240223496A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/12Arrangements for remote connection or disconnection of substations or of equipment thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/20Hop count for routing purposes, e.g. TTL
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0023Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the signalling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0036Systems modifying transmission characteristics according to link quality, e.g. power backoff arrangements specific to the receiver
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the present application relates to the technical field of communications, and in particular to a message transmission method, device and system, network equipment and storage media.
  • IP packet is a data unit transmitted at the network layer.
  • the IP message usually carries the maximum hop count indication information.
  • the network device needs to determine whether to continue forwarding the IP message according to the maximum hop count indication information.
  • the process of transmitting the IP message according to the maximum hop count indication information is as follows: the first network device receives the IP message sent by the source network device, and the IP message carries the maximum hop count indication information (such as a TTL value); The first network device determines whether the IP message reaches the corresponding maximum hop number according to the maximum hop count indication information; if the IP message does not reach the corresponding maximum hop count, the first network device updates the maximum hop count indication in the IP message information (such as reducing the TTL value by 1), and continue to send the corresponding IP packet to the intermediate network device; after the intermediate network device receives the IP packet, it determines whether the IP packet reaches the corresponding If the intermediate network device determines that the IP packet has reached the corresponding maximum hop count, it will send an error message to the first network device, and the error message is used to indicate that the IP message has reached the corresponding maximum hop count , and the error message carries identification information of a second network device, and the second network device is an intermediate network device that generates the error message.
  • the first network device When the first network device receives the error message, because part of the information is missing in the error message, the first network device cannot use this part of information when processing the error message, and the processing method is single.
  • Embodiments of the present application provide a message transmission method and device, network equipment, and a storage medium, capable of carrying processing information for indicating a processing method for an error message in an error message corresponding to an IP message.
  • the present application provides a message transmission method.
  • the method is executed by the first network device.
  • the method includes: receiving an IP message; adding indication information to the IP message and sending it out, the indication information is used to indicate to add processing information to an error message corresponding to the IP message, and the processing information It is used to indicate a processing mode for the error message, where the error message is generated by the second network device when the IP message reaches the corresponding maximum hop count.
  • the second network device by adding indication information in the IP message and sending the IP message after adding the indication information, the second network device will send the carrying An error message containing processing information indicating how to process the error message.
  • the first network device receives the error message sent by the second network device, it can process the error message according to the processing information in the error message, and the processing method is more flexible.
  • the error message corresponding to the IP message refers to the second network device according to the maximum hop number indication information in the received IP message (such as the maximum hop number indication information in the tunnel header of the IP message) ) to determine the error message generated when the IP message reaches the corresponding maximum hop count. If the hop count minus 1 indicated by the maximum hop count indication information in the tunnel header of the IP message received by the second network device is equal to 0, it means that the IP message reaches the corresponding maximum hop count, and the second network device generates an IP The error message corresponding to the message.
  • the maximum hop number indication information in the received IP message such as the maximum hop number indication information in the tunnel header of the IP message
  • adding the indication information to the IP packet includes: adding an IPv6 extension header to the IP packet, where the IPv6 extension header is used to carry the indication information.
  • the extension header is an existing IPv6 extension header, such as a destination option header or a hop-by-hop header.
  • the IP message carries the indication information.
  • an IPv6 extension header is added to carry the indication information, so that the IP packet carries the indication information.
  • the processing information is the same as the indication information.
  • Both the indication information and the processing information include at least one of VPN indication information and mode indication information.
  • the VPN indication information is used to indicate the VPN corresponding to the source network device of the IP packet.
  • the VPN indication information includes at least one of a VPN identifier and an ingress interface identifier, where the ingress interface identifier is an identifier of an interface of the first network device corresponding to the source VPN. Both of these two identifiers can effectively identify the source VPN.
  • the mode indication information is used to indicate a time-to-live (TTL) mode corresponding to the IP packet.
  • TTL mode is a uniform mode or a pipe mode.
  • the method further includes: receiving the error message, where the error message includes the processing information; and processing the error message according to the processing information.
  • the processing information only includes mode indication information
  • the mode indication information is first mode indication information for indicating that the TTL mode is a pipeline mode. Then, processing the error message according to the indication information in the error message includes: discarding the error message under the indication of the first mode indication information.
  • processing the processing information only includes VPN indication information.
  • processing the error packet according to the processing information includes sending the error packet to the source network device according to the VPN indication information. For example, first the first network device determines the target interface according to the VPN indication information; then sends the error packet from the target interface to the source network device.
  • the indication information includes VPN indication information and mode indication information
  • the mode indication information is second mode indication information used to indicate that the TTL mode is a unified mode.
  • the first network device Under the instruction of the second mode instruction information, the first network device sends the error message to the source network device according to the VPN instruction information.
  • the indication information includes VPN indication information and mode indication information
  • the mode indication information is first mode indication information used to indicate that the TTL mode is a pipe mode.
  • the VPN indication information does not work, and the first network device still discards the error message under the indication of the first mode indication information.
  • the processing information is the same as the indication information.
  • Both the instruction information and the processing information are first identifiers.
  • the first network device When receiving the IP packet sent by the source network device, the first network device records the correspondence between the control information of the IP packet and the first identifier.
  • the first identifier uniquely corresponds to the IP packet, that is, different IP packets sent by the source network device correspond to different first identifiers.
  • the first network device receives the error message carrying the first identifier, it searches locally for control information corresponding to the first identifier, and processes the error message according to the found control information.
  • the content of the control information is the same as that of the aforementioned processing information, and related content refers to the aforementioned content, and detailed description is omitted here.
  • the processing information is different from the indication information.
  • the indication information is the first identifier
  • the processing information is the second identifier.
  • the first network device stores the correspondence between the first identifier and the second identifier.
  • the first network device records the correspondence between the control information of the IP packet and the first identifier.
  • the first identifier uniquely corresponds to the IP packet, that is, different IP packets sent by the source network device correspond to different first identifiers.
  • the first network device When the first network device receives the error packet carrying the second identifier, it searches locally for the first identifier corresponding to the second identifier, and searches for the control information corresponding to the first identifier, and processes the error packet according to the found control information. to process.
  • the content of the control information is the same as that of the aforementioned processing information, and related content refers to the aforementioned content, and detailed description is omitted here.
  • the first network device is an ingress device of the IP tunnel.
  • the type of IP tunnel includes but not limited to IPv4 over SRv6 tunnel, IPv6 over IPv6-based segment routing (segment routing IPv6, SRv6) tunnel, or, IPv4 over IPv6 tunnel.
  • the first network device when it adds indication information to the IP message, it also encapsulates a tunnel header for the IP message.
  • the types of tunnel headers are different.
  • the tunnel header is the IPv6 packet header of the SRv6 tunnel.
  • the tunnel header is the IPv6 packet header of the IP tunnel.
  • the first network device will generate a tunnel header carrying different indication information of the maximum hop count.
  • the hop count indicated by the maximum hop count indication information in the tunnel header added by the first network device is the same as the hop count indicated by the maximum hop count indication information in the received IP packet.
  • the hop count indicated by the maximum hop count indication information in the tunnel header added by the first network device is a set value, and the set value is usually relatively large, such as 255 or 128.
  • the TTL mode corresponding to the mode indication information is determined according to networking information.
  • the TTL mode indicated by the mode indication information is a unified mode.
  • the TTL mode indicated by the mode indication information is the pipe mode.
  • the networking information may be pre-configured in the first network device before the method is executed.
  • the IP message is a user datagram protocol (user datagram protocol, UDP) message, an internet control message protocol (internet control message protocol, ICMP) message or a transmission control protocol (transmission control protocol, TCP) message.
  • UDP user datagram protocol
  • ICMP internet control message protocol
  • TCP transmission control protocol
  • the IP packet is a traceroute packet.
  • the traceroute packet refers to an IP packet initiated by a source network device and used to implement traceroute.
  • the route tracking message is a UDP message or an ICMP message.
  • the error message is an ICMP message.
  • a packet transmission method is provided, and the method is executed by a second network device.
  • the method includes: receiving an IP packet sent by a first network device, where the IP packet includes indication information, and the indication information is used to indicate to add processing information to an error packet corresponding to the IP packet, and the processing The information is used to indicate the processing mode of the error message; in response to determining that the IP message reaches the corresponding maximum hop count, an error message corresponding to the IP message is generated, and the error message includes the processing information; sending an error message to the first network device, so that the first network device processes the error message according to the indication information.
  • the second network device generates an error message when the IP message reaches the corresponding maximum hop count, and according to the indication information in the received IP message, carries in the error message an indication of the processing method for the error message processing information. In this way, after receiving the error message, the first network device can process the error message according to the processing information in the error message to meet actual needs.
  • the processing information includes at least one of VPN indication information and mode indication information
  • the VPN indication information is used to indicate the source VPN of the IP packet
  • the mode indication information is used to indicate the IP The TTL mode corresponding to the packet.
  • a message transmission device includes: a receiving module and a sending module.
  • the receiving module is used to receive the IP message;
  • the sending module is used to add indication information in the IP message and send it out, and the indication information is used to indicate to add processing in the error message corresponding to the IP message information, where the processing information is used to indicate a processing manner for the error packet, where the error packet is generated by the second network device when the IP packet reaches a corresponding maximum hop count.
  • the sending module is configured to add an IPv6 extension header to the IP message, and the extension header is used to carry the indication information.
  • the extension header includes an option field, and the option field is used to carry the indication information.
  • the extension header is a destination option header or a hop-by-hop header.
  • the receiving module is further configured to receive the error message, and the error message includes the processing information; the sending module is further configured to process the error message according to the processing information.
  • the processing information includes first mode indication information, where the first mode indication information is used to indicate that the TTL mode is a pipeline mode.
  • the sending module is configured to discard the error message under the instruction of the first mode instruction information.
  • the processing information does not include mode indication information, but only includes VPN indication information.
  • the VPN indication information is used to indicate the VPN corresponding to the source network device of the IP packet.
  • the sending module is configured to send the error message to the source network device according to the VPN indication information.
  • the processing information includes VPN indication information and second mode indication information, where the second mode indication information is used to indicate that the TTL mode is a unified mode.
  • the sending module is configured to send the error packet to the source network device to which the IP packet belongs according to the VPN instruction information under the instruction of the second instruction information.
  • the sending module is configured to determine a target interface according to the VPN indication information; and send the error message from the target interface to the source network device.
  • the sending module is further configured to encapsulate a tunnel header for the IP packet, and the tunnel header includes maximum hop count indication information.
  • a message transmission device in a fourth aspect, includes a receiving module, a generating module and a sending module.
  • the receiving module is used to receive the IP message, and the IP message includes indication information, and the indication information is used to indicate the processing mode of the error message corresponding to the IP message;
  • the generating module is used to respond to the determination of the The IP message reaches the corresponding maximum number of hops, and an error message corresponding to the IP message is generated, the error message includes the processing information;
  • the sending module is used to send the error message to the first network device, so as to enabling the first network device to process the error message according to the indication information.
  • the processing information includes at least one of VPN indication information and mode indication information
  • the VPN indication information is used to indicate the source VPN of the IP packet
  • the mode indication information is used to indicate the IP The time-to-live TTL mode corresponding to the packet.
  • a network device includes a processor and a memory; the memory is used to store a software program, and the processor executes the software program stored in the memory so that the The network device implements the method in any possible implementation manner of the first aspect, or executes the method in any possible implementation manner of the second aspect.
  • a packet transmission system including: a first network device and a second network device.
  • the first network device is configured to execute the method in any possible implementation manner of the first aspect.
  • the second network device is configured to execute the method in any possible implementation manner of the second aspect.
  • a computer-readable storage medium stores computer instructions.
  • the computer device executes the first aspect or the second aspect. A method of any possible implementation of an aspect.
  • a computer program product containing instructions, which, when run on a computer device, causes the computer device to execute the method in any possible implementation manner of the first aspect or the second aspect above.
  • a chip including a processor, the processor is used to call from the memory and execute the instructions stored in the memory, so that the communication device installed with the chip executes the above-mentioned first aspect or the second aspect.
  • another chip including: an input interface, an output interface, a processor, and a memory, the input interface, the output interface, the processor, and the memory are connected through an internal connection path, and the processing
  • the processor is configured to execute codes in the memory, and when the codes are executed, the processor is configured to execute the method in any possible implementation manner of the first aspect or the second aspect above.
  • FIG. 1 is a schematic diagram of a network architecture of an application scenario provided by an exemplary embodiment of the present application
  • FIG. 2 is a schematic flowchart of a message transmission method provided by an exemplary embodiment of the present application
  • Fig. 3 is a schematic flowchart of another message transmission method provided by an exemplary embodiment of the present application.
  • FIG. 4 is a schematic diagram of the process of another message transmission method provided by an exemplary embodiment of the present application.
  • FIG. 5 is a schematic diagram of another message transmission method provided by an exemplary embodiment of the present application.
  • Fig. 6 is a schematic structural diagram of a message transmission device provided by an exemplary embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of another message transmission device provided by an exemplary embodiment of the present application.
  • Fig. 8 is a schematic structural diagram of a network device provided by an exemplary embodiment of the present application.
  • IP protocol The IP protocol is the core part of the transmission control protocol (transmission control protocol, TCP)/IP protocol family. Its function is to transmit data between two devices. hypertext transfer protocol, HTTP), TCP, user datagram protocol (user datagram protocol, UDP, etc.) will be encapsulated in IP packets one by one and sent to the network. There are two versions of the IP protocol, version four (v4) and version six (v6).
  • ICMP It is often used to transmit error information.
  • the ICMP protocol is a part of the IP layer, and its messages are also transmitted through IP messages.
  • TTL also known as hop limit
  • IP packet also known as a router
  • the data packet sent from the source network device will be forwarded by many routers on the way to the destination host.
  • the source network device When sending the data packet, the source network device will set a TTL value, and the TTL will be subtracted every time it passes through a network device. 1.
  • the IP data packet When the TTL is 0, the IP data packet will be directly discarded (no further forwarding), and an ICMP error message indicating TTL timeout will be sent to the source network device.
  • Tunneling technology Packets of different protocols can be re-encapsulated and sent in new packet headers.
  • the new packet headers provide routing information, so that the encapsulated packets can be transmitted through the network.
  • the tunneling technology includes several processes of data encapsulation, transmission and decapsulation.
  • the tunnel is a layer-3 protocol tunnel, such as an IPv4 over SRv6 tunnel, an IPv6 over SRv6 tunnel, or an IPv4 over IPv6 tunnel.
  • TTL mode It is used to indicate the setting method of the TTL value in the tunnel header when the IP packet enters the tunnel.
  • TTL mode includes unified mode and pipeline mode. If the TTL mode is unified, when entering the tunnel, the TTL value in the tunnel header is equal to the TTL value in the IP packet. If the TTL mode is the pipeline mode, when entering the tunnel, the TTL value in the tunnel header is equal to the set value, and the set value is usually larger, such as 255, 128 and so on.
  • Traceroute It is used to determine the path through which the Internet Protocol (IP) message sent by the source network device accesses the target device.
  • IP Internet Protocol
  • the network device can be divided into three types, namely customer edge (customer edge, CE) device, provider edge (provider edge, PE) device and provider (provider, P) device.
  • CE equipment includes switches, routers, routing switches, integrated access devices (integrated access devices, IADs), and various metropolitan area networks (metropolitan area networks, MAN)/wide area networks (wide area networks) for accessing end users.
  • WAN wide area networks
  • the PE device is a device at the aggregation layer. It accesses the data processed by the CE device and is mainly used for data aggregation and encapsulation/decapsulation.
  • the path between one PE device and another PE device may be a pseudowire (pseudowire, PW) or a tunnel according to different starting points.
  • the P device is a core layer device with powerful switching capabilities.
  • Fig. 1 is a schematic diagram of a network architecture of an application scenario provided by an exemplary embodiment of the present application. As shown in Figure 1, this scenario includes 4 CE devices, 2 PE devices, and 1 P device. The four CE devices are CE1, CE2, CE3, and CE4, and the two PE devices are PE1 and PE2. The number of network devices in FIG. 1 is only an example, which is not limited in the present disclosure.
  • a tunnel is formed between PE1 and PE2.
  • PE1 is the ingress device of the tunnel, and PE2 is the egress device of the tunnel.
  • VPN1 and VPN2 corresponds to CE1
  • VPN2 corresponds to CE3.
  • the IP addresses of CE1 and CE3 are the same, for example, 1.1.1.1.
  • Two VPNs are also configured on PE2: VPN1 and VPN2.
  • VPN1 corresponds to CE2
  • VPN2 corresponds to CE4.
  • the IP addresses of CE2 and CE4 are the same, for example, both are 2.2.2.2.
  • CE1 to initiate traceroute to CE2 as an example to illustrate the process and principle of traceroute.
  • CE1 is the source network device and CE2 is the destination network device for the traceroute packet sent by CE1.
  • the process of traceroute is as follows:
  • CE1 sends the first traceroute packet, and the TTL value in the first traceroute packet is 1.
  • the TTL value refers to the value of the TTL field.
  • PE1 receives the first traceroute packet, and according to the TTL value in the first traceroute packet, PE1 determines that the TTL expires, that is, the first traceroute packet reaches the corresponding maximum hop count.
  • PE1 sends an error message to CE1, and the error message is used to indicate that the traceroute message reaches the corresponding maximum hop count (also called TTL timeout).
  • CE1 sends a second traceroute packet, and the TTL value of the second traceroute packet is 2.
  • PE1 receives the second traceroute packet. Since the TTL value in the second traceroute packet is greater than 1, it means that the second traceroute packet has not reached the corresponding maximum hop count. PE1 determines that it needs to continue forwarding the traceroute packet. The second traceroute message. PE1 subtracts 1 from the TTL value in the second traceroute packet, and encapsulates a tunnel header for the second traceroute packet. The TTL value in the tunnel header is equal to the TTL value in the second traceroute packet. Then PE1 sends the traceroute packet with the tunnel header to the P device.
  • the P device determines whether the second traceroute packet with the tunnel header reaches the corresponding maximum hop count according to the TTL value in the tunnel header. If the second traceroute packet with the tunnel header reaches the corresponding maximum hop count, it sends CE1 sends an error message. For example, when the TTL value in the tunnel header of the second traceroute packet received is equal to 1, it means that the second traceroute packet has reached the corresponding maximum hop count; When the TTL value in the header is greater than 1, it means that the second traceroute packet has not reached the corresponding maximum hop count.
  • CE1 sends a third traceroute packet, and the TTL value of the third traceroute packet is 3.
  • PE1 receives the third traceroute packet. Since the TTL value in the third traceroute packet is greater than 1, it means that the third traceroute packet has not reached the corresponding maximum hop count. PE1 determines that it needs to continue forwarding the traceroute packet. The third traceroute message. PE1 subtracts 1 from the TTL value of the third trace-route packet and encapsulates a tunnel header for the third trace-route packet. The TTL value in the tunnel header is equal to the TTL value in the third trace-route packet. is 2, then PE1 sends the traceroute packet with the tunnel header to the P device.
  • the P device determines that it needs to continue forwarding the traceroute packet with the tunnel header, decreases the TTL value in the tunnel header by 1 to 1, and then sends the traceroute packet with the tunnel header to PE2.
  • PE2 determines that the third traceroute packet has reached the corresponding maximum hop count, and sends an error packet to CE1.
  • CE1 sends a fourth traceroute packet, and the TTL value of the fourth traceroute packet is 4.
  • PE1 receives the fourth traceroute packet. Since the TTL value in the third traceroute packet is greater than 1, it means that the third traceroute packet has not reached the corresponding maximum hop count. PE1 determines that it needs to continue forwarding the traceroute packet. The fourth traceroute packet. PE1 subtracts 1 from the TTL value of the third trace-route packet and encapsulates a tunnel header for the fourth trace-route packet. The TTL value in the tunnel header is equal to the TTL value in the fourth trace-route packet. is 3, then PE1 sends the traceroute packet with the tunnel header to the P device.
  • the P device determines that it needs to continue forwarding the traceroute packet with the tunnel header, reduces the TTL value in the tunnel header by 1 to 2, and then sends the traceroute packet with the tunnel header to PE2.
  • PE2 determines that it needs to continue forwarding the fourth trace-route packet, strips off the tunnel header, and sends the fourth trace-route packet to CE2.
  • CE2 determines itself as the destination network device according to the destination address in the fourth traceroute packet, and sends a response packet corresponding to the traceroute packet to CE1.
  • CE1 After CE1 receives the response message, it determines that the fourth tracking route message has reached the destination device, and then extracts the identification information of each network device it passes from all error messages received, so as to realize route tracking .
  • the identification information includes the IP address of the corresponding network device.
  • the identification information further includes an identification of an incoming interface of the corresponding network device.
  • the inbound interface of the network device refers to the interface through which the network device receives the traceroute message.
  • the number of network devices between CE1 and CE2 is 3 as an example for illustration. In practical applications, the number of network devices may be more than 3, for example, 4, 5, etc. .
  • the route tracking message is a UDP message or an ICMP message. Error packets are ICMP packets.
  • both the UDP message and the ICMP message are IP messages, and the version of the IP message may be v4 (ie, an IPv4 message) or v6 (ie, an IPv6 message).
  • the tunnel header is an IPv6 packet header, such as a packet header of an SRv6 tunnel. Among them, the SRv6 tunnel is a kind of IP tunnel.
  • network devices such as P devices and PE2
  • CE1 when network devices (such as P devices and PE2) send error packets to CE1, they first send the error packets to PE1, and then PE1 relays the error packets and forwards the error packets to CE1.
  • network devices such as P devices and PE2
  • PE1 when multiple VPNs are configured on PE1, there will be multiple CEs with the same IP address. For example, CE1 and CE3 have the same IP address. CE1 or CE3 will eventually discard the error packet.
  • CE1 cannot receive the error message, and cannot obtain the identification information of the network device corresponding to the error message.
  • CE1 sends IP packets to PE1.
  • TTL mode of PE1 is configured as pipe mode
  • PE1 will add a tunnel header containing the maximum hop count indication information to the IP packets sent by CE1, and the tunnel The maximum hop count indicated by the maximum hop count indication information in the header is relatively large (for example, 255).
  • the IP packet will not have insufficient hops in the tunnel, that is, the P device in the tunnel will not return an error packet.
  • the IP packet will be sent cyclically on the network, so that the IP packet cannot reach CE2.
  • a P device in the tunnel determines that the maximum hop count indicated by the maximum hop count indication information in the tunnel header has reached, the P device will generate an error message, and PE1 will receive the error message accordingly.
  • an error message is sent to CE1
  • a P device will appear in CE1's path detection, that is, the device between PE1 and PE2 will be detected by the user, which will lead to hidden dangers in network security.
  • the type of the IP packet is the same as that of the aforementioned trace-route packet, or the IP packet is a TCP packet.
  • Error packets are ICMP packets.
  • the embodiment of the present application carries indication information in the IP message, so that the error message corresponding to the IP message carries processing information for indicating the processing mode of the error message, so that PE1 can Handle error messages.
  • the processing information includes VPN indication information.
  • the source network device CE1 of the trace-route packet can be distinguished, and the error packet corresponding to the trace-route packet is sent to CE1 to ensure that CE1 can receive the information sent by each network device. Error message, so that the traceroute can display the complete path corresponding to the tunnel.
  • the processing information contained in the error message includes first mode indication information, which is used to indicate that the TTL mode of the IP message is the pipeline mode, Then PE1 discards the error message according to the first mode indication information.
  • Fig. 2 is a flowchart of a message transmission method provided by an exemplary embodiment of the present application.
  • the method is executed by a first network device, and the first network device is an ingress device of an IP tunnel, such as PE1 in FIG. 1 .
  • the method includes the following processes:
  • the IP packet is sent by a source network device, such as CE1 in FIG. 1 .
  • the indication information is used to indicate to add processing information to the error message corresponding to the IP message.
  • the processing information is used to indicate a processing manner for the error message, and the error message is generated by the second network device when the IP message reaches the corresponding maximum hop count.
  • the second network device is a network device sending an error packet in the scenario shown in FIG. 1 , such as a P device or PE2.
  • the error message corresponding to the IP message refers to the second network device according to the maximum hop number indication information in the received IP message (such as the maximum hop number indication information in the tunnel header of the IP message) ) to determine the error message generated when the IP message reaches the corresponding maximum hop count. If the hop count minus 1 indicated by the maximum hop count indication information in the tunnel header of the IP message received by the second network device is equal to 0, it means that the IP message reaches the corresponding maximum hop count, and the second network device generates an IP The error message corresponding to the message.
  • the maximum hop number indication information in the received IP message such as the maximum hop number indication information in the tunnel header of the IP message
  • the second network device by adding indication information in the IP message and sending the IP message after adding the indication information, the second network device sends a message to the first network device when the IP message reaches the corresponding maximum hop count.
  • An error message carrying processing information indicating a processing manner for the error message is sent.
  • the first network device receives the error message sent by the second network device, it can process the error message according to the processing information in the error message, and the processing method is more flexible.
  • Fig. 3 is a flowchart of a message transmission method provided by an exemplary embodiment of the present application.
  • the method may be executed by the second network device, which is the aforementioned network device that sends the error message, for example, executed by the P device or PE2 in FIG. 1 .
  • the method includes the following processes:
  • the IP packet includes indication information, and the indication information is used to indicate to add processing information to the error packet corresponding to the IP packet.
  • the processing information is used to indicate the processing mode of the error message.
  • the second network device determines whether the IP packet reaches the corresponding maximum hop count indication information according to the maximum hop count indication information in the tunnel header of the received IP packet. If the hop count minus 1 indicated by the maximum hop count indication information in the tunnel header is equal to 0, it means that the IP packet reaches the corresponding maximum hop count, and the second network device generates an error packet corresponding to the IP packet.
  • the first network device is an ingress device of the IP tunnel, such as PE1 in FIG. 1 .
  • the second network device generates an error message when the IP message reaches the corresponding maximum hop count, and according to the indication information in the received IP message, carries in the error message an indication of how to process the error message processing information. In this way, after receiving the error message, the first network device can process the error message according to the processing information in the error message, and the processing method is more flexible.
  • FIG. 4 is a schematic diagram of a process of a message transmission method provided by an exemplary embodiment of the present application.
  • FIG. 4 exemplifies the message transmission method provided by the embodiment of the present application by taking the route tracking process as an example.
  • the method includes the following processes:
  • the source network device sends a traceroute packet to the first network device.
  • the route tracing message includes the IP address of the source network device and the IP address of the destination network device, indicating that the source network device initiates route tracing to the destination network device.
  • the route tracking message further includes indication information of the maximum hop count.
  • the maximum hop count indication information is used to indicate the maximum number of network devices that the traceroute message can pass through.
  • the traceroute packet is an IPv4 packet.
  • the maximum hop count indication information is carried in the TTL field, and the maximum number indicated by the maximum hop count indication information is the value of the TTL field, also called the TTL value.
  • the route tracking packet is an IPv6 packet. In the IPv6 message, the indication information of the maximum hop count is carried in a hop limit (hop limit) field.
  • the first network device receives the traceroute packet.
  • the source network device is, for example, CE1 in FIG. 1
  • the first network device is an ingress device of the IP tunnel, for example, PE1 in FIG. 1 .
  • the first network device adds an IPv6 extension header and a tunnel header to the received route tracking packet.
  • the IPv6 extension header carries indication information, and the indication information is used to indicate to add processing information to the error message corresponding to the route tracking message.
  • the indication information includes at least one of VPN indication information and mode indication information.
  • the VPN indication information is used to indicate the source VPN of the traceroute packet.
  • the VPN indication information includes at least one of an identifier of a source VPN of the traceroute message and an identifier of an incoming interface, where the identifier of the incoming interface is an identifier of an interface of the first network device corresponding to the source VPN. Both of these two identifiers can effectively identify the source VPN.
  • the mode indication information is used to indicate the TTL mode corresponding to the trace route message.
  • the TTL mode is a uniform mode or a pipe mode.
  • the first network device For different TTL modes, the first network device generates a tunnel header carrying different maximum hop count indication information.
  • the hop count indicated by the maximum hop count indication information in the tunnel header generated by the first network device is the same as the hop count indicated by the maximum hop count indication information in the traceroute packet, for example, when the traceroute packet
  • the hop count indicated by the maximum hop count indication information in the tunnel header is also 3.
  • the hop count indicated by the maximum hop count indication information in the tunnel header generated by the first network device is a set value, and the set value is usually relatively large, such as 255, 128, and so on.
  • the TTL mode type corresponding to the mode indication information is determined according to networking information. For example, when the network where the second network device and the first network device are located belong to the same operator, the TTL mode indicated by the mode indication information is a unified mode. For another example, when the networks where the second network device and the first network device are located do not belong to the same operator, the TTL mode indicated by the mode indication information is the pipe mode.
  • the mode indication information and the VPN indication information are in the same field, for example, both are in the option field of the IPv6 extension header. Since the information amount of the indication information is small, it can be realized by using fewer bits, therefore, the indication information can be carried in the same field.
  • the extension header is a destination options header (destination options header) or a hop-by-hop options header (hop-by-hop options header).
  • the second packet carries the indication information.
  • an extension header is added to carry the indication information, so that the second packet carries the indication information.
  • the newly added extension header refers to an extension header that does not exist in the RFC standard.
  • the option field includes three subfields, namely option type (option type) subfield, option data length (opt data len) subfield and option data (option data) subfield.
  • the length of the option type subfield is 8 bits, the highest 2 bits are all 0, and the intermediate forwarding device does not perceive it.
  • the length of the option data length subfield is 8 bits, and an unsigned integer is used to indicate the length of data carried in the option data subfield, for example, 6 bytes.
  • the option data subfield is further divided into three subfields, namely a version (version) subfield, an identification (flag) subfield and an information (info) subfield.
  • the length of the version subfield is 8 bits, and the current value is 0, which can be used as a version number later.
  • the identification subfield has a length of 8 bits and is used to carry mode indication information.
  • the identification subfield may also be used to carry indication information of the identification type in the indication information.
  • the identification subfield indicates the TTL mode in bit form and indicates whether the indication information carries the VPN identification or the inbound interface identification.
  • the upper 6 bits of the identification subfield are temporarily not applicable and are set to 0.
  • the 7th bit indicates the identification type in the indication information.
  • the 7th bit when the 7th bit is the first value (such as 0 or 1), it means that the identifier in the indication information is a VPN identifier, such as a VPN ID; when the 7th bit is the second value (such as 1 or 0), it means that the identifier in the indication information is The identifier of is the ingress interface identifier, such as the ingress interface index.
  • the 8th bit indicates TTL mode. For example, when the 8th bit is the first value (such as 0 or 1), it indicates that the TTL mode is the unified mode; when the 8th bit is the second value (such as 1 or 0), it indicates that the TTL mode is the pipeline mode.
  • the length of the information subfield is 32bit, indicating the VPN ID or the index of the incoming interface (the VPN ID or the index of the incoming interface is determined according to the previous identification subfield).
  • the types of the tunnel headers are different.
  • the tunnel header is the IPv6 packet header of the SRv6 tunnel.
  • the tunnel header is the IPv6 packet header of the IP tunnel.
  • the first network device sends a route tracing packet to the second network device.
  • the second network device receives the route tracking message.
  • the second network device determines, according to the maximum hop count indication information in the tunnel header, that the traceroute packet reaches the maximum hop count corresponding to the traceroute packet, and generates an error packet.
  • the hop number indicated by the maximum hop count indication information in the tunnel header is equal to 1, for example, the TTL value in the tunnel header is equal to 1, it means that the maximum hop count corresponding to the traceroute packet has been reached, and the first When a network device sends an error message, it generates an error message.
  • the error message includes processing information, and the processing information is used to indicate a processing manner for the error message.
  • the content of the processing information is the same as that of the foregoing indication information, and includes at least one of VPN indication information and mode indication information.
  • the second network device can directly encapsulate the error header in the outer layer of the received route tracking message, and the processing method is simple.
  • the error message header includes identification information of the second network device.
  • the identification information of the second network device includes the IP address of the second network device.
  • the identification information of the second network device further includes an inbound interface identifier of the second network device, and the inbound interface of the second network device is an interface through which the second network device receives a corresponding traceroute packet.
  • the second network device is a next hop to the first network device.
  • the second network device is the next-hop device of the first network device PE1.
  • the second network device is a transit network device P device between PE2 and the first network device PE1.
  • the actions performed by the transit network device include:
  • Step 1 The transit network device determines that the traceroute packet does not reach the maximum hop count corresponding to the traceroute packet according to the maximum hop count indication information in the tunnel header (that is, the hop indicated by the maximum hop count indication information in the tunnel header). number), the transit network device will continue to forward traceroute packets.
  • the hop count indicated by the maximum hop count indication information in the tunnel header is greater than 1, for example, the TTL value in the tunnel header is greater than 1, it means that the maximum hop count corresponding to the traceroute packet has not been reached.
  • the transit network device updates the maximum hop count indication information in the tunnel header, so that the hop count indicated by the updated maximum hop count indication information is 1 smaller than the hop count indicated by the maximum hop count indication information before the update, and Send route tracking packets to the next-hop network device.
  • the route tracking packet is sent to the next-hop network device.
  • the second network device sends the error packet to the first network device.
  • the first network device receives the error message.
  • the first network device processes the error packet according to the processing information.
  • the processing information includes first mode indication information, where the first mode indication information is used to indicate that the TTL mode is the pipeline mode. Then the step 406 includes: discarding the error message under the indication of the first mode indication information.
  • the TTL value is relatively large. If the first network device still receives the error message, it means that a loop occurs in the network. For safety reasons, the error message needs to be discarded.
  • an alarm may also be issued.
  • the processing information includes second mode indication information and VPN indication information, where the second mode indication information is used to indicate that the TTL mode is a unified mode.
  • step 406 includes: sending the error message to the source network device to which the trace-route message belongs according to the VPN indication information.
  • the error message is sent to the source network device to which the route tracking message belongs, including: the first step, determining the target interface according to the VPN indication information; the second step, sending the error message from the target interface to source network device.
  • the first network device Before the first network device sends the error message from the target interface to the source network device, it also needs to extract the innermost routing trace message (that is, extract the route tracking message sent by CE1) from the error message.
  • An error message header is added to the outgoing route tracking message, and the destination address in the error message header is the IP address of the first network device.
  • the method shown in FIG. 4 is also applicable to IP packets for other purposes, such as IP packets used for data transmission.
  • the second network device by adding indication information in the IP message and sending the IP message after adding the indication information, the second network device sends a message to the first network device when the IP message reaches the corresponding maximum hop count.
  • An error message carrying processing information indicating a processing manner for the error message is sent.
  • the first network device receives the error message sent by the second network device, it can process the error message according to the processing information in the error message, and the processing method is more flexible.
  • the indication information and the processing information are the same, and both include one of the VPN indication information and the mode indication information.
  • Each network device can directly obtain the required information from the message without performing a local search, and the implementation method is simple.
  • the processing information is the same as the indication information.
  • Both the instruction information and the processing information are first identifiers.
  • the first network device When receiving the trace-route packet sent by the source network device, the first network device records the correspondence between the control information of the trace-route packet and the first identifier.
  • the first identifier uniquely corresponds to the traceroute packet, that is, different traceroute packets sent by the source network device correspond to different first identifiers.
  • the first network device receives the error message carrying the first identifier, it searches locally for control information corresponding to the first identifier, and processes the error message according to the found control information.
  • the content of the control information is the same as that of the aforementioned processing information, and related content refers to the aforementioned content, and a detailed description is omitted here.
  • the processing information is different from the indication information.
  • the indication information is the first identifier
  • the processing information is the second identifier.
  • the first network device stores the correspondence between the first identifier and the second identifier.
  • the first network device records the correspondence between the control information of the trace-route packet and the first identifier.
  • the first identifier uniquely corresponds to the traceroute packet, that is, different traceroute packets sent by the source network device correspond to different first identifiers.
  • the first network device When the first network device receives the error packet carrying the second identifier, it searches locally for the first identifier corresponding to the second identifier, and searches for the control information corresponding to the first identifier, and processes the error packet according to the found control information. to process.
  • the content of the control information is the same as that of the aforementioned processing information, and related content refers to the aforementioned content, and detailed description is omitted here.
  • Fig. 5 is a schematic diagram of a process of a message transmission method provided by an exemplary embodiment of the present application.
  • two VPNs are configured on PE1: VPN1 and VPN2.
  • VPN1 corresponds to CE1
  • VPN2 corresponds to CE3.
  • the IP addresses of CE1 and CE3 are the same, for example, both are 1.1.1.1.
  • Two VPNs are also configured on PE2: VPN1 and VPN2.
  • VPN1 corresponds to CE2
  • VPN2 corresponds to CE4.
  • the IP addresses of CE2 and CE4 are the same, for example, both are 2.2.2.2.
  • the following takes an Ipv4 over SRv6 tunnel with a TTL value of 2 as an example to illustrate the route tracking method. As shown in Figure 5, the method includes the following processes:
  • CE1 sends an IPv4 traceroute packet with a TTL value of 2 to PE1.
  • PE1 receives the traceroute packet.
  • the source address SA in the traceroute message is 1.1.1.1
  • the destination address DA is 2.2.2.2.
  • PE1 subtracts 1 from the TTL value of the route tracking message, and determines that the TTL mode is unified mode according to the configuration, then encapsulates the IPv6 header of SRv6 (the TTL value in the IPv6 header is set to be the same as the TTL value of the route tracking message, That is, it is set to 1), and an IPv6 extension header including an option field is encapsulated at the same time, and the option field carries VPN indication information and mode indication information, and continues to forward the route tracking message to the P device.
  • the mode indication information is used to indicate that the TTL mode of the route tracking message is a unified mode.
  • the VPN indication information is used to indicate the source VPN of the traceroute packet.
  • the VPN indication information includes at least one of the identifier of the source VPN and the identifier of the incoming interface of the traceroute message.
  • the source VPN is VPN1
  • the inbound interface ID is the ID of the PE1 interface corresponding to VPN1, that is, the ID of the interface through which PE1 receives the traceroute packet sent by CE1.
  • the P device determines that the TTL has expired, and sends an IPv6 ICMP error message to PE1.
  • the P device judges that the TTL timeout means that the P device judges that the maximum hop count corresponding to the traceroute packet has reached according to the TTL value in the SRv6 IPv6 header.
  • the IPv6 ICMP error message includes the received route tracking message and the ICMP error message header. That is, the ICMP error message is obtained by adding an ICMP error message header to the received route tracking message header.
  • the ICMP error message header includes identification information of the P device, and the identification information includes information such as the IPv4 address of the P device and the identification of the incoming interface.
  • the destination address in the error message header is PE1.
  • PE1 receives the ICMP error message, determines that the TTL mode is the unified mode according to the mode indication information, constructs an IPv4 ICMP error message, and sends the IPv4 ICMP error message to CE1 according to the VPN indication information.
  • constructing the ICMP error message of IPv4 includes removing the error message header in the received ICMP error message, re-encapsulating the ICMP error message header of IPv4, and the destination address in the IPv4 ICMP error message header is CE1 IP address: 1.1.1.1.
  • PE1 After constructing the IPv4 ICMP error message, PE1 determines the target interface (that is, the interface corresponding to VPN1) according to the VPN indication information, and then sends the ICMP error message from the target interface to CE1.
  • PE1 can determine the interface to which the source network device CE1 of the route tracing message is connected according to the VPN information in the error message, and send the error message to CE1 through the determined interface. In this way, CE1 can receive error messages sent by all network devices, and obtain the identification information of the network devices corresponding to the error messages, thereby realizing complete path detection.
  • the first step is to encapsulate the IPv6 header of SRv6 for the route tracking message (the TTL value in the IPv6 header is set to a larger value, such as 255), and at the same time encapsulate an IPv6 extension header including an option field, which is used for Indicate the mode indication information of the pipe mode, and continue to forward the traceroute message to the P device.
  • the option field may also carry VPN indication information.
  • the route tracking message is transmitted between the network devices corresponding to the tunnel. If a short-term loop occurs in the network, the route tracking message will be sent cyclically in the network until a certain P device in the tunnel according to the determined The TTL value in the IPv6 header of the SRv6 determines that the traceroute packet reaches the corresponding maximum hop count, generates an ICMP error packet corresponding to the traceroute packet, and sends the ICMP error packet to PE1.
  • Step 3 PE1 receives the ICMP error message, determines that the TTL mode is the pipe mode according to the mode indication information, and then discards the error message.
  • an alarm may also be initiated to indicate that a loop fault occurs.
  • this method is also applicable to IP packets for other purposes, for example, IP packets used for data transmission.
  • IP packets used for data transmission are also applicable to IP packets for other purposes, for example, IP packets used for data transmission.
  • the embodiment of the present application does not limit the protocol type of the IP message, including but not limited to TCP message, UDP message and ICMP message.
  • Fig. 6 is a schematic structural diagram of a message transmission device provided by an exemplary embodiment of the present application.
  • the device can be implemented as a part or all of the device through software, hardware or a combination of the two.
  • the device provided in the embodiment of the present application can realize the process of FIG. 2 in the embodiment of the present application.
  • the device includes: a receiving module 601 and a sending module 603 .
  • the receiving module 601 is configured to execute step 201 in FIG. 2 , that is, the receiving module 601 is configured to receive IP packets.
  • the sending module 602 is used to execute step 202 in FIG. 2, that is, the sending module 602 is used to add indication information in the IP message and send it out, the indication information is used to indicate the error corresponding to the IP message Adding processing information to the message, where the processing information is used to indicate a processing manner for the error message, and the error message is generated by the second network device when the IP message reaches a corresponding maximum hop count.
  • the receiving module 601 is also configured to execute steps 401 and 405 in FIG. 4; the sending module 602 is also configured to execute steps 402, 403 and 406 in FIG. 4.
  • the sending module 602 is configured to add an IPv6 extension header to the IP packet, where the extension header is used to carry the indication information.
  • the extension header includes an option field, and the option field is used to carry indication information.
  • the extension header is a destination option header or a hop-by-hop header.
  • the receiving module 601 is further configured to receive an error message, and the error message includes processing information; the sending module is further configured to process the error message according to the processing information.
  • the processing information includes first mode indication information, and the first mode indication information is used to indicate that the TTL mode is the pipeline mode.
  • the sending module 602 is configured to discard error packets under the instruction of the first mode instruction information.
  • the processing information does not include mode indication information, but only includes VPN indication information.
  • the VPN indication information is used to indicate the VPN corresponding to the source network device of the IP packet.
  • the sending module 602 is configured to send the error message to the source network device of the IP message according to the VPN indication information.
  • the processing information includes VPN indication information and second mode indication information, where the second mode indication information is used to indicate that the TTL mode is a unified mode.
  • the sending module 602 is configured to send the error packet to the source network device to which the IP packet belongs according to the VPN instruction information under the instruction of the second instruction information.
  • the sending module 602 is configured to determine the target interface according to the VPN indication information; and send the error message from the target interface to the source network device.
  • the sending module 602 is further configured to encapsulate a tunnel header for the IP message added with the indication information, where the tunnel header carries the indication information of the maximum hop count.
  • the IP packet is a UDP packet, an ICMP packet or a TCP packet.
  • the IP packet is a route tracking packet.
  • the error message is an ICMP message.
  • Fig. 7 is a schematic structural diagram of another message transmission device provided by an exemplary embodiment of the present application.
  • the device can be implemented as a part or all of the device through software, hardware or a combination of the two.
  • the device provided in the embodiment of the present application can realize the process of FIG. 3 in the embodiment of the present application.
  • the device includes: a receiving module 701 , a generating module 702 and a sending module 703 .
  • the receiving module 701 is configured to execute step 301 in FIG. 3 , that is, the receiving module 701 is configured to receive an IP packet, the IP packet includes indication information, and the indication information is used to indicate an error message corresponding to the IP packet. The way the text is processed.
  • the generation module 702 is used to execute step 302 in FIG.
  • the message includes the processing information.
  • the sending module 703 is configured to execute step 302 in FIG. 3 , that is, the sending module 703 is configured to send an error message to the first network device, so that the first network device reports the error message according to the indication information. text is processed.
  • the processing information includes at least one of VPN indication information and mode indication information
  • the VPN indication information is used to indicate the source VPN of the IP packet
  • the mode indication information is used to indicate the IP The time-to-live TTL mode corresponding to the packet.
  • the IP packet is a UDP packet, an ICMP packet or a TCP packet.
  • the IP packet is a route tracking packet.
  • the error message is an ICMP message.
  • each functional module in each embodiment of the present application can be integrated into one In the processor, it may exist separately physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.
  • the integrated module is realized in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions for enabling a terminal device (which may be a personal computer, a mobile phone, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method in each embodiment of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
  • the message transmission device provided in the above-mentioned embodiment transmits a message
  • only the division of the above-mentioned functional modules is used as an example for illustration.
  • the above-mentioned function allocation can be completed by different functional modules according to needs. , that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the message transmission device and the message transmission method embodiment provided by the above embodiment belong to the same idea, and the specific implementation process thereof is detailed in the method embodiment, and will not be repeated here.
  • FIG. 8 shows a schematic structural diagram of a network device 2000 provided by an exemplary embodiment of the present application.
  • the network device 2000 shown in FIG. 8 is configured to perform the operations involved in the packet transmission method shown in FIG. 2 or FIG. 3 or FIG. 4 above.
  • the network device 2000 is, for example, a switch, a router, etc., and the network device 2000 may be implemented by a general bus architecture.
  • a network device 2000 includes at least one processor 2001 , a memory 2003 and at least one communication interface 2004 .
  • the processor 2001 is, for example, a general-purpose central processing unit (central processing unit, CPU), a digital signal processor (digital signal processor, DSP), a network processor (network processor, NP), a graphics processing unit (Graphics Processing Unit, GPU), A neural network processor (neural-network processing units, NPU), a data processing unit (Data Processing Unit, DPU), a microprocessor, or one or more integrated circuits for implementing the solution of this application.
  • the processor 2001 includes an application-specific integrated circuit (application-specific integrated circuit, ASIC), a programmable logic device (programmable logic device, PLD) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.
  • the PLD is, for example, a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), a general array logic (generic array logic, GAL) or any combination thereof. It can realize or execute various logical blocks, modules and circuits described in conjunction with the disclosure of the embodiments of the present invention.
  • the processor may also be a combination that implements computing functions, for example, a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
  • the network device 2000 further includes a bus.
  • the bus is used to transfer information between the various components of the network device 2000 .
  • the bus may be a peripheral component interconnect standard (PCI for short) bus or an extended industry standard architecture (EISA for short) bus or the like.
  • PCI peripheral component interconnect standard
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 8 , but it does not mean that there is only one bus or one type of bus.
  • the memory 2003 is, for example, a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (random access memory, RAM) or a storage device that can store information and instructions.
  • Other types of dynamic storage devices such as electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc Storage (including Compact Disc, Laser Disc, Optical Disc, Digital Versatile Disc, Blu-ray Disc, etc.), magnetic disk storage medium, or other magnetic storage device, or is capable of carrying or storing desired program code in the form of instructions or data structures and capable of Any other medium accessed by a computer, but not limited to.
  • the memory 2003 exists independently, for example, and is connected to the processor 2001 via a bus.
  • the memory 2003 can also be integrated with the processor 2001.
  • the communication interface 2004 uses any device such as a transceiver for communicating with other devices or a communication network.
  • the communication network can be Ethernet, radio access network (RAN) or wireless local area networks (wireless local area networks, WLAN).
  • the communication interface 2004 may include a wired communication interface, and may also include a wireless communication interface.
  • the communication interface 2004 can be an Ethernet (Ethernet) interface, a Fast Ethernet (Fast Ethernet, FE) interface, a Gigabit Ethernet (Gigabit Ethernet, GE) interface, an asynchronous transfer mode (Asynchronous Transfer Mode, ATM) interface, a wireless local area network ( wireless local area networks, WLAN) interface, cellular network communication interface or a combination thereof.
  • the Ethernet interface can be an optical interface, an electrical interface or a combination thereof.
  • the communication interface 2004 may be used for the network device 2000 to communicate with other devices.
  • the processor 2001 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 8 .
  • Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • the network device 2000 may include multiple processors, such as the processor 2001 and the processor 2005 shown in FIG. 8 .
  • processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU).
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data such as computer program instructions.
  • the network device 2000 may further include an output device and an input device.
  • Output devices communicate with processor 2001 and can display information in a variety of ways.
  • the output device may be a liquid crystal display (liquid crystal display, LCD), a light emitting diode (light emitting diode, LED) display device, a cathode ray tube (cathode ray tube, CRT) display device, or a projector (projector).
  • the input device communicates with the processor 2001 and can receive user input in various ways.
  • the input device may be a mouse, a keyboard, a touch screen device, or a sensing device, among others.
  • the memory 2003 is used to store the program code 2010 for implementing the solution of the present application
  • the processor 2001 can execute the program code 2010 stored in the memory 2003 . That is, the network device 2000 can implement the message transmission method provided by the method embodiment through the processor 2001 and the program code 2010 in the memory 2003 .
  • One or more software modules may be included in the program code 2010 .
  • the processor 2001 itself may also store program codes or instructions for executing the solutions of the present application.
  • the network device 2000 in the embodiment of the present application may correspond to the first network device in the above method embodiments, and the processor 2001 in the network device 2000 reads the instructions in the memory 2003, so that the The network device 2000 is capable of performing all or part of the operations performed by the first network device.
  • the processor 2001 is configured to receive the IP message through the communication interface; and add indication information to the IP message and send it out through the communication interface, where the indication information is used to indicate to add processing information to the error message corresponding to the IP message. information.
  • the processing information is used to indicate a processing mode for the error message, and the error message is generated by the second network device when the IP message reaches the corresponding maximum hop count.
  • the network device 2000 in the embodiment of the present application may correspond to the second network device in the above method embodiments, and the processor 2001 in the network device 2000 reads the instructions in the memory 2003, so that the network device shown in FIG. 8 The 2000 is capable of performing all or part of the operations performed by the second network device.
  • the processor 2001 is configured to receive an IP packet through a communication interface, the IP packet includes indication information, and the indication information is used to indicate a processing mode of an error packet corresponding to the IP packet; in response to determining the The IP message reaches the corresponding maximum number of hops, an error message is generated according to the IP message, and the error message includes processing information; an error message is sent to the first network device through a communication interface, so that the first network device A network device processes and sends the error message according to the indication information.
  • the network device 2000 may also correspond to the packet transmission device shown in FIGS. 6-7 above, and each functional module in the packet transmission device is implemented by software of the network device 2000 .
  • the functional modules included in the resource scheduling apparatus are generated after the processor 2001 of the network device 2000 reads the program code 2010 stored in the memory 2003 .
  • each step of the packet transmission method shown in FIGS. 2-5 is completed by an integrated logic circuit of hardware in a processor of the network device 2000 or an instruction in the form of software.
  • the steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the 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, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, no detailed description is given here.
  • the embodiment of the present application also provides a chip, including a processor, and the processor is used to call and execute instructions stored in the memory from the memory, so that the communication device installed with the chip executes any one of the message transmission methods provided in the present application .
  • the embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor, and a memory, the input interface, the output interface, the processor, and the memory are connected through an internal connection path, and the processor is used to execute the code in the memory , when the code is executed, the processor is configured to execute any one of the above message transmission methods.
  • processor may be a CPU, or other general-purpose processors, DSP, ASIC, FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like.
  • a general purpose processor may be a microprocessor or any conventional processor or the like. It should be noted that the processor may be a processor supporting the ARM architecture.
  • processors there are one or more processors and one or more memories.
  • the memory may be integrated with the processor, or the memory may be separated from the processor.
  • the above-mentioned memory may include read-only memory and random-access memory, and provides instructions and data to the processor.
  • Memory may also include non-volatile random access memory.
  • the memory may also store reference blocks and target blocks.
  • the memory can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory.
  • the non-volatile memory may be ROM, PROM, EPROM, EEPROM or flash memory.
  • Volatile memory can be RAM, which acts as external cache memory.
  • many forms of RAM are available. For example, SRAM, DRAM, SDRAM, DDR SDRAM, ESDRAM, SLDRAM, and DR RAM.
  • a computer-readable storage medium stores computer instructions.
  • the computer device executes the above-mentioned Provided message transmission method.
  • a computer program product including instructions is also provided, which, when running on a computer device, causes the computer device to execute the message transmission method provided above.
  • all or part may be implemented by software, hardware, firmware or any combination thereof, and when software is used, all or part may be implemented in the form of a computer program product.
  • the computer program product includes one or more computer instructions, and when the computer program instructions are loaded and executed on the server or terminal, all or part of the processes or functions according to the embodiments of the present application will be generated.
  • 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, DSL) or wireless (eg, infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium may be any available medium that can be accessed by a server or a terminal, 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, and a magnetic tape, etc.), an optical medium (such as a digital video disk (Digital Video Disk, DVD), etc.), or a semiconductor medium (such as a solid-state hard disk, etc.).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请公开了一种报文传输方法、装置和系统、网络设备及存储介质,属于通信技术领域。该方法包括:第一网络设备接收IP报文;在所述IP报文中添加指示信息并发送出去,所述指示信息用于指示在所述IP报文对应的差错报文中添加处理信息,所述处理信息用于指示对所述差错报文的处理方式,所述差错报文是第二网络设备在所述IP报文达到对应的最大跳数时生成的。该方法能够在IP报文对应的差错报文中携带用于指示对差错报文的处理方式的处理信息,使得第一网络设备能够根据该处理信息处理差错报文。

Description

报文传输方法、装置和系统、网络设备及存储介质
本申请要求于2021年07月09日提交的申请号为202110778464.5、发明名称为“报文传输方法、装置和系统、网络设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,特别涉及一种报文传输方法、装置和系统、网络设备及存储介质。
背景技术
互联网协议(Internet Protocol,IP)报文是在网络层传输的数据单元。IP报文中通常会携带最大跳数指示信息,在IP报文的传输过程中,网络设备需要根据该最大跳数指示信息确定是否继续转发该IP报文。
相关技术中,根据该最大跳数指示信息传输IP报文的过程如下:第一网络设备接收源网络设备发送的IP报文,IP报文中携带有最大跳数指示信息(例如TTL值);第一网络设备根据该最大跳数指示信息,确定IP报文是否达到对应的最大跳数;如果IP报文未达到对应的最大跳数,第一网络设备更新IP报文中的最大跳数指示信息(例如将TTL值减1),继续向中间网络设备发送对应的IP报文;中间网络设备收到IP报文后,根据IP报文中的最大跳数指示信息确定IP报文是否达到对应的最大跳数;如果中间网络设备确定IP报文已达到对应的最大跳数,则向第一网络设备发送差错报文,该差错报文用于指示该IP报文已达到对应的最大跳数,且该差错报文中携带有第二网络设备的标识信息,该第二网络设备为生成该差错报文的中间网络设备。第一网络设备接收到该差错报文之后,向源网络设备发送该差错报文。
当第一网络设备接收到差错报文时,由于差错报文里缺失部分信息,使得第一网络设备在处理差错报文时无法利用这部分信息,处理方式单一。
发明内容
本申请实施例提供了一种报文传输方法和装置、网络设备及存储介质,能够在IP报文对应的差错报文中携带用于指示对差错报文的处理方式的处理信息。
第一方面,本申请提供了一种报文传输方法。该方法由第一网络设备执行。该方法包括:接收IP报文;在所述IP报文中添加指示信息并发送出去,所述指示信息用于指示在所述IP报文对应的差错报文中添加处理信息,所述处理信息用于指示对所述差错报文的处理方式,所述差错报文是第二网络设备在所述IP报文达到对应的最大跳数时生成的。
在本申请中,通过在IP报文中添加指示信息并发送添加指示信息后的IP报文,使得第二网络设备在该IP报文达到对应的最大跳数时,向第一网络设备发送携带了用于指示对差错报文的处理方式的处理信息的差错报文。这样,当第一网络设备接收到第二网络设备发送的 差错报文时,能够根据差错报文中的处理信息对差错报文进行处理,处理方式更加灵活。
在本申请中,IP报文对应的差错报文是指,第二网络设备在根据接收到的IP报文中的最大跳数指示信息(例如IP报文的隧道头中的最大跳数指示信息)确定出IP报文达到对应的最大跳数时所生成的差错报文。如果第二网络设备接收到的IP报文的隧道头中的最大跳数指示信息所指示的跳数减1等于0,表示该IP报文达到对应的最大跳数,则第二网络设备生成IP报文对应的差错报文。
在一些示例中,在所述IP报文中添加指示信息,包括:为所述IP报文添加IPv6扩展头,所述IPv6扩展头用于携带所述指示信息。
在一种可能的实施方式中,所述扩展头为已有的IPv6扩展头,例如目的选项头或者逐跳头。通过在已有的扩展头中新增携带指示信息的选项字段,从而使得IP报文携带该指示信息。
在另一种可能的实施方式中,通过新增一个IPv6扩展头来携带该指示信息,从而使得IP报文携带该指示信息。
在一种可能的实施方式中,所述处理信息与所述指示信息相同。指示信息和处理信息均包括VPN指示信息和模式指示信息中的至少一种。所述VPN指示信息用于指示所述IP报文的源网络设备对应的VPN。示例性地,VPN指示信息包括VPN的标识和入接口标识中的至少一种,所述入接口标识为与所述来源VPN对应的第一网络设备的接口的标识。这两种标识均能有效标识来源VPN。所述模式指示信息用于指示IP报文对应的存活时间(time-to-live,TTL)模式。可选地,TTL模式为统一(uniform)模式或管道(pipe)模式。
可选地,该方法还包括:接收所述差错报文,所述差错报文包括所述处理信息;以及根据所述处理信息处理所述差错报文。
在一些示例中,所述处理信息仅包括模式指示信息,且模式指示信息为用于指示所述TTL模式为管道模式的第一模式指示信息。则根据所述差错报文中的指示信息对所述差错报文进行处理,包括:在所述第一模式指示信息的指示下,丢弃所述差错报文。
在另一些示例中,所述处理信息仅包括VPN指示信息。示例性地,根据所述处理信息处理所述差错报文,包括根据所述VPN指示信息,向所述源网络设备发送所述差错报文。例如,首先第一网络设备根据所述VPN指示信息确定目标接口;然后将所述差错报文从所述目标接口发送给所述源网络设备。
在另一些示例中,指示信息包括VPN指示信息和模式指示信息,且该模式指示信息为用于指示所述TTL模式为统一模式的第二模式指示信息。第一网络设备在第二模式指示信息的指示下,根据所述VPN指示信息,将所述差错报文发送给所述源网络设备。
在又一些示例中,指示信息包括VPN指示信息和模式指示信息,且该模式指示信息为用于指示所述TTL模式为管道模式的第一模式指示信息。此时,VPN指示信息不起作用,第一网络设备仍然在所述第一模式指示信息的指示下,丢弃所述差错报文。
在另一种可能的实施方式中,所述处理信息与所述指示信息相同。指示信息和处理信息均为第一标识。第一网络设备在接收到源网络设备发送的IP报文时,记录IP报文的控制信息和第一标识的对应关系。该第一标识与IP报文唯一对应,即源网络设备发送的不同的IP报文,对应不同的第一标识。当第一网络设备接收到携带第一标识的差错报文时,在本地查找第一标识对应的控制信息,并根据查找到的控制信息对差错报文进行处理。这里,控制信息的内容和前述处理信息的内容相同,相关内容参见前述内容,在此省略详细描述。
在又一种可能的实施方式中,处理信息与指示信息不同。例如,指示信息为第一标识,处理信息为第二标识。第一标识和第二标识一一对应,不同的第一标识对应的第二标识不同。第一网络设备存储有第一标识和第二标识之间的对应关系。第一网络设备在接收到源网络设备发送的IP报文时,记录IP报文的控制信息和第一标识的对应关系。该第一标识与IP报文唯一对应,即源网络设备发送的不同的IP报文,对应不同的第一标识。当第一网络设备接收到携带第二标识的差错报文时,在本地查找第二标识对应的第一标识,以及查找第一标识对应的控制信息,并根据查找到的控制信息对差错报文进行处理。这里,控制信息的内容和前述处理信息的内容相同,相关内容参见前述内容,在此省略详细描述。
在这两种实施方式中,通过将控制信息保存在本地,仅发送标识,可以减小报文的数据量,减少网络开销。
在本申请中,第一网络设备为IP隧道的入口设备。其中,IP隧道的类型包括但不限于IPv4 over SRv6隧道,IPv6 over基于IPv6的段路由(segment routing IPv6,SRv6)隧道,或者,IPv4 over IPv6隧道。
在本申请中,第一网络设备在所述IP报文中添加指示信息时,还为IP报文封装隧道头。对于不同类型的IP隧道,隧道头的类型不同。例如,对于IPv4 over SRv6隧道,Ipv6 over SRv6隧道,隧道头为SRv6隧道的IPv6报文头。又例如,对于IPv4 over IPv6隧道,隧道头为IP隧道的IPv6报文头。
不同的TTL模式中,第一网络设备会生成携带不同的最大跳数指示信息的隧道头。例如,对于统一模式,第一网络设备添加的隧道头中的最大跳数指示信息所指示的跳数与接收到的IP报文中的最大跳数指示信息所指示的跳数相同。又例如,对于管道模式,第一网络设备添加的隧道头中的最大跳数指示信息所指示的跳数为设定值,该设定值通常较大,例如255、或者128等。
可选地,模式指示信息对应的TTL模式根据组网信息确定。例如,当第二网络设备和第一网络设备所在的网络属于同一运营商,则模式指示信息所指示的TTL模式为统一模式。又例如,当第二网络设备和第一网络设备所在的网络不属于同一运营商,则模式指示信息所指示的TTL模式为管道模式。该组网信息可以在该方法执行之前预先配置在第一网络设备中。
可选地,所述IP报文为用户数据报协议(user datagram protocol,UDP)报文、互联网控制报文协议(internet control message protocol,ICMP)报文或者传输控制协议(transmission control protocol,TCP)报文。
在一些示例中,所述IP报文为路由跟踪报文。这里,路由跟踪报文是指由源网络设备发起,用于实现路由跟踪的IP报文。可选地,路由跟踪报文为UDP报文或ICMP报文。
可选地,所述差错报文为ICMP报文。
第二方面,提供了一种报文传输方法,该方法由第二网络设备执行。该方法包括:接收第一网络设备发送的IP报文,所述IP报文包括指示信息,所述指示信息用于指示在所述IP报文对应的差错报文中添加处理信息,所述处理信息用于指示对所述差错报文的处理方式;响应于确定所述IP报文达到对应的最大跳数,生成所述IP报文对应的差错报文,所述差错报文包括所述处理信息;向所述第一网络设备发送差错报文,以使所述第一网络设备根据所述指示信息对所述差错报文进行处理。
第二网络设备在IP报文达到对应的最大跳数时,生成差错报文,并且根据接收到的IP 报文中的指示信息,在差错报文中携带用于指示对差错报文的处理方式的处理信息。这样,第一网络设备接收到该差错报文后,可以根据差错报文中的处理信息对差错报文进行处理,以适应实际需求。
可选地,所述处理信息包括VPN指示信息和模式指示信息中的至少一种,所述VPN指示信息用于指示所述IP报文的来源VPN,所述模式指示信息用于指示所述IP报文对应的TTL模式。
第三方面,提供了一种报文传输装置,该装置包括:接收模块和发送模块。其中,接收模块用于接收IP报文;发送模块用于在所述IP报文中添加指示信息并发送出去,所述指示信息用于指示在所述IP报文对应的差错报文中添加处理信息,所述处理信息用于指示对所述差错报文的处理方式,所述差错报文是第二网络设备在所述IP报文达到对应的最大跳数时生成的。
可选地,所述发送模块用于为所述IP报文添加IPv6扩展头,所述扩展头用于携带所述指示信息。
可选地,所述扩展头包括选项字段,所述选项字段用于携带所述指示信息。
可选地,所述扩展头为目的选项头或者逐跳头。
可选地,所述接收模块还用于接收所述差错报文,所述差错报文包括所述处理信息;所述发送模块还用于根据所述处理信息处理所述差错报文。
在一些示例中,所述处理信息包括第一模式指示信息,所述第一模式指示信息用于指示所述TTL模式为管道模式。所述发送模块用于在所述第一模式指示信息的指示下,丢弃所述差错报文。
在另一些示例中,所述处理信息不包括模式指示信息,仅包括VPN指示信息。所述VPN指示信息用于指示所述IP报文的源网络设备对应的VPN。所述发送模块用于根据所述VPN指示信息,将所述差错报文发送给所述源网络设备。
在又一些示例中,所述处理信息包括VPN指示信息和第二模式指示信息,所述第二模式指示信息用于指示所述TTL模式为统一模式。则所述发送模块,用于在第二指示信息的指示下,根据所述VPN指示信息,将所述差错报文发送给所述IP报文所属的源网络设备。
示例性地,所述发送模块用于根据所述VPN指示信息确定目标接口;将所述差错报文从所述目标接口发送给所述源网络设备。
可选地,所述发送模块还用于为IP报文封装隧道头,该隧道头中包括最大跳数指示信息。
第四方面,提供了一种报文传输装置。该装置包括接收模块、生成模块和发送模块。其中,接收模块用于接收IP报文,所述IP报文包括指示信息,所述指示信息用于指示所述IP报文对应的差错报文的处理方式;生成模块用于响应于确定所述IP报文达到对应的最大跳数,生成所述IP报文对应的差错报文,所述差错报文包括所述处理信息;发送模块用于向所述第一网络设备发送差错报文,以使所述第一网络设备根据所述指示信息对所述差错报文进行处理。
可选地,所述处理信息包括VPN指示信息和模式指示信息中的至少一种,所述VPN指示信息用于指示所述IP报文的来源VPN,所述模式指示信息用于指示所述IP报文对应的存活时间TTL模式。
第五方面,提供了一种网络设备,所述网络设备包括处理器和存储器;所述存储器用于 存储软件程序,所述处理器通过执行存储在所述存储器内的软件程序,以使得所述网络设备实现第一方面的任一种可能的实施方式的方法,或者,执行第二方面的任一种可能的实施方式的方法。
第六方面,提供了一种报文传输系统,包括:第一网络设备和第二网络设备。第一网络设备用于执行第一方面的任一种可能的实施方式的方法。第二网络设备用于执行第二方面的任一种可能的实施方式的方法。
第七方面,提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机指令,当计算机可读存储介质中的计算机指令被计算机设备执行时,使得计算机设备执行第一方面或第二方面的任一种可能的实施方式的方法。
第八方面,提供了一种包含指令的计算机程序产品,当其在计算机设备上运行时,使得计算机设备执行上述第一方面或第二方面的任一种可能的实施方式的方法。
第九方面,提供了一种芯片,包括处理器,处理器用于从存储器中调用并运行所述存储器中存储的指令,使得安装有所述芯片的通信设备执行上述第一方面或第二方面的任一种可能的实施方式中的方法。
第十方面,提供另一种芯片,包括:输入接口、输出接口、处理器和存储器,所述输入接口、输出接口、所述处理器以及所述存储器之间通过内部连接通路相连,所述处理器用于执行所述存储器中的代码,当所述代码被执行时,所述处理器用于执行上述第一方面或第二方面的任一种可能的实施方式中的方法。
附图说明
图1是本申请一个示例性实施例提供的应用场景的网络架构示意图;
图2是本申请一个示例性实施例提供的一种报文传输方法的流程示意图;
图3是本申请一个示例性实施例提供的另一种报文传输方法的流程示意图;
图4是本申请一个示例性实施例提供的另一种报文传输方法的过程示意图;
图5是本申请一个示例性实施例提供的另一种报文传输方法的过程示意图;
图6是本申请一个示例性实施例提供的一种报文传输装置的结构示意图;
图7是本申请一个示例性实施例提供的另一种报文传输装置的结构示意图;
图8是本申请一个示例性实施例提供的一种网络设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
为了便于理解申请实施例,下面对本申请实施例涉及的名词进行解释。
IP协议:IP协议是传输控制协议(transmission control protocol,TCP)/IP协议族中最核心的部分,它的作用是在两台设备之间传输数据,所有上层协议的数据(超文本传输协议(hypertext transfer protocol,HTTP)、TCP、用户数据报协议(user datagram protocol,UDP)等)都会被封装在一个个的IP报文中被发送到网络上。IP协议有两个版本,版本四(v4)和版本六(v6)。
ICMP:常用于传递错误信息,ICMP协议是IP层的一部分,它的报文也是通过IP报文 来传输的。
TTL:又称为跳数限制,是IP数据包中的一个字段,它指定了数据包最多能经过几次网络设备(例如路由器)。从源网络设备发出去的数据包在到达目的主机的路上要经过许多个路由器的转发,在发送数据包的时候源网络设备会设置一个TTL的值,每经过一个网络设备TTL就会被减去1,当TTL为0的时候该IP数据包会被直接丢弃(不再继续转发),并发送一个用于表示TTL超时的ICMP差错报文给源网络设备。
隧道技术:能够将不同协议的报文重新封装在新的报文头中发送,新的报文头提供路由信息,从而使得被封装的报文能够通过网络传输。通常,隧道技术包括数据封装、传输和解封装这几个过程。在本申请实施例中,隧道为三层协议隧道,例如IPv4 over SRv6隧道,IPv6 over SRv6隧道,或者,IPv4 over IPv6隧道。
TTL模式:用于指示在IP报文进入隧道时,隧道头中TTL值的设置方式。TTL模式包括统一模式和管道模式。如果TTL模式为统一模式,在进入隧道时,隧道头中的TTL值与IP报文中的TTL值相等。如果TTL模式为管道模式,在进入隧道时,隧道头中的TTL值等于设定值,该设定值通常较大,例如为255、128等。
路由跟踪(traceroute):用于确定源网络设备发送的网际互连协议(Internet Protocol,IP)报文访问目标设备所经过的路径。
在本申请实施例中,根据网络设备在网络中的位置,可以将网络设备分为三类,分别为用户边缘(customer edge,CE)设备、提供商边缘(provider edge,PE)设备和提供商(provider,P)设备。其中,CE设备包括用于接入终端用户的交换机、路由器、路由交换机、综合接入设备(integrated access device,IAD)、各种城域网(metropolitan area network,MAN)/广域网(wide area network,WAN)设备。PE设备是汇聚层设备,接入的是经过CE设备处理过之后的数据,主要用于对数据进行汇聚、封装/解封装。一个PE设备和另一个PE设备之间的路径根据起始点不同,可以是伪线(pseudowire,PW),也可以是隧道。P设备是核心层设备,具有强大的交换能力。
图1是本申请一个示例性实施例提供的应用场景的网络架构示意图。如图1所示,该场景包括4个CE设备、2个PE设备和1个P设备。4个CE设备分别为CE1、CE2、CE3和CE4,2个PE设备分别为PE1和PE2。图1中的网络设备的数量仅为举例,本公开对此不做限制。
其中,PE1和PE2之间形成一条隧道。PE1为该条隧道的入口设备,PE2为该条隧道的出口设备。
在图1所示场景中,PE1上配置有两个VPN:VPN1和VPN2,其中,VPN1对应CE1,VPN2对应CE3,CE1和CE3的IP地址相同,例如均为1.1.1.1。PE2上也配置有两个VPN:VPN1和VPN2,VPN1对应CE2,VPN2对应CE4,CE2和CE4的IP地址相同,例如均为2.2.2.2。
下面以CE1向CE2发起路由跟踪为例,对路由跟踪的过程和原理进行示例性说明。当CE1向CE2发起路由跟踪时,对于CE1发送的路由跟踪报文而言,CE1为源网络设备,CE2为目的网络设备。路由跟踪的过程如下:
一、CE1发送第一个路由跟踪报文,该第一个路由跟踪报文中的TTL值为1。在本申请 实施例中,TTL值是指TTL字段的取值。PE1接收该第一个路由跟踪报文,根据该第一个路由跟踪报文中的TTL值,PE1确定TTL超时,即该第一个路由跟踪报文达到对应的最大跳数。PE1向CE1发送差错报文,该差错报文用于表示路由跟踪报文达到对应的最大跳数(又称为TTL超时)。
二、CE1发送第二个路由跟踪报文,该第二个路由跟踪报文的TTL值为2。PE1接收该第二个路由跟踪报文,由于该第二个路由跟踪报文中的TTL值大于1,表示该第二个路由跟踪报文未达到对应的最大跳数,PE1确定需要继续转发该第二个路由跟踪报文。PE1将第二个路由跟踪报文中的TTL值减1,以及为第二个路由跟踪报文封装隧道头,该隧道头中的TTL值与第二个路由跟踪报文中的TTL值相等,然后PE1将带有隧道头的路由跟踪报文发送给P设备。P设备根据隧道头中的TTL值确定带有隧道头的第二路由跟踪报文是否达到对应的最大跳数,如果带有隧道头的第二路由跟踪报文达到对应的最大跳数,则向CE1发送差错报文。例如,当接收到的第二路由跟踪报文的隧道头中的TTL值等于1时,表示该第二路由跟踪报文达到对应的最大跳数;当接收到的第二路由跟踪报文的隧道头中的TTL值大于1时,表示该第二路由跟踪报文未达到对应的最大跳数。
三、CE1发送第三个路由跟踪报文,该第三个路由跟踪报文的TTL值为3。PE1接收该第三个路由跟踪报文,由于该第三个路由跟踪报文中的TTL值大于1,表示该第三个路由跟踪报文未达到对应的最大跳数,PE1确定需要继续转发该第三个路由跟踪报文。PE1将第三个路由跟踪报文的TTL值减1,以及为第三个路由跟踪报文封装隧道头,该隧道头中的TTL值与第三个路由跟踪报文中的TTL值相等,均为2,然后PE1将带有隧道头的路由跟踪报文发送给P设备。P设备根据隧道头中的TTL值确定需要继续转发该带有隧道头的路由跟踪报文,将隧道头中的TTL值减1,变为1,然后将带有隧道头的路由跟踪报文发送给PE2。PE2根据隧道头中的TTL值确定第三个路由跟踪报文达到对应的最大跳数,向CE1发送差错报文。
四、CE1发送第四个路由跟踪报文,该第四个路由跟踪报文的TTL值为4。PE1接收该第四个路由跟踪报文,由于该第三个路由跟踪报文中的TTL值大于1,表示该第三个路由跟踪报文未达到对应的最大跳数,PE1确定需要继续转发该第四个路由跟踪报文。PE1将第三个路由跟踪报文的TTL值减1,以及为第四个路由跟踪报文封装隧道头,该隧道头中的TTL值与第四个路由跟踪报文中的TTL值相等,均为3,然后PE1将带有隧道头的路由跟踪报文发送给P设备。P设备根据隧道头中的TTL值确定需要继续转发该带有隧道头的路由跟踪报文,将隧道头中的TTL值减1,变为2,然后将带有隧道头的路由跟踪报文发送给PE2。PE2根据隧道头中的TTL值确定需要继续转发该第四个路由跟踪报文,剥离隧道头后,将第四个路由跟踪报文发送给CE2。CE2根据第四个路由跟踪报文中的目的地址,确定自己为目的网络设备,则向CE1发送路由跟踪报文对应的响应报文。
五、CE1接收到该响应报文后,确定第四个路由跟踪报文已到达目的设备,则从接收到的所有差错报文中,提取所经过的各个网络设备的标识信息,从而实现路由跟踪。示例性地,该标识信息包括对应的网络设备的IP地址。在一些示例中,该标识信息还包括对应的网络设备的入接口的标识。这里,网络设备的入接口是指网络设备接收到路由跟踪报文的接口。
需要说明的是,这里以CE1与CE2之间的网络设备的数量为3个为例进行了示例性说明,在实际应用中,网络设备的数量可以多余3个,例如,4个、5个等。
在本申请实施例中,路由跟踪报文为UDP报文或者ICMP报文。差错报文为ICMP报文。 在本申请实施例中,UDP报文和ICMP报文均为IP报文,IP报文的版本可以是v4(即IPv4报文)或者v6(即IPv6报文)。在一些示例中,隧道头为IPv6报文头,例如SRv6隧道的报文头。其中,SRv6隧道是IP隧道的一种。
在前述过程中,网络设备(例如P设备和PE2)向CE1发送差错报文时,是先向PE1发送差错报文,然后由PE1对差错报文进行中继,将差错报文转发给CE1。然而,当PE1上配置有多个VPN时,会存在多个具有相同的IP地址的CE,例如CE1和CE3的IP地址相同,PE1无法根据差错报文中的IP地址确定将差错报文发送给CE1还是CE3,最终会丢弃该差错报文。CE1无法接收该差错报文,就无法获知该差错报文对应的网络设备的标识信息。
此外,在另一些场景下,CE1向PE1发送IP报文,如果PE1的TTL模式配置为管道模式,PE1会为CE1发送的IP报文添加一个包含最大跳数指示信息的隧道头,且该隧道头中最大跳数指示信息所指示的最大跳数较大(例如255)。正常情况下,该IP报文在隧道内不会出现跳数不够的情况,即不会出现隧道内的P设备回差错报文的情况。但是,如果网络中出现短暂环路,该IP报文将在网络中循环发送,导致该IP报文不能到达CE2。如果隧道内的某一P设备确定隧道头中的最大跳数指示信息所指示的最大跳数达到,则该P设备就会产生差错报文,相应地,PE1会收到差错报文。这种情况下,如果将差错报文发送给CE1,将导致CE1的路径探测出现P设备,也就是说PE1和PE2之间的设备被用户探测到,从而导致网络安全存在隐患。
在该场景下,IP报文的类型与前述路由跟踪报文相同,或者IP报文为TCP报文等。差错报文为ICMP报文。
为此,本申请实施例通过在IP报文中携带指示信息,从而使得该IP报文对应的差错报文中携带用于指示差错报文的处理方式的处理信息,使得PE1能够根据该处理信息对差错报文进行处理。例如,处理信息包括VPN指示信息,根据VPN指示信息可以区分路由跟踪报文的源网络设备CE1,将路由跟踪报文对应的差错报文发送给CE1,以保证CE1能够接收到各个网络设备发送的差错报文,使得路由跟踪能够显示出隧道对应的完整路径。又例如,在PE1为IP报文添加一个指示的最大跳数较大的隧道头时,差错报文包含的处理信息包括第一模式指示信息,用于指示IP报文的TTL模式为管道模式,则PE1根据该第一模式指示信息,丢弃差错报文。
图2是本申请一个示例性实施例提供的报文传输方法的流程图。该方法由第一网络设备执行,该第一网络设备为IP隧道的入口设备,例如图1中的PE1。如图2所示,该方法包括以下几个过程:
201:接收IP报文。
示例性地,该IP报文由源网络设备发送,例如图1中的CE1。
202:在IP报文中添加指示信息并发送出去。
该指示信息用于指示在IP报文对应的差错报文中添加处理信息。该处理信息用于指示对差错报文的处理方式,差错报文是第二网络设备在IP报文达到对应的最大跳数时生成的。
示例性地,该第二网络设备为图1所示场景中发送差错报文的网络设备,例如P设备或者PE2。
在本申请中,IP报文对应的差错报文是指,第二网络设备在根据接收到的IP报文中的最大跳数指示信息(例如IP报文的隧道头中的最大跳数指示信息)确定出IP报文达到对应的最大跳数时所生成的差错报文。如果第二网络设备接收到的IP报文的隧道头中的最大跳数指示信息所指示的跳数减1等于0,表示该IP报文达到对应的最大跳数,则第二网络设备生成IP报文对应的差错报文。
在本申请实施例中,通过在IP报文中添加指示信息并发送添加指示信息后的IP报文,使得第二网络设备在该IP报文达到对应的最大跳数时,向第一网络设备发送携带了用于指示对差错报文的处理方式的处理信息的差错报文。这样,当第一网络设备接收到第二网络设备发送的差错报文时,能够根据差错报文中的处理信息对差错报文进行处理,处理方式更加灵活。
图3是本申请一个示例性实施例提供的报文传输方法的流程图。该方法可以由第二网络设备执行,该第二网络设备为前述发送差错报文的网络设备,例如由图1中的P设备或者PE2执行。如图3所示,该方法包括以下几个过程:
301:接收第一网络设备发送的IP报文。
该IP报文包括指示信息,该指示信息用于指示在IP报文对应的差错报文中添加处理信息。该处理信息用于指示对差错报文的处理方式。
302:响应于确定IP报文达到对应的最大跳数,生成IP报文对应的差错报文,差错报文包括处理信息。
302中,第二网络设备根据接收到的IP报文的隧道头中的最大跳数指示信息,确定IP报文是否达到对应的最大跳数。如果隧道头中的最大跳数指示信息所指示的跳数减1等于0,表示该IP报文达到对应的最大跳数,则第二网络设备生成IP报文对应的差错报文。
303:向第一网络设备发送差错报文,以使第一网络设备根据指示信息对差错报文进行处理。
其中,第一网络设备为IP隧道的入口设备,例如图1中的PE1。
第二网络设备在IP报文达到对应的最大跳数时,生成差错报文,并且根据接收到的IP报文中的指示信息,在差错报文中携带用于指示对差错报文的处理方式的处理信息。这样,第一网络设备接收到该差错报文后,可以根据差错报文中的处理信息对差错报文进行处理,处理方式更加灵活。
图4是本申请一个示例性实施例提供的报文传输方法的过程示意图。图4以路由跟踪过程为例,对本申请实施例提供的报文传输方法进行示例性说明。如图4所示,该方法包括以下几个过程:
401:源网络设备向第一网络设备发送路由跟踪报文。
该路由跟踪报文中包括源网络设备的IP地址和目的网络设备的IP地址,表示源网络设备向目的网络设备发起路由跟踪。
在本公开实施例中,路由跟踪报文还包括最大跳数指示信息。该最大跳数指示信息用于指示该路由跟踪报文能够经过的网络设备的最大数量。在一些示例中,该路由跟踪报文为IPv4报文。在IPv4报文中,该最大跳数指示信息携带在TTL字段中,该最大跳数指示信息所指 示的最大数量为TTL字段的取值,也被称为TTL值。在另一些示例中,该路由跟踪报文为IPv6报文。在IPv6报文中,该最大跳数指示信息携带在跳数极限(hop limit)字段中。
相应地,第一网络设备接收该路由跟踪报文。
其中,源网络设备例如图1中的CE1,第一网络设备为IP隧道的入口设备,例如为图1中的PE1。
402:第一网络设备为接收到的路由跟踪报文添加IPv6扩展头和隧道头。
其中,IPv6扩展头中携带指示信息,该指示信息用于指示在路由跟踪报文对应的差错报文中添加处理信息。
可选地,指示信息包括VPN指示信息和模式指示信息中的至少一种。
VPN指示信息用于指示路由跟踪报文的来源VPN。示例性地,VPN指示信息包括路由跟踪报文的来源VPN的标识和入接口标识中的至少一种,入接口标识为与来源VPN对应的第一网络设备的接口的标识。这两种标识均能有效标识来源VPN。
模式指示信息用于指示路由跟踪报文对应的TTL模式。可选地,TTL模式为统一(uniform)模式或管道(pipe)模式。
在本公开实施例中,对于不同的TTL模式,第一网络设备会生成携带不同的最大跳数指示信息的隧道头。对于统一模式,第一网络设备生成的隧道头中的最大跳数指示信息所指示的跳数与路由跟踪报文中的最大跳数指示信息所指示的跳数相同,例如,当路由跟踪报文中的最大跳数指示信息所指示的跳数为3时,隧道头中的最大跳数指示信息所指示的跳数也为3。对于管道模式,第一网络设备生成的隧道头中的最大跳数指示信息所指示的跳数为设定值,该设定值通常较大,例如255、128等。
可选地,模式指示信息对应的TTL模式类型根据组网信息确定。例如,当第二网络设备和第一网络设备所在的网络属于同一运营商,则模式指示信息所指示的TTL模式为统一模式。又例如,当第二网络设备和第一网络设备所在的网络不属于同一运营商,则模式指示信息所指示的TTL模式为管道模式。
可选地,模式指示信息与VPN指示信息在同一字段中,例如均在IPv6扩展头的选项字段中。由于指示信息的信息量较少,通过较少的比特就可以实现,因此,可以将指示信息携带在同一字段中。
在一种可能的实施方式中,扩展头为目的选项头(destination options header)或者逐跳头(hop-by-hop options header)。通过在目的选项头或者逐跳头中新增携带指示信息的选项字段,从而使得第二报文携带该指示信息。
在另一种可能的实施方式中,通过新增一个扩展头来携带该指示信息,从而使得第二报文携带该指示信息。这里,新增扩展头是指RFC标准中不存在的扩展头。
下面以Destination Options header中增加新的Option字段为例(遵从RFC8200对Option的定义),说明对Option的扩展:
选项字段包括三个子字段,分别为选项类型(option type)子字段、选项数据长度(opt data len)子字段和选项数据(option data)子字段。
其中,选项类型子字段长度为8bit,最高2bit全0,中间转发设备不感知。选项数据长度子字段的长度为8bit,采用无符号整数,用于指示选项数据子字段中携带的数据的长度,例如,6字节。选项数据子字段又分为三个子字段,分别为版本(version)子字段、标识(flag) 子字段和信息(info)子字段。
其中,版本子字段的长度为8bit,当前取值为0,后续可以作为版本号使用。标识子字段的长度为8bit,用于携带模式指示信息。可选地,该标识子字段还可以用于携带指示信息中的标识类型的指示信息。示例性地,标识子字段以bit位的方式表示TTL模式以及表示指示信息中携带的是VPN标识还是入接口标识。示例性地,标识子字段的高6bit暂时不适用,设置为0。第7bit表示指示信息中的标识类型。例如,当第7bit为第一值(例如0或1)时,表示指示信息中的标识为VPN标识,例如VPN ID;当第7bit为第二值(例如1或0)时,表示指示信息中的标识为入接口标识,例如入接口索引。第8bit表示TTL模式。例如,当第8bit为第一值(例如0或1)时,表示TTL模式为统一模式;当第8bit为第二值(例如1或0)时,表示TTL模式为管道模式。信息子字段的长度为32bit,表示VPN ID或者入接口索引(根据前面标识子字段来决定是VPN ID还是入接口索引)。
可选地,对于不同类型的IP隧道,隧道头的类型不同。例如,对于IPv4 over SRv6隧道,IPv6 over SRv6隧道,隧道头为SRv6隧道的IPv6报文头。又例如,对于IPv4 over IPv6隧道,隧道头为IP隧道的IPv6报文头。
403:第一网络设备向第二网络设备发送路由跟踪报文。
第二网络设备接收路由跟踪报文。
404:第二网络设备根据隧道头中的最大跳数指示信息,确定路由跟踪报文达到路由跟踪报文对应的最大跳数,生成差错报文。
示例性地,如果隧道头中的最大跳数指示信息所指示的跳数等于1,例如隧道头中的TTL值等于1,则表示路由跟踪报文对应的最大跳数已达到,需要向第一网络设备发送差错报文,则生成差错报文。
在该差错报文中包括处理信息,该处理信息用于指示对差错报文的处理方式。在一种可能的实施方式中,该处理信息的内容与前述指示信息的内容相同,包括VPN指示信息和模式指示信息中的至少一种。
当处理信息与指示信息的内容相同时,第二网络设备可以直接在接收到的路由跟踪报文外层封装差错报文头,处理方式简单。该差错报文头中包括第二网络设备的标识信息。第二网络设备的标识信息包括第二网络设备的IP地址。可选地,第二网络设备的标识信息还包括第二网络设备的入接口标识,第二网络设备的入接口为第二网络设备接收对应的路由跟踪报文的接口。
在一些示例中,第二网络设备是第一网络设备的下一跳。例如,在图1所示场景中,当差错报文由P设备生成时,第二网络设备是第一网络设备PE1的下一跳设备。
在另一些示例中,第二网络设备和第一网络设备之间还存在一个或多个中转网络设备。例如,在图1所示场景中,当差错报文由PE2生成时,第二网络设备是PE2与第一网络设备PE1之间存在中转网络设备P设备。
当第二网络设备和第一网络设备之间存在中转网络设备时,中转网络设备执行的动作包括:
第一步、中转网络设备根据隧道头中的最大跳数指示信息,确定路由跟踪报文未达到即路由跟踪报文对应的最大跳数(即隧道头中的最大跳数指示信息所指示的跳数),中转网络设备将继续转发路由跟踪报文。
在一些示例中,如果隧道头中的最大跳数指示信息所指示的跳数大于1,例如隧道头中的TTL值大于1,则表示路由跟踪报文对应的最大跳数还未达到。
第二步、中转网络设备更新隧道头中的最大跳数指示信息,使得更新后的最大跳数指示信息所指示的跳数比更新前的最大跳数指示信息所指示的跳数小1,以及向下一跳网络设备发送路由跟踪报文。
例如,将隧道头中的TTL值减1后,向下一跳网络设备发送路由跟踪报文。
405:第二网络设备将差错报文发送给第一网络设备。
第一网络设备接收该差错报文。
406:第一网络设备根据处理信息对差错报文进行处理。
在一些示例中,处理信息包括第一模式指示信息,该第一模式指示信息用于指示TTL模式为管道模式。则该步骤406包括:在第一模式指示信息的指示下,丢弃差错报文。
当TTL模式为管道模式时,TTL值较大,如果第一网络设备仍然收到差错报文,表示网络中出现环路,为了安全起见,则需要丢弃该差错报文。
可选地,除了丢弃该差错报文之外,还可以发出告警。
在另一些示例中,处理信息包括第二模式指示信息和VPN指示信息,该第二模式指示信息用于指示TTL模式为统一模式。则该步骤406包括:根据VPN指示信息,将差错报文发送给路由跟踪报文所属的源网络设备。
其中,根据VPN指示信息,将差错报文发送给路由跟踪报文所属的源网络设备,包括:第一步、根据VPN指示信息确定目标接口;第二步、将差错报文从目标接口发送给源网络设备。
在第一网络设备将差错报文从目标接口发送给源网络设备之前,还需要先从差错报文中提取最内层的路由跟踪报文(即提取CE1发送的路由跟踪报文),为提取出的路由跟踪报文重新添加差错报文头,该差错报文头中的目的地址为第一网络设备的IP地址。
还需要说明的是,除了针对路由跟踪报文,图4所示方法也适用于其他用途的IP报文,例如用于数据传输的IP报文等。
在本申请实施例中,通过在IP报文中添加指示信息并发送添加指示信息后的IP报文,使得第二网络设备在该IP报文达到对应的最大跳数时,向第一网络设备发送携带了用于指示对差错报文的处理方式的处理信息的差错报文。这样,当第一网络设备接收到第二网络设备发送的差错报文时,能够根据差错报文中的处理信息对差错报文进行处理,处理方式更加灵活。
需要说明的是,在图4所示实施例中,指示信息和处理信息相同,且均包括VPN指示信息和模式指示信息中的一种,通过直接将指示信息和处理信息携带在报文中,各网络设备可以直接从报文中获取需要的信息,无需进行本地查找,实现方式简单。
在另一种可能的实施方式中,所述处理信息与所述指示信息相同。指示信息和处理信息均为第一标识。第一网络设备在接收到源网络设备发送的路由跟踪报文时,记录路由跟踪报文的控制信息和第一标识的对应关系。该第一标识与路由跟踪报文唯一对应,即源网络设备发送的不同的路由跟踪报文,对应不同的第一标识。当第一网络设备接收到携带第一标识的差错报文时,在本地查找第一标识对应的控制信息,并根据查找到的控制信息对差错报文进行处理。这里,控制信息的内容和前述处理信息的内容相同,相关内容参见前述内容,在此 省略详细描述。
在又一种可能的实施方式中,处理信息与指示信息不同。例如,指示信息为第一标识,处理信息为第二标识。第一标识和第二标识一一对应,不同的第一标识对应的第二标识不同。第一网络设备存储有第一标识和第二标识之间的对应关系。第一网络设备在接收到源网络设备发送的路由跟踪报文时,记录路由跟踪报文的控制信息和第一标识的对应关系。该第一标识与路由跟踪报文唯一对应,即源网络设备发送的不同的路由跟踪报文,对应不同的第一标识。当第一网络设备接收到携带第二标识的差错报文时,在本地查找第二标识对应的第一标识,以及查找第一标识对应的控制信息,并根据查找到的控制信息对差错报文进行处理。这里,控制信息的内容和前述处理信息的内容相同,相关内容参见前述内容,在此省略详细描述。
在这两种实施方式中,通过将控制信息保存在本地,仅发送标识,可以减小报文的数据量,减少网络开销。
图5是本申请一个示例性实施例提供的报文传输方法的过程示意图。图5中,PE1上配置有两个VPN:VPN1和VPN2,其中,VPN1对应CE1,VPN2对应CE3,CE1和CE3的IP地址相同,例如均为1.1.1.1。PE2上也配置有两个VPN:VPN1和VPN2,VPN1对应CE2,VPN2对应CE4,CE2和CE4的IP地址相同,例如均为2.2.2.2。
下面以Ipv4 over SRv6隧道,TTL值为2为例对路由跟踪方法进行示例性说明。如图5所示,该方法包括以下几个过程:
501:CE1向PE1发送TTL值为2的IPv4的路由跟踪报文。
PE1接收该路由跟踪报文。该路由跟踪报文中的源地址SA为1.1.1.1,目的地址DA为2.2.2.2。
502:PE1将该路由跟踪报文的TTL值减1,并根据配置确定TTL模式为统一模式,则封装SRv6的IPv6头(IPv6头中的TTL值设置为与路由跟踪报文的TTL值相同,即设置为1),同时封装一个包括选项字段的IPv6扩展头,在该选项字段携带VPN指示信息和模式指示信息,继续向P设备转发路由跟踪报文。
其中,该模式指示信息用于指示该路由跟踪报文的TTL模式为统一模式。VPN指示信息用于指示路由跟踪报文的来源VPN。示例性地,VPN指示信息包括路由跟踪报文的来源VPN的标识和入接口标识中的至少一种。在该示例中,来源VPN为VPN1,入接口标识为与VPN1对应的PE1的接口的标识,即PE1接收到CE1发送的路由跟踪报文的接口的标识。
503:P设备判断TTL超时,向PE1发送IPv6的ICMP差错报文。
其中,P设备判断TTL超时,是指P设备根据SRv6的IPv6头中的TTL值判断路由跟踪报文对应的最大跳数已达到。
该IPv6的ICMP差错报文包括接收到的路由跟踪报文以及ICMP差错报文头。也即是,该ICMP差错报文通过为接收到的路由跟踪报文头添加ICMP差错报文头得到。
该ICMP差错报文头中包括P设备的标识信息,标识信息包括P设备的IPv4地址和入接口标识等信息。该差错报文头中的目的地址为PE1。
504:PE1收到ICMP差错报文,根据模式指示信息确定TTL模式为统一模式,则构造IPv4的ICMP差错报文,根据VPN指示信息将IPv4的ICMP差错报文发送给CE1。
其中,构造IPv4的ICMP差错报文,包括去除接收到的ICMP差错报文中的差错报文头, 重新封装IPv4的ICMP差错报文头,且IPv4的ICMP差错报文头中的目的地址为CE1的IP地址:1.1.1.1。
在构造IPv4的ICMP差错报文之后,PE1根据VPN指示信息确目标接口(即VPN1对应的接口),然后将ICMP差错报文从目标接口发送给CE1。
在该示例中,PE1能够根据差错报文中的VPN信息确定路由跟踪报文的源网络设备CE1所连接的接口,并通过确定出的接口将差错报文发送给CE1。这样,CE1能够接收到所有的网络设备发送的差错报文,获知差错报文对应的网络设备的标识信息,从而实现完整的路径探测。
需要说明的是,在502中,如果PE1根据配置确定该TTL模式为Pipe模式,则502至504将被替代为以下过程:
第一步、为路由跟踪报文封装SRv6的IPv6头(IPv6头中的TTL值设置为较大的数值,例如255),同时封装一个包括选项字段的IPv6扩展头,在该选项字段携带用于指示该pipe模式的模式指示信息,继续向P设备转发路由跟踪报文。可选地,除了模式指示信息之外,该选项字段还可以携带VPN指示信息。
第二步、该路由跟踪报文在隧道对应的网络设备之间传输,如果网络中出现短暂环路,该路由跟踪报文将在网络中循环发送,直至隧道中的某个P设备根据该确定该SRv6的IPv6头中的TTL值确定路由跟踪报文达到对应的最大跳数,生成该路由跟踪报文对应的ICMP差错报文,并将该ICMP差错报文发送给PE1。
第三步、PE1收到ICMP差错报文,根据模式指示信息确定TTL模式为管道模式,则丢弃该差错报文。可选地,除了直接丢弃该差错报文,还可以发起告警,以提示出现环路故障。
除了路由跟踪报文之外,该方法还适用于其他用途的IP报文,例如,用于数据传输的IP报文等。另外,本申请实施例对IP报文的协议类型也不做限制,包括但不限于TCP报文、UDP报文和ICMP报文等。
上述各个附图对应的流程的描述各有侧重,某个流程中没有详述的部分,可以参见其他流程的相关描述。
图6是本申请一个示例性实施例提供的一种报文传输装置的结构示意图。该装置可以通过软件、硬件或者两者的结合实现成为装置中的部分或者全部。本申请实施例提供的装置能够实现本申请实施例图2的流程,如图6所示,该装置包括:接收模块601和发送模块603。
其中,接收模块601用于执行图2中的步骤201,也即接收模块601用于接收IP报文。发送模块602用于执行图2中的步骤202,也即发送模块602用于在所述IP报文中添加指示信息并发送出去,所述指示信息用于指示在所述IP报文对应的差错报文中添加处理信息,所述处理信息用于指示对所述差错报文的处理方式,所述差错报文是第二网络设备在所述IP报文达到对应的最大跳数时生成的。
可选地,该接收模块601还用于执行图4中的步骤401和405;该发送模块602还用于执行图4中的步骤402、403和406。
可选地,发送模块602用于为IP报文添加IPv6扩展头,该扩展头用于携带该指示信息。
可选地,扩展头包括选项字段,选项字段用于携带指示信息。
可选地,扩展头为目的选项头或者逐跳头。
可选地,接收模块601还用于接收差错报文,差错报文包括处理信息;发送模块还用于根据处理信息处理差错报文。
在一些示例中,处理信息包括第一模式指示信息,第一模式指示信息用于指示TTL模式为管道模式。发送模块602用于在第一模式指示信息的指示下,丢弃差错报文。
在另一些示例中,处理信息不包括模式指示信息,仅包括VPN指示信息。VPN指示信息用于指示IP报文的源网络设备对应的VPN。发送模块602用于根据VPN指示信息,将差错报文发送给IP报文的源网络设备。
在又一些示例中,处理信息包括VPN指示信息和第二模式指示信息,第二模式指示信息用于指示TTL模式为统一模式。则发送模块602用于在第二指示信息的指示下,根据VPN指示信息,将差错报文发送给IP报文所属的源网络设备。
示例性地,发送模块602用于根据VPN指示信息确定目标接口;将差错报文从目标接口发送给源网络设备。
可选地,发送模块602还用于为添加有指示信息的IP报文封装隧道头,该隧道头中携带有最大跳数指示信息。
可选地,所述IP报文为UDP报文、ICMP报文或者TCP报文。
可选地,所述IP报文为路由跟踪报文。
可选地,所述差错报文为ICMP报文。
图7是本申请一个示例性实施例提供的另一种报文传输装置的结构示意图。该装置可以通过软件、硬件或者两者的结合实现成为装置中的部分或者全部。本申请实施例提供的装置能够实现本申请实施例图3的流程,如图7所示,该装置包括:接收模块701、生成模块702和发送模块703。
接收模块701用于执行图3中的步骤301,也即接收模块701用于接收IP报文,所述IP报文包括指示信息,所述指示信息用于指示所述IP报文对应的差错报文的处理方式。生成模块702用于执行图3中的步骤302,也即生成模块702用于响应于确定所述IP报文达到对应的最大跳数,生成所述IP报文对应的差错报文,所述差错报文包括所述处理信息。发送模块703用于执行图3中的步骤302,也即发送模块703用于向所述第一网络设备发送差错报文,以使所述第一网络设备根据所述指示信息对所述差错报文进行处理。
可选地,该接收模块601还用于执行图4中的步骤403;该生成模块702还用于执行图4中步骤404;该发送模块703还用于执行图4中的步骤405。
可选地,所述处理信息包括VPN指示信息和模式指示信息中的至少一种,所述VPN指示信息用于指示所述IP报文的来源VPN,所述模式指示信息用于指示所述IP报文对应的存活时间TTL模式。
可选地,所述IP报文为UDP报文、ICMP报文或者TCP报文。
可选地,所述IP报文为路由跟踪报文。
可选地,所述差错报文为ICMP报文。
本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时也可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成为一个模块中。上述集成的模块既 可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
该集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台终端设备(可以是个人计算机,手机,或者网络设备等)或处理器(processor)执行本申请各个实施例该方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
需要说明的是:上述实施例提供的报文传输装置进行报文传输时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的报文传输装置与报文传输方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
参见图8,图8示出了本申请一个示例性实施例提供的网络设备2000的结构示意图。图8所示的网络设备2000用于执行上述图2或图3或图4所示的报文传输方法所涉及的操作。该网络设备2000例如是交换机、路由器等,该网络设备2000可以由一般性的总线体系结构来实现。
如图8所示,网络设备2000包括至少一个处理器2001、存储器2003以及至少一个通信接口2004。
处理器2001例如是通用中央处理器(central processing unit,CPU)、数字信号处理器(digital signal processor,DSP)、网络处理器(network processer,NP)、图形处理器(Graphics Processing Unit,GPU)、神经网络处理器(neural-network processing units,NPU)、数据处理单元(Data Processing Unit,DPU)、微处理器或者一个或多个用于实现本申请方案的集成电路。例如,处理器2001包括专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。PLD例如是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。其可以实现或执行结合本发明实施例公开内容所描述的各种逻辑方框、模块和电路。所述处理器也可以是实现计算功能的组合,例如包括一个或多个微处理器组合,DSP和微处理器的组合等等。
可选的,网络设备2000还包括总线。总线用于在网络设备2000的各组件之间传送信息。总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
存储器2003例如是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,又如是随机存取存储器(random access memory,RAM)或者可 存储信息和指令的其它类型的动态存储设备,又如是电可擦可编程只读存储器(electrically erasable programmable read-only Memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器2003例如是独立存在,并通过总线与处理器2001相连接。存储器2003也可以和处理器2001集成在一起。
通信接口2004使用任何收发器一类的装置,用于与其它设备或通信网络通信,通信网络可以为以太网、无线接入网(RAN)或无线局域网(wireless local area networks,WLAN)等。通信接口2004可以包括有线通信接口,还可以包括无线通信接口。具体的,通信接口2004可以为以太(Ethernet)接口、快速以太(Fast Ethernet,FE)接口、千兆以太(Gigabit Ethernet,GE)接口,异步传输模式(Asynchronous Transfer Mode,ATM)接口,无线局域网(wireless local area networks,WLAN)接口,蜂窝网络通信接口或其组合。以太网接口可以是光接口,电接口或其组合。在本申请实施例中,通信接口2004可以用于网络设备2000与其他设备进行通信。
在具体实现中,作为一种实施例,处理器2001可以包括一个或多个CPU,如图8中所示的CPU0和CPU1。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,网络设备2000可以包括多个处理器,如图8中所示的处理器2001和处理器2005。这些处理器中的每一个可以是一个单核处理器(single-CPU),也可以是一个多核处理器(multi-CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,网络设备2000还可以包括输出设备和输入设备。输出设备和处理器2001通信,可以以多种方式来显示信息。例如,输出设备可以是液晶显示器(liquid crystal display,LCD)、发光二极管(light emitting diode,LED)显示设备、阴极射线管(cathode ray tube,CRT)显示设备或投影仪(projector)等。输入设备和处理器2001通信,可以以多种方式接收用户的输入。例如,输入设备可以是鼠标、键盘、触摸屏设备或传感设备等。
在一些实施例中,存储器2003用于存储执行本申请方案的程序代码2010,处理器2001可以执行存储器2003中存储的程序代码2010。也即是,网络设备2000可以通过处理器2001以及存储器2003中的程序代码2010,来实现方法实施例提供的报文传输方法。程序代码2010中可以包括一个或多个软件模块。可选地,处理器2001自身也可以存储执行本申请方案的程序代码或指令。
在具体实施例中,本申请实施例的网络设备2000可对应于上述各个方法实施例中的第一网络设备,网络设备2000中的处理器2001读取存储器2003中的指令,使图8所示的网络设备2000能够执行第一网络设备所执行的全部或部分操作。
具体的,处理器2001用于通过通信接口接收IP报文;以及在IP报文中添加指示信息并通过通信接口发送出去,该指示信息用于指示在IP报文对应的差错报文中添加处理信息。该 处理信息用于指示对差错报文的处理方式,差错报文是第二网络设备在IP报文达到对应的最大跳数时生成的。
其他可选的实施方式,为了简洁,在此不再赘述。
又例如,本申请实施例的网络设备2000可对应于上述各个方法实施例中的第二网络设备,网络设备2000中的处理器2001读取存储器2003中的指令,使图8所示的网络设备2000能够执行第二网络设备所执行的全部或部分操作。
具体的,处理器2001用于通过通信接口接收IP报文,所述IP报文包括指示信息,所述指示信息用于指示所述IP报文对应的差错报文的处理方式;响应于确定所述IP报文达到对应的最大跳数,根据所述IP报文,生成差错报文,所述差错报文包括处理信息;通过通信接口向第一网络设备发送差错报文,以使所述第一网络设备根据所述指示信息对所述差错报文进行处理发送。
其他可选的实施方式,为了简洁,在此不再赘述。
网络设备2000还可以对应于上述图6-7所示的报文传输装置,报文传输装置中的每个功能模块采用网络设备2000的软件实现。换句话说,资源调度装置包括的功能模块为网络设备2000的处理器2001读取存储器2003中存储的程序代码2010后生成的。
其中,图2-5所示的报文传输方法的各步骤通过网络设备2000的处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤,为避免重复,这里不再详细描述。
本申请实施例还提供了一种芯片,包括处理器,处理器用于从存储器中调用并运行存储器中存储的指令,使得安装有芯片的通信设备执行本申请提供的任一种的报文传输方法。
本申请实施例还提供了一种芯片,包括:输入接口、输出接口、处理器和存储器,输入接口、输出接口、处理器以及存储器之间通过内部连接通路相连,处理器用于执行存储器中的代码,当代码被执行时,处理器用于执行上述任一种的报文传输方法。
应理解的是,上述处理器可以是CPU,还可以是其他通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者是任何常规的处理器等。值得说明的是,处理器可以是支持ARM架构的处理器。
进一步地,在一种可选的实施例中,上述处理器为一个或多个,存储器为一个或多个。可选地,存储器可以与处理器集成在一起,或者存储器与处理器分离设置。上述存储器可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器还可以包括非易失性随机存取存储器。例如,存储器还可以存储参考块和目标块。
该存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是ROM、PROM、EPROM、EEPROM或闪存。易失性存储器可以是RAM,其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用。例如,SRAM、DRAM、SDRAM、DDR SDRAM、ESDRAM、SLDRAM和DR RAM。
本申请实施例中,还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机指令,当计算机可读存储介质中存储的计算机指令被计算机设备执行时,使得计算机设备执行上述所提供的报文传输方法。
本申请实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机设备上运行时,使得计算机设备执行上述所提供的报文传输方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现,当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令,在服务器或终端上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴光缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是服务器或终端能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(如软盘、硬盘和磁带等),也可以是光介质(如数字视盘(Digital Video Disk,DVD)等),或者半导体介质(如固态硬盘等)。
以上所述仅为本申请的可选实施例,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应该以权利要求的保护范围为准。

Claims (22)

  1. 一种报文传输方法,其特征在于,应用于第一网络设备,所述方法包括:
    接收互联网协议IP报文;
    在所述IP报文中添加指示信息并发送出去,所述指示信息用于指示在所述IP报文对应的差错报文中添加处理信息,所述处理信息用于指示对所述差错报文的处理方式,所述差错报文是第二网络设备在所述IP报文达到对应的最大跳数时生成的。
  2. 根据权利要求1所述的方法,其特征在于,所述在所述IP报文中添加指示信息,包括:
    为所述IP报文添加IPv6扩展头,所述扩展头用于携带所述指示信息。
  3. 根据权利要求2所述的方法,其特征在于,所述扩展头包括选项字段,所述选项字段用于携带所述指示信息。
  4. 根据权利要求2或3所述的方法,其特征在于,所述扩展头为目的选项头或者逐跳头。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述方法还包括:
    接收所述差错报文,所述差错报文包括所述处理信息;
    根据所述处理信息处理所述差错报文。
  6. 根据权利要求5所述的方法,其特征在于,所述处理信息包括第一模式指示信息,所述第一模式指示信息用于指示所述存活时间TTL模式为管道模式;
    所述根据所述处理信息处理所述差错报文,包括:
    在所述第一模式指示信息的指示下,丢弃所述差错报文。
  7. 根据权利要求5所述的方法,其特征在于,所述处理信息包括虚拟专用网VPN指示信息,所述VPN指示信息用于指示所述IP报文的源网络设备对应的VPN;
    所述根据所述处理信息处理所述差错报文,包括:
    根据所述VPN指示信息,将所述差错报文发送给所述源网络设备。
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述VPN指示信息,将所述差错报文发送给所述源网络设备,包括:
    根据所述VPN指示信息确定目标接口;
    将所述差错报文从所述目标接口发送给所述源网络设备。
  9. 根据权利要求7或8所述的方法,其特征在于,所述VPN指示信息包括所述IP报文的来源VPN的标识和入接口标识中的至少一种,所述入接口标识为与所述来源VPN对应的第一网络设备的接口的标识。
  10. 根据权利要求7至9任一项所述的方法,其特征在于,所述处理信息还包括第二模式指示信息,所述第二模式指示信息用于指示所述TTL模式为统一模式。
  11. 根据权利要求2至10任一项所述的方法,其特征在于,所述在所述IP报文中添加指示信息,还包括:
    为所述IP报文封装隧道头,所述隧道头中包括最大跳数指示信息。
  12. 根据权利要求1至11任一项所述的方法,其特征在于,所述IP报文为用户数据报协议UDP报文、互联网控制报文协议ICMP报文或者传输控制协议TCP报文。
  13. 根据权利要求1至11任一项所述的方法,其特征在于,所述IP报文为路由跟踪报文。
  14. 根据权利要求1至12任一项所述的方法,其特征在于,所述差错报文为ICMP报文。
  15. 一种报文传输方法,其特征在于,所述方法应用于第二网络设备,所述方法包括:
    接收第一网络设备发送的互联网协议IP报文,所述IP报文包括指示信息,所述指示信息用于指示在所述IP报文对应的差错报文中添加处理信息,所述处理信息用于指示对所述差错报文的处理方式;
    响应于确定所述IP报文达到对应的最大跳数,生成所述IP报文对应的差错报文,所述差错报文包括所述处理信息;
    向所述第一网络设备发送所述差错报文,以使所述第一网络设备根据所述指示信息对所述差错报文进行处理。
  16. 根据权利要求15所述的方法,其特征在于,所述处理信息包括虚拟专用网VPN指示信息和模式指示信息中的至少一种,所述VPN指示信息用于指示所述IP报文的来源VPN,所述模式指示信息用于指示所述IP报文对应的存活时间TTL模式。
  17. 根据权利要求15或16所述的方法,其特征在于,所述IP报文为用户数据报协议UDP报文、互联网控制报文协议ICMP报文或者传输控制协议TCP报文。
  18. 根据权利要求15或16所述的方法,其特征在于,所述IP报文为路由跟踪报文。
  19. 根据权利要求15至18任一项所述的方法,其特征在于,所述差错报文为ICMP报文。
  20. 一种网络设备,其特征在于,所述网络设备包括处理器和存储器;所述存储器用于存储软件程序,所述处理器通过执行存储在所述存储器内的软件程序,以使得所述网络设备实现如权利要求1至14任一项所述的方法,或者,执行所述权利要求15至19任一项所述的方法。
  21. 一种报文传输系统,其特征在于,所述系统包括第一网络设备和第二网络设备,所述第一网络设备用于执行如权利要求1至14任一项所述的方法,所述第二网络设备用于执行如权利要求15至19任一项所述的方法。
  22. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,当所述计算机可读存储介质中的计算机指令被计算机设备执行时,使得所述计算机设备执行所述权利要求1至14任一项所述的方法,或者,执行所述权利要求15至19任一项所述的方法。
PCT/CN2022/101240 2021-07-09 2022-06-24 报文传输方法、装置和系统、网络设备及存储介质 WO2023279990A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22836744.7A EP4333382A1 (en) 2021-07-09 2022-06-24 Packet transmission method, apparatus and system, network device, and storage medium
US18/406,468 US20240223496A1 (en) 2021-07-09 2024-01-08 Packet transmission method, apparatus, and system, network device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110778464.5A CN115604369A (zh) 2021-07-09 2021-07-09 报文传输方法、装置和系统、网络设备及存储介质
CN202110778464.5 2021-07-09

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/406,468 Continuation US20240223496A1 (en) 2021-07-09 2024-01-08 Packet transmission method, apparatus, and system, network device, and storage medium

Publications (1)

Publication Number Publication Date
WO2023279990A1 true WO2023279990A1 (zh) 2023-01-12

Family

ID=84800346

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/101240 WO2023279990A1 (zh) 2021-07-09 2022-06-24 报文传输方法、装置和系统、网络设备及存储介质

Country Status (4)

Country Link
US (1) US20240223496A1 (zh)
EP (1) EP4333382A1 (zh)
CN (1) CN115604369A (zh)
WO (1) WO2023279990A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102340451A (zh) * 2011-09-28 2012-02-01 中兴通讯股份有限公司 一种跟踪路由测试方法、系统、装置及设备
US20130298201A1 (en) * 2012-05-05 2013-11-07 Citrix Systems, Inc. Systems and methods for network filtering in vpn
CN103986637A (zh) * 2014-05-15 2014-08-13 杭州华三通信技术有限公司 一种差错报文处理方法及隧道设备
US20160142291A1 (en) * 2013-05-01 2016-05-19 Joseph Polland Enhanced route tracing
CN110971433A (zh) * 2018-09-29 2020-04-07 华为技术有限公司 获取SRv6隧道信息的方法、设备和系统
CN111131496A (zh) * 2019-12-31 2020-05-08 易票联支付有限公司 一种基于标识信息的通讯中转方法、系统、装置及介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102340451A (zh) * 2011-09-28 2012-02-01 中兴通讯股份有限公司 一种跟踪路由测试方法、系统、装置及设备
US20130298201A1 (en) * 2012-05-05 2013-11-07 Citrix Systems, Inc. Systems and methods for network filtering in vpn
US20160142291A1 (en) * 2013-05-01 2016-05-19 Joseph Polland Enhanced route tracing
CN103986637A (zh) * 2014-05-15 2014-08-13 杭州华三通信技术有限公司 一种差错报文处理方法及隧道设备
CN110971433A (zh) * 2018-09-29 2020-04-07 华为技术有限公司 获取SRv6隧道信息的方法、设备和系统
CN111131496A (zh) * 2019-12-31 2020-05-08 易票联支付有限公司 一种基于标识信息的通讯中转方法、系统、装置及介质

Also Published As

Publication number Publication date
US20240223496A1 (en) 2024-07-04
CN115604369A (zh) 2023-01-13
EP4333382A1 (en) 2024-03-06

Similar Documents

Publication Publication Date Title
US11979322B2 (en) Method and apparatus for providing service for traffic flow
CN107995052B (zh) 用于针对有线和无线节点的公共控制协议的方法和设备
US20150358232A1 (en) Packet Forwarding Method and VXLAN Gateway
WO2020156166A1 (zh) 用于处理报文的方法和装置
US10237130B2 (en) Method for processing VxLAN data units
WO2019134383A1 (zh) 控制网络拥塞的方法、接入设备和计算机可读存储介质
CN111669330A (zh) 一种bier报文的发送方法和装置
CN107770072B (zh) 一种发送和接收报文的方法和设备
JP7216120B2 (ja) Bgpメッセージ送信方法、bgpメッセージ受信方法、及びデバイス
ES2826388T3 (es) Procedimiento y puerta de enlace para adquirir una ruta según se requiera
WO2020019958A1 (zh) Vxlan报文封装及策略执行方法、设备、系统
EP3767898A1 (en) Packet forwarding method and apparatus
US20220255772A1 (en) Packet sending method, apparatus, and system
WO2014166073A1 (zh) 报文转发方法和网络设备
WO2022042503A1 (zh) 一种报文传输方法、装置及系统
WO2014026571A1 (zh) 一种通用路由封装隧道报文发送方法和装置
EP4057576A1 (en) Packet encapsulating method and apparatus, and packet decapsulating method and apparatus
CN111510513A (zh) 一种map-e链路加速方法、装置、存储介质及网络设备
CN111371634A (zh) 一种通信方法、装置及系统
WO2022117018A1 (zh) 报文传输的方法和装置
WO2019196914A1 (zh) 一种发现转发路径的方法及其相关设备
CN108282404B (zh) 一种路由生成方法、装置及系统
WO2023273957A1 (zh) 算力发布方法、算力更新方法及装置
WO2023279990A1 (zh) 报文传输方法、装置和系统、网络设备及存储介质
WO2023035836A1 (zh) 一种报文处理方法及相关装置

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: 22836744

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022836744

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022836744

Country of ref document: EP

Effective date: 20231130

NENP Non-entry into the national phase

Ref country code: DE