CN109495570B - Method and device for forwarding sampling message and data center - Google Patents

Method and device for forwarding sampling message and data center Download PDF

Info

Publication number
CN109495570B
CN109495570B CN201811383141.0A CN201811383141A CN109495570B CN 109495570 B CN109495570 B CN 109495570B CN 201811383141 A CN201811383141 A CN 201811383141A CN 109495570 B CN109495570 B CN 109495570B
Authority
CN
China
Prior art keywords
sampling
address
source
random
equipment
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
CN201811383141.0A
Other languages
Chinese (zh)
Other versions
CN109495570A (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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN201811383141.0A priority Critical patent/CN109495570B/en
Publication of CN109495570A publication Critical patent/CN109495570A/en
Application granted granted Critical
Publication of CN109495570B publication Critical patent/CN109495570B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management

Landscapes

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

Abstract

The invention discloses a method, a device and a data center for forwarding a sampling message, wherein the method comprises the following steps: establishing communication connection with sampling destination equipment included in the data center, wherein the sampling destination equipment is equipment connected with a sampling server included in the data center; the method comprises the steps that an Internet Protocol (IP) address and a random IP address list of a sampling source device are synchronously sampled to a sampling target device, so that the sampling target device establishes a mapping relation between the IP address of the sampling source device and the random IP address list; packaging the collected message by taking one IP address in the random IP address list as a source IP address to obtain a sampling message; and sending the sampling message to the sampling destination equipment so that the sampling destination equipment changes the source IP address into the IP address of the sampling source equipment according to the mapping relation and forwards the sampling source equipment to the sampling server. The scheme can ensure load balance of each link of the whole data center and improve the bandwidth utilization rate of each link.

Description

Method and device for forwarding sampling message and data center
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for forwarding a sample packet, and a data center.
Background
Fig. 1 shows a typical architecture diagram of a data center, which includes network devices (SW 1-1, SW1-2, SW2-1, SW2-2, SW3, SW4, and SW5 shown in fig. 1), service servers (4 shown in fig. 1), and sampling servers, where an sFlow sampling function of an outlet is configured on the network device SW5 of the outlet, and messages in both directions (i.e., transmitting and receiving directions) of a Port5 are mirrored onto one sampling server (SW2-2, which is connected downstream). Because the image is a remote image, the message received and sent by the Port5 on the SW5 needs to be encapsulated into a sampling message, the source Internet Protocol (IP) address of the sampling message is the IP address of the Port5 on the SW5, and the destination IP address of the sampling message is the IP address of the sampling service, and then the sampling message is sent to the sampling server.
In fig. 1, although there are many links from the sampling device to the sampling server, if a packet at the same port on the same device is collected, the source IP address, the destination IP address, the source port, and the destination port of the packaged sampled packet are all the same, the equalization factor of the current equalization algorithm is usually related to the source IP address, the destination IP address, the source port, and the destination port, so that the sampled packet of one sampling device only selects the same link to forward at each time, as the link identified by the dashed line with an arrow in fig. 1.
In the above method for forwarding the sample packet, if the number of the sample packet is large, the excessive bandwidth of the link identified by the dotted line with the arrow is occupied, which affects forwarding of the normal service packet on the link, and other links may be in an idle state, and the bandwidth utilization rate of other links is low, thereby causing link load imbalance of the whole data center.
Disclosure of Invention
The embodiment of the invention provides a method and a device for forwarding a sampling message and a data center, which are used for solving the problem of link load unbalance of the whole data center in the prior art.
According to an embodiment of the present invention, a method for forwarding a sample packet is provided, which is applied to a sampling source device included in a data center, and the method includes:
establishing communication connection with sampling destination equipment included in the data center, wherein the sampling destination equipment is equipment connected with a sampling server included in the data center;
synchronizing the Internet protocol IP address and a random IP address list of the sampling source equipment to the sampling destination equipment so that the sampling destination equipment establishes a mapping relation between the IP address of the sampling source equipment and the random IP address list;
packaging the collected message by taking one IP address in the random IP address list as a source IP address to obtain a sampling message;
and sending the sampling message to the sampling destination equipment so that the sampling destination equipment changes the source IP address into the IP address of the sampling source equipment according to the mapping relation and forwards the IP address to the sampling server.
Specifically, establishing a communication connection with a sampling destination device included in the data center specifically includes:
sending a communication connection establishment request to the sampling destination device so that the sampling destination device sends a communication connection establishment response according to the communication connection establishment request;
receiving the communication connection establishment response.
Optionally, before synchronizing the IP address of the sampling source device and the random IP address list to the sampling destination device, the method further includes:
performing conflict detection on the IP addresses in the random IP address list;
if the conflict detection is passed, synchronizing the IP address of the sampling source device and the random IP address list to the sampling destination device;
and if the IP address list fails to pass the conflict detection, deleting the conflicting IP address from the random IP address list, and synchronizing the IP address of the sampling source device and the random IP address list for deleting the conflicting IP address to the sampling destination device.
According to an embodiment of the present invention, there is also provided a method for forwarding a sample packet, where the method is applied to a sampling destination device included in a data center, where the sampling destination device is a device connected to a sampling server included in the data center, and the method includes:
establishing communication connection with sampling source equipment included in the data center;
receiving the synchronous Internet protocol IP address and random IP address list of the sampling source equipment;
establishing a mapping relation between the IP address of the sampling source equipment and the random IP address list;
receiving a sampling message, wherein the sampling message is obtained by the sampling source device by packaging the acquired message by taking one IP address in the random IP address list as a source IP address;
and after the source IP address is changed into the IP address of the sampling source device according to the mapping relation, forwarding the IP address to the sampling server.
Specifically, establishing a communication connection with a sampling source device included in the data center specifically includes:
receiving a communication connection establishment request sent by the sampling source equipment;
and sending a communication connection establishment response according to the communication connection establishment request so that the sampling source device receives the communication connection establishment response.
According to an embodiment of the present invention, there is also provided a forwarding apparatus for a sample packet, which is applied to a sampling source device included in a data center, and the apparatus includes:
the system comprises an establishing module, a data center and a data processing module, wherein the establishing module is used for establishing communication connection with sampling destination equipment included in the data center, and the sampling destination equipment is equipment connected with a sampling server included in the data center;
the synchronization module is used for synchronizing the Internet protocol IP address and the random IP address list of the sampling source equipment to the sampling destination equipment so that the sampling destination equipment establishes the mapping relation between the IP address of the sampling source equipment and the random IP address list;
the encapsulation module is used for encapsulating the acquired message by taking one IP address in the random IP address list as a source IP address to obtain a sampling message;
and the sending module is used for sending the sampling message to the sampling destination equipment so that the sampling destination equipment changes the source IP address into the IP address of the sampling source equipment according to the mapping relation and forwards the IP address to the sampling server.
Specifically, the establishing module is specifically configured to:
sending a communication connection establishment request to the sampling destination device so that the sampling destination device sends a communication connection establishment response according to the communication connection establishment request;
receiving the communication connection establishment response.
Specifically, the synchronization module is further configured to:
before synchronizing the IP address of the sampling source device and a random IP address list to the sampling destination device, performing conflict detection on the IP addresses in the random IP address list;
if the conflict detection is passed, synchronizing the IP address of the sampling source device and the random IP address list to the sampling destination device;
and if the IP address list fails to pass the conflict detection, deleting the conflicting IP address from the random IP address list, and synchronizing the IP address of the sampling source device and the random IP address list for deleting the conflicting IP address to the sampling destination device.
According to an embodiment of the present invention, there is also provided a forwarding apparatus for a sample packet, which is applied to a sampling destination device included in a data center, where the sampling destination device is a device connected to a sampling server included in the data center, and the apparatus includes:
the data center comprises a first establishing module, a second establishing module and a data processing module, wherein the first establishing module is used for establishing communication connection with sampling source equipment included in the data center;
the first receiving module is used for receiving the Internet protocol IP address and the random IP address list of the sampling source equipment synchronized by the sampling source equipment;
the second establishing module is used for establishing the mapping relation between the IP address of the sampling source equipment and the random IP address list;
a second receiving module, configured to receive a sampling packet, where the sampling packet is obtained by encapsulating, by the sampling source device, a packet acquired by using an IP address in the random IP address list as a source IP address;
and the changing module is used for changing the source IP address into the IP address of the sampling source device according to the mapping relation and then forwarding the IP address to the sampling server.
Specifically, the first establishing module is specifically configured to:
receiving a communication connection establishment request sent by the sampling source equipment;
and sending a communication connection establishment response according to the communication connection establishment request so that the sampling source device receives the communication connection establishment response.
According to an embodiment of the present invention, there is also provided a data center, including a sampling source device and a sampling destination device, wherein:
the sampling source equipment comprises a forwarding device of the sampling message; the sampling destination device comprises the forwarding device of the sampling message.
The invention has the following beneficial effects:
the embodiment of the invention provides a method and a device for forwarding a sampling message, wherein communication connection is established between the device and sampling destination equipment included in a data center, and the sampling destination equipment is equipment connected with a sampling server included in the data center; synchronizing the Internet protocol IP address and a random IP address list of the sampling source equipment to the sampling destination equipment so that the sampling destination equipment establishes a mapping relation between the IP address of the sampling source equipment and the random IP address list; packaging the collected message by taking one IP address in the random IP address list as a source IP address to obtain a sampling message; and sending the sampling message to the sampling destination equipment so that the sampling destination equipment changes the source IP address into the IP address of the sampling source equipment according to the mapping relation and forwards the IP address to the sampling server. According to the scheme, the messages of the same port on the same equipment are collected, the source IP addresses of the sampling messages obtained by encapsulation are different, the balance factors of the balance algorithm used when different sampling messages are forwarded can be directly influenced to be different, even if the links selected by the sampling messages of the same port on the same sampling equipment at each time are different, the load balance of all the links of the whole data center can be ensured, and the bandwidth utilization rate of all the links is improved.
Drawings
FIG. 1 is a diagram of a prior art data center architecture;
fig. 2 is a flowchart of a method for forwarding a sample packet with a sampling source device as an execution subject according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for forwarding a sample packet with a sampling destination device as an execution subject according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a forwarding apparatus of a sample packet corresponding to fig. 2 in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a forwarding apparatus of a sample packet corresponding to fig. 3 in an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a data center according to an embodiment of the present invention.
Detailed Description
For a problem of link load imbalance of the entire data center in the prior art, an embodiment of the present invention provides a method for forwarding a sample packet, where the method is applied to a sampling source device included in the data center, an architecture diagram of the data center may refer to the architecture shown in fig. 1, and the source device is a device configured with an sFlow sampling function in the data center, and may be, for example, SW5 in fig. 1. The flow of the method is shown in fig. 2, and the specific execution steps are as follows:
s21: and establishing communication connection with sampling destination equipment included in the data center.
The sampling destination device is a device connected to a sampling server included in the data center, and may be one device or a plurality of devices, for example, in the case of a plurality of devices shown in fig. 1, the sampling destination device in fig. 1 is SW2(SW2 includes SW2-1 and SW2-2 constituting a virtual switching unit). After the data center is established, in order to implement the method in this embodiment, the sampling source device needs to establish a communication connection with the sampling destination device, which may be, but is not limited to, a Transmission Control Protocol (TCP) connection.
S22: and synchronizing the IP address of the sampling source equipment and the random IP address list to the sampling destination equipment so that the sampling destination equipment establishes the mapping relation between the IP address of the sampling source equipment and the random IP address list.
In order to enable the sampling destination device to establish a mapping relationship between the IP address of the sampling source device and the random IP address list, the sampling source device needs to synchronize the IP address of the sampling source device and the random IP address list to the sampling destination device.
The random IP address list may be set according to actual needs, and for example, may include: 1.1.1.1-1.1.1.254, totaling 254 IP addresses, and if the IP address of the sampling source device is 192.168.1.1, the sampling source device can synchronize 192.168.1.1 and 1.1.1.1-1.1.1.254 to the sampling destination device.
S23: and packaging the acquired message by taking one IP address in the random IP address list as a source IP address to obtain a sampling message.
When the sampling source device receives and sends the messages, the messages can be collected, then the header information is added outside the messages and encapsulated into the sampling messages, wherein the source IP address of the sampling messages is not the IP address of the sampling source device but one IP address in the random IP address list, the IP address can be randomly obtained from the random IP address list or obtained from the random IP address list according to the sequence, and the specific implementation mode can be determined according to the actual situation.
Continuing with the above example, 1.1.1.10 may be selected from the random IP address list as the source IP address of the sample packet.
S24: and sending the sampling message to the sampling destination equipment so that the sampling destination equipment changes the source IP address into the IP address of the sampling source equipment according to the mapping relation and forwards the sampling source equipment to the sampling server.
The sampling source device sends the sampling message in S23 to the sampling destination device, and in order to ensure that the sampling server correctly performs sampling analysis on the sampling source device, the sampling destination device needs to change the source IP address of the sampling message to the IP address of the sampling source device according to the mapping relationship in S22.
Continuing with the above example, the sampling destination device determines that the IP address of the sampling source device corresponding to 1.1.1.10 is 192.168.1.1 according to the mapping relationship, and therefore, directly changes 1.1.1.10 to 192.168.1.1 and forwards the result to the sampling server.
According to the scheme, the messages of the same port on the same equipment are collected, the source IP addresses of the sampling messages obtained by encapsulation are different, the balance factors of the balance algorithm used when different sampling messages are forwarded can be directly influenced to be different, even if the links selected by the sampling messages of the same port on the same sampling equipment at each time are different, the load balance of all the links of the whole data center can be ensured, and the bandwidth utilization rate of all the links is improved.
Specifically, the establishing of the communication connection with the sampling destination device included in the data center in S21 includes:
sending a communication connection establishment request to the sampling destination device so that the sampling destination device sends a communication connection establishment response according to the communication connection establishment request;
a communication connection establishment response is received.
The communication connection establishment request and the communication connection establishment response are different for different types of communication connections, for example, for a TCP connection, the communication connection establishment request and the communication connection establishment response are a TCP request and a TCP response, respectively. Other types of communication connections are not described in detail.
Optionally, before synchronizing the IP address of the sampling source device and the random IP address list to the sampling destination device in S22, the method further includes:
performing conflict detection on the IP addresses in the random IP address list;
if the conflict detection is passed, synchronously sampling the IP address and the random IP address list of the source equipment to the sampling destination equipment;
and if the IP address list does not pass the conflict detection, deleting the conflicting IP address from the random IP address list, and synchronously sampling the IP address of the source device and the random IP address list for deleting the conflicting IP address to the sampling destination device.
Sometimes two different devices in a data center may have the same IP address, and to avoid this, collision detection is required. In this embodiment, collision detection may be performed on the IP addresses in the random IP address list before the IP address of the source device and the random IP address list are synchronously sampled to the sampling destination device, and if the collision detection is passed, it is indicated that the IP addresses of the devices in the data center are not included in the random IP address list, and the IP address of the source device and the random IP address list may be synchronously sampled to the sampling destination device directly; if the IP addresses of the partial devices of the data center do not pass the conflict detection, the IP addresses of the partial devices of the data center are included in the random IP address list, and after the conflicting IP addresses need to be deleted from the random IP address list, the IP address of the source device is synchronously sampled to the sampling destination device, and the random IP address list of the conflicting IP addresses is deleted.
Based on the same inventive concept, an embodiment of the present invention further provides a method for forwarding a sample packet, which is applied to a sampling destination device included in a data center, where the sampling destination device is a device connected to a sampling server included in the data center, for example, SW2 in fig. 1 (SW2 includes SW2-1 and SW2-2 that form a virtual switch unit), and a flow of the method is shown in fig. 3, and the method includes the following steps:
s31: a communication connection is established with a sampling source device included in the data center.
In order to implement the method in this embodiment, the sampling source device needs to establish a communication connection with the sampling destination device, which may be, but is not limited to, a TCP connection.
S32: and receiving the IP address and the random IP address list of the sampling source device synchronized by the sampling source device.
S33: and establishing a mapping relation between the IP address of the sampling source equipment and the random IP address list.
Since there may be a plurality of sampling source devices, a plurality of mapping relationships may be established to facilitate correct forwarding of subsequent sampling packets.
S34: and receiving a sampling message, wherein the sampling message is obtained by packaging the acquired message by using an IP address in the random IP address list as a source IP address by the sampling source equipment.
S35: and after the source IP address is changed into the IP address of the sampling source device according to the mapping relation, forwarding the IP address to the sampling server.
In order to ensure that the sampling server correctly performs sampling analysis on the sampling source device, the sampling destination device needs to change the source IP address of the sampling packet to the IP address of the sampling source device according to the mapping relationship in S33.
According to the scheme, the messages of the same port on the same equipment are collected, the source IP addresses of the sampling messages obtained by encapsulation are different, the balance factors of the balance algorithm used when different sampling messages are forwarded can be directly influenced to be different, even if the links selected by the sampling messages of the same port on the same sampling equipment at each time are different, the load balance of all the links of the whole data center can be ensured, and the bandwidth utilization rate of all the links is improved.
Specifically, the communication connection is established with the sampling source device included in the data center in S31, and the implementation manner specifically includes:
receiving a communication connection establishment request sent by sampling source equipment;
and sending a communication connection establishment response according to the communication connection establishment request so that the sampling source equipment receives the communication connection establishment response.
The communication connection establishment request and the communication connection establishment response are different for different types of communication connections, for example, for a TCP connection, the communication connection establishment request and the communication connection establishment response are a TCP request and a TCP response, respectively. Other types of communication connections are not described in detail.
Based on the same inventive concept, an embodiment of the present invention further provides a forwarding apparatus for a sample packet, which corresponds to the method shown in fig. 2 and is applied to a sampling source device included in a data center, where the apparatus has a structure shown in fig. 4 and includes:
the establishing module 41 is used for establishing communication connection with sampling destination equipment included in the data center, wherein the sampling destination equipment is equipment connected with a sampling server included in the data center;
the synchronization module 42 is configured to synchronize the internet protocol IP address and the random IP address list of the sampling source device with the sampling destination device, so that the sampling destination device establishes a mapping relationship between the IP address of the sampling source device and the random IP address list;
an encapsulating module 43, configured to encapsulate the acquired packet with an IP address in the random IP address list as a source IP address, so as to obtain a sampling packet;
the sending module 44 is configured to send the sampling packet to the sampling destination device, so that the sampling destination device changes the source IP address into the IP address of the sampling source device according to the mapping relationship, and forwards the IP address to the sampling server.
According to the scheme, the messages of the same port on the same equipment are collected, the source IP addresses of the sampling messages obtained by encapsulation are different, the balance factors of the balance algorithm used when different sampling messages are forwarded can be directly influenced to be different, even if the links selected by the sampling messages of the same port on the same sampling equipment at each time are different, the load balance of all the links of the whole data center can be ensured, and the bandwidth utilization rate of all the links is improved.
Specifically, the establishing module 41 is specifically configured to:
sending a communication connection establishment request to the sampling destination device so that the sampling destination device sends a communication connection establishment response according to the communication connection establishment request;
a communication connection establishment response is received.
Specifically, the synchronization module 42 is further configured to:
before synchronously sampling the IP address of the source device and the random IP address list to the sampling destination device, carrying out conflict detection on the IP addresses in the random IP address list;
if the conflict detection is passed, synchronously sampling the IP address and the random IP address list of the source equipment to the sampling destination equipment;
and if the IP address list does not pass the conflict detection, deleting the conflicting IP address from the random IP address list, and synchronously sampling the IP address of the source device and the random IP address list for deleting the conflicting IP address to the sampling destination device.
Based on the same inventive concept, an embodiment of the present invention further provides a forwarding apparatus for a sample packet, which corresponds to the method shown in fig. 3, and is applied to a sampling destination device included in a data center, where the sampling destination device is a device connected to a sampling server included in the data center, and the apparatus has a structure shown in fig. 5, and includes:
a first establishing module 51, configured to establish a communication connection with a sampling source device included in a data center;
a first receiving module 52, configured to receive an internet protocol IP address and a random IP address list of a sampling source device synchronized with the sampling source device;
a second establishing module 53, configured to establish a mapping relationship between an IP address of the sampling source device and the random IP address list;
a second receiving module 54, configured to receive a sampling packet, where the sampling packet is obtained by encapsulating, by a sampling source device, a packet acquired by using an IP address in the random IP address list as a source IP address;
and a changing module 55, configured to change the source IP address into the IP address of the sampling source device according to the mapping relationship, and forward the IP address to the sampling server.
According to the scheme, the messages of the same port on the same equipment are collected, the source IP addresses of the sampling messages obtained by encapsulation are different, the balance factors of the balance algorithm used when different sampling messages are forwarded can be directly influenced to be different, even if the links selected by the sampling messages of the same port on the same sampling equipment at each time are different, the load balance of all the links of the whole data center can be ensured, and the bandwidth utilization rate of all the links is improved.
Specifically, the first establishing module 51 is specifically configured to:
receiving a communication connection establishment request sent by sampling source equipment;
and sending a communication connection establishment response according to the communication connection establishment request so that the sampling source equipment receives the communication connection establishment response.
Based on the same inventive concept, the embodiment of the present invention further provides a data center, as shown in fig. 6, including a sampling source device 61 and a sampling destination device 62.
The sampling source device 61 includes a forwarding device of the sampling packet shown in fig. 4, and the sampling destination device includes a forwarding device of the sampling packet shown in fig. 5.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While alternative embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following appended claims be interpreted as including alternative embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.

Claims (7)

1. A method for forwarding a sample message is applied to a sampling source device included in a data center, and is characterized in that the method comprises the following steps:
establishing communication connection with sampling destination equipment included in the data center, wherein the sampling destination equipment is equipment connected with a sampling server included in the data center;
synchronizing the Internet protocol IP address and a random IP address list of the sampling source equipment to the sampling destination equipment so that the sampling destination equipment establishes a mapping relation between the IP address of the sampling source equipment and the random IP address list;
packaging the collected message by taking one IP address in the random IP address list as a source IP address to obtain a sampling message;
sending the sampling message to the sampling destination device, so that the sampling destination device changes the source IP address into the IP address of the sampling source device according to the mapping relation and forwards the IP address to the sampling server;
the method for establishing communication connection with the sampling destination device included in the data center specifically includes:
sending a communication connection establishment request to the sampling destination device so that the sampling destination device sends a communication connection establishment response according to the communication connection establishment request;
receiving the communication connection establishment response.
2. The method of claim 1, wherein prior to synchronizing the IP address of the sampling source device and the list of random IP addresses to the sampling destination device, further comprising:
performing conflict detection on the IP addresses in the random IP address list;
if the conflict detection is passed, synchronizing the IP address of the sampling source device and the random IP address list to the sampling destination device;
and if the IP address list fails to pass the conflict detection, deleting the conflicting IP address from the random IP address list, and synchronizing the IP address of the sampling source device and the random IP address list for deleting the conflicting IP address to the sampling destination device.
3. A method for forwarding a sampling message is applied to sampling destination equipment included in a data center, wherein the sampling destination equipment is equipment connected with a sampling server included in the data center, and the method comprises the following steps:
establishing communication connection with sampling source equipment included in the data center;
receiving the synchronous Internet protocol IP address and random IP address list of the sampling source equipment;
establishing a mapping relation between the IP address of the sampling source equipment and the random IP address list;
receiving a sampling message, wherein the sampling message is obtained by the sampling source device by packaging the acquired message by taking one IP address in the random IP address list as a source IP address;
after the source IP address is changed into the IP address of the sampling source device according to the mapping relation, forwarding the IP address to the sampling server;
the method for establishing communication connection with the sampling source device included in the data center specifically includes:
receiving a communication connection establishment request sent by the sampling source equipment;
and sending a communication connection establishment response according to the communication connection establishment request so that the sampling source device receives the communication connection establishment response.
4. A forwarding device of a sampled message is applied to a sampling source device included in a data center, and is characterized by comprising:
the system comprises an establishing module, a data center and a data processing module, wherein the establishing module is used for establishing communication connection with sampling destination equipment included in the data center, and the sampling destination equipment is equipment connected with a sampling server included in the data center;
the synchronization module is used for synchronizing the Internet protocol IP address and the random IP address list of the sampling source equipment to the sampling destination equipment so that the sampling destination equipment establishes the mapping relation between the IP address of the sampling source equipment and the random IP address list;
the encapsulation module is used for encapsulating the acquired message by taking one IP address in the random IP address list as a source IP address to obtain a sampling message;
the sending module is used for sending the sampling message to the sampling destination device so that the sampling destination device changes the source IP address into the IP address of the sampling source device according to the mapping relation and forwards the IP address to the sampling server;
wherein the establishing module is specifically configured to:
sending a communication connection establishment request to the sampling destination device so that the sampling destination device sends a communication connection establishment response according to the communication connection establishment request;
receiving the communication connection establishment response.
5. The apparatus of claim 4, wherein the synchronization module is further configured to:
before synchronizing the IP address of the sampling source device and a random IP address list to the sampling destination device, performing conflict detection on the IP addresses in the random IP address list;
if the conflict detection is passed, synchronizing the IP address of the sampling source device and the random IP address list to the sampling destination device;
and if the IP address list fails to pass the conflict detection, deleting the conflicting IP address from the random IP address list, and synchronizing the IP address of the sampling source device and the random IP address list for deleting the conflicting IP address to the sampling destination device.
6. A forwarding device of a sampling message is applied to sampling destination equipment included in a data center, wherein the sampling destination equipment is equipment connected with a sampling server included in the data center, and the forwarding device is characterized by comprising:
the data center comprises a first establishing module, a second establishing module and a data processing module, wherein the first establishing module is used for establishing communication connection with sampling source equipment included in the data center;
the first receiving module is used for receiving the Internet protocol IP address and the random IP address list of the sampling source equipment synchronized by the sampling source equipment;
the second establishing module is used for establishing the mapping relation between the IP address of the sampling source equipment and the random IP address list;
a second receiving module, configured to receive a sampling packet, where the sampling packet is obtained by encapsulating, by the sampling source device, a packet acquired by using an IP address in the random IP address list as a source IP address;
the changing module is used for changing the source IP address into the IP address of the sampling source device according to the mapping relation and then forwarding the IP address to the sampling server;
the first establishing module is specifically configured to:
receiving a communication connection establishment request sent by the sampling source equipment;
and sending a communication connection establishment response according to the communication connection establishment request so that the sampling source device receives the communication connection establishment response.
7. A data center comprising a sampling source device and a sampling destination device, wherein:
the sampling source device comprises the forwarding device of the sampling message according to any one of claims 4 to 5; the sampling destination device comprises the forwarding device of the sampling message according to claim 6.
CN201811383141.0A 2018-11-20 2018-11-20 Method and device for forwarding sampling message and data center Active CN109495570B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811383141.0A CN109495570B (en) 2018-11-20 2018-11-20 Method and device for forwarding sampling message and data center

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811383141.0A CN109495570B (en) 2018-11-20 2018-11-20 Method and device for forwarding sampling message and data center

Publications (2)

Publication Number Publication Date
CN109495570A CN109495570A (en) 2019-03-19
CN109495570B true CN109495570B (en) 2022-04-26

Family

ID=65696974

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811383141.0A Active CN109495570B (en) 2018-11-20 2018-11-20 Method and device for forwarding sampling message and data center

Country Status (1)

Country Link
CN (1) CN109495570B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075921A (en) * 2009-11-24 2011-05-25 中国移动通信集团公司 Inter-network communication method and device
CN102131239A (en) * 2010-10-27 2011-07-20 华为技术有限公司 Business processing unit and method, business control gateway and load balancing method
CN102143248A (en) * 2011-02-28 2011-08-03 华为数字技术有限公司 Method and device for detecting IP (Internet Protocol) address conflict
CN104038422A (en) * 2013-03-08 2014-09-10 华为技术有限公司 Message forwarding method and gateways
CN104601742A (en) * 2014-12-29 2015-05-06 杭州华三通信技术有限公司 Message transmission method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7251745B2 (en) * 2003-06-11 2007-07-31 Availigent, Inc. Transparent TCP connection failover

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075921A (en) * 2009-11-24 2011-05-25 中国移动通信集团公司 Inter-network communication method and device
CN102131239A (en) * 2010-10-27 2011-07-20 华为技术有限公司 Business processing unit and method, business control gateway and load balancing method
CN102143248A (en) * 2011-02-28 2011-08-03 华为数字技术有限公司 Method and device for detecting IP (Internet Protocol) address conflict
CN104038422A (en) * 2013-03-08 2014-09-10 华为技术有限公司 Message forwarding method and gateways
CN104601742A (en) * 2014-12-29 2015-05-06 杭州华三通信技术有限公司 Message transmission method and device

Also Published As

Publication number Publication date
CN109495570A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
US10491628B2 (en) Attack observation apparatus and attack observation method
CN112039796B (en) Data packet transmission method and device, storage medium and electronic equipment
CN106797335B (en) Data transmission method, data transmission device, electronic equipment and computer program product
WO2015086543A1 (en) Establishing a data transfer connection
CN106375139B (en) Method, device and system for copying request
CN105610632A (en) Virtual network device and related method
CN112788060B (en) Data packet transmission method and device, storage medium and electronic equipment
CN103631652A (en) Method and system for achieving virtual machine migration
CN105939297A (en) TCP message reassembling method and TCP message reassembling device
CN111193756B (en) VXLAN tunnel load balancing method and related equipment
CN103281257A (en) Method and device for processing protocol message
CN103236975A (en) Message forwarding method and message forwarding device
CN104247339A (en) Home network packet delivery
EP3203693B1 (en) User message forwarding control method and processing node
CN110417687B (en) Message sending and receiving method and device
CN107948217B (en) Switch system and communication method
CN106789650B (en) Wide area network acceleration method and device based on IP
CN107483369B (en) Message processing method and virtual switch
CN107483628B (en) DPDK-based one-way proxy method and system
CN113497752B (en) Message sending method, first network equipment and network system
CN109495570B (en) Method and device for forwarding sampling message and data center
CN112217735A (en) Information synchronization method and load balancing system
CN107086958B (en) Data transmission method, wap gateway and system
CN113286011B (en) IP address allocation method and device based on VXLAN
CN114079640B (en) Data processing method, user plane function and device

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