CN114079622B - Method, device and storage medium for determining packet loss network port - Google Patents

Method, device and storage medium for determining packet loss network port Download PDF

Info

Publication number
CN114079622B
CN114079622B CN202111233631.4A CN202111233631A CN114079622B CN 114079622 B CN114079622 B CN 114079622B CN 202111233631 A CN202111233631 A CN 202111233631A CN 114079622 B CN114079622 B CN 114079622B
Authority
CN
China
Prior art keywords
network port
target
port
message
target network
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
CN202111233631.4A
Other languages
Chinese (zh)
Other versions
CN114079622A (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.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor 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 Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202111233631.4A priority Critical patent/CN114079622B/en
Publication of CN114079622A publication Critical patent/CN114079622A/en
Application granted granted Critical
Publication of CN114079622B publication Critical patent/CN114079622B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

The invention provides a method, a device and a storage medium for determining a packet loss network port, which are used for sending a detection message to a receiving end through a target network port in a plurality of first network ports and receiving a feedback message fed back by the receiving end; determining a communication link of the target network port based on second network port information corresponding to the second network port carried in the feedback message and the target network port; receiving a second message which is fed back to the target network port based on the first message sent by the target network port according to the communication link of the target network port; and determining the packet loss network port condition according to the number of the first messages and the number of the second messages. Because the number of the corresponding second network ports and the number of the second network ports in the communication link of the target network port are determined, the sending end counts the number of the first messages sent by the target network port and the number of the second messages received by the target network port, and when the number of the first messages sent by the target network port is inconsistent with the number of the second messages received by the target network port, the packet loss condition can be accurately positioned according to the corresponding second network ports.

Description

Method, device and storage medium for determining packet loss network port
Technical Field
The embodiment of the invention relates to the technical field of computers and the Internet, in particular to a method, a device and a storage medium for determining a packet loss network port.
Background
Communication devices (e.g., hosts, switches, routers, etc.) for forwarding data typically include multiple communication ports, and may need to be aware of packet loss at different communication ports when performing device maintenance or development testing. Packet loss detection modules are provided in some existing communication devices.
The inventor finds that the existing packet loss detection module can only detect whether a certain network node on a link can normally communicate, but cannot accurately locate which network port has packet loss.
Disclosure of Invention
The method, the device and the storage medium for determining the packet loss network port can accurately locate the packet loss condition.
The technical scheme of the invention is realized as follows:
the embodiment of the invention provides a method for determining a packet loss network port, which is applied to a transmitting end and comprises the following steps:
sending a detection message to a receiving end through a target network port in the first network ports; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of the target network port;
receiving a feedback message fed back by the receiving end;
Determining a communication link of the target network port based on second network port information corresponding to the second network port carried in the feedback message and the target network port;
receiving a second message which is fed back to the target network port based on the first message sent by the target network port according to the communication link of the target network port;
and determining the packet loss network port condition according to the number of the first messages and the number of the second messages. The embodiment of the invention also provides a method for determining the packet loss network port, which is characterized by being applied to a receiving end and comprising the following steps:
receiving detection messages sent by target network ports in a plurality of first network ports of a sending end; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of the target network port;
forming a feedback message based on the detection message, and sending the feedback message to the target network port so that the sending end can determine a communication link of the target network port; the feedback message carries second network port information of a second network port corresponding to the target network port;
receiving a first message sent by the sending end according to the communication link of the target network port;
And forming a second message of the target network port according to the first message, and feeding back the second message of the target network port to the target network port of the sending end.
The embodiment of the invention also provides a device for determining the packet loss network port, which is applied to the transmitting end and comprises the following steps:
the first sending unit is used for sending the detection message to the receiving end through the target network port in the plurality of first network ports; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of the target network port;
the first receiving unit is used for receiving a feedback message fed back by the receiving end;
the determining unit is used for determining a communication link of the target network port based on second network port information corresponding to the second network port carried in the feedback message and the target network port;
the first receiving unit is further configured to receive, according to the communication link of the target network port, a second message that is fed back to the target network port based on the first message sent by the target network port;
the determining unit is further configured to determine a packet loss port condition according to the number of the first messages and the number of the second messages in combination with the target port.
The embodiment of the invention also provides a device for determining the packet loss network port, which is applied to the receiving end and comprises the following steps:
the second receiving unit is used for receiving detection messages sent by target network ports in the plurality of first network ports of the sending end; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of the target network port;
the second sending unit is used for forming a feedback message based on the detection message, sending the feedback message to the target network port and determining a communication link of the target network port by the sending end; the feedback message carries second network port information of a second network port corresponding to the target network port;
the second receiving unit is further configured to receive a first message sent by the sending end according to the communication link of the target network port;
the second sending unit is further configured to form a second message of the target network port according to the first message, and feed back the second message of the target network port to the target network port of the sending end.
The embodiment of the invention also provides a packet loss network port determining device, which comprises a first memory and a first processor, wherein the first memory stores a computer program which can run on the first processor, and the first processor executes steps in a method at one side of a transmitting end.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by the first processor, implements steps in a sender side method.
The embodiment of the invention also provides a packet loss network port determining device, which comprises a second memory and a second processor, wherein the second memory stores a computer program which can run on the second processor, and the second processor realizes steps in a receiving end method when executing the program.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when being executed by the second processor, implements steps in a method at the receiving end side.
In the embodiment of the invention, a detection message is sent to a receiving end through a target network port in a plurality of first network ports; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of a target network port; receiving a feedback message fed back by a receiving end; determining a communication link of the target network port based on second network port information corresponding to the second network port carried in the feedback message and the target network port; receiving a second message which is fed back to the target network port based on the first message sent by the target network port according to the communication link of the target network port; and determining the packet loss network port condition according to the number of the first messages and the number of the second messages. Because the first message of the target network port is sent to the receiving end through the communication link, and because the number of the corresponding second network port and the number of the second network port in the communication link of the target network port are determined, the sending end counts the number of the first message sent by the target network port and the number of the second message received by the target network port, and when the number of the first message sent by the target network port and the number of the second message received by the target network port are inconsistent, the situation of packet loss network port can be accurately positioned according to the corresponding second network port.
Drawings
Fig. 1 is a schematic flow chart of an alternative method for determining a packet loss network port according to an embodiment of the present invention;
fig. 2 is an optional effect schematic diagram of a packet loss network port determining method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of an alternative method for determining a packet loss network port according to an embodiment of the present invention;
fig. 4 is an optional effect schematic diagram of a packet loss network port determining method according to an embodiment of the present invention;
fig. 5 is an optional effect schematic diagram of a packet loss network port determining method according to an embodiment of the present invention;
fig. 6 is an optional effect schematic diagram of a packet loss network port determining method according to an embodiment of the present invention;
fig. 7 is a schematic flow chart of an alternative method for determining a packet loss network port according to an embodiment of the present invention;
fig. 8 is a schematic flow chart of an alternative packet loss network port determining method according to an embodiment of the present invention;
fig. 9 is a schematic flow chart of an alternative packet loss network port determining method according to an embodiment of the present invention;
fig. 10 is a schematic flow chart of an alternative packet loss network port determining method according to an embodiment of the present invention;
fig. 11 is a schematic flow chart of an alternative packet loss network port determining method according to an embodiment of the present invention;
Fig. 12 is an interaction schematic diagram of a method for determining a packet loss network port according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of a packet loss network port determining device according to an embodiment of the present invention;
fig. 14 is a schematic diagram of a hardware entity of a packet loss network port determining device according to an embodiment of the present invention;
fig. 15 is a second schematic structural diagram of a packet loss network port determining device according to an embodiment of the present invention;
fig. 16 is a second hardware entity diagram of the packet loss network port determining device according to the embodiment of the present invention.
Detailed Description
The technical solution of the present invention will be further elaborated with reference to the accompanying drawings and examples, which should not be construed as limiting the invention, but all other embodiments which can be obtained by one skilled in the art without making inventive efforts are within the scope of protection of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
If a similar description of "first/second" appears in the present document, the following description is added, in which the terms "first/second/third" merely distinguish similar objects and do not represent a specific ordering of the objects, it being understood that the "first/second/third" may, where allowed, interchange a specific order or precedence order such that the embodiments of the invention described herein can be implemented in an order other than that illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
Fig. 1 is a schematic flow chart of an alternative method for determining a packet loss network port according to an embodiment of the present invention, and will be described with reference to the steps shown in fig. 1.
S101, sending a detection message to a receiving end through a target network port in a plurality of first network ports; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of the target network port.
In the embodiment of the invention, the sending end sends the detection message to the receiving end through the target network port in the first network ports. The target network port is at least one network port of the first network ports. The detection message carries first network port information and physical address information (Media Access Control Address, MAC) of the target network port.
The target network port may be a single network port of the plurality of first network ports, or the target network port may be a plurality of first network ports.
In the embodiment of the invention, the sending end can be any one of a server, a cloud host, a terminal and a mobile terminal. The receiving end can also be any one of a server, a cloud host, a terminal and a mobile terminal.
In the embodiment of the invention, when the sending end is in a single-network port mode, the sending end sends the detection message to each second network port of the receiving end through the target network port (single network port) in each first network port. And the receiving end forms feedback messages of the second network ports corresponding to the target network ports according to the detection messages. The receiving end sends the feedback messages of the second network ports corresponding to the target network ports of the sending end.
In the embodiment of the invention, when the sending end is an aggregation network port, the sending end sends the detection message to each second network port of the receiving end through the target network port (the target network port is a plurality of first network ports at the moment). And the receiving end forms feedback messages corresponding to the first network ports according to the detection messages. The receiving end sends the feedback messages corresponding to the first network ports to the sending end.
In the embodiment of the invention, the detection message is a message which is sent to the receiving end by the sending end and is used for determining a communication link of a target network port of the sending end. The detection message is a data unit exchanged and transmitted in a communication network of the transmitting end and the receiving end, namely a data block to be transmitted by the transmitting end at one time. The detection message contains complete data information to be sent, the lengths of the detection message are not consistent, and the length of the detection message is unlimited and variable. When the transmitting end is in a single-network port mode, the detection message sent by the single-network port carries first network port information and physical address information of the single-network port. When the sending end is in an aggregation network port mode, the detection messages sent by the plurality of first network ports respectively carry first network port information and physical address information of the corresponding first network ports.
S102, receiving a feedback message fed back by the receiving end.
In the embodiment of the invention, the sending end receives the feedback message returned by the receiving end.
In the embodiment of the invention, when the sending end is in the single-network port mode, the receiving end receives the detection message sent by the single-network port. The receiving end takes the object address information of the single network port in the detection message as a target physical address, and takes the physical address of each second network port as a source physical address to form a feedback message of each second network port corresponding to the single network port. The feedback message of each second network port carries second network port information corresponding to the second network port.
The receiving end sends the feedback message of each second network port corresponding to the single network port of the sending end.
In the embodiment of the invention, when the sending end is in the aggregation network port mode, the receiving end receives the detection messages respectively sent by the plurality of first network ports. The receiving end takes the physical address of the first network port corresponding to each detection message as a target physical address, and takes the physical address of the second network port corresponding to each detection message as a source physical address, so as to form a feedback message between each second network port and the corresponding first network port. The feedback message of each second network port carries second network port information corresponding to the second network port. The receiving end sends the feedback message of each second network port to the sending end.
In the embodiment of the invention, the method for determining the packet loss network port is mainly used for detecting the packet loss of the network port in the two-layer network between hosts in the local area network, and covers a host single network port mode and an aggregation network port mode. The coverage area is configured by a static configuration aggregation mode of the switch based on a source media access control address (MAC) address, a destination MAC address, a source internet protocol address (Internet Protocol Address, IP) address, a destination IP address, a source IP address source port, a destination IP address destination port, a source destination IP address source port and the like, and a link aggregation control protocol (Link Aggregation Control Protocol, LACP) aggregation port configured by the switch is not covered. The scheme is mainly deployed on a cloud server or other same two-layer network plane physical servers, and detects the packet loss condition of each network port of the same two-layer network plane, so that single network port faults are confirmed. In other embodiments, the method for determining the packet loss network port based on the three-layer network or the four-layer network protocol is derived by adding the content of the three-layer network information and the four-layer network information on the basis of the two-layer network.
S103, determining a communication link of the target network port based on second network port information corresponding to the second network port carried in the feedback message and the target network port.
In the embodiment of the invention, the sending end determines the communication link of the data packet of the target network port based on the second network port information corresponding to the second network port carried in the feedback message and the target network port.
In the embodiment of the invention, when the sending end is in the single-network-port mode, the target network port of the sending end is a single network port. The transmitting end determines the communication link of the single network port based on the second network port information in the feedback message. When the sending end is an aggregation network port, the target network port of the sending end is each first network port. The sending end determines communication links corresponding to the first network ports respectively based on the second network port information in the feedback message.
In the embodiment of the invention, when the sending end is in the single-network port mode, the receiving end sends the feedback message corresponding to the single-network port of each second network port to the single-network port of the sending end. The feedback message carries second network port information and physical address information of each second network port corresponding to the single network port. And the receiving end sends the feedback messages of each second network port to the sending end according to the physical address information of the single network port. After receiving the feedback messages fed back by each second network port, the sending end extracts the second network port information and the physical address information corresponding to the second network port in each feedback message. The sending end establishes a communication link of the target network port based on the second network port information of each second network port, the physical address information, the first network port information of the single network port and the physical address information.
The first network port information may be identification information corresponding to the first network port, that is, a part or all of codes in the IP address information corresponding to the first network port. The physical address information corresponding to the first network port is a media access control address corresponding to the first network port. The second portal information may be identification information corresponding to the second portal, that is, some or all of code information in the IP address information corresponding to the second portal. The physical address information corresponding to the second network port is a media access control address corresponding to the second network port.
In the embodiment of the invention, when the sending end is in the aggregation network port mode, the receiving end sends the feedback messages corresponding to the first network ports of the aggregation network ports. The feedback messages received by the first network ports carry second network port information and physical address information of the corresponding second network ports.
The single network port mode is a communication mode that the transmitting end has only one external network port. The aggregation network port mode is a communication mode in which a plurality of network ports are aggregated together to form a convergence group and the convergence group is utilized for communication.
In the embodiment of the invention, the method for determining the packet loss network port is mainly divided into two parts, wherein one part is the detection of a communication link between the network port of the sending end and the network port of the receiving end, and the other part is the determination process of the packet loss network port.
Part one: and detecting a communication link between the network port of the transmitting end and the network port of the receiving end.
The link detection basis between the network ports of the sending end and the network ports of the receiving end is that the aggregation network ports adopt a mechanism of stream-by-stream load sharing. The data frame can transmit the detection message according to different conditions of source MAC, destination MAC, source IP, destination IP, virtual local area network (Virtual Local Area Network, VLAN), source/destination port number and the like according to the requirements of actual conditions. And sending detection messages of different results through different network ports according to different results which are not obtained through hash calculation, and sending detection messages of the same result from the same network port. Thereby ensuring the accuracy of the sequence of the detection messages. After the messages with the same characteristics reach the aggregation port according to the characteristics, the messages can only be loaded on the same member port. The following describes in detail how this principle can be used to achieve probing for a single portal link to an aggregation port.
Since the present embodiment is directed to probing of aggregation ports of a two-layer network, two-layer network packets are used for probing.
Before describing how to perform link probing, the following hash strategy is described for the message by the switch:
load mode of the switch: the load mode of the aggregation network port of the switch for the two-layer message also calculates the specific corresponding network port of the aggregation network port from which each message is to be sent to the receiving end according to the source MAC, the destination MAC and the L2-PROTO. That is, two-layer messages of the same type are necessarily hashed to the same portal.
The switch selects the low x (x < =8) bit of the MAC address character of each port as the exclusive or bit, then selects the low x bit of two bytes of the VLAN and the low x bit of other reference fields such as the low x bit of two bytes of the L2-proco as the exclusive or calculation bit, and obtains the last packet forwarding port through x-bit exclusive or calculation. That is, in the same two layers, the message can be constructed on different network ports of the aggregation port of the receiving end by modifying the source or destination MAC, so that the aggregation port has at most POW (2, x) network ports. Wherein POW (x, y) is the power of x to the power of y.
S104, receiving a second message which is fed back to the target network port based on the first message sent by the target network port according to the communication link of the target network port.
In the embodiment of the invention, the transmitting end receives the second message which is fed back to the target network port by the receiving end based on the first message sent by the target network port according to the communication link of the target network port.
In the embodiment of the invention, the sending end sends the first message of the target network port to each second network port of the receiving end according to the communication link of the target network port. The sending end receives the first message sent by each second network port of the receiving end according to the target network port, and feeds back the second message to the target network port.
The second message fed back to the target network port carries second network port information of a second network port corresponding to the target network port. The first message carries first network port information of the target network port. The second message carries the corresponding information
S105, determining the packet loss network port condition according to the number of the first messages and the number of the second messages.
In the embodiment of the invention, the sending end determines the packet loss condition according to the counted number of the first messages and the counted number of the second messages.
In the embodiment of the invention, the sending end determines the packet loss link in the communication link of the target network port according to the counted number of the first messages sent by the target network port and the counted number of the second messages received by the target network port. The sending end determines the packet loss network port based on the number of the first messages and the number of the second messages between the target network port of the packet loss link and each second network port of the receiving end.
In the embodiment of the invention, the sending end determines the packet loss link in the communication link of the target network port according to the counted number of the first messages sent by the target network port and the counted number of the second messages received by the target network port. And when the number of the first messages sent by the target network port in the packet loss link is greater than the number of the second messages fed back by the corresponding second network port, determining that the second network port corresponding to the target network port is the packet loss network port.
For example, in connection with fig. 2.host1 (transmitting end) is an aggregation network port, and host2 (receiving end) is also an aggregation network port. host1 includes ports eth0, eth1, eth2, and eth3.host2 includes ports eth4, eth5, eth6, and eth7. At this time, all the first ports of host1 are target ports. That is, eth0, eth1, eth2, and eth3 are all target portals. host1 sends a first message to each of eth4, eth5, eth6, and eth7 of host2 via eth0, eth1, eth2, and eth3, respectively. That is, host1 sends a first message to all of eth4, eth5, eth6, and eth7 of host2 via eth 0. The way in which eth1, eth2, and eth3 send the first message is the same as eth 0. The sending end counts the number of the first messages sent by each network port and the number of the second messages received by each network port of eth0, eth1, eth2 and eth3. If the number of the first messages sent by a certain network port in eth0, eth1, eth2 and eth3 is greater than the number of the second messages received, determining that the communication link corresponding to the network port is a packet loss link, and combining the packet sending and receiving conditions between the network port and eth4, eth5, eth6 and eth7, determining that a specific one of the network port of host1 (sending end) or host2 (receiving end) is a packet loss network port.
In the embodiment of the invention, a detection message is sent to a receiving end through a target network port in a plurality of first network ports; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of a target network port; receiving a feedback message fed back by a receiving end; determining a communication link of the target network port based on second network port information corresponding to the second network port carried in the feedback message and the target network port; receiving a second message which is fed back to the target network port based on the first message sent by the target network port according to the communication link of the target network port; and determining the packet loss network port condition according to the number of the first messages and the number of the second messages. Because the first message of the target network port is sent to the receiving end through the communication link, and because the number of the corresponding second network port and the number of the second network port in the communication link of the target network port are determined, the sending end counts the number of the first message sent by the target network port and the number of the second message received by the target network port, and when the number of the first message sent by the target network port and the number of the second message received by the target network port are inconsistent, the situation of packet loss network port can be accurately positioned according to the corresponding second network port.
In some embodiments, referring to fig. 3, fig. 3 is a schematic flow chart of an alternative packet loss network port determining method provided in the embodiment of the present invention, and S101 to S103 shown in fig. 1 may be implemented through S106 to S108, and will be described in connection with each step.
S106, sending a detection message to the receiving end through a single network port or each first network port; the detection message carries single network port or first network port information and physical address information corresponding to each first network port.
In the embodiment of the invention, the sending end sends the detection message to the receiving end through a single network port or each first network port. The detection message carries single network port or first network port information and physical address information corresponding to each first network port.
In the embodiment of the present invention, referring to fig. 4, when host1 (transmitting end) is in the single portal mode and host2 (receiving end) is in the aggregate portal mode. The first portal of host1 includes: eth0, eth1, eth2, and eth3. The second portal of host2 includes: eth4, eth5, eth6, and eth7. The target portal of host1 is eth0. And sending a detection message to eth4, eth5, eth6 and eth7 of the host2 through eth0 of the host 1.
In the embodiment of the present invention, referring to fig. 5, when host1 (transmitting end) is in the aggregate network port mode and host2 (receiving end) is in the single network port mode. The first portal of host1 includes: eth0, eth1, eth2, and eth3. The second portal of host2 includes: eth4, eth5, eth6, and eth7. The target ports of host1 are eth0, eth1, eth2, and eth3. And respectively sending detection messages to eth4 of the host2 by eth0, eth1, eth2 and eth3 which are passed by the host 1.
In the embodiment of the present invention, referring to fig. 6, when host1 (transmitting end) is in the aggregate network port mode, host2 (receiving end) is also in the aggregate network port mode. The first portal of host1 includes: eth0, eth1, eth2, and eth3. The second portal of host2 includes: eth4, eth5, eth6, and eth7. The target ports of host1 are eth0, eth1, eth2, and eth3. And sending detection messages to eth4, eth5, eth6 and eth7 of the host2 by eth0, eth1, eth2 and eth3 of the host 1. As shown in fig. 6, the host1 may send the detection message to the eth4, eth5, eth6, and eth7 of the host2 through the eth0 in the plurality of first network ports, respectively.
S107, receiving a feedback message fed back by the receiving end according to the detection message; the feedback message carries second network port information of a single network port or second network ports corresponding to the first network ports.
In the embodiment of the invention, the sending end receives the feedback message fed back by the receiving end according to the detection message. The feedback message carries second network port information of a single network port or second network ports corresponding to the first network ports.
In an embodiment of the present invention, referring to fig. 4, the host2 includes 4 second ports. After the host2 receives the 4 detection messages sent by the host1, the 4 detection messages are distributed to the corresponding second network ports. Eth4, eth5, eth6, and eth7 of host2 form feedback messages corresponding to eth0 of host1, respectively. And the host2 carries the second network port information corresponding to each of the eth4, eth5, eth6 and eth7 into a corresponding feedback message, and sends the feedback message to eth0 of the host 1.
In the embodiment of the present invention, referring to fig. 5, eth4 of host2 receives the probe packets sent by eth0, eth1, eth2, and eth3 of host1, respectively. Eth4 of host2 forms feedback messages corresponding to eth0, eth1, eth2, and eth3 of host1, respectively. And the host2 sends feedback messages to eth0, eth1, eth2 and eth3 of the host1 respectively through eth 4.
In the embodiment of the present invention, referring to fig. 6, all of eth4, eth5, eth6 and eth7 of the host2 receive the probe messages sent by eth0, eth1, eth2 and eth3 of the host1 respectively. Eth4, eth5, eth6, and eth7 of host2 form feedback messages corresponding to the first portal in host1, respectively. And the host2 respectively sends feedback messages to the first network ports corresponding to the host1 through the eth4, eth5, eth6 and eth 7.
S108, determining a communication link corresponding to the single network port or the plurality of first network ports based on the second network port information corresponding to the single network port or each first network port carried in the feedback message and the first network port information of the single network port or the plurality of first network ports.
In the embodiment of the invention, the sending end determines a communication link corresponding to a single network port or a plurality of first network ports based on the second network port information corresponding to the single network port or each first network port carried in the feedback message and the first network port information of the single network port or the plurality of first network ports.
In the embodiment of the invention, when the sending end is in a single network port mode and the receiving end is in an aggregation network port mode. The sending end extracts m pieces of second network port information and physical address information in m pieces of feedback messages. The sending end constructs the mapping relation between the m second network port information and the physical address information and the first network port information corresponding to the single network port, and then m communication links corresponding to the m second network ports of the single network port are formed. m is a positive integer greater than or equal to 1.
Illustratively, referring to fig. 4, host1 (transmitting end) is in single portal mode and host2 (receiving end) is in aggregate portal mode. At this time, eth0 of host1 is the target portal, that is, eth0 is the single portal. And the host1 constructs communication links between eth0 and eth4, eth5, eth6 and eth7 respectively according to the second network port information and physical address information in the feedback messages corresponding to eth4, eth5, eth6 and eth7 respectively.
Illustratively, referring to fig. 5, host1 (transmitting end) is an aggregate portal mode, and host2 (receiving end) is a single portal mode. And the host1 constructs communication links between eth0, eth1, eth2 and eth3 and eth4 respectively according to the second network port information and physical address information of eth4 in the feedback message corresponding to each target network port.
In the embodiment of the invention, when the sending end is in a single network port mode or an aggregation network port mode, the sending end sends the detection message to the receiving end through the single network port or each first network port. The sending end receives the feedback message fed back by the receiving end, and the feedback message carries the second network port information and the physical address information of the second network port corresponding to the single network port or each first network port, so that the sending end can accurately determine the communication link corresponding to the single network port or each first network port.
In some embodiments, referring to fig. 7, fig. 7 is a schematic flow chart of an alternative packet loss network port determining method provided in the embodiment of the present invention, and S101 to S102 shown in fig. 1 may be implemented through S109 to S112, and will be described in connection with each step.
S109, reporting the second number of the local first network ports to the receiving end, and receiving the first number of the second network ports reported by the receiving end.
In the embodiment of the invention, the sending end reports the second number of the local first network ports to the receiving end and receives the first number of the second network ports reported by the receiving end.
Illustratively, in connection with FIG. 4, host1 includes 4 first portals and host2 includes 4 second portals. host1 receives a first number of host transmissions of 4.host1 sends a second number of 4 to host 2.
S110, generating m pieces of continuous non-repeated source physical address information through a preset program.
In the embodiment of the invention, the transmitting end generates m pieces of continuous non-repeated source physical address information through a preset program. Where m is the maximum of the first number and the second number.
Illustratively, when the first number is 10 and the second number is 4. The transmitting end generates 10 pieces of continuous non-repeated source physical address information through a preset program.
S111, respectively sending a first number of detection messages to the receiving end through a single network port or each first network port.
In the embodiment of the invention, the sending end respectively sends the first number of detection messages to the receiving end through a single network port or each first network port. The different detection messages carry different source physical address information corresponding to a single network port or each first network port.
In the embodiment of the invention, the receiving end comprises m second network ports. The sending end sends m detection messages to the receiving end through a single network port or each first network port. The different detection messages carry different source physical address information corresponding to a single network port or each first network port.
In the embodiment of the invention, when the transmitting end does not determine the aggregation mode of the external switch of the receiving end, the transmitting end transmits m detection messages carrying the modified source physical address and m detection messages modifying the destination physical address to the receiving end through a single network port. When the aggregation mode of the external switch of the receiving end is the source MAC load, the receiving end receives m detection messages for modifying the source physical address. When the aggregation mode of the external switch of the receiving end is the target MAC load, the receiving end receives m detection messages for modifying the target physical address.
In the embodiment of the present invention, in combination with fig. 4, the host1 (transmitting end) sends 4 probing messages for modifying the source MAC address and 4 probing messages for modifying the destination MAC address to the host2 (receiving end) through eth0. And then the host2 receives 4 detection messages according to the network port of the channel1 through which the load mode of the external switch passes, and exchanges the source-destination MAC addresses of the 4 detection messages to form a feedback message. And filling corresponding second network port information in the feedback message body. host2 feeds back the feedback message to eth0 of host 1. At this time, host1 may determine the communication link of eth0 according to the second portal information in the feedback packet.
And S112, when the target network port is a single network port, the receiving end receives a first number of feedback messages fed back according to the first number of detection messages.
In the embodiment of the invention, when the target network port of the sending end is a single network port, the sending end receives the first number of feedback messages fed back by the receiving end according to the first number of detection messages.
Illustratively, in connection with fig. 4, the host2 includes 4 second portals. Eth0 of host1 sends 4 probe messages to host 2. And forming feedback messages of eth4, eth5, eth6 and eth7 corresponding to eth0 respectively according to the 4 detection messages by host 2. host2 sends the 4 feedback messages to eth0 of host 1.
In the embodiment of the invention, the sending end sends the first number of detection messages to the receiving end, and the number of the detection messages is the same as the number of the second network ports of the receiving end, so that the receiving end can respectively distribute the first number of detection messages to each second network port, further form a feedback message of each second network port corresponding to a single network port, and further accurately determine a communication link between the single network port and each second network port.
In some embodiments, referring to fig. 8, fig. 8 is a schematic flow chart of an alternative method for determining a packet loss network port according to an embodiment of the present invention, and S112 shown in fig. 7 may be implemented through S113, and will be described in connection with each step.
S113, when the target network port is a plurality of first network ports, the receiving end receives a second number of feedback messages fed back according to the first number of detection messages.
In the embodiment of the invention, when the target network port of the sending end is a plurality of first network ports, the sending end receives a second number of feedback messages fed back by the receiving end according to the first number of detection messages.
In the embodiment of the invention, each first network port of the sending end sends the detection message to each second network port of the receiving end. The plurality of second network ports of the receiving end form feedback messages corresponding to the plurality of first network ports, namely a second number of feedback messages are formed. The receiving end sends the feedback message to the corresponding first network port through each second network port.
In the embodiment of the invention, the sending end sends the first number of detection messages to the receiving end, and the number of the detection messages is the same as the number of the second network ports of the receiving end, so that the receiving end can respectively distribute the first number of detection messages to each second network port to further form a feedback message corresponding to each first network port, and further, the communication links between the first network ports and the corresponding second network ports can be accurately determined.
In some embodiments, referring to fig. 9, fig. 9 is a schematic flow chart of an alternative packet loss network port determining method provided in the embodiment of the present invention, and S111 to S113 shown in fig. 8 may be implemented through S114 to S115, and will be described in connection with each step.
S114, k detection messages are respectively sent to the receiving end through a single network port or each first network port.
In the embodiment of the invention, the transmitting end respectively transmits k detection messages to the receiving end through a single network port or each first network port. Wherein k is the square of the maximum of the first number and the second number; k is a positive integer greater than or equal to 1.
In the embodiment of the invention, when the number of the plurality of first network ports of the sending end is greater than the number of the second network ports of the receiving end, a single network port or each first network port of the sending end sends a detection message to each second network port, and each second network port feeds back a corresponding feedback message to the sending end. However, since the number of the second network ports is smaller than that of the first network ports, there may be a case that the first network ports do not receive the feedback message. Therefore, each first network port of the transmitting end needs to transmit excessive detection messages respectively, so that each first network port can be guaranteed to receive corresponding feedback messages.
S115, the receiving end feeds back feedback messages to the single network port or each first network port according to the k detection messages.
In the embodiment of the invention, the sending end receives the feedback messages fed back to each first network port of the single network port according to k detection messages.
The feedback message received by the single network port or each first network port carries second network port information and physical address information of the second network port corresponding to the single network port or each first network port.
In the embodiment of the invention, when the network port numbers of the two hosts host1 and host2 are inconsistent, the sending of the POW (MAX (m, n), 2) network data packets can determine that the detection message of one physical address pair is sent from the ethx of host1 to the ethyl of host 2. After the host2 receives the detection message, the source-destination physical address is exchanged, and the feedback message can be returned to the ethx of the host1 by using the ethyl reply. Wherein m is the number of second network ports of host2, and n is the number of first network ports of host 1.
In some embodiments, referring to fig. 10, fig. 10 is a schematic flow chart of an alternative packet loss network port determining method provided in the embodiment of the present invention, and S104-S105 shown in fig. 1 may be implemented through S116-S119, and will be described in connection with each step.
S116, according to the communication links of the target network ports, the first number of first messages of the target network ports are respectively sent to the first number of second network ports of the receiving end.
In the embodiment of the invention, the sending end respectively sends the first number of first messages of the target network port to the first number of second network ports of the receiving end according to the communication link of the target network port. Each first message carries first network port information and physical address information corresponding to the target network port.
In the embodiment of the invention, due to different aggregation modes of the sending end, the target network port of the sending end can be a single network port or a plurality of first network ports.
S117, each second network port of the receiving end receives the second message which is fed back to the target network port according to the first message which is sent by the target network port.
In the embodiment of the invention, the sending end receives the first message sent by each second network port of the receiving end according to the target network port, and feeds back the second message to the target network port.
In the embodiment of the invention, when the sending end is in the single-network port mode. Each second network port of the receiving end corresponds to the second message of the single network port according to the first message sent by the single network port. The receiving end sends the second message to the single network port through each second network port.
In the embodiment of the invention, when the sending end is in the aggregation network port mode. And each second network port of the receiving end forms a second message corresponding to each first network port according to the first message sent by each first network port. The receiving end sends the second message corresponding to each first network port through each second network port.
S118, determining a packet loss link in the communication links of the target network port according to the counted number of the first messages sent by the target network port and the counted number of the second messages received by the target network port.
In the embodiment of the invention, the sending end determines the packet loss link in the communication link of the target network port according to the counted number of the first messages sent by the target network port and the counted number of the second messages received by the target network port.
S119, determining the packet loss network port condition based on the communication condition of the target network port of the packet loss link and each second network port of the receiving end.
In the embodiment of the invention, the sending end determines the packet loss network port condition based on the communication condition of the target network port of the packet loss link and each second network port of the receiving end.
In the embodiment of the invention, the target network port of the transmitting end transmits the first message to each second network port. And determining a packet loss link according to the number of the first messages sent by the target network port and the number of the second messages received by the target network port, wherein the second network port corresponding to the communication link of the target network port is determined, so that the packet loss network port condition can be accurately determined by combining the target network port.
In some embodiments, S118-S119 shown in FIG. 10 may be implemented by S120-S121, as will be described in connection with the steps.
And S120, if the number of the first messages sent by the target network port is counted and is larger than the number of the second messages received, determining that the communication link corresponding to the target network port is a packet loss link.
In the embodiment of the invention, if the number of the first messages sent by the target network port is counted by the sending end and is larger than the number of the second messages received, the communication link corresponding to the target network port is determined to be a packet loss link.
In the embodiment of the invention, if the sending end counts to obtain the number of the first messages sent by at least one first network port in the target network ports and is greater than the number of the second messages received, the communication link of the at least one first network port is determined to be a packet loss link.
S121, if the target network port is detected to not receive the second message fed back by the second network port of the corresponding communication link, but the target network port receives the second messages fed back by other second network ports of the receiving end, determining that the second network port of the communication link corresponding to the target network port is a packet loss network port.
In the embodiment of the invention, if the sending end detects that the target network port does not receive the second message fed back by the second network port of the corresponding communication link, but the target network port receives the second messages fed back by other second network ports of the receiving end, the second network port of the communication link corresponding to the target network port is determined to be the packet loss network port.
In the embodiment of the invention, since the second port in the communication link corresponding to the target port is determined, the target port does not receive the second message fed back by the second port in the communication link at this time, but receives the second messages fed back by other second ports, which indicates that the communication of the target port is normal, and the second port of the communication link corresponding to the target port is a packet loss port.
For example, in conjunction with fig. 2, if packet loss occurs from the aggregation port member port ethx of host1 to the aggregation port member port ethyl of host2 and packet loss does not occur from other network ports, it may be concluded that packet loss exists in the ethyl group of the aggregation port member port of host 2.
In some embodiments, S121 shown may be implemented by S122, which will be described in connection with the steps.
S122, if the second message fed back by each second network port of the receiving end is not received by the target network port and the second messages fed back by each second network port are received by other first network ports in the target network port, determining that the target network port is a packet loss network port.
In the embodiment of the invention, if the sending end detects that the target network port does not receive the second message fed back by each second network port of the receiving end, and other first network ports in the target network port receive the second message fed back by each second network port, the target network port is determined to be the packet loss network port.
For example, in connection with fig. 2, if packet loss occurs in each network port from the ethx of the aggregation port member port of host1 to the ethx of the aggregation port member port of host2, but no packet loss is found in the other member ports of the aggregation port of host1, it may be obtained that packet loss exists in the ethx of the aggregation port member port of host 1.
Since there is a certain delay in each first network port transmitting and receiving packet, the statistical data may be distorted when the packet is transmitted and received. Assuming that the counted period is T, a packet having a time of about 0.2T is inaccurate in one period T. The main reason for the inaccuracy of the packet in the 0.2T time is that the packet may have been sent out, but the receiving end may not reply in time, and if the packet statistics are performed at this time, the counted packet data will be distorted. However, when the transmitting end prolongs the statistical period, the original period T is changed to 1.2T, so that the problem of data distortion of the receiving and transmitting packets caused by the defect of the statistical period can be solved.
In some embodiments, S122 is shown as being implemented by S123, and will be described in connection with the steps.
S123, if the communication links corresponding to the target network ports are all packet loss links, determining that a switch between the target network ports and the receiving end fails, or that self equipment fails, or that the receiving end equipment fails.
In the embodiment of the invention, if the communication links corresponding to the target network ports are packet loss links, determining that the switch between the target network ports and the receiving end fails, or that the transmitting end equipment fails, or that the receiving end equipment fails.
For example, in connection with fig. 2, if all links from the aggregation port member port of host1 to all member ports of the aggregation port of host2 drop packets, it is possible that a network failure exists in a switch or a host.
In some embodiments, the packet loss network port determining method further includes S124-S125, which will be described in connection with the steps.
S124, if there is a packet loss between the target network port and each network port of the second receiving end, and there is no packet loss between each network port of the second receiving end and each second network port of the receiving end, determining that the target network port is a packet loss network port.
S125, if packet loss exists between the target network port and each network port of the second receiving end, and packet loss exists between each network port of the second receiving end and each second network port of the receiving end, determining that a fault exists in a switch between the second receiving end and the receiving end.
For example, in combination with fig. 2, a host3 is added, host3 also has channel1, and each of the network ports of hosts 1 to host3 has packet loss, but no packet loss exists between host2 and host3, which can prove that the switch has no packet loss and is the packet loss of the host aggregation port failure of host 1. However, if there is still packet loss between the aggregation ports of host2 and host3, a large probability of packet loss occurs for the switch.
In the embodiment of the invention, by introducing the second receiving end and comparing the communication conditions among the sending end, the receiving end and each network port of the second receiving end, whether the target network port loses the packet or the packet is lost due to the fault of the switch can be accurately determined.
In some embodiments, referring to fig. 11, fig. 11 is a schematic flow chart of an alternative method for determining a packet loss network port according to an embodiment of the present invention, and will be described with reference to the steps.
S201, receiving detection messages sent by target network ports in a plurality of first network ports of a sending end; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of the target network port.
In the embodiment of the invention, a receiving end receives a detection message sent by a target network port in a plurality of first network ports of a sending end. The target network port is at least one network port of the first network ports. The detection message carries first network port information and physical address information of the target network port.
S202, forming a feedback message based on the detection message, and sending the feedback message to a target network port for a sending end to determine a communication link of the target network port; the feedback message carries second network port information of a second network port corresponding to the target network port.
In the embodiment of the invention, the receiving end forms a feedback message based on the detection message, and the feedback message is sent to the target network port so that the sending end can determine the communication link of the target network port. The feedback message carries second network port information of a second network port corresponding to the target network port.
S203, receiving a first message sent by a sending end according to a communication link of a target network port.
In the embodiment of the invention, the receiving end receives the first message sent by the sending end according to the communication link of the target network port.
S204, forming a second message of the target network port according to the first message, and feeding back the second message of the target network port to the target network port of the sending end.
In the embodiment of the invention, the receiving end forms the second message of the target network port according to the first message, and feeds back the second message of the target network port to the target network port of the sending end.
In the embodiment of the invention, a receiving end receives detection messages sent by a target network port in a plurality of first network ports of a sending end, forms a feedback message based on the detection messages, and sends the feedback message to the target network port so that the sending end can determine a communication link of the target network port. And receiving the first message sent by the sending end according to the communication link of the target network port. And forming a second message of the target network port according to the first message, and feeding back the second message of the target network port to the target network port of the transmitting end. The feedback message fed back by the receiving end can help the sending end to determine the communication link of the target network port, and the second network port corresponding to the communication link of the target network port in the receiving end is determined, so that the sending end can accurately determine the packet loss condition according to the number of the first messages sent to the receiving end and the number of the second messages received.
In some embodiments, S201-S202 shown in FIG. 11 may be implemented by S205-S206, which will be described in connection with the steps.
S205, receiving detection messages sent by a single network port or each first network port; the detection message carries single network port or first network port information and physical address information corresponding to each first network port.
In the embodiment of the invention, the receiving end receives the detection message sent by the single network port or each first network port. The detection message carries single network port or first network port information and physical address information corresponding to each first network port.
S206, forming a feedback message corresponding to the single network port or each first network port based on the detection message, and sending the feedback message to the single network port or each first network port; the feedback message carries second network port information of a single network port or second network ports corresponding to the first network ports.
In the embodiment of the invention, the receiving end forms the feedback message corresponding to the single network port or each first network port based on the detection message, and sends the feedback message to the single network port or each first network port. The feedback message carries second network port information of a single network port or second network ports corresponding to the first network ports.
In some embodiments, the illustrated S205-S206 may be implemented by S207-S210, which will be described in connection with the steps.
S207, reporting the first number of the local second network ports to the transmitting end, and receiving the second number of the first network ports reported by the transmitting end.
In the embodiment of the invention, the receiving end reports the first number of the local multiple second network ports to the sending end and receives the second number of the multiple first network ports reported by the sending end.
S208, generating m pieces of continuous non-repetitive destination physical address information through a preset program, and distributing the non-repetitive destination physical address information to a plurality of second network ports; m is a positive integer greater than or equal to 1; m is the maximum of the first number and the second number.
In the embodiment of the invention, the receiving end generates m pieces of continuous non-repetitive destination physical address information through a preset program, and distributes the non-repetitive destination physical address information to a plurality of second network ports. Wherein m is a positive integer greater than or equal to 1; m is the maximum of the first number and the second number.
S209, receiving a single network port or a first number of detection messages respectively sent by each first network port; different detection messages carry different source physical address information corresponding to a single network port or each first network port.
In the embodiment of the invention, the receiving end receives a single network port or a first number of detection messages respectively sent by each first network port. The different detection messages carry different source physical address information corresponding to a single network port or each first network port.
S210, when the target network port is a single network port, taking source physical address information in the detection messages received by each second network port as new destination physical address information, taking destination physical address information of each second network port as new source physical address information, forming a first number of feedback messages corresponding to the single network port, and sending the first number of feedback messages to Shan Wangkou; each feedback message carries second network port information of a second network port corresponding to the single network port.
In the embodiment of the invention, when the target network port is a single network port, the receiving end takes the source physical address information in the detection messages received by each second network port as new destination physical address information, takes the destination physical address information of each second network port as new source physical address information, forms a first number of feedback messages corresponding to the single network port, and sends the first number of feedback messages to the single network port. Each feedback message carries second network port information of a second network port corresponding to the single network port.
In some embodiments, S210 shown may be implemented by S211, which will be described in connection with the steps.
S211, when the target network port is a plurality of first network ports, taking source physical address information corresponding to each first network port as new destination physical address information, taking destination physical address information corresponding to a second network port corresponding to each first network port as new source physical address information, forming a second number of feedback messages corresponding to the plurality of first network ports, and respectively sending the second number of feedback messages to each first network port; each feedback message carries second network port information of a second network port corresponding to each first network port.
In the embodiment of the invention, when the target network port is a plurality of first network ports, the receiving end takes source physical address information corresponding to each first network port as new destination physical address information, takes destination physical address information corresponding to each second network port corresponding to each first network port as new source physical address information, forms a second number of feedback messages corresponding to the plurality of first network ports, and sends the second number of feedback messages to each first network port respectively. Each feedback message carries second network port information of a second network port corresponding to each first network port.
In some embodiments, referring to fig. 12, fig. 12 is an interaction schematic diagram of a method for determining a packet loss network port according to an embodiment of the present invention, and description will be made with reference to each step.
S301, the sending end sends a detection message to the receiving end through a target network port in the first network ports.
The detailed implementation of step S301 is consistent with the implementation of S101, and will not be described here again.
S302, the sending end receives a feedback message fed back by the receiving end.
The detailed implementation of step S302 is consistent with the implementation of S102, and will not be described here again.
S303, the transmitting end determines a communication link of the target network port based on the second network port information corresponding to the second network port carried in the feedback message and the target network port.
The detailed implementation of step S303 is identical to the implementation of step S103, and will not be described here again.
S304, the transmitting end receives a second message which is fed back to the target network port based on the first message transmitted by the target network port according to the communication link of the target network port.
The detailed implementation of step S304 is consistent with the implementation of step S104, and will not be described here.
S305, the sending end determines the packet loss network port condition according to the number of the first messages and the number of the second messages.
The detailed implementation of step S305 is consistent with the implementation of S105, and will not be described here again.
Referring to fig. 13, a first schematic structural diagram of a packet loss network port determining device according to an embodiment of the present invention is shown;
the embodiment of the invention also provides a packet loss network port determining device 800, which is applied to a transmitting end and comprises: a first transmitting unit 803, a first receiving unit 804, and a determining unit 805.
A first sending unit 803, configured to send a detection message to the receiving end through a target network port in the plurality of first network ports; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of the target network port;
a first receiving unit 804, configured to receive a feedback message fed back by the receiving end;
a determining unit 805, configured to determine, based on second network port information corresponding to the second network port carried in the feedback packet and the target network port, a communication link of the target network port;
the first receiving unit 804 is further configured to receive, according to the communication link of the target network port, a second message that is fed back to the target network port based on the first message sent by the target network port;
the determining unit 805 is further configured to determine a packet loss network port according to the number of the first packets and the number of the second packets.
In the embodiment of the present invention, the first sending unit 803 in the packet loss network port determining apparatus 800 is configured to send a detection message to the receiving end through the single network port or each first network port; the detection message carries the single network port or the first network port information corresponding to each first network port and the physical address information. The first receiving unit 804 is configured to receive the feedback message fed back by the receiving end according to the detection message; the feedback message carries the second network port information of the single network port or the second network ports corresponding to the first network ports. The determining unit 805 is configured to determine, based on the single port or the second port information corresponding to the first ports and the first port information of the single port or the first ports carried in the feedback packet, a communication link corresponding to the single port or the first ports.
In the embodiment of the present invention, the first sending unit 803 in the packet loss network port determining device 800 is configured to report the local second number of the plurality of first network ports to the receiving end, and the first receiving unit 804 is configured to receive the first number of the plurality of second network ports reported by the receiving end. The packet loss network port determining device 800 is configured to generate m pieces of continuous non-repeated source physical address information through a preset program; m is a positive integer greater than or equal to 1; m is the maximum of the first number and the second number.
In the embodiment of the present invention, a first sending unit 803 in the packet loss network port determining apparatus 800 is configured to send the first number of detection messages to the receiving end through the single network port or the first network ports respectively; different detection messages carry different source physical address information corresponding to the single network port or each first network port. The first receiving unit 804 is configured to receive the first number of feedback messages fed back by the receiving end according to the first number of detection messages when the target network port is the single network port. The first receiving unit 804 is configured to receive the second number of feedback messages fed back by the receiving end according to the first number of detection messages when the target network port is the plurality of first network ports.
In the embodiment of the present invention, the first sending unit 803 in the packet loss network port determining apparatus 800 is configured to send k detection messages to the receiving end through the single network port or the first network ports respectively; k is the square of the maximum of the first number and the second number; k is a positive integer greater than or equal to 1. The first receiving unit 804 is configured to receive feedback messages from the receiving end to the single network port or the first network ports according to the k detection messages.
In the embodiment of the present invention, a first sending unit 803 in the packet loss network port determining apparatus 800 is configured to send, according to the communication link of the target network port, a first number of first packets of the target network port to the first number of second network ports of the receiving end, respectively; each first message carries the first network port information of the target network port and the physical address information. The first receiving unit 804 is configured to receive the first message sent by each second network port of the receiving end according to the target network port, and feed back the second message to the target network port.
In the embodiment of the present invention, the determining unit 805 in the packet loss network port determining device 800 is configured to determine, according to the counted number of the first packets sent by the target network port and the counted number of the second packets received by the target network port, a packet loss link from the communication links of the target network port; and determining the packet loss network port condition based on the communication condition of the target network port of the packet loss link and each second network port of the receiving end.
In the embodiment of the present invention, the determining unit 805 in the packet loss network port determining device 800 is configured to determine that the communication link corresponding to the target network port is the packet loss link if the number of the first packets sent by the target network port is counted and obtained to be greater than the number of the second packets received. If the target network port is detected to not receive the second message fed back by the second network port of the corresponding communication link, but the target network port receives the second messages fed back by other second network ports of the receiving end, determining that the second network port of the communication link corresponding to the target network port is a packet loss network port; if the second message fed back by each second network port of the receiving end is not received by the target network port and the second messages fed back by each second network port are received by other first network ports in the target network port, determining that the target network port is the packet loss network port.
In the embodiment of the present invention, a first sending unit 803 sends a detection message to a receiving end from a target network port in a plurality of first network ports; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of a target network port; receiving a feedback message fed back by a receiving end through a first receiving unit 804; determining, by the determining unit 805, a communication link of the target portal based on the second portal information corresponding to the second portal carried in the feedback packet and the target portal; receiving, by the first receiving unit 804 according to the communication link of the target network port, a second message fed back to the target network port based on the first message sent by the target network port; and determining the packet loss network port condition by the determining unit 805 according to the number of the first messages and the number of the second messages. Because the first message of the target network port is sent to the receiving end through the communication link, and because the number of the corresponding second network port and the number of the second network port in the communication link of the target network port are determined, the sending end counts the number of the first message sent by the target network port and the number of the second message received by the target network port, and when the number of the first message sent by the target network port and the number of the second message received by the target network port are inconsistent, the situation of packet loss network port can be accurately positioned according to the corresponding second network port.
Correspondingly, an embodiment of the invention provides a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method.
Correspondingly, the embodiment of the invention provides a packet loss network port determining device, which comprises a first memory 802 and a first processor 801, wherein the first memory 802 stores a computer program capable of running on the first processor 801, and the steps in the method are realized when the first processor 801 executes the program.
It should be noted here that: the description of the storage medium and apparatus embodiments above is similar to that of the method embodiments described above, with similar benefits as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus of the present invention, please refer to the description of the method embodiments of the present invention.
It should be noted that fig. 14 is a schematic diagram of a hardware entity of a packet loss network port determining device provided by the embodiment of the present invention, as shown in fig. 14, the hardware entity of the packet loss network port determining device 800 includes: a first processor 801 and a first memory 802, wherein;
the first processor 801 generally controls the overall operation of the packet loss portal determination device 800.
The first memory 802 is configured to store instructions and applications executable by the first processor 801, and may also cache data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by each module in the first processor 801 and the packet loss portal determination device 800, which may be implemented by a FLASH memory (FLASH) or a random access memory (Random Access Memory, RAM).
Referring to fig. 15, a second schematic structural diagram of a packet loss network port determining device according to an embodiment of the present invention is shown;
the embodiment of the invention also provides a packet loss network port determining device 900, which is applied to a receiving end and comprises: a second receiving unit 903 and a second transmitting unit 904.
A second receiving unit 903, configured to receive a probe packet sent by a target network port in the multiple first network ports of the sending end; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of the target network port;
a second sending unit 904, configured to form a feedback packet based on the detection packet, and send the feedback packet to the target network port, so that the sending end determines a communication link of the target network port; the feedback message carries second network port information of a second network port corresponding to the target network port;
The second receiving unit 903 is further configured to receive a first packet sent by a sending end according to a communication link of the target network port;
the second sending unit 904 is further configured to form a second packet of the target network port according to the first packet, and feed back the second packet of the target network port to the target network port of the sending end.
In the embodiment of the invention, a single network port in the plurality of first network ports or the plurality of first network ports; the second receiving unit 903 in the packet loss network port determining device 900 is configured to receive a detection packet sent by the single network port or each first network port; the detection message carries the single network port or the first network port information and the physical address information corresponding to each first network port; the second sending unit 904 is configured to form a feedback packet corresponding to the single network port or each first network port based on the detection packet, and send the feedback packet to the single network port or each first network port; the feedback message carries second network port information of the single network port or the second network ports corresponding to the first network ports.
In the embodiment of the present invention, the second sending unit 904 in the packet loss network port determining device 900 is configured to report, to the sending end, a first number of local second network ports, and the second receiving unit is configured to receive, and send, the second number of the first network ports reported by the sending end. The packet loss portal determining device 900 is configured to generate m pieces of continuous non-repetitive destination physical address information through a preset program, and allocate the non-repetitive destination physical address information to the plurality of second portals; m is a positive integer greater than or equal to 1; m is the maximum of the first number and the second number.
In the embodiment of the present invention, the second receiving unit 903 in the packet loss network port determining device 900 is configured to receive the first number of detection packets sent by the single network port or each first network port respectively; different detection messages carry different source physical address information corresponding to the single network port or each first network port; the second sending unit 904 is configured to, when the target network port is the single network port, use source physical address information in the probe packet received by each second network port as new destination physical address information, use destination physical address information of each second network port as new source physical address information, form the first number of feedback packets corresponding to the single network port, and send the first number of feedback packets to the single network port; each feedback message carries the second network port information of the second network port corresponding to the single network port; when the target network port is the plurality of first network ports, taking source physical address information corresponding to each first network port as new destination physical address information, taking destination physical address information corresponding to the second network port corresponding to each first network port as new source physical address information, forming the second number of feedback messages corresponding to the plurality of first network ports, and respectively sending the second number of feedback messages to each first network port; each feedback message carries the second network port information of the second network port corresponding to each first network port.
In the embodiment of the invention, the second receiving unit is used for receiving the detection message sent by the target network port in the plurality of first network ports of the sending end; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of the target network port; the second sending unit is used for forming a feedback message based on the detection message, sending the feedback message to the target network port and determining a communication link of the target network port by the sending end; the feedback message carries second network port information of a second network port corresponding to the target network port; the second receiving unit 903 receives the first message sent by the sending end according to the communication link of the target network port. And forming a second message of the target network port according to the first message through the second sending unit 904, and feeding back the second message of the target network port to the target network port of the sending end. The feedback message fed back by the receiving end can help the sending end to determine the communication link of the target network port, and the second network port corresponding to the communication link of the target network port in the receiving end is determined, so that the sending end can accurately determine the packet loss condition according to the number of the first messages sent to the receiving end and the number of the second messages received.
It should be noted that, in the embodiment of the present invention, if the above-mentioned packet loss network port determination method is implemented in the form of a software function module, and is sold or used as an independent product, the packet loss network port determination method may also be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied essentially or in a part contributing to the related art in the form of a software product stored in a storage medium, including several instructions for causing a packet loss portal determining device (may be a personal computer or the like) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
Correspondingly, an embodiment of the invention provides a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method.
Correspondingly, the embodiment of the invention provides a packet loss network port determining device, which comprises a second memory 902 and a second processor 901, wherein the second memory 902 stores a computer program capable of running on the second processor 901, and the steps in the method are realized when the second processor 901 executes the program.
It should be noted here that: the description of the storage medium and apparatus embodiments above is similar to that of the method embodiments described above, with similar benefits as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus of the present invention, please refer to the description of the method embodiments of the present invention.
It should be noted that, fig. 16 is a second hardware entity schematic diagram of the packet loss network port determining device according to the embodiment of the present invention, as shown in fig. 16, the hardware entity of the packet loss network port determining device 900 includes: a second processor 901 and a second memory 902, wherein;
the second processor 901 generally controls the overall operation of the packet loss portal determination device 900.
The second memory 902 is configured to store instructions and applications executable by the second processor 901, and may also cache data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by each module in the second processor 901 and the packet loss portal determining device 900, which may be implemented by a FLASH memory (FLASH) or a random access memory (Random Access Memory, RAM).
The foregoing is merely an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present invention, and the changes and substitutions are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. The method for determining the packet loss network port is characterized by being applied to a transmitting end and comprising the following steps:
sending a detection message to a receiving end through a target network port in the first network ports; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of the target network port;
receiving a feedback message fed back by the receiving end;
determining a communication link of the target network port based on second network port information corresponding to the second network port carried in the feedback message and the target network port;
receiving a second message which is fed back to the target network port based on the first message sent by the target network port according to the communication link of the target network port;
if the number of the first messages sent by the target network port is counted and is larger than the number of the second messages received, determining that the communication link corresponding to the target network port is a packet loss link;
if the target network port is detected to not receive the second message fed back by the second network port of the corresponding communication link, but the target network port receives the second messages fed back by other second network ports of the receiving end, determining that the second network port of the communication link corresponding to the target network port is a packet loss network port;
If the second message fed back by each second network port of the receiving end is not received by the target network port and the second messages fed back by each second network port are received by other first network ports in the target network port, determining that the target network port is the packet loss network port.
2. The packet loss portal determination method according to claim 1, wherein the target portal comprises: a single portal of the plurality of first portals or the plurality of first portals;
the sending the detection message to the receiving end through the target network port in the plurality of first network ports includes:
sending a detection message to the receiving end through the single network port or each first network port; the detection message carries the single network port or the first network port information and the physical address information corresponding to each first network port;
correspondingly, the receiving the feedback message fed back by the receiving end includes:
receiving the feedback message fed back by the receiving end according to the detection message; the feedback message carries the second network port information of the single network port or the second network ports corresponding to the first network ports;
Correspondingly, the determining the communication link of the target network port based on the second network port information corresponding to the second network port carried in the feedback message and the target network port includes:
and determining a communication link corresponding to the single network port or the plurality of first network ports based on the second network port information corresponding to the single network port or each first network port and the first network port information of the single network port or the plurality of first network ports carried in the feedback message.
3. The method for determining a packet loss network port according to claim 2, wherein before the sending the detection message to the receiving end through the target network port in the plurality of first network ports, the method further comprises:
reporting the local second number of the plurality of first network ports to the receiving end, and receiving the first number of the plurality of second network ports reported by the receiving end;
m pieces of continuous non-repeated source physical address information generated through a preset program; m is a positive integer greater than or equal to 1; m is the maximum of the first number and the second number.
4. The method for determining a packet loss network port according to claim 3, wherein the sending, through the single network port or each first network port, a detection message to the receiving end includes:
The first number of detection messages are respectively sent to the receiving end through the single network port or each first network port; different detection messages carry different source physical address information corresponding to the single network port or each first network port;
correspondingly, the receiving the feedback message fed back by the receiving end comprises one of the following steps:
when the target network port is the single network port, receiving the first number of feedback messages fed back by the receiving end according to the first number of detection messages;
and when the target network port is the plurality of first network ports, receiving the second number of feedback messages fed back by the receiving end according to the first number of detection messages.
5. The method for determining a packet loss network port according to claim 3, wherein the sending, through the single network port or each first network port, a detection message to the receiving end includes:
k detection messages are respectively sent to the receiving end through the single network port or each first network port; k is the square of the maximum of the first number and the second number; k is a positive integer greater than or equal to 1;
Correspondingly, the receiving the feedback message fed back by the receiving end further includes:
and receiving feedback messages fed back to the single network port or each first network port by the receiving end according to the k detection messages.
6. The method for determining a packet loss port according to claim 1, wherein the receiving, according to the communication link of the target port, the second message fed back to the target port based on the first message sent by the target port includes:
according to the communication links of the target network ports, a first number of first messages of the target network ports are respectively sent to the first number of second network ports of a receiving end; each first message carries the first network port information and the physical address information of the target network port;
and receiving the first message sent by each second network port of the receiving end according to the target network port, and feeding back the second message to the target network port.
7. The method for determining the packet loss network port is characterized by being applied to a receiving end and comprising the following steps:
receiving detection messages sent by target network ports in a plurality of first network ports of a sending end; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of the target network port;
Forming a feedback message based on the detection message, and sending the feedback message to the target network port so that the sending end can determine a communication link of the target network port; the feedback message carries second network port information of a second network port corresponding to the target network port;
receiving a first message sent by the sending end according to the communication link of the target network port;
and forming a second message of the target network port according to the first message, feeding back the second message of the target network port to the target network port of the transmitting end, if the transmitting end counts the number of the first messages transmitted by the target network port and is larger than the number of the received second messages, determining the communication link corresponding to the target network port as a packet loss link, if the transmitting end detects that the second message fed back by the second network port of the corresponding communication link is obtained by the target network port, but the target network port receives the second messages fed back by other second network ports of the receiving end, determining the second network port of the communication link corresponding to the target network port as a packet loss network port, and if the transmitting end detects that the second message fed back by each second network port of the receiving end is obtained by the target network port, determining that each second network port in the target network port is lost, and determining the second packet loss network port.
8. The packet loss portal determination method of claim 7, wherein the target portal comprises: a single portal of the plurality of first portals or the plurality of first portals;
the detection message sent by the target network port in the first network ports of the receiving and sending end comprises:
receiving detection messages sent by the single network port or each first network port; the detection message carries the single network port or the first network port information and the physical address information corresponding to each first network port;
correspondingly, the forming a feedback message based on the detection message, and sending the feedback message to the target network port includes:
forming a feedback message corresponding to the single network port or each first network port based on the detection message, and sending the feedback message to the single network port or each first network port; the feedback message carries second network port information of the single network port or the second network ports corresponding to the first network ports.
9. The method for determining a packet loss port according to claim 7, wherein before receiving the probe packet sent by the target port in the plurality of first ports of the sending end, the method further comprises:
Reporting the first number of the local second network ports to the transmitting end, and receiving the second number of the first network ports reported by the transmitting end;
m pieces of continuous non-repetitive destination physical address information generated through a preset program, and distributing the non-repetitive destination physical address information to the plurality of second network ports; m is a positive integer greater than or equal to 1; m is the maximum of the first number and the second number.
10. The device for determining the packet loss network port is characterized by being applied to a transmitting end and comprising the following components:
the first sending unit is used for sending the detection message to the receiving end through the target network port in the plurality of first network ports; the target network port is at least one network port in the plurality of first network ports; the detection message carries first network port information and physical address information of the target network port;
the first receiving unit is used for receiving a feedback message fed back by the receiving end;
the determining unit is used for determining a communication link of the target network port based on second network port information corresponding to the second network port carried in the feedback message and the target network port;
the first receiving unit is further configured to receive, according to the communication link of the target network port, a second message that is fed back to the target network port based on the first message sent by the target network port;
The determining unit is further configured to determine that the communication link corresponding to the target network port is a packet loss link if the number of the first packets sent by the target network port is counted and is greater than the number of the second packets received by the target network port, determine that the second network port of the communication link corresponding to the target network port is a packet loss port if the second packets fed back by the second network port of the corresponding communication link are detected and obtained, and determine that the second network port of the communication link corresponding to the target network port is a packet loss port if the second packets fed back by each second network port of the receiving end are detected and the second packets fed back by each second network port are received by the target network port and the other first network port is received by the target network port.
11. A packet loss portal determination device, comprising a first memory and a first processor, the first memory storing a computer program executable on the first processor, the first processor implementing the steps in the method of any one of claims 1-6 when the program is executed.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a first processor, implements the steps of the method of any of claims 1-6.
CN202111233631.4A 2021-10-22 2021-10-22 Method, device and storage medium for determining packet loss network port Active CN114079622B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111233631.4A CN114079622B (en) 2021-10-22 2021-10-22 Method, device and storage medium for determining packet loss network port

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111233631.4A CN114079622B (en) 2021-10-22 2021-10-22 Method, device and storage medium for determining packet loss network port

Publications (2)

Publication Number Publication Date
CN114079622A CN114079622A (en) 2022-02-22
CN114079622B true CN114079622B (en) 2023-05-12

Family

ID=80283444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111233631.4A Active CN114079622B (en) 2021-10-22 2021-10-22 Method, device and storage medium for determining packet loss network port

Country Status (1)

Country Link
CN (1) CN114079622B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904775A (en) * 2012-09-29 2013-01-30 华为技术有限公司 Method, apparatus and system for measuring network packet loss
CN103634228A (en) * 2013-11-25 2014-03-12 华为技术有限公司 Network message transmission method and equipment
CN104270282A (en) * 2014-09-11 2015-01-07 浙江宇视科技有限公司 IP network end-to-end testing method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201114126Y (en) * 2007-10-26 2008-09-10 中兴通讯股份有限公司 Multi- net opening test device
CN107995068B (en) * 2017-12-20 2020-04-07 北京百度网讯科技有限公司 Network port testing method, equipment and computer readable storage medium
CN109039829A (en) * 2018-09-18 2018-12-18 郑州云海信息技术有限公司 A kind of network card performance testing method, apparatus, terminal and storage medium
CN111726258A (en) * 2019-03-19 2020-09-29 华为技术有限公司 Network performance detection method and related device
CN110445681A (en) * 2019-07-31 2019-11-12 新华三技术有限公司合肥分公司 A kind of multiport parallel test method, device and electronic equipment
CN111682989B (en) * 2020-07-01 2022-06-28 迈普通信技术股份有限公司 Method, device and system for detecting port link state
CN112152876B (en) * 2020-09-09 2022-01-11 锐捷网络股份有限公司 Method and device for acquiring packet loss information

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904775A (en) * 2012-09-29 2013-01-30 华为技术有限公司 Method, apparatus and system for measuring network packet loss
CN103634228A (en) * 2013-11-25 2014-03-12 华为技术有限公司 Network message transmission method and equipment
CN104270282A (en) * 2014-09-11 2015-01-07 浙江宇视科技有限公司 IP network end-to-end testing method and device

Also Published As

Publication number Publication date
CN114079622A (en) 2022-02-22

Similar Documents

Publication Publication Date Title
EP3346661B1 (en) Path detection method and device
CN109391560B (en) Network congestion notification method, proxy node and computer equipment
US9712559B2 (en) Identifying frames
US9398039B2 (en) Apparatus, system and method for suppressing erroneous reporting of attacks on a wireless network
US7639625B2 (en) Tracing connection paths through transparent proxies
KR101253390B1 (en) Router detection
CN101316236B (en) Vrrp backup group load sharing method and router
US10382397B2 (en) Mitigating neighbor discovery-based denial of service attacks
CN109981323B (en) Method and network equipment for detecting multicast path state of data link layer
CN106921578B (en) Method and device for generating forwarding table item
JP6598771B2 (en) Distributed data transmission in data networks
CN110191066B (en) Method, equipment and system for determining maximum transmission unit (PMTU)
CN112311674B (en) Message sending method, device and storage medium
CN107566292B (en) Message forwarding method and device
CN111193756B (en) VXLAN tunnel load balancing method and related equipment
US10938721B2 (en) Hash collision mitigation system
EP3291486B1 (en) Selective transmission of bidirectional forwarding detection (bfd) messages for verifying multicast connectivity
CN102739462B (en) Test message sending method and device
CN113497752B (en) Message sending method, first network equipment and network system
CN114079622B (en) Method, device and storage medium for determining packet loss network port
US8411684B1 (en) System, method, and computer program product for determining a hop count between network devices utilizing a binary search
US20220141153A1 (en) Server communication method, broadband access server, and system
JP2020010315A (en) Network topology acquisition method and device
US11876680B2 (en) Method and apparatus for determining link for forwarding service flow
WO2017020287A1 (en) Link detection method 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