CN107547311B - Flow statistical method and device - Google Patents

Flow statistical method and device Download PDF

Info

Publication number
CN107547311B
CN107547311B CN201710754687.1A CN201710754687A CN107547311B CN 107547311 B CN107547311 B CN 107547311B CN 201710754687 A CN201710754687 A CN 201710754687A CN 107547311 B CN107547311 B CN 107547311B
Authority
CN
China
Prior art keywords
table entry
implicit
tunnel
layer data
arp
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
CN201710754687.1A
Other languages
Chinese (zh)
Other versions
CN107547311A (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.)
New H3C Information Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201710754687.1A priority Critical patent/CN107547311B/en
Publication of CN107547311A publication Critical patent/CN107547311A/en
Application granted granted Critical
Publication of CN107547311B publication Critical patent/CN107547311B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the application provides a traffic statistical method and a device, which are applied to a head node, wherein the method comprises the following steps: recording an ARP table entry index of an ARP table entry of equipment of a next hop of a hidden empty label tunnel in an hidden empty label table entry; determining that the destination addresses of the received multiple three-layer data messages are matched with an implicit null label table entry; reading next hop information in the ARP table entry according to the ARP table entry index recorded by the implicit empty label table entry, encapsulating a plurality of matched three-layer data messages, and sending the encapsulated three-layer data messages to next hop equipment corresponding to the read next hop information through an implicit empty label tunnel; counting the matching times of the implicit empty label table entries; and calculating the flow of the three-layer data message forwarded by the implicit empty label tunnel according to the matching times. By applying the embodiment of the application, software change is reduced when flow statistics is realized.

Description

Flow statistical method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a traffic statistic method and apparatus.
Background
An MPLS (Multi-Protocol label Switching) TE (traffic engineering) tunnel is a virtual point-to-point connection from a head node to a destination node. The head node is a device for introducing the three-layer data message into the MPLS TE tunnel, and the destination node is a device for acquiring the three-layer data message from the MPLS TE tunnel. Typically, when a three-layer data packet is introduced into an MPLS TE tunnel, the head node encapsulates the three-layer data packet with labels, one for each MPLS TE tunnel. The implicit empty label is a special MPLS label, and the three-layer data message forwarded through the implicit empty label tunnel is directly packaged with the next hop information without packaging the label.
Specifically, the process of forwarding the three-layer data packet through the MPLS TE tunnel includes: after receiving the three-layer data message, the head node searches a route corresponding to a destination Address of the three-layer data message, wherein the route comprises an FEC (Forward error Class) index, searches an FEC table item through the FEC index, if the route points to a non-implicit empty label tunnel, the FEC table item comprises a label index, searches the non-implicit empty label table item according to the label index, the non-implicit empty label table item comprises label information and an ARP (Address Resolution Protocol) table item index, encapsulates three-layer datagram messages according to the label information, searches the ARP table item according to the ARP table item index, encapsulates the messages according to next hop information in the ARP table item, and then introduces the three-layer datagram messages into the non-implicit empty label tunnel; however, if the route points to the implicit empty label tunnel, the FEC entry includes an ARP entry index, the ARP entry is directly searched according to the ARP entry index, the three-layer data packet is encapsulated according to the next hop information in the ARP entry, and the three-layer data packet is further introduced into the implicit empty label tunnel.
In order to better supervise the implicit empty label tunnel, statistics needs to be performed on the flow of the three-layer data packet forwarded by the implicit empty label tunnel. At present, flow statistics is mainly realized by additionally establishing an ARP table entry for an implicit empty label tunnel: and the three-layer data message forwarded by the implicit empty label tunnel acquires the next hop information from the additionally established ARP table entry, so that the flow of the three-layer data message forwarded by the implicit empty label tunnel can be counted by counting the times of acquiring the next hop information from the additionally established ARP table entry. However, the direct problem of additionally establishing an ARP entry is: the additionally established ARP table entry needs to be maintained independently, and software is changed greatly.
Disclosure of Invention
The embodiment of the application aims to provide a flow statistical method and a flow statistical device so as to reduce software change. The specific technical scheme is as follows:
on one hand, the embodiment of the application discloses a traffic statistical method, which is applied to a head node, and the method comprises the following steps:
recording an ARP table entry index of an ARP table entry of equipment of a next hop of a hidden empty label tunnel in an hidden empty label table entry;
determining that the destination addresses of the received multiple three-layer data messages match the implicit empty label table entry;
reading next hop information in an ARP table entry according to the ARP table entry index recorded by the implicit empty label table entry, encapsulating a plurality of matched three-layer data messages, and sending the encapsulated three-layer data messages to next hop equipment corresponding to the read next hop information through the implicit empty label tunnel;
counting the matching times of the implicit empty label table entries;
and calculating the flow of the three-layer data message forwarded by the implicit empty label tunnel according to the matching times.
In a second aspect, an embodiment of the present application discloses a traffic statistic apparatus, which is applied to a head node, and the apparatus includes:
the recording unit is used for recording the ARP table entry index of the ARP table entry of the next hop of equipment on the implicit empty label tunnel in the implicit empty label table entry;
a determining unit, configured to determine that destination addresses of the received multiple three-layer data packets match the implicit null label table entry;
the encapsulation unit is used for reading next hop information in an ARP table entry according to the ARP table entry index recorded by the implicit empty label table entry, encapsulating a plurality of matched three-layer data messages, and sending the encapsulated three-layer data messages to next hop equipment corresponding to the read next hop information through the implicit empty label tunnel;
the counting unit is used for counting the matching times of the implicit empty label table entry;
and the calculating unit is used for calculating the flow of the three-layer data message forwarded by the implicit empty label tunnel according to the matching times.
In the embodiment of the application, a head node records an ARP table entry index of an ARP table entry of a next-hop device of an implicit empty label tunnel in an implicit empty label table entry, if it is determined that destination addresses of a plurality of received three-layer data messages match the implicit empty label table entry, next-hop information in the ARP table entry is read according to the ARP table entry index recorded in the implicit empty label table entry, the read next-hop information is encapsulated for the plurality of matched three-layer data messages, the encapsulated three-layer data messages are sent to the next-hop device corresponding to the read next-hop information through the implicit empty label tunnel, the matching times of the implicit empty label table entry are counted, each time the implicit empty label table entry is matched, the implicit empty label tunnel forwards one three-layer data message, and the flow rate of the implicit empty label tunnel for forwarding the three-layer data messages can be calculated according to the recorded matching times. The flow of the implicit empty label tunnel forwarding three-layer data message is obtained through the matching times of the implicit empty label table entry, the label table entry is a resource originally existing in the head node, the implicit empty label table entry and the non-implicit empty label table entry can be maintained simultaneously, and software change is reduced when flow statistics is achieved. Of course, it is not necessary for any product or method of the present application to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of MPLS TE tunnel networking;
FIG. 2 is a simplified diagram of the MPLS TE tunnel networking shown in FIG. 1;
fig. 3 is a schematic flow chart of a traffic statistic method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a message forwarding method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a flow rate statistic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
MPLS TE tunnels include implicit null label tunnels and non-implicit null label tunnels.
As shown in fig. 1, in the networking of MPLS TE tunnels, TE tunnel 1 is an MPLS TE tunnel, and TE tunnel 1 is established by PE (Provider Edge) 1-PE 2-PE 3; if PE 1 receives a three-layer data packet that needs to be sent to PE 3, PE 1 introduces the three-layer data packet into TE tunnel 1 and sends it to PE 3 via PE 2, so the networking of MPLS TE tunnel shown in fig. 1 can be simplified to the networking of MPLS TE tunnel shown in fig. 2, a TE tunnel 1 is established between PE 1 and PE 3, and PE 1 sends the three-layer data packet to PE 3 via TE tunnel 1. Here, PE 1 is a head node and PE 3 is a destination node.
At present, a two-layer data message, a protocol message, a three-layer data message and the like all obtain next hop information from an ARP entry, if a TE tunnel 1 is an implicit empty label tunnel, a three-layer data message forwarded by the TE tunnel 1 is counted, in order to ensure the accuracy of a statistical result, an ARP entry X for the TE tunnel 1 is additionally established on a PE 1, the three-layer data message forwarded by the TE tunnel 1 all obtains the next hop information from the ARP entry X, the next hop information is not obtained from the original ARP entry, and the next hop information is not obtained from the ARP entry X for the messages forwarded by the TE tunnel 1, such as the two-layer data message, the protocol message and the like. Therefore, the flow of the three-layer data message forwarded by the TE tunnel 1 can be counted by counting the times of acquiring the next hop information from the ARP table entry X. However, the direct problem of additionally establishing an ARP entry for each implicit null label tunnel is: the additionally established ARP table entry needs to be maintained independently, and software is changed greatly.
In order to reduce software change, the embodiment of the application provides a traffic statistical method and a traffic statistical device.
Referring to fig. 3, fig. 3 is a schematic flow chart of a traffic statistics method provided in the embodiment of the present application, and is applied to a head node of an implicit empty label tunnel, where the head node is a device that introduces three layers of data messages into the implicit empty label tunnel, and an implicit empty label table entry pointing to the implicit empty label tunnel is stored in the head node; the method comprises the following steps:
s301: recording an ARP table entry index of an ARP table entry of equipment of a next hop of a hidden empty label tunnel in an hidden empty label table entry;
s302: determining that the destination addresses of the received multiple three-layer data messages are matched with an implicit null label table entry;
s303: reading next hop information in the ARP table entry according to the ARP table entry index recorded by the implicit empty label table entry, encapsulating a plurality of matched three-layer data messages, and sending the encapsulated three-layer data messages to next hop equipment corresponding to the read next hop information through an implicit empty label tunnel;
s304: counting the matching times of the implicit empty label table entries;
s305: and calculating the flow of the three-layer data message forwarded by the implicit empty label tunnel according to the matching times.
In the embodiment of the application, one label table entry corresponds to one MPLS TE tunnel, and a three-layer data packet is matched with one label table entry, so that an ARP table entry index is obtained from the label table entry once, that is, the ARP table entry index is matched with the label table entry once, and one packet is forwarded through the MPLS TE tunnel corresponding to the label table entry.
The head node records the ARP table entry index of the ARP table entry of the next hop equipment of the implicit empty label tunnel in the implicit empty label table entry; after receiving a three-layer data message, if determining that the destination address of the received three-layer data message is matched with an implicit null label table entry, reading next hop information in an ARP table entry according to an ARP table entry index recorded by the implicit null label table entry, encapsulating the next hop information for the three-layer data message, and sending the encapsulated three-layer data message to next hop equipment corresponding to the read next hop information through an implicit null label tunnel; in addition, the messages forwarded by the implicit empty label tunnel are all matched with the implicit empty label table entry, the matching times of the implicit empty label table entry are counted, and the flow of the three-layer data message forwarded by the implicit empty label tunnel corresponding to the implicit empty label table entry can be calculated and obtained through the matching times of the implicit empty label table entry. The label table entry is a resource originally existing in the head node, the implicit empty label table entry and the non-implicit empty label table entry can be maintained simultaneously, and software change is reduced when flow statistics is achieved.
The destination address may be a destination IP (Internet Protocol) address, a destination MAC (Media Access Control) address, or the like.
In one embodiment of the present application, in order to ensure that a three-layer data packet can be directed to an implicit null label entry, a label index of the implicit null label entry is recorded in an FEC entry that points to an implicit null label tunnel. Therefore, after the head node receives the three-layer data message, a route corresponding to the destination address of the three-layer data message is searched, an FEC entry is searched according to an FEC index included in the route, if the FEC entry points to the implicit empty label tunnel, the FEC entry includes a label index of the implicit empty label entry, and then the implicit empty label entry matched with the destination address of the three-layer data message is determined according to the label index included in the searched FEC entry.
In the related art, when an implicit empty label tunnel is established, an implicit empty label table entry allocated to the implicit empty label tunnel is only used for the implicit empty label tunnel, label information does not need to be encapsulated in three layers of data messages, and therefore the implicit empty label table entry allocated to the implicit empty label tunnel is not used. According to the embodiment of the application, the originally allocated implicit empty label table entry is utilized, no additional table entry is required to be established, no independent maintenance is required, only the label index of the implicit empty label table entry is required to be recorded in the FEC table entry corresponding to the implicit empty label tunnel, software change is small, and the implementation is simple.
In an embodiment of the present application, in order to ensure that the received three-layer data packet is forwarded through the implicit null label tunnel, the label information included in the implicit null label entry stored in the head node may be null, where null may be "0", "x", and the like, and indicates a null character. When the label information in the label table entry matched with the three-layer data message is empty, determining that the label table entry is an implicit empty label table entry, not encapsulating the label information for the received three-layer data message, and directly reading the ARP table entry according to the ARP table entry index recorded in the label table entry matched with the three-layer data message.
In another embodiment of the present application, in order to ensure that the received three-layer data packet is forwarded through the implicit null label tunnel, the implicit null label entry stored in the head node may not include label information. When the tag table entry matched with the three-layer data message does not contain tag information, determining that the tag table entry is an implicit empty tag table entry, not encapsulating the tag information for the received three-layer data message, and directly reading the ARP table entry according to the ARP table entry index recorded in the tag table entry matched with the three-layer data message.
In an embodiment of the present application, there are multiple paths of the implicit empty label tunnel from the head node to the destination node, that is, there are multiple equivalent paths of the implicit empty label tunnel between the head node and the destination node, and there is one next-hop device on each equivalent path of the implicit empty label tunnel, under this condition, the head node may obtain multiple ARP entry indexes including ARP entries of the next-hop devices on the implicit empty label tunnel, and record the ARP entry indexes of the ARP entries of the next-hop devices on each equivalent path of the implicit empty label tunnel in the implicit empty label entry.
When a three-layer data message is received, if the head node determines that the destination address of the received three-layer data message is matched with an implicit empty label table entry, and the ARP table entry index of the ARP table entry of the next-hop device on each equivalent path of the implicit empty label tunnel is recorded in the implicit empty label table entry, an ARP table entry index can be selected from a plurality of ARP table entry indexes recorded in the implicit empty label table entry according to a load sharing algorithm, next-hop information in the ARP table entry is read according to the selected ARP table entry index, the read next-hop information is encapsulated for the three-layer data message, and the encapsulated three-layer data message is sent to the next-hop device corresponding to the read next-hop information through the implicit empty label tunnel.
Here, the method for forwarding the three-layer data packet by the hidden empty label tunnel includes that the head node receives a plurality of three-layer data packets matched with the hidden empty label entry, possibly sending the three-layer data packets to next-hop equipment through different equivalent paths of the hidden empty label tunnel, but all the three-layer data packets are matched with the hidden empty label entry, counting the matching times of the hidden empty label entry, and calculating the flow of the three-layer data packets forwarded by the hidden empty label tunnel according to the counted matching times.
In an embodiment of the present application, to ensure forwarding of a packet and improve accuracy of flow statistics, when a head node detects that one path fault exists in multiple equivalent paths of an implicit null label tunnel, for example, a next hop fault of one path of the implicit null label tunnel is detected, an ARP entry index of an ARP entry of a next hop device of the faulty path in implicit null label entries is deleted, so as to avoid a problem that the head node selects the ARP entry index of the faulty path, which causes that the packet cannot be sent to a destination node, and avoid a problem that the matching statistics of this time is performed in the number of matching times of the implicit null label entries, which further causes inaccuracy of statistical results of forwarding three-layer data packets in the implicit null label tunnel.
The network environment changes continuously, and equipment information changes continuously when equipment is on-line or off-line. In an embodiment of the present application, if it is detected that a next hop device of an implicit empty label tunnel is refreshed, for example, the next hop device changes or device information of the next hop device changes, an ARP table entry index of a refreshed ARP table entry of the next hop device is recorded in an implicit empty label table entry, so as to ensure forwarding of a packet and improve accuracy of a statistical result of forwarding a three-layer data packet in the implicit empty label tunnel.
The flow statistics method provided in the embodiment of the present application is described by taking the packet forwarding flow shown in fig. 4 as an example.
In fig. 4, the FEC _ entry is an FEC entry, the label entry is a non-implicit empty label entry, the nullacep _ entry is an implicit empty label entry, the ARP entry is an ARP entry, the Count entry _1 and the Count _2 are statistical engines, the Count entry _1 is associated with the label entry, and the Count entry _2 is associated with the nullacep _ entry;
the head node acquires an ARP table entry index of an ARP table entry of equipment of a next hop of the implicit empty label tunnel and records the ARP table entry index in a Nullencap _ entry, and acquires an ARP table entry index of equipment of a next hop of the non-implicit empty label tunnel and records the ARP table entry index in a Label encap _ entry;
1. after receiving the three-layer data message F, the head node searches a route corresponding to the destination address of the three-layer data message F, and acquires an FEC index from the searched route;
2. the head node searches an FEC _ entry corresponding to the obtained FEC index, and obtains a label index from the FEC _ entry;
3. the head node searches a label table item corresponding to the obtained label index, namely determines a label table item matched with the destination address of the three-layer data message F; if the destination address of the three-layer data message F is determined to be matched with the Null encap _ entry, the Nullencap _ entry points to the implicit empty label tunnel, and label information is not encapsulated for the three-layer data message F; if the destination address of the three-layer data message F is determined to be matched with the label encap _ entry, the label encap _ entry points to the non-implicit empty label tunnel, and label information included in the label encap _ entry found by the three-layer data message F is encapsulated; in addition, acquiring an ARP table entry index from the label table entries matched with the destination addresses of the three-layer data message F;
in the embodiment of the application, ARP table entry indexes pointing to the ARP table entries of the MPLS TE tunnel are recorded in the non-implicit null label table entries and the implicit null label table entries, three layers of data messages forwarded by the MPLS TE tunnel are matched with the label table entries, and flow statistics can be realized through the label table entries. Compared with the method for realizing the flow statistics by adopting the ARP table entry, the method effectively avoids the problem that the flow statistics result is inaccurate because various different messages obtain the next hop information from the ARP table entry; compared with additionally adding an APR table entry aiming at the implicit empty label tunnel, the label table entry is a resource originally existing in the head node, the implicit empty label table entry and the non-implicit empty label table entry can be maintained simultaneously, and software change is reduced.
4. The head node searches an ARP encap _ entry corresponding to the obtained ARP table entry index, obtains next hop information from the searched ARPencap _ entry, encapsulates the next hop information for a three-layer data message F, and then forwards the three-layer data message F through a corresponding MPLS TE tunnel;
5. and adding 1 to the statistics engine accumulation associated with the label table entry searched by the head node. For example, the number of Nullencap _ entry, Count entry _2 found by the head node is added by 1; the head node finds the label encap _ entry, and the counting _1 adds 1 cumulatively.
The CPU of the head node may read information accumulated by the statistics engine, obtain the number of the MPLS TE tunnel forwarding the three-layer data packet, and further calculate the flow rate of the MPLS TE tunnel forwarding the three-layer data packet. The MPLS TE tunnel includes: a non-implicit null label tunnel and an implicit null label tunnel.
In the embodiment of the application, a head node records an ARP table entry index of an ARP table entry of a next-hop device of an implicit empty label tunnel in an implicit empty label table entry, if it is determined that destination addresses of a plurality of received three-layer data messages match the implicit empty label table entry, next-hop information in the ARP table entry is read according to the ARP table entry index recorded in the implicit empty label table entry, the read next-hop information is encapsulated for the plurality of matched three-layer data messages, the encapsulated three-layer data messages are sent to the next-hop device corresponding to the read next-hop information through the implicit empty label tunnel, the matching times of the implicit empty label table entry are counted, each time the implicit empty label table entry is matched, the implicit empty label tunnel forwards one three-layer data message, and the flow rate of the implicit empty label tunnel for forwarding the three-layer data messages can be calculated according to the recorded matching times. The flow of the implicit empty label tunnel forwarding three-layer data message is obtained through the matching times of the implicit empty label table entry, the label table entry is a resource originally existing in the head node, the implicit empty label table entry and the non-implicit empty label table entry can be maintained simultaneously, and software change is reduced when flow statistics is achieved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a traffic statistic apparatus provided in this embodiment, applied to a head node, where the apparatus includes:
a recording unit 501, configured to record an ARP entry index of an ARP entry of a next-hop device in an implicit empty tag tunnel in an implicit empty tag entry;
a determining unit 502, configured to determine that destination addresses of the received multiple three-layer data packets match an implicit null label table entry;
an encapsulating unit 503, configured to read next hop information in an ARP entry according to an ARP entry index recorded in the implicit empty tag entry, encapsulate multiple matched three-layer data packets, and send the encapsulated three-layer data packets to a next hop device corresponding to the read next hop information through an implicit empty tag tunnel;
a counting unit 504, configured to count matching times of the implicit null tag table entry;
and a calculating unit 505, configured to calculate, according to the matching times, a flow rate of the implicit empty label tunnel for forwarding the three-layer data packet.
In an embodiment of the present application, the recording unit 501 may be specifically configured to:
and recording the ARP table entry index of the ARP table entry of the next hop equipment on each equivalent path of the implicit empty label tunnel in the implicit empty label table entry.
In an embodiment of the present application, the encapsulating unit 503 may be specifically configured to:
selecting an ARP table entry index from a plurality of ARP table entry indexes recorded in an implicit empty tag table entry according to a load sharing algorithm; and reading next hop information in the ARP table entry according to the selected ARP table entry index, encapsulating the matched three-layer data message, and sending the encapsulated three-layer data message to the next hop equipment corresponding to the read next hop information through the hidden empty label tunnel.
In an embodiment of the application, the traffic statistic device may further include:
a first detection unit, configured to detect a path failure in an equal cost path;
and the deleting unit is used for deleting the ARP table entry index of the ARP table entry of the next-hop equipment of the fault path in the implicit null label table entry.
In an embodiment of the application, the traffic statistic device may further include: a second detection unit;
the second detection unit is used for detecting the next hop equipment refreshing of the implicit empty label tunnel;
the recording unit 501 may also be configured to record an ARP entry index of the ARP entry of the refreshed next-hop device in the implicit null tag entry.
In the embodiment of the application, a head node records an ARP table entry index of an ARP table entry of a next-hop device of an implicit empty label tunnel in an implicit empty label table entry, if it is determined that destination addresses of a plurality of received three-layer data messages match the implicit empty label table entry, next-hop information in the ARP table entry is read according to the ARP table entry index recorded in the implicit empty label table entry, the read next-hop information is encapsulated for the plurality of matched three-layer data messages, the encapsulated three-layer data messages are sent to the next-hop device corresponding to the read next-hop information through the implicit empty label tunnel, the matching times of the implicit empty label table entry are counted, each time the implicit empty label table entry is matched, the implicit empty label tunnel forwards one three-layer data message, and the flow rate of the implicit empty label tunnel for forwarding the three-layer data messages can be calculated according to the recorded matching times. The flow of the implicit empty label tunnel forwarding three-layer data message is obtained through the matching times of the implicit empty label table entry, the label table entry is a resource originally existing in the head node, the implicit empty label table entry and the non-implicit empty label table entry can be maintained simultaneously, and software change is reduced when flow statistics is achieved.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. Especially for the embodiment of the flow rate statistic device, since it is basically similar to the embodiment of the flow rate statistic method, the description is simple, and the relevant points can be referred to the partial description of the embodiment of the flow rate statistic method.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (10)

1. A traffic statistic method, applied to a head node, the method comprising:
recording an ARP table entry index of an ARP table entry of a next hop of equipment on an implicit empty label tunnel in an implicit empty label table entry;
determining that the destination addresses of the received multiple three-layer data messages match the implicit empty label table entry;
reading next hop information in an ARP table entry according to the ARP table entry index recorded by the implicit empty label table entry, encapsulating a plurality of matched three-layer data messages, and sending the encapsulated three-layer data messages to next hop equipment corresponding to the read next hop information through the implicit empty label tunnel;
counting the matching times of the implicit empty label table entries;
and calculating the flow of the three-layer data message forwarded by the implicit empty label tunnel according to the matching times.
2. The method of claim 1, wherein the recording the ARP entry index of the ARP entry of the next-hop device in the implicit null label tunnel in the implicit null label entry comprises:
and recording the ARP table entry index of the ARP table entry of the next-hop equipment on each equivalent path of the implicit empty label tunnel in the implicit empty label table entry, wherein the equivalent path is the path of the implicit empty label tunnel between the head node and the destination node which are connected by the implicit empty label tunnel.
3. The method according to claim 2, wherein the reading next hop information in an ARP entry according to an ARP entry index recorded in the implicit null tag entry, encapsulating a plurality of matched three-layer data packets, and sending the encapsulated three-layer data packets to a next hop device corresponding to the read next hop information through the implicit null tag tunnel comprises:
selecting an ARP table entry index from a plurality of ARP table entry indexes recorded in the implicit empty tag table entry according to a load sharing algorithm;
and reading next hop information in the ARP table entry according to the selected ARP table entry index, encapsulating the matched three-layer data message, and sending the encapsulated three-layer data message to the next hop equipment corresponding to the read next hop information through the implicit empty label tunnel.
4. The method of claim 2, further comprising:
detecting a path failure in the equal cost paths;
and deleting the ARP table entry index of the ARP table entry of the next-hop equipment of the fault path in the implicit null label table entry.
5. The method of claim 1, further comprising:
detecting a next hop device refresh of the implicit empty label tunnel;
and recording the ARP table entry index of the ARP table entry of the refreshed next-hop equipment in the implicit null label table entry.
6. A traffic statistic apparatus, applied to a head node, the apparatus comprising:
the recording unit is used for recording an ARP table entry index of an ARP table entry of a next hop of equipment on the implicit empty label tunnel in the implicit empty label table entry;
a determining unit, configured to determine that destination addresses of the received multiple three-layer data packets match the implicit null label table entry;
the encapsulation unit is used for reading next hop information in an ARP table entry according to the ARP table entry index recorded by the implicit empty label table entry, encapsulating a plurality of matched three-layer data messages, and sending the encapsulated three-layer data messages to next hop equipment corresponding to the read next hop information through the implicit empty label tunnel;
the counting unit is used for counting the matching times of the implicit empty label table entry;
and the calculating unit is used for calculating the flow of the three-layer data message forwarded by the implicit empty label tunnel according to the matching times.
7. The apparatus according to claim 6, wherein the recording unit is specifically configured to:
and recording the ARP table entry index of the ARP table entry of the next-hop equipment on each equivalent path of the implicit empty label tunnel in the implicit empty label table entry, wherein the equivalent path is the path of the implicit empty label tunnel between the head node and the destination node which are connected by the implicit empty label tunnel.
8. The apparatus according to claim 7, wherein the encapsulation unit is specifically configured to:
selecting an ARP table entry index from a plurality of ARP table entry indexes recorded in the implicit empty tag table entry according to a load sharing algorithm; and reading next hop information in the ARP table entry according to the selected ARP table entry index, encapsulating the matched three-layer data message, and sending the encapsulated three-layer data message to the next hop equipment corresponding to the read next hop information through the implicit empty label tunnel.
9. The apparatus of claim 7, further comprising:
a first detection unit, configured to detect a path failure in the equal cost path;
and the deleting unit is used for deleting the ARP table entry index of the ARP table entry of the next-hop equipment of the fault path in the implicit null label table entry.
10. The apparatus of claim 6, further comprising: a second detection unit;
the second detection unit is used for detecting the next hop equipment refreshing of the implicit empty label tunnel;
the recording unit is further configured to record an ARP entry index of the ARP entry of the refreshed next-hop device in the implicit null tag entry.
CN201710754687.1A 2017-08-29 2017-08-29 Flow statistical method and device Active CN107547311B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710754687.1A CN107547311B (en) 2017-08-29 2017-08-29 Flow statistical method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710754687.1A CN107547311B (en) 2017-08-29 2017-08-29 Flow statistical method and device

Publications (2)

Publication Number Publication Date
CN107547311A CN107547311A (en) 2018-01-05
CN107547311B true CN107547311B (en) 2020-04-17

Family

ID=60957866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710754687.1A Active CN107547311B (en) 2017-08-29 2017-08-29 Flow statistical method and device

Country Status (1)

Country Link
CN (1) CN107547311B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108494619B (en) * 2018-02-28 2021-01-01 新华三技术有限公司 Traffic statistical method and device and provider router
CN109889453B (en) * 2019-01-31 2022-07-01 新华三技术有限公司 HQoS (quality of service) implementation method and device
CN112804145B (en) * 2020-12-31 2022-06-21 锐捷网络股份有限公司 Flow statistical method and device based on segmented identification list
CN116303474B (en) * 2023-05-09 2023-08-18 新华三技术有限公司 Tunnel information statistical method, device, network equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101656663A (en) * 2008-08-20 2010-02-24 华为技术有限公司 Method, device and system for forwarding MPLS multicast message
CN106911538A (en) * 2017-04-24 2017-06-30 新华三技术有限公司 Flow statistical method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101871411B1 (en) * 2011-07-28 2018-06-26 텔레콤 이탈리아 소시에떼 퍼 아찌오니 A method for performing a measurement on data traffic at a node of a communication network, node and management server for such a communication network, and recording medium storing a program for implementing such a method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101656663A (en) * 2008-08-20 2010-02-24 华为技术有限公司 Method, device and system for forwarding MPLS multicast message
CN106911538A (en) * 2017-04-24 2017-06-30 新华三技术有限公司 Flow statistical method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
VxWorks系统中MPLS的实现;陈剑 等;《计算机工程》;20030131;第29卷(第1期);第79-81页、第140页 *

Also Published As

Publication number Publication date
CN107547311A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN107547311B (en) Flow statistical method and device
US9608938B2 (en) Method and system for tracking and managing network flows
CN108809759A (en) Detect the method, apparatus and router of link state
CN102404197B (en) Data path processing information included in the pseudowire layer of packets
RU2493677C2 (en) Method and router for implementing mirroring
US20140269729A1 (en) Packet forwarding method, apparatus, and system
CN109495320B (en) Data message transmission method and device
CN102368726B (en) Forwarding method and device applied to L2VPN (layer 2 virtual private network)
CN106411625A (en) Link message packet loss measurement method and system, target node and initiator node
CN113709043B (en) Path tracking method and device
CN108718276B (en) Message forwarding method and device
CN114430394A (en) Message processing method and device, electronic equipment and readable storage medium
CN109951371A (en) Data forwarding method and device
CN110430131B (en) Message forwarding method and device
US9515872B2 (en) Systems and methods for tunnel-free fast rerouting in internet protocol networks
CN107547373B (en) Message forwarding method, device, equipment and machine readable storage medium
CN107317691B (en) Fault positioning method and equipment
KR101566139B1 (en) Pseudowire extended group messaging in a packet switched network
CN102804703A (en) Communication system, switching hub, and router
CN111147376B (en) Route updating method, device, equipment and medium
CN110166361B (en) Message forwarding method and device
CN102204169A (en) Fault detection method, route node and system
CN104506369A (en) Packet loss position detecting method and device
US20130259057A1 (en) Pseudowire groups in a packet switched network
CN108111414B (en) Label deployment method and device based on segment routing

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230626

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.