CN108111432B - Message forwarding method and device - Google Patents

Message forwarding method and device Download PDF

Info

Publication number
CN108111432B
CN108111432B CN201711476340.1A CN201711476340A CN108111432B CN 108111432 B CN108111432 B CN 108111432B CN 201711476340 A CN201711476340 A CN 201711476340A CN 108111432 B CN108111432 B CN 108111432B
Authority
CN
China
Prior art keywords
data message
message
network device
information
tracking
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201711476340.1A
Other languages
Chinese (zh)
Other versions
CN108111432A (en
Inventor
宋小恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201711476340.1A priority Critical patent/CN108111432B/en
Publication of CN108111432A publication Critical patent/CN108111432A/en
Application granted granted Critical
Publication of CN108111432B publication Critical patent/CN108111432B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/36Flow control; Congestion control by determining packet size, e.g. maximum transfer unit [MTU]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/628Queue scheduling characterised by scheduling criteria for service slots or service orders based on packet size, e.g. shortest packet first
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric

Abstract

The embodiment of the invention relates to a message forwarding method and a device, comprising the following steps: acquiring a first data message comprising an in-band telemetry network INT information field and a first identifier; acquiring statistical information corresponding to the INT information field according to the INT information field, and storing the statistical information into the INT information field to obtain a second data message; according to the first identification, copying the second data message to obtain a third data message; sending the second data message to a Software Defined Network (SDN) controller so that the SDN controller determines a transmission path for transmitting the data message according to the second data message; and when the network equipment has next hop network equipment, sending the third data message to the next hop network equipment of the network equipment so that the next hop network equipment executes the same steps as the network equipment on the third data message. According to the message forwarding method and device provided by the embodiment of the invention, the processing efficiency of the SDN controller can be improved.

Description

Message forwarding method and device
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method and an apparatus for forwarding a packet.
Background
In-band Network Telemetry (INT for short) is a new Network management architecture. The network architecture may collect and report the status of the network through only the data plane of the network device without involvement of the control plane of the network device. However, in Software Defined Networking (SDN), there is a need for longest path probing in addition to collecting Network states.
In the framework model of INT, a transmission link is formed between two node devices. The multiple transmission links form a transmission path of data. The transmission path includes an INT head node, an INT transit node, and an INT tail node. An INT head node (INT source), i.e. a source network device, is responsible for adding an INT head and an INT monitoring instruction to a specific data packet to obtain an INT packet. And an INT Transit Hop node (INT Transit Hop), namely the intermediate network equipment receives the INT message and executes the monitoring instruction. The INT Transit Hop adds designation information in the INT message (or at the end). An INT tail node (INT Sink), that is, a destination network device, receives an INT message, and uploads the INT message to an SDN controller, so that the SDN controller can analyze data traffic and a path. However, if the data plane has a message loss condition, the INT Sink cannot receive the INT message sent by the INT source. The SDN controller cannot realize path monitoring, and the current INT framework model lacks the function of longest path detection.
Based on the above problem, the SDN controller may instruct the INT devices (INT source, INT Transit Hop, and INT Sink) to send an INT message to the SDN controller. The device of the last INT message received by the SDN controller may be considered as the farthest device from which the data message can be transmitted, so as to determine the longest path.
However, because of a large number of data messages of the data plane, a large number of INT messages uploaded by the INT device in the above scheme occupy a large number of resources of the SDN controller, and further affect the processing efficiency of the SDN controller.
Disclosure of Invention
In view of this, the present invention provides a message forwarding method and device, so as to reduce the number of messages that are uploaded to an SDN controller by a network device, reduce resource occupation of the SDN controller, and improve processing efficiency of the SDN controller.
In a first aspect, the present invention provides a packet forwarding method, applied to a network device, where the method includes: acquiring a first data message, wherein the first data message comprises an in-band telemetry network INT information field and a first identifier;
acquiring statistical information corresponding to the INT information field according to the INT information field, and storing the statistical information into the INT information field to obtain a second data message;
copying the second data message according to the first identifier to obtain a third data message;
sending the second data message to a Software Defined Network (SDN) controller so that the SDN controller determines a transmission path for transmitting the data message according to the second data message;
and when the network equipment has next hop network equipment, sending the third data message to the next hop network equipment of the network equipment so that the next hop network equipment executes the same steps as the network equipment on the third data message.
With reference to the first aspect, in a first possible implementation manner, when the network device is a source network device, the acquiring a first data packet includes:
receiving tracking indication information issued by the SDN controller;
determining a target data message from a plurality of data messages according to the tracking indication information;
copying the target data message, and adding a first identifier in an INT information field of the copied target data message to obtain a tracking message;
and determining the trace message as the first data message.
With reference to the first possible implementation manner of the first aspect, in a second implementation manner, the method further includes:
and sending the target data message to the next hop network equipment of the network equipment.
With reference to the first possible implementation manner of the first aspect, in a third possible implementation manner, the tracking indication information includes: identification information of a target data message and a copy frequency of copying the target data message,
determining a target data message from a plurality of data messages according to the tracking indication information, including:
and determining a data message matched with the identification information from a plurality of data messages as the target data message according to the identification information and the copy frequency.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner, the tracking indication information further includes: tracking start identification information;
before copying the target data packet, the method further includes:
identifying whether the tracking start identification information is a second identification;
and if the tracking start identification information is a second identification, copying the target data message.
In a second aspect, the present invention provides a packet forwarding apparatus, applied to a network device, where the apparatus includes:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a first data message, and the first data message comprises an in-band telemetry network INT information field and a first identifier;
the second acquisition module is used for acquiring statistical information corresponding to the INT information field according to the INT information field and storing the statistical information into the INT information field to obtain a second data message;
the processing module is used for copying the second data message according to the first identifier to obtain a third data message;
a determining module, configured to send the second data packet to a Software Defined Network (SDN) controller, so that the SDN controller determines, according to the second data packet, a transmission path for transmitting the data packet;
a first sending module, configured to send the third data packet to a next hop network device of the network device when the network device has the next hop network device, so that the next hop network device performs the same step as the network device on the third data packet.
With reference to the first aspect, in a first possible implementation manner, when the network device is a source network device, the first obtaining module includes:
the receiving submodule is used for receiving tracking indication information issued by the SDN controller;
the first determining submodule is used for determining a target data message from a plurality of data messages according to the tracking indication information;
the replication submodule is used for replicating the target data message and adding a first identifier in an INT information field of the replicated target data message to obtain a tracking message;
and the second determining submodule is used for determining the tracking message as the first data message.
With reference to the first possible implementation manner of the first aspect, in a second implementation manner, the apparatus further includes:
and the second sending module is used for sending the target data message to the next hop network equipment of the network equipment.
With reference to the first possible implementation manner of the first aspect, in a third possible implementation manner, the tracking indication information includes: identification information of a target data message and a copy frequency for copying the target data message;
the first determining submodule is further configured to determine, from the plurality of data messages, a data message matched with the identification information as the target data message according to the identification information and the copy frequency.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner,
the tracking indication information further includes: tracking start identification information; the device further comprises:
the identification module is used for identifying whether the tracking starting identification information is a second identification;
and the copying module is used for copying the target data message if the tracking start identification information is a second identification.
In this way, after receiving the first data packet, the network device determines that the first data packet is a trace packet according to the first identifier included in the first data packet. And the network equipment adds the statistical information in an INT information field included in the first data message to obtain a second data message, and copies the second data message to obtain a third data message. And the network equipment sends the second data message to the SDN controller, and forwards the third data message to next-hop network equipment of the network equipment.
Because the tracking message with the first identifier is sent to the SDN controller instead of all data messages received by the network device in the embodiment of the present invention, when the longest path for transmitting the data message is detected, the number of messages sent to the SDN controller can be reduced, and the processing efficiency of the SDN controller is further improved.
Other features and aspects of the present invention will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the invention and, together with the description, serve to explain the principles of the invention.
Fig. 1 shows a flowchart of a packet forwarding method according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating a packet forwarding method according to an embodiment of the present invention.
Fig. 3 shows a flowchart of a packet forwarding method according to an embodiment of the present invention.
Fig. 4 is a diagram illustrating an exemplary packet forwarding scheme according to the present invention.
Fig. 5 is a block diagram illustrating a structure of a packet forwarding apparatus according to an embodiment of the present invention.
Fig. 6 is a block diagram illustrating a structure of a packet forwarding apparatus according to an embodiment of the present invention.
Fig. 7 is a block diagram illustrating a hardware structure of a message forwarding apparatus according to an exemplary embodiment.
Detailed Description
Various exemplary embodiments, features and aspects of the present invention will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present invention. It will be understood by those skilled in the art that the present invention may be practiced without some of these specific details. In some instances, methods, procedures, components, and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present invention.
The method and the device aim to solve the problems that when an SDN controller detects the longest path for transmitting data messages, the quantity of received data messages is large, so that the resource occupation is excessive, and the processing efficiency of the SDN controller is affected. In the embodiment of the invention, the network equipment determines the target data message in the received data message, and adds the first identifier in the target data message to obtain the tracking message. And when the next hop network equipment exists, forwarding the tracking message to the next hop network equipment. In this way, the network device on the whole path identifies the trace message through the first identifier to send the trace message to the SDN controller, so that the SDN controller can detect the longest path for transmitting the data message according to the trace message. The embodiment of the invention can reduce the quantity of data messages sent by network equipment to the SDN controller, reduce the occupation of SDN controller resources and improve the processing efficiency of the SDN controller.
Fig. 1 is a flowchart illustrating a message forwarding method according to an embodiment of the present invention, which may be applied to a network device. The network device may be specifically a VTEP device, or a Switch (SW), or a gateway, etc. As shown in fig. 1, the method may include the steps of:
step 101, obtaining a first data message, wherein the first data message comprises an in-band telemetry network INT information field and a first identification.
Specifically, the first data packet may be a data packet forwarded to the network device by a previous hop network device of the network device, or the first data packet may be a data packet from a virtual machine in communication with the network device and added with the first identifier by the network device.
The first identifier is identification information for identifying the first data message as a trace message. The INT information field may be used to specify information (e.g., bandwidth, delay, packet loss rate, etc.) to be counted by the current network device.
For example, the INT information field may include an identifier of the information to be counted, so that the network device may determine the corresponding statistical information according to the identifier.
Further, if the network device is a source network device, the trace message is generated by the source network device according to the trace indication information. The tracking indication information is information which is issued to the network device by the SDN controller to indicate the network device to generate a tracking message and upload the tracking message to the SDN controller.
For example, the trace indication information carries Internet Protocol (IP) information identifying a data stream, a Virtual Private Network (VPN) identifier, and a tenant identifier. When the network device is a source network device, the network device determines a data message in which the tenant identifier, the VPN identifier and the IP information are consistent with the tenant identifier, the VPN identifier and the IP information indicated by the tracking indication information, and adds a first identifier in the data message to generate a tracking message.
And 102, acquiring statistical information corresponding to the INT information field according to the INT information field, and storing the statistical information into the INT information field to obtain a second data message.
Specifically, the network device determines and acquires statistical information corresponding to the INT information field according to the INT information field.
For example: and the INT information field indicates the network equipment to count the bandwidth information, and the network equipment counts the currently occupied bandwidth and adds the counted bandwidth information to the INT information field to obtain a second data message.
And 103, copying the second data message according to the first identifier to obtain a third data message.
And step 104, sending the second data message to a Software Defined Network (SDN) controller, so that the SDN controller determines a transmission path for transmitting the data message according to the second data message.
Specifically, in the embodiment of the present invention, the first data packet carries the first identifier, and the network device determines that the first data packet is the trace packet. And after the network equipment stores the information to be counted into the INT information field to obtain a second data message, the network equipment copies the second data message to obtain a third data message.
The network device forwards the second data message to the SDN controller, so that the SDN controller may determine a transmission path for transmitting the data message according to the received second data message.
For example, after receiving the second data packet from the network device a, the SDN controller determines that a transmission path for transmitting the data packet passes through the network device a. Next, after the SDN controller receives the second data packet from the network device B again, it is determined that the transmission path for transmitting the data packet also passes through the network device B.
And 105, when the network device has a next hop network device, sending the third data packet to the next hop network device of the network device, so that the next hop network device performs the same steps as the network device on the second data packet.
Specifically, when the network device has a next hop network device, the network device sends the third data packet to the next hop network device of the network device. And the next hop network equipment receives the third data message, adds the statistical information to the INT information field and obtains a fourth data message. And the next hop network device copies the fourth data message according to the first identifier in the third data message, sends the copied fourth data message to the SDN controller, and forwards the fourth data message to the next hop network device.
In other words, if the next hop network device is a non-destination network device, steps 101-105 are performed again.
And if the next-hop network device is the target network device, adding corresponding statistical information in the received fourth data message by the target network device to obtain a fifth data message, and sending the fifth data message to the SDN controller. The destination network device does not perform the process of copying the fifth data packet and forwarding the fifth data packet to the next hop network device.
In fact, since the second data packet and the third data packet are the same packet, the network device may also send the third data packet to the SDN controller, and forward the second data packet to the next-hop network device of the network device, which is not limited in the embodiment of the present invention. In this way, after receiving the first data packet, the network device determines that the first data packet is a trace packet according to the first identifier included in the first data packet. And the network equipment adds the statistical information in an INT information field included in the first data message to obtain a second data message, and copies the second data message to obtain a third data message. And the network equipment sends the second data message to the SDN controller, and forwards the third data message to next-hop network equipment of the network equipment.
In the embodiment of the invention, the first data message, the second data message, the third data message, the fourth data message and the fifth data message are all messages subjected to VXLAN tunnel encapsulation.
It can be understood that, when the network device is a source network device, the source network device receives an original data packet sent by a connected virtual machine. After the source network equipment determines that the original data message is the tracking message, a first identifier is added to the original data message, VXLAN tunnel encapsulation is carried out, and the first data message is obtained. And the source network equipment sends the first data message to the next hop network equipment through the VXLAN tunnel.
And when the network equipment is the destination network equipment, the destination network equipment receives the fourth data message sent by the previous hop network equipment. And the target network equipment adds corresponding statistical information in the fourth data message to obtain a fifth data message, and sends the fifth data message to the SDN controller. And simultaneously, the destination network equipment de-encapsulates the VXLAN tunnel of the fourth data message to obtain an original data message, and sends the original data message to the connected virtual machine.
Because the tracking message with the first identifier is sent to the SDN controller instead of all data messages received by the network device in the embodiment of the present invention, when the longest path for transmitting the data message is detected, the number of messages sent to the SDN controller can be reduced, and the processing efficiency of the SDN controller is further improved.
Fig. 2 is a flowchart illustrating a packet forwarding method according to an embodiment of the present invention. Step 204 to step 207 in fig. 2 are the same as step 102 to step 105 in the foregoing embodiment, and the embodiment of the present invention is not described herein again.
In one possible implementation, referring to fig. 2, when the network device is a source network device, the method includes the following steps.
Step 201, receiving tracking indication information issued by the SDN controller.
Specifically, the trace indication information is information that the SDN controller issues to the network device to indicate the network device to generate a trace packet and upload the trace packet to the SDN controller.
For example, the SDN controller may issue the tracking indication information to the network device in the form of a flow table and/or an information instruction.
Step 202, determining a target data message from the plurality of data messages according to the tracking indication information.
Specifically, the network device determines a target data packet from the received multiple data packets according to the tracking indication information.
For example: the tracking indication information carries IP information (source IP and destination IP) identifying the data stream and VPN identification. And the network equipment determines that the data message with the consistent IP information and VPN identification and the IP information and VPN identification indicated in the tracking indication information is the target data message.
For another example: and the tracking indication information carries IP information, VPN identification and tenant identification for identifying the data flow. And the network equipment determines the data message of which the tenant identification, the VPN identification and the IP information are consistent with the tenant identification, the VPN identification and the IP information indicated in the tracking indication information as a target data message.
For another example, the trace indication information may also carry a copy frequency, and the copy frequency is a frequency of determining the target data packet for the network device. For example, when the duplication frequency is 1/second, it means that the network device will determine a target data packet in the received data packet every 1 s. That is, the network device determines, every second, a data packet in which a designated tenant (tenant corresponding to tenant identification) and an IP information in the VPN are identical to the same tenant (tenant corresponding to tenant identification) and the IP information in the VPN indicated in the trace instruction information as a target data packet.
And 203, copying the target data message, and adding a first identifier in an INT information field of the copied target data message to obtain a tracking message.
Step 204, determining the trace message as the first data message.
Specifically, the network device copies the target data message, and adds a first identifier in an INT information field of the copied target message to obtain a trace message. The network device determines that the trace message is a first data message.
The first identifier is an identifier for identifying that the message is a trace message. The identifier may be an extension identifier of the INT message, and when the extension identifier is set, it indicates that the INT message is used for tracking and detecting the path.
And step 205, obtaining statistical information corresponding to the INT information field according to the INT information field, and storing the statistical information into the INT information field to obtain a second data message.
And step 206, copying the second data message according to the first identifier to obtain a third data message.
Step 207, sending the second data packet to a software defined network, SDN, controller, so that the SDN controller determines a transmission path for transmitting the data packet according to the second data packet.
And step 208, when the network device has a next hop network device, sending the third data packet to the next hop network device of the network device, so that the next hop network device performs the same steps as the network device on the third data packet.
Optionally, in a possible implementation manner, the method may further include:
and the network equipment sends the target data message to the next hop network equipment of the network equipment.
Specifically, the network device sends the target data packet to the next hop network device while sending the third data packet (trace packet) to the next hop network device of the network device.
And after the next-hop network equipment receives the third data message and the target data message, identifying the third data message as a tracking message according to the first identifier in the third data message. And after adding the statistical information in INT fields of the third data message and the target data message, copying the third data message added with the statistical information, and uploading the third data message added with the statistical information to the SDN controller.
And meanwhile, the next hop network equipment performs normal forwarding processing on the target data message, and forwards the copied third data message when the next hop network equipment exists.
In this way, the network device determines the target data message according to the tracking indication information issued by the SDN controller, and copies the target data message. The network equipment adds the first identifier in the copied target data message to obtain the tracking message, so that all network equipment in the network can identify the tracking message according to the first identifier and upload the tracking message to the SDN controller.
According to the message forwarding method, when the longest path for transmitting the data message is detected, the number of messages uploaded to the SDN controller can be reduced, and the processing efficiency of the SDN controller is further improved.
Fig. 3 is a flowchart illustrating a message forwarding method according to an embodiment of the present invention, wherein step 301, and step 303 to step 308 are similar to step 201, and step 203 to step 208, respectively, and are not described herein again.
In a possible implementation manner, the tracking indication information may include: referring to fig. 3, the method may include the following steps:
step 301, receiving tracking indication information issued by the SDN controller.
Step 302, according to the identification information and the copy frequency, determining a data packet matched with the identification information from a plurality of data packets as the target data packet.
The identification information of the target data packet may identify a data stream. The identification information may include a source IP address and a destination IP address, a VPN identifier, and a tenant identifier. The replication frequency determines the frequency of the target data message for the network device. For example, when the copy frequency is 1/second, it means that the network device will determine a target data packet in the received multiple data packets every 1 s.
For example, the network device may determine a time interval and a number of packets according to the copy frequency, where the time interval is a time interval for determining the target data packet, and the number of packets is a number of the determined target data packets. For example, the number of messages is N, where N is a positive integer.
For example, the network device may set the determination time of the target data packet according to the time interval. For example: if the network device receives the tracking indication information at time 1 or completes the determination of the target data message at time 1, time 2 which is separated from time 1 by the time interval is determined, and time 2 is set as the time of determining the target data message next. At time 2, the network device may determine N target data packets in the received data packet. For example, the network device may determine the data packet having the identification information in the trace indication information in the data packet received at time 2, and randomly determine N data packets as the target data packets in the data packet.
Illustratively, the network device may also set a timer according to the time interval. For example: the network device may start the timer after receiving the trace indication information or after completing the determination of the target data packet. When the timer reaches a time interval, the network device determines N target data packets in the received data packets. For example, when the timer reaches the time interval, the network device determines that the data packet received at this time has the data packet with the identification information in the tracking indication information, and randomly determines N data packets as the target data packet in the data packet.
Step 303, copying the target data message, and adding a first identifier in an in-band telemetry network INT information field of the copied target data message to obtain a tracking message;
step 304, determining the trace message as a first data message.
305, acquiring statistical information corresponding to the INT information field according to the INT information field, and storing the statistical information into the INT information field to obtain a second data message;
step 306, according to the first identifier, performing copy processing on the second data message to obtain a third data message;
step 307, sending the second data packet to a Software Defined Network (SDN) controller, so that the SDN controller determines a transmission path for transmitting the data packet according to the second data packet;
step 308, when the network device has a next hop network device, sending the third data packet to the next hop network device of the network device, so that the next hop network device performs the same steps as the network device on the third data packet.
Optionally, in a possible implementation manner, the tracking indication information further includes: tracking the start-up identification information, the method may further include:
identifying whether the tracking start identification information is a second identification;
and if the tracking start identification information is a second identification, copying the target data message. And the SDN controller issues tracking starting identification information to the network equipment.
For example, the SDN controller issues the tracking start identifier information while issuing the IP information and the copy frequency of the target data packet to the network device.
The tracking start identification information indicates whether the network device generates a tracking message or not and uploads the tracking message to the SDN controller. The tracking start identification information includes a second identification and a third identification. The second identifier indicates the network equipment to generate a tracking message and uploads the tracking message to the SDN controller; the third identifier indicates that the network device does not generate a trace packet and does not upload the trace packet to the SDN controller.
The network device responds to the second identity when the tracking start identity information is the second identity. And the network equipment determines a target data message according to the tracking indication information, copies the target data message, and adds a first identifier in an in-band telemetry network INT information field of the copied target data message to obtain a tracking message process.
When the trace start identification information is the third identification, even if the network device receives the trace indication information from the SDN controller, the process of determining the target data packet is not executed.
Fig. 4 is a diagram illustrating an exemplary packet forwarding scheme according to the present invention.
For example, taking the example shown in fig. 4 as an example, after SW2 receives the data packet from SW1, if it is recognized that the data packet carries the first identifier, that is, the data packet is a trace packet, the data packet may be sent to an SDN controller, and the data packet may be forwarded to SW 3.
Therefore, the network device only sends the tracking message carrying the first identifier to the SDN controller, the number of messages sent to the SDN controller can be reduced, the processing efficiency of the SDN controller is further improved, the network fault position can be accurately judged, the network fault detection efficiency can be improved, and the network maintenance efficiency is further improved.
Illustratively, reference is made to the example shown in FIG. 4. Wherein, VM10 and VM40 are Virtual machines belonging to the same Virtual Extensible LAN (VXLAN), SW1 and SW4 are devices accessing VXLAN Tunnel End Point (VTEP), and SW1, SW2, SW3 and SW4 all support INT function. SW1 is an INT Source device, SW2, SW3 are INT Transit Hop devices, and SW4 is an INT Sink device.
Under an initial condition, the SDN controller issues trace indication information (including a trace flow table and copy frequency information, where the trace flow table may include a source IP (VM10), a destination IP (VM40), that is, IP information of a target packet, a tenant identifier, a VPN identifier, and may further include an INT packet type (protocol type in a VXLAN header), a first identifier, to all network devices (SW1, SW2, SW3, and SW4), where an action item of the trace flow table may include a normal forwarding and forwarding controller, and the like).
VM10 sends data messages to SW 1. After receiving the data message, SW1 performs INT information encapsulation on the data message to obtain an INT message. At this time, the tracking start identification information received by the SW1 is the second identification. Therefore, the target data message can be determined in the INT message according to the tracking indication information, and the target data message can be copied. SW1 adds the first mark in INT field of the copied INT message to obtain the trace message. SW1 forwards trace packets to the SDN controller and forwards trace packets and target data packets to SW 2. After receiving the data packets (trace packets and target data packets), the network devices SW1, SW2, SW3 and SW4 all perform an operation of adding statistical information to the INT information field of the data packets.
Assuming that the path from the VW10 to the VM40 is normal, SW1 forwards the trace and target data packets to SW 2. SW2 uploads trace messages to the SDN controller and continues to forward trace messages and target data messages to SW 3. SW3 uploads trace messages to the SDN controller and continues to forward trace messages and target data messages to SW 4. The SW4 sends the trace message to the SDN controller, and at the same time, the SW4 recognizes that the destination address of the tunnel header of the trace message is the address of SW4, so that the SW4 does not execute the process of copying the trace message, and decapsulates the target data message (decapsulates VXLAN and strips INT information from the target message) to obtain the original data message. SW4 forwards the data packet to VM 40. Thus, the SDN controller receives the trace messages from SW1, SW2, SW3, and SW4 in sequence, and determines that the longest path from VM10 to VM40 is SW1-SW2-SW3-SW 4.
Assume that the SW3-SW4 path failed. After SW3 receives the trace packets and the target data packets from SW2, SW3 sends the trace packets up to the SDN controller, and continues to forward the trace packets and the target data packets to SW 4. SW4 does not receive the trace message and the target data message forwarded by SW3, and SW4 does not send the trace message to the SDN controller. Within a preset time, the SDN controller receives trace messages from SW1, SW2, and SW3 in sequence. After the preset time is over, the SDN controller only receives the trace messages of SW1, SW2 and SW3, so that the SDN controller determines that the longest path from VM10 to VM40 is SW1-SW2-SW 3. The SDN controller reports the longest path from the VM10 to the VM40 to the SW1-SW2-SW3 and reports the path exception from the SW3 to the SW4 to the network management platform, so that the network management platform processes the failed SW3-SW4 paths.
Therefore, the SDN controller can realize the detection of the longest transmission path of the data flow based on the INT frame, can accurately judge the network fault position, can improve the efficiency of network fault detection, and further improves the efficiency of network maintenance.
Fig. 5 is a block diagram illustrating a structure of a packet forwarding apparatus according to an embodiment of the present invention, where the apparatus may be applied to a network device, and as shown in fig. 5, the apparatus may include: a first obtaining module 501, a second obtaining module 502, a processing module 503, a determining module 504 and a first sending module 505; wherein the content of the first and second substances,
a first obtaining module 501, configured to obtain a first data packet, where the first data packet includes an in-band telemetry network INT information field and a first identifier;
a second obtaining module 502, configured to obtain statistical information corresponding to the INT information field according to the INT information field, and store the statistical information in the INT information field to obtain a second data packet;
the processing module 503 may be configured to copy the second data packet according to the first identifier to obtain a third data packet;
a determining module 504, configured to send the second data packet to a software defined network, SDN, controller, so that the SDN controller determines a transmission path for transmitting the data packet according to the second data packet;
the first sending module 505 may be configured to send the third data packet to a next hop network device of the network device when the network device exists in the next hop network device, so that the next hop network device performs the same steps as the network device on the third data packet.
Fig. 6 is a block diagram illustrating a structure of a packet forwarding apparatus according to an embodiment of the present invention.
In a possible implementation manner, when the network device is a source network device, referring to fig. 6, the first obtaining module 501 may include:
the receiving submodule 5011 may be configured to receive tracking indication information sent by the SDN controller;
the first determining submodule 5012 may be configured to determine, according to the tracking indication information, a target data packet from the multiple data packets;
the replication sub-module 5013 may be configured to replicate the target data packet, and add a first identifier to an INT information field of the replicated target data packet to obtain a tracking packet;
a second determining sub-module 5014 may be configured to determine the trace packet as the first data packet.
In one possible implementation, referring to fig. 6, the apparatus may further include:
a second sending module 506, configured to send the target data packet to a next hop network device of the network devices.
In one possible implementation manner, the tracking indication information may include: identification information of a target data message and a copy frequency for copying the target data message;
the first determining submodule 5012 may further be configured to determine, according to the identification information and the copy frequency, a data packet that matches the identification information from among the plurality of data packets, as the target data packet.
In one possible implementation manner, the tracking indication information further includes: tracking start identification information; referring to fig. 6, the apparatus may further include:
an identifying module 507, configured to identify whether the tracking start identification information is a second identification;
the copying module 508 may be configured to copy the target data packet if the tracking start identifier information is the second identifier.
Fig. 7 is a block diagram illustrating a hardware structure of a message forwarding apparatus according to an exemplary embodiment. In practical applications, the device may be implemented by a server. Referring to fig. 7, the apparatus 700 may include a processor 701, a machine-readable storage medium 702 having stored thereon machine-executable instructions. The processor 701 and the machine-readable storage medium 702 may communicate via a system bus 703. Also, the processor 701 executes the message processing method described above by reading machine-executable instructions corresponding to the data processing method logic in the machine-readable storage medium 702.
The machine-readable storage medium 702 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: random Access Memory (RAM), volatile Memory, non-volatile Memory, flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, dvd, etc.), or similar storage media, or a combination thereof.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (8)

1. A message forwarding method is applied to a network device, and the method comprises the following steps:
acquiring a first data message, wherein the first data message comprises an in-band telemetry network INT information field and a first identifier;
acquiring statistical information corresponding to the INT information field according to the INT information field, and storing the statistical information into the INT information field to obtain a second data message;
copying the second data message according to the first identifier to obtain a third data message;
sending the second data message to a Software Defined Network (SDN) controller so that the SDN controller determines a transmission path for transmitting the data message according to the second data message;
when the network equipment has next hop network equipment, sending the third data message to the next hop network equipment of the network equipment so that the next hop network equipment executes the same steps as the network equipment on the third data message;
when the network device is a source network device, the acquiring the first data packet includes:
receiving tracking indication information issued by the SDN controller;
determining a target data message from a plurality of data messages according to the tracking indication information;
copying the target data message, and adding a first identifier in an INT information field of the copied target data message to obtain a tracking message;
and determining the trace message as the first data message.
2. The method of claim 1, further comprising:
and sending the target data message to the next hop network equipment of the network equipment.
3. The method of claim 1, wherein the tracking indication information comprises: identification information of a target data message and a copy frequency of copying the target data message,
determining a target data message from a plurality of data messages according to the tracking indication information, including:
and determining a data message matched with the identification information from a plurality of data messages as the target data message according to the identification information and the copy frequency.
4. The method of claim 3, wherein the tracking indication information further comprises: tracking start identification information;
before copying the target data packet, the method further includes:
identifying whether the tracking start identification information is a second identification;
and if the tracking start identification information is a second identification, copying the target data message.
5. A message forwarding apparatus, applied to a network device, the apparatus comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a first data message, and the first data message comprises an in-band telemetry network INT information field and a first identifier;
the second acquisition module is used for acquiring statistical information corresponding to the INT information field according to the INT information field and storing the statistical information into the INT information field to obtain a second data message;
the processing module is used for copying the second data message according to the first identifier to obtain a third data message;
a determining module, configured to send the second data packet to a Software Defined Network (SDN) controller, so that the SDN controller determines, according to the second data packet, a transmission path for transmitting the data packet;
a first sending module, configured to send the third data packet to a next hop network device of the network device when the network device has the next hop network device, so that the next hop network device performs the same step as the network device on the third data packet;
when the network device is a source network device, the first obtaining module includes:
the receiving submodule is used for receiving tracking indication information issued by the SDN controller;
the first determining submodule is used for determining a target data message from a plurality of data messages according to the tracking indication information;
the replication submodule is used for replicating the target data message and adding a first identifier in an INT information field of the replicated target data message to obtain a tracking message;
and the second determining submodule is used for determining the tracking message as the first data message.
6. The apparatus of claim 5, further comprising:
and the second sending module is used for sending the target data message to the next hop network equipment of the network equipment.
7. The apparatus of claim 5, wherein the tracking indication information comprises: identification information of a target data message and a copy frequency for copying the target data message;
the first determining submodule is further configured to determine, from the plurality of data messages, a data message matched with the identification information as the target data message according to the identification information and the copy frequency.
8. The apparatus of claim 7, wherein the tracking indication information further comprises: tracking start identification information; the device further comprises:
the identification module is used for identifying whether the tracking starting identification information is a second identification;
and the copying module is used for copying the target data message if the tracking start identification information is a second identification.
CN201711476340.1A 2017-12-27 2017-12-27 Message forwarding method and device Active CN108111432B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711476340.1A CN108111432B (en) 2017-12-27 2017-12-27 Message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711476340.1A CN108111432B (en) 2017-12-27 2017-12-27 Message forwarding method and device

Publications (2)

Publication Number Publication Date
CN108111432A CN108111432A (en) 2018-06-01
CN108111432B true CN108111432B (en) 2021-07-02

Family

ID=62214845

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711476340.1A Active CN108111432B (en) 2017-12-27 2017-12-27 Message forwarding method and device

Country Status (1)

Country Link
CN (1) CN108111432B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110572293B (en) * 2018-06-06 2023-02-14 华为技术有限公司 Data message detection method, equipment and system
CN109194581B (en) * 2018-08-24 2020-12-25 新华三技术有限公司 Message processing method and device
US10979787B2 (en) * 2018-09-10 2021-04-13 Zte Corporation Techniques to collect and transport telemetry information in a communication network
CN109787833B (en) * 2019-01-23 2020-05-08 清华大学 Network abnormal event sensing method and system
CN112350844B (en) * 2019-08-09 2024-03-29 华为技术有限公司 Method and device for data transmission
CN110752993B (en) * 2019-10-24 2022-02-25 新华三信息安全技术有限公司 Message forwarding method and device
CN111147403B (en) * 2019-12-27 2021-08-31 苏州盛科通信股份有限公司 Message processing method and device, storage medium and electronic device
CN113098749A (en) * 2020-01-08 2021-07-09 华为技术有限公司 Message sending method, device and storage medium
CN113300951B (en) * 2020-02-21 2023-10-24 华为技术有限公司 Method, equipment and system for sending message
CN111698161B (en) * 2020-04-01 2022-09-02 北京华三通信技术有限公司 Message processing method and device
CN114157595B (en) * 2020-09-08 2023-07-04 超聚变数字技术有限公司 Communication system, data processing method and related equipment
CN113328956B (en) * 2021-06-07 2022-07-01 新华三技术有限公司 Message processing method and device
CN113364778B (en) * 2021-06-07 2022-07-29 新华三技术有限公司 Message processing method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106612211B (en) * 2015-10-23 2020-02-21 华为技术有限公司 Path detection method, controller and network equipment in VxLAN
EP3306871B1 (en) * 2015-11-27 2021-08-11 Huawei Technologies Co., Ltd. Method and apparatus for acquiring path information
CN106936655A (en) * 2015-12-30 2017-07-07 阿里巴巴集团控股有限公司 Chain circuit detecting method, device and the network equipment, controller
CN107294743B (en) * 2016-03-30 2020-02-14 华为技术有限公司 Network path detection method, controller and network equipment
CN107453884B (en) * 2016-05-30 2020-01-10 华为技术有限公司 Method and device for detecting service quality of network equipment

Also Published As

Publication number Publication date
CN108111432A (en) 2018-06-01

Similar Documents

Publication Publication Date Title
CN108111432B (en) Message forwarding method and device
US10985942B2 (en) Multicast traffic steering using tree identity in bit indexed explicit replication (BIER)
US10917322B2 (en) Network traffic tracking using encapsulation protocol
US10484206B2 (en) Path detection method in VxLAN, controller, and network device
US10122614B2 (en) Failure protection for traffic-engineered bit indexed explicit replication
EP4089981B1 (en) Bit-forwarding ingress router and operation, administration and maintenance detection method
US10305822B2 (en) Service chain routing method and system, and equipment in system
US10498627B2 (en) Detecting packet forwarding path
CN108521371B (en) Message forwarding method and device
CN105591974A (en) Message processing method, device and system
CN107566292B (en) Message forwarding method and device
US20200076724A1 (en) Path management for segment routing based mobile user-plane using seamless bfd
CN110557342B (en) Apparatus for analyzing and mitigating dropped packets
US10944667B2 (en) Loop check packets
CN112887229B (en) Session information synchronization method and device
CN111614505B (en) Message processing method and gateway equipment
US20170195203A1 (en) Method, apparatus, and system for implementing packet loss detection
US20170222953A1 (en) User packet forwarding control method and processing node
US20080130503A1 (en) Method and system for forwarding ethernet frames over redundant networks with all links enabled
CN105763463B (en) Method and device for transmitting link detection message
CN107682261A (en) Flow forwarding method and device
CN104506369A (en) Packet loss position detecting method and device
US10110462B1 (en) False positive protection for Network Function Virtualization (NFV) virtual probe deployment
CN107231321B (en) Method, equipment and network system for detecting forwarding path
US20160344591A1 (en) Determining Connections of Non-External Network Facing Ports

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant