Abstract:
An Ethernet traffic statistics and analysis method comprises: according to two pieces of port traffic information reported continuously by each of two traffic analyzed nodes which are connected to any one link and a reporting time interval, a traffic analyzing node counting traffic of packets passing through the link, traffic of lost packets and corresponding rates, and constructing an analytic diagram according to the rate of the traffic of the lost packets counted every time. An Ethernet traffic statistics and analysis system is also provided. The solution performs statistics and analysis on the traffic on the link in the Ethernet, and reflects the current state of the link accurately and visually. When a fault occurs or a packet is lost on the link, the fault position can be quickly located, and the efficiency of management and maintenance can be increased.

Description:
FIELD OF THE INVENTION 
       [0001]    The present invention relates to a traffic statistical technology in data communication, and more particularly, to an Ethernet traffic statistics and analysis method and system. 
       BACKGROUND OF THE INVENTION 
       [0002]    Since the Ethernet is developing into a carrier grade network which carries multiple services, and especially since some services have higher requirements on network reliability and real-time performance, it is more important to monitor and manage the Ethernet traffic. The traffic distribution of the Ethernet can be learned through analyzing the Ethernet traffic to achieve better network performance and services. When a packet is lost in the Ethernet, the fault point can be found quickly and the fault process can be analyzed efficiently to locate the fault and evaluate the impact on the services quickly. 
         [0003]    Generally, in the existing technology, a node counts such information as the number of sent and received packets, the number of lost packets and the number of error packets etc. of a port of the node itself, and then reports this statistical information to a traffic analyzing node. The traffic analyzing node, according to the statistical information and a statistical time interval of each reporting node, calculates the rates of the sent and received packets, the lost packets and the error packets etc. of the egress port, and after collecting the information, a traffic information diagram of the whole network can be formed to monitor and manage the network traffic visually. The traffic analyzing node, which may be an independent node or server, is configured to count and analyze the collected traffic information. The traffic analyzing node may be also a node which is counted, under which circumstance other counted nodes besides the traffic analyzing node are called traffic analyzed nodes. 
         [0004]    When services cannot be provided because of a fault which occurs in a certain link in the Ethernet, the traffic rate of the fault link will decrease rapidly, thus the link in which the fault occurs can be easily analyzed by a network traffic distribution diagram. As shown in  FIG. 1 , Node S 1 , Node S 2  and Node S 3  are all nodes which support Ethernet functions, and User 1 , User 2  and User 3  are user nodes which communicate through Node S 1 , Node S 2  and Node S 3 . Node S 1 , Node S 2  and Node S 3  are respectively coupled with a traffic analyzing node A. Node S 1 , Node S 2  and Node S 3  respectively count such information as the number of sent and received packets, the number of lost packets and the number of error packets etc. of the ports of the nodes themselves, and then report the statistical information to the traffic analyzing node A. The traffic analyzing node A, according to the statistical information and statistical time intervals of the nodes, calculates the rates of the sent and received packets, the lost packets and the error packets etc. of the egress ports. For example, when a fault occurs in the link between Node S 1  and Node S 2  to cause a link failure, the traffic rate of Port  12  of Node S 1  is as shown in  FIG. 2 , and the traffic rate decreases rapidly to 0 at Moment t 1 . It can be observed from the traffic analyzing node A that the traffic rate of Port  12  of Node S 1  decreases rapidly, thus it is easily learned that a fault occurs in the link corresponding to Port  12  of Node S 1 ; and it can be seen from  FIG. 2  that the time when the fault occurs is Moment t 1 . 
         [0005]    However, the Ethernet traffic statistics and analysis methods in the existing technology can only analyze the traffic information of a node port and fail to analyze the corresponding data of a link, thus the actual traffic of the network cannot be reflected accurately. For example, in  FIG. 3 , the link between Node S 1  and Node S 2  is not completely disconnected when a fault occurs therein and can still transmit data. However, a large number of packets are lost on the link, and the lost packets on the link cannot be counted by Node S 1  and Node S 2  at the moment.  FIG. 4  shows a diagram illustrating the traffic rate of Port  12  of Node S 1  counted by the traffic analyzing node A, from which it can be observed that the traffic rate of Port  12  of Node S 1  decreases somewhat. However, the decrease in the traffic rate may be caused by normally decreased transmitting and receiving flows of users. Therefore, it cannot be judged that a fault occurs in the link corresponding to Port  12  of Node S 1  only by the decrease in the traffic rate of the node port. Network abnormality cannot be observed in  FIG. 4 , however a fault has already occurred in the communication between Node S 1  and Node S 2 . 
       SUMMARY OF THE INVENTION 
       [0006]    In view of the above, the present invention provides an Ethernet traffic statistics and analysis method and system so that a current state of a link can be reflected accurately and a fault position can be located quickly. 
         [0007]    The technical solution of the present invention is realized as follows. The present invention provides an Ethernet traffic statistics and analysis method. The method comprises: 
         [0008]    according to two pieces of port traffic information reported continuously by each of two traffic analyzed nodes which are connected to any one link and a reporting time interval, a traffic analyzing node counting traffic of packets passing through the link, traffic of lost packets and corresponding rates, and constructing an analytic diagram according to the rate of the traffic of the lost packets counted every time; 
         [0009]    wherein the port traffic information comprises counting information of sent and received packets of a port of the traffic analyzed node. 
         [0010]    In the above solution, the step of constructing an analytic diagram according to the rate of the traffic of the lost packets counted every time comprises: according to the rate of the traffic of the lost packets counted every time, constructing the analytic diagram by taking a reporting time of the traffic analyzed node as a time axis. 
         [0011]    In the above solution, the method further comprises: according to a configured sending strategy, the traffic analyzing node sending a traffic collection request message to the two traffic analyzed nodes on each link respectively; after receiving the traffic collection request message, the traffic analyzed nodes sending a traffic reporting message respectively to report respective port traffic information. 
         [0012]    In the above solution, the two traffic analyzed nodes which are connected to any one link are a first node and a second node; 
         [0013]    the counted traffic of the packets passing through the link comprises: total traffic of packets sent from the first node to the second node, traffic of packets successfully sent from the first node to the second node, total traffic of packets sent from the second node to the first node, and traffic of packets successfully sent from the second node to the first node. 
         [0014]    In the above solution, the traffic of the lost packets comprises: traffic of lost packets from the first node to the second node, and traffic of lost packets from the second node to the first node. 
         [0015]    The present invention also provides an Ethernet traffic statistics and analysis system, comprising: an analyzing node and two analyzed nodes which are connected to at least one link, wherein 
         [0016]    the analyzing node is configured to, according to two pieces of port traffic information reported continuously by each of the two analyzed nodes which are connected to any one link and a reporting time interval, count traffic of packets passing through the link, traffic of lost packets and corresponding rates, and construct an analytic diagram according to the rate of the traffic of the lost packets counted every time; and 
         [0017]    the analyzed nodes are configured to report respective port traffic information to the analyzing node. 
         [0018]    In the above solution, the analyzing node is further configured to, according to a configured sending strategy, send a traffic collection request message to the two analyzed nodes on each link respectively; 
         [0019]    the analyzed nodes are further configured to, after receiving the traffic collection request message, send a traffic reporting message respectively to report respective port traffic information. 
         [0020]    In accordance with the Ethernet traffic statistics and analysis method and system provided by the present invention, according to two pieces of port traffic information reported continuously by each of two traffic analyzed nodes which are connected to any one link and a reporting time interval, a traffic analyzing node counts traffic of packets passing through the link, traffic of lost packets and corresponding rates, and constructs an analytic diagram according to the rate of the traffic of the lost packets counted every time. In this way, statistics and analysis can be performed for the traffic on the link in the Ethernet. The current state of the link, i.e. information such as sent and received packets and lost packets etc. on the link, can be reflected accurately to better learn the traffic distribution of the Ethernet. In addition, when a fault occurs or a packet is lost on the link, the fault position can be quickly located and the fault impact can be accurately evaluated, which is in favor of improving the management and maintenance efficiencies. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0021]      FIG. 1  is a schematic diagram illustrating a network with traffic statistical function; 
           [0022]      FIG. 2  is a statistical analytic diagram of the traffic rate of Port  12  of Node S 1  in the network as shown in  FIG. 1 ; 
           [0023]      FIG. 3  is a schematic diagram illustrating a network in which a link can still transmit part of the data when a fault occurs therein; 
           [0024]      FIG. 4  is a diagram illustrating the traffic rate of Port  12  of Node S 1  counted by the node A in the network as shown in  FIG. 3 ; 
           [0025]      FIG. 5  is a schematic diagram illustrating a flow for realizing an Ethernet traffic statistics and analysis method in accordance with an embodiment of the present invention; 
           [0026]      FIG. 6  is a structural schematic diagram illustrating an Ethernet traffic statistics and analysis system realized in accordance with an embodiment of the present invention; 
           [0027]      FIG. 7  is a schematic diagram illustrating a flow for realizing an Ethernet traffic statistics and analysis method in Embodiment 1 of the present invention; 
           [0028]      FIG. 8  is a statistical analytic diagram of the traffic rate of the lost packets of the link from Node S 1  to Node S 2  in Embodiment 1 of the present invention; 
           [0029]      FIG. 9  is a schematic diagram illustrating a structure of an Ethernet ring network in Embodiment 2 of the present invention; 
           [0030]      FIG. 10  is a structural diagram when a fault occurs in a link between Node S 2  and Node S 3  in the Ethernet ring network as shown in  FIG. 9 ; 
           [0031]      FIG. 11  is a schematic diagram illustrating a flow for realizing an Ethernet traffic statistics and analysis method in Embodiment 2 of the present invention; and 
           [0032]      FIG. 12  is a statistical analytic diagram of the traffic rate of lost packets of the link from Node S 2  to Node S 3  in Embodiment 2 of the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
       [0033]    The basic idea of the present invention is that: according to two pieces of port traffic information reported continuously by each of two traffic analyzed nodes which are connected to any one link and a reporting time interval, a traffic analyzing node counts traffic of packets passing through the link, traffic of lost packets and corresponding rates, and constructs an analytic diagram according to the rate of the traffic of the lost packets counted every time. 
         [0034]    The present invention is further described in details below according to the accompanying drawings and specific embodiments. 
         [0035]    The present invention realizes an Ethernet traffic statistics and analysis method. As shown in  FIG. 5 , the method comprises the following steps. 
         [0036]    Step  501 : in an Ethernet, a traffic analyzing node and traffic analyzed nodes are deployed. 
         [0037]    There are at least two traffic analyzed nodes, which are two connected nodes in one link. There may be also more than two traffic analyzed nodes, and at least one link is provided to connect each traffic analyzed node. 
         [0038]    Step  502 : the traffic analyzing node, according to a configured sending strategy, sends a traffic collection request message to the two traffic analyzed nodes on each link respectively. 
         [0039]    In this step, the configured sending strategy may be sending on schedule or sending aperiodicity. 
         [0040]    Step  503 : after receiving the traffic collection request message, the traffic analyzed nodes send a traffic reporting message respectively to report respective port traffic information. 
         [0041]    In this step, the port traffic information comprises counting information of sent and received packets of a port of the traffic analyzed node 
         [0042]    Step  504 : according to two pieces of port traffic information reported continuously by each of the two traffic analyzed nodes which are connected to any one link and a reporting time interval, the traffic analyzing node counts traffic of packets passing through the link, traffic of lost packets and corresponding rates. 
         [0043]    More specifically, it is assumed that the two traffic analyzed nodes connected to any one link are Node A and Node B respectively and the time interval between two continuous reporting is T. The traffic of the packets passing through the link comprises: the total traffic of packets sent from Node A to Node B, the traffic of packets successfully sent from Node A to Node B, the total traffic of packets sent from Node B to Node A, and the traffic of packets successfully sent from Node B to Node A. The traffic of the lost packets comprises: the traffic of lost packets from Node A to Node B, and the traffic of lost packets from Node B to Node A. 
         [0044]    The total traffic of packets sent from Node A to Node B can be obtained by deducting the counted number of sent packets of the port reported by Node A last time from the counted number of sent packets of the port reported by Node A this time. The traffic of the packets successfully sent from Node A to Node B can be obtained by deducting the counted number of received packets of the port reported by Node B last time from the counted number of received packets of the port reported by Node B this time. The traffic of the lost packets from Node A to Node B can be obtained by deducting the traffic of the packets successfully sent from Node A to Node B from the total traffic of packets sent from Node A to Node B. 
         [0045]    The total traffic of packets sent from Node B to Node A can be obtained by deducting the counted number of sent packets of the port reported by Node B last time from the counted number of sent packets of the port reported by Node B this time. The traffic of the packets successfully sent from Node B to Node A can be obtained by deducting the counted number of received packets of the port reported by Node A last time from the counted number of received packets of the port reported by Node A this time. The traffic of the lost packets from Node B to Node A can be obtained by deducting the traffic of the packets successfully sent from Node B to Node A from the total traffic of packets sent from Node B to Node A. 
         [0046]    The rate of the traffic of the packets passing through the link and the rate of the traffic of the lost packets can be obtained by dividing the traffic of the packets passing through the link and the traffic of the lost packets by the time interval T, respectively. 
         [0047]    Step  505 : according to the rate of the traffic of the lost packets counted every time, an analytic diagram is constructed for the link by taking the reporting time of the traffic analyzed node as a time axis, then the rate change of the traffic of the lost packets on the link can be observed visually. 
         [0048]    Based on the method above, an embodiment of the present invention provides an Ethernet traffic statistics and analysis system. As shown in  FIG. 6 , the system comprises: an analyzing node  61  and analyzed nodes  62 , wherein 
         [0049]    the analyzing node  61  is configured to, according to two pieces of port traffic information reported continuously by each of two analyze nodes  62  connected to any one link and a reporting time interval, count traffic of packets passing through the link, traffic of the lost packets and the corresponding rates, and construct an analytic diagram according to the rate of the traffic of the lost packets counted every time; 
         [0050]    the analyzed nodes  62  at least comprise two nodes connected to one link, and are configured to report the respective port traffic information to the analyzing node  61 . 
         [0051]    Here, the port traffic information comprises: counting information of sent and received packets of the ports. 
         [0052]    The analyzing node  61  is further configured to, according to a configured sending strategy, send a traffic collection request message to the two analyzed nodes on each link, respectively. 
         [0053]    The analyzed nodes  62  are configured to, after receiving the traffic collection request message, send a traffic reporting message respectively to report the respective port traffic information. 
         [0054]    The process and principle for realizing the method of the present invention are described in details below according to the specific embodiments. 
       Embodiment 1 
       [0055]    As shown in  FIG. 3 , a traffic analyzing node deployed in the Ethernet is Node A, and the traffic analyzed nodes are Node S 1 , Node S 2  and Node S 3 . The method for realizing Ethernet traffic statistics and analysis in this embodiment is as shown in  FIG. 7  and comprises the following steps. 
         [0056]    Step  701 : Node A respectively sends a traffic collection request message to Node S 1 , Node S 2  and Node S 3  on the links S 1 ⇄S 2  and S 2 ⇄S 3  according to a configured period T. 
         [0057]    Step  702 : after receiving the traffic collection request message, Node S 1 , Node S 2  and Node S 3  send a traffic reporting message respectively to report the respective port traffic information. 
         [0058]    The port traffic information of Node S 1  comprises counting information of the sent and received packets of Port  11  and Port  12  of Node S 1 . The port traffic information of Node S 2  comprises counting information of the sent and received packets of Port  21  and Port  22  of Node S 2 . The port traffic information of Node S 3  comprises counting information of the sent and received packets of Port  31  and Port  32  of Node S 3 . 
         [0059]    Step  703 : according to two pieces of port traffic information reported continuously by each of two traffic analyzed nodes connected to any one link and the reporting period T, Node A counts traffic of the packets passing through the link, traffic of the lost packets and the corresponding rates. 
         [0060]    For example, during a certain counting process, Node S 1  reports the counted number of the received packets of Port  12  as R 1 , and the counted number of the sent packets of Port  12  as K 1 ; Node S 2  reports the counted number of the received packets of Port  21  as R 2 , and the counted number of the sent packets of Port  21  as K 2 . During the next counting process, Node S 1  reports the counted number of the received packets of Port  12  as R 3 , and the counted number of the sent packets of Port  12  as K 3 ; Node S 2  reports the counted number of the received packets of Port  21  as R 4 , and the counted number of the sent packets of Port  21  as K 4 . 
         [0061]    Then, after Node A receives the information, it can be calculated and obtained that: for the link between Node S 1  and Node S 2 , during the time period between the two counting times, the traffic of the packets sent from S 1  to S 2  is K3−K1 and the traffic rate of the sent packets is (K3−K1)/T; the traffic of successfully sent packets is R4−R2 and the traffic rate of the successfully sent packets is (R4−R2)/T; the traffic of the lost packets is (K4−K1)−(R4−R2), and the traffic rate of the lost packets is (K3−K1−R4+R2)/T. The traffic of the packets sent from S 2  to S 1  is K4−K2 and the traffic rate of the sent packets is (K4−K2)/T; the traffic of successfully sent packets is R3−R1 and the traffic rate of the successfully sent packets is (R3−R1)/T; the traffic of the lost packets is (K4−K2)−(R3−R1), and the traffic rate of the lost packets is (K4−K2−R3+R1)/T. In the same way, Node A is able to calculate and obtain the traffic statistical analytic information of the link S 2 ⇄S 3 . 
         [0062]    Step  704 : according to the rate of the traffic of the lost packets counted every time, an analytic diagram is constructed for the link by taking the reporting time of the traffic analyzed node as a time axis, then the rate change of the traffic of the lost packets on the link can be observed visually. 
         [0063]    For example, when a fault occurs in the link between Node S 1  and Node S 2 , if the link is not completely disconnected, and the link can still transmit data. However, a large number of packets are lost on the link, then it can be easily observed from the analytic diagram of the traffic rate of the lost packets on the link between Node S 1  and Node S 2  that, as shown in  FIG. 8 , the traffic rate of the lost packets from Node S 1  to Node S 2  increases greatly from Moment t 1 , which means a great traffic loss indicating that the fault occurs in the link between Node S 1  and Node S 2  from Moment t 1 , thus facilitating management, maintenance and fault location. 
       Embodiment 2 
       [0064]    Taking  FIG. 9  as an example,  FIG. 9  shows an Ethernet ring network. The Ethernet ring network, which is an Ethernet protection technology, is a network of ring topology connected by several nodes. When all links on the ring are well-conditioned, a port on the ring of a node on the ring is blocked to prevent the ring from being closed, and the traffic has only one transmission channel on the network, for example, Port  11  is blocked by Node S 1  and the traffic transmission path is S 2 ⇄S 3 . When a fault occurs on a link on the ring, after the fault is detected by the adjacent nodes of the fault link, the port connected with the fault link is blocked and other nodes are notified to perform switching. The blocked port is opened when the link recovers. As shown in  FIG. 10 , a fault occurs between Node S 2  and Node S 3 , Port  22  is blocked by Node S 2 , Port  31  is blocked by Node S 3 , other nodes are notified to perform switching and Port  11  is opened by Node S 1 . 
         [0065]    In this network, Node A is the traffic analyzing node, Node S 1 , Node S 2 , Node S 3  and Node S 4  are traffic analyzed nodes. Node A is connected with Node S 1  and connected with other nodes via the Ethernet ring network.  FIG. 11  shows an Ethernet traffic statistics and analysis method in this embodiment, comprising the following steps. 
         [0066]    Step S 101 : Node A, according to a configured sending strategy, sends a traffic collection request message to Node S 1 , Node S 2 , Node S 3  and Node S 4 , respectively. 
         [0067]    Step S 102 : after receiving the traffic collection request message, Node S 1 , Node S 2 , Node S 3  and Node S 4  send a traffic reporting message respectively to report the respective port traffic information. 
         [0068]    The port traffic information of Node S 1  comprises counting information of the sent and received packets of Port  11  and Port  12  of Node S 1 . The port traffic information of Node S 2  comprises counting information of the sent and received packets of Port  21  and Port  22  of Node S 2 . The port traffic information of Node S 3  comprises counting information of the sent and received packets of Port  31  and Port  32  of Node S 3 . The port traffic information of Node S 4  comprises counting information of the sent and received packets of Port  41  and Port  42  of Node S 4 . 
         [0069]    Step S 103 : according to two pieces of port traffic information reported continuously by each of two traffic analyzed nodes connected to any one link and a reporting time interval, Node A counts traffic of packets passing through the link, traffic of the lost packets and the corresponding rates. 
         [0070]    For example, the reporting time interval is T. During a certain counting process, Node S 2  reports the counted number of the received packets of Port  22  as R 1 , and the counted number of the sent packets of Port  22  as K 1 ; Node S 3  reports the counted number of the received packets of Port  31  as R 2 , and the counted number of the sent packets of Port  31  as K 2 . During the next counting process, Node S 2  reports the counted number of the received packets of Port  22  as R 3 , and the counted number of the sent packets of Port  22  as K 3 ; Node S 3  reports the counted number of the received packets of Port  31  as R 4 , and the counted number of the sent packets of Port  31  as K 4 . 
         [0071]    After Node A receives the information, it can be calculated and obtained that: for the link between Node S 2  and Node S 3 , during the time period between the two counting times, the traffic of the packets sent from S 2  to S 3  is K3−K1 and the traffic rate of the sent packets is (K3−K1)/T; the traffic of successfully sent packets is R4−R2 and the traffic rate of the successfully sent packets is (R4−R2)/T; the traffic of the lost packets is (K3−K1)−(R4−R2), and the traffic rate of the lost packets is (K3−K1−R4+R2)/T. The traffic of the packets sent from S 3  to S 2  is K4−K2 and the traffic rate of the sent packets is (K4−K2)/T; the traffic of successfully sent packets is R3−R1 and the traffic rate of the successfully sent packets is (R3−R1)/T; the traffic of the lost packets is (K4−K2)−(R3−R1), and the traffic rate of the lost packets is (K4-K2-R3+R1)/T. In the same way, Node A is able to calculate and obtain the traffic statistical analytic information of other links. 
         [0072]    Step S 104 : according to the rate of the traffic of the lost packets counted every time, an analytic diagram is constructed for the link by taking the reporting time of the traffic analyzed node as a time axis, then the rate change of the traffic of the lost packets on the link can be observed visually. 
         [0073]    For example, when a fault occurs in the link from Node S 2  to Node S 3 , before and after protection switching is initiated by the ring network, the protection switching process can be clearly observed from  FIG. 12  as follows. The traffic rate of the lost packets on the link from Node S 2  to Node S 3  increases greatly at Moment t 1 , which indicates that the traffic begins to be lost greatly at Moment t 1 , i.e. the fault occurs on the link; subsequently, protection switching is initiated on the ring network at Moment t 2 , it can be observed that there is no traffic loss on the link from Node S 2  to Node S 3  any more at Moment t 2 . 
         [0074]    The above are only preferable embodiments of the present invention and should not be used to limit the present invention. Any modifications, equivalent replacements, improvements and the like within the principle of the present invention shall fall within the scope of protection of the present invention.