The invention relates to computer networks and, more particularly, to traffic flow analysis within computer networks.
A computer network is a collection of interconnected computing devices that can exchange data and share resources. In a packet-based network, such as the Internet, the computing devices communicate data by dividing the data into small blocks called packets, which are individually routed across the network from a source device to a destination device. The destination device extracts the data from the packets and assembles the data into its original form.
The devices communicate the packets according to a communication protocol that defines the format of the packets. A typical packet, for example, includes a header carrying source and destination information, as well as a payload that carries the data being transmitted. The standard for packet-based communication in the Internet, is the Internet Protocol (IP).
In general, a network analyzer is a device used to monitor and record traffic flows in a network. For example, a network analyzer may capture data from the network, and generate traffic flow statistics indicative of the traffic flow in the network. The network analyzer may locally store the traffic flow statistics, but more often, the network analyzer communicates the traffic flow statistics to another network device, referred to as packet flow collector, that can be used by a network administrator to examine traffic flows through the entire network. Specifically, the network analyzer generates traffic flow packets that include the accumulated statistics, i.e., the traffic flow information, for individual packet flows of the monitored network. In many network environments, the traffic flow collector may receive traffic flow information via traffic flow packets sent from various network locations. Consequently, a network administrator can use the packet flow collector to analyze overall network traffic flow.
Conventional network analyzers comprise dedicated computers that extract traffic flow information from packets being sent between routers or other devices in the network. In addition, a network router, switch, hub, or other device, may include traffic analysis functions to generate traffic flow packets based on the traffic flow that occurs through the device. In either case, the network analyzers typically compute traffic flow information, and generate traffic flow packets to communicate the traffic flow information to the packet flow collector. The information generated by network analyzers and contained in the traffic flow packets may be used to improve network planning, traffic engineering, network monitoring, usage-based billing and the like. In addition, the information contained in the traffic flow packets may be used to identify denial of service (DoS) attacks, or other network events related to network security.
Conventional network analyzers monitor the network and compute traffic flow information over a period of time, and then send a large collection of traffic flow packets to the packet flow collector. For example, network analyzers may accumulate flow statistics into a database or other data structure and, upon expiration of a defined period or upon collecting a defined amount of data, transmit all of the flow information in a burst of traffic flow packets. This burst of traffic flow packets may consume significant network bandwidth, and may overload or otherwise burden the packet flow collector. These effects may be more noticeable in network environments having multiple network analyzers.
In general, the invention is directed to techniques for improving network analysis. In particular, techniques are described for generating and outputting traffic flow packets which include traffic flow information indicative of network traffic flows. More specifically, the traffic flow packets may be output in a rate-controlled fashion, which can avoid data loss of traffic flow information in the traffic flow packets. Rate-controlled output can be extremely useful in ensuring that transmitted traffic flow packets will be received by a packet flow collector without overloading input buffers of the packet flow collector.
In one embodiment, a method includes receiving first packets from a network and generating traffic flow information for the first packets. The method may also include outputting second packets including the traffic flow information in a rate-controlled manner.
In another embodiment, a method comprises receiving first packets from a network, defining a first data structure as an aggregation data structure and a second data structure as an export data structure, and aggregating traffic flow information for a first set of the first packets in the first data structure. The method further includes redefining the first data structure as the export data structure and the second data structure as the aggregation data structure, aggregating traffic flow information for a second set of the first packets in the second data structure, and outputting a first set of second packets, the first set of second packet including the traffic flow information in the first data structure.
In another embodiment, an apparatus includes at least one network interface to receive first packets from a network and a traffic flow module to generate traffic flow information based on the first packets. In addition, the traffic flow module can output second packets including the traffic flow information in a rate-controlled manner. For example, the apparatus may comprise a network router, a gateway, a switch, a hub, a server, a workstation, or the like.
In another embodiment, an apparatus comprises at least one network interface to receive first packets from a network, a first data structure to accumulate traffic flow information corresponding to a first set of the first packets, a second data structure to accumulate traffic flow information corresponding to a second set of the first packets, and a controller to output second packets based on the accumulated traffic flow information in the first and second data structures. The controller can cause output of a first set of second packets corresponding to information in the first data structure during a period of time when traffic flow information is accumulated in the second data structure.
In an added embodiment, the invention may comprise a traffic flow service card capable of removable insertion into a network device. In that case, the traffic flow service card may comprise an interface for insertion within a slot of the network device, and a traffic flow module coupled to the interface to generate traffic flow information based on first packets received by the network device and output second packets including the traffic flow information in a rate-controlled manner.
In other embodiments, the invention may comprise a computer readable medium comprising instructions that upon execution in a network analyzer cause the network analyzer to perform one or more of the techniques described herein. In still other embodiments, the invention may comprise a computer readable medium that stores the data structures described herein.
The described techniques may provide one or more advantages. In particular, the techniques may improve traffic flow analysis by facilitating rate-controlled transmission of traffic flow packets. Importantly, rate-controlled transmission of traffic flow packets can avoid a scenario where a packet flow collector is overloaded with traffic flow packets. Accordingly, the invention can avoid data loss of traffic flow packets, and thereby improve network analysis.
The techniques described herein may be readily integrated within a network router of a packet-based network. The router may, for example, operate as a core router within the Internet to route packets received from high data rate communication links, such as OC-3, OC-12, OC-48, OC-192 and greater communication links. The router may integrate flow analysis functionality to generate flow records for routed packets. In this manner, the router can improve identification of network events, such as Denial of Service (DoS) attacks and other network security violations.
The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the invention will be apparent from the description and drawings, and from the claims.
The term “packet” is used herein to generally describe a unit of data communicated between network devices in conformance with a packet-based communication protocol. The principles of the invention are readily applicable to systems implementing any of a variety of protocols, such as the Transmission Control Protocol (TCP), the User Datagram Protocol (UDP), the Internet Protocol (IP), Asynchronous Transfer Mode, Frame Relay, and the like. Accordingly, “packet” is used to encompass any such unit of data, and may be interchanged with the term “cell,” or other similar terms used in such protocols to describe a unit of data communicated between resources within the network.
The phrase “traffic flow packet” is used herein to describe a packet having a payload that specifically includes traffic flow information. As one example, traffic flow packets may correspond to “cflowd” packets generated according to a flow analysis tool such as NetFlow™ created by Cisco Systems. The Cooperative Association for Internet Data Analysis (CAIDA) has also developed flow analysis tools for analyzing cflowd packets. As outlined in greater detail below, these or other traffic flow packets that include traffic flow information in the payload can be exported for transmission in a rate-controlled manner consistent with the principles of the invention. Consequently, transmission of traffic flow packets can occur in a way that avoids data loss at packet collector 16, even if a number of network analyzers 14 are simultaneously sending traffic flow packets to the packet collector 16.
Network analyzers 14 may include one or more traffic flow modules (not shown in
The traffic flow modules may provide accounting capabilities for maintaining accurate flow statistics for all of the packets received by network analyzers 14. For example, the traffic flow modules may monitor and generate statistics for high traffic rates, even core traffic rates of the Internet, including but not limited to OC-3, OC-12, OC-48, OC-192 and higher or lower rates. The particular packet flows being monitored may be defined by source and/or destination network addresses. Additionally, other routing information within packets may readily be used to define the packet flows for which flow statistics are maintained, such as MPLS labels, VPN labels, Class of Service (CoS) information, and the like. In this manner, statistics for particularized packet flows can be maintained to a level of granularity desired for effective traffic analysis.
Network analyzers 14 output a stream of traffic flow packets that carry traffic flow information. The traffic flow packets, in particular, may include statistical data for each flow, such as a number of packets, a number of bytes, a time of capturing a first packet for the flow, a time of capturing a most recent packet for the flow, an incoming interface, an outgoing interface, a source/destination network mask, a source/destination Autonomous System (AS) number, or the like. Packet flow collector 16 receives the traffic flow packets sent by network analyzers 14, and updates an accounting system based on the received traffic flow packets.
Packet flow collector 16 receives traffic flow packets from network analyzers 14, and stores the traffic flow information carried by the traffic flow packets within a database or other suitable data structure. In addition, packet flow collector 16 may analyze the received traffic flow packets to identify any suspicious packet flows. For example, packet flow collector 16 may identify packet flows arising from Denial of Service (DOS) attacks and other network security violations. In this manner, analysis of traffic flows through network 6 can improve network reliability and be used to reduce the potential for security breeches or other network events. In addition, packet flow collector 16 may use traffic flow analysis to improve network performance.
A system administrator 19 operating packet flow collector 16 may provide programmable information to network analyzers 14 to specify particular packet flows to be monitored. In this manner, administrator 19 may selectively define the packet flows, and packets within a given flow, that are intercepted for analysis. Alternatively, all packet flows, or a defined subset of packet flows may be defined at each network analyzer 14, without administrative direction from packet flow collector 16. In some cases, traffic flows may be monitored for every packet transmitted through network 6. Alternatively, a subset of the transmitted packets may be monitored by selectively sampling one or more packet flows, or by sampling a given packet flow for only a period of time.
As described herein, network analyzers 14 can be configured to transmit traffic flow packets to packet flow collector 16 in a rate-controlled fashion. In other words, each of network analyzers 14 may convey the information to packet collector 16 via respective traffic flow packets in a rate-controlled manner using multiple packet streams over a period of time. In this manner, network analyzers 14 avoid outputting bursts of packets that may carry all of the information computed by the respective analyzer, but that may overload or burden packet collector 16.
Consequently, the transmission of traffic flow packets from network analyzers 14 to packet flow collector 16 can be made more robust, thereby avoiding data loss. For this reason, rate-controlled transmission can be extremely useful in ensuring that transmitted traffic flow packets will be received by packet flow collector 16 without overloading input buffers or other resources of packet flow collector 16.
In the embodiment of
Network analyzer 14 receives inbound packets via inbound ports of IFCs 24, generates flow information 29 based on the received packets, and outputs traffic flow packets that include the flow information via outbound ports of IFCs 24. More specifically, upon receiving an inbound packet, control unit 26 retrieves and reads one or more blocks of data, referred to as the “key,” that defines the packet flow associated with the packet. The key may, for example, typically comprises the header of the packet, and may contain a variety of information including, for example, the source and destination address for the packet, MPLS labels, VPN labels, Class of Service (CoS) information, and the like. Control unit forwards the key to traffic flow module 28, which computes and maintains traffic flow information 29 for defined packet flows.
Traffic flow module 28 generates the traffic flow information 29 based on the received packets. In particular, using the keys, traffic flow module 28 associates the received packets with respective packet flows, and updates statistics for the packets flows. For example, traffic flow module 28 may maintain one or more of the following for each defined packet flow: an accurate packet count, a byte count, the source IP address, the destination IP address, the next hop IP address, input interface information, output interface information, total octets sent, flow start time, flow end time, source and destination port numbers, TCP flags, IP type of service, originating AS, source address prefix mask bits, destination address prefix mask bits, or the like. The particular packet flows being monitored may be defined by the source and/or destination network address associated with the packets. Additionally, other routing information within the packets may be used to define the packet flows for which flow statistics are maintained, such as MPLS labels, VPN labels, Class of Service (CoS) information, and the like. In general, statistics for particular packet flows can be maintained to a level of granularity desired for effective traffic analysis. Tree-like data structures may be used, as outlined in greater detail below, to define varying levels of packet flow granularity.
Traffic flow module 28 further generates traffic flow packets based on traffic flow information that is accumulated over time. In particular, after a given period of time (which may be fixed or dynamic), traffic flow module 28 generates a traffic flow packets for packet flows being monitored. The traffic flow packets are output to control unit 26, which forwards the traffic flow packets to a particular destination address via an outgoing port of IFCs 24. The destination may correspond to packet flow collector 16, where an administrator can examine packet flows for the entire network 6 (
Control unit 26 and other components of network analyzer 14 may operate according to executable instructions fetched from a computer-readable medium. Examples of such media include random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), electrically erasable programmable read-only memory (EEPROM), flash memory, and the like. The functions of network analyzer 14 may be implemented by executing the instructions of the computer-readable medium with one or more processors, discrete hardware circuitry, firmware, software executing on a programmable processor, or a combination of any of the above.
Routing engine 36 is primarily responsible for maintaining routing information 38 to reflect the current network topology. In order to maintain an accurate representation of the network, router 30 may support a number of protocols for exchanging routing information with other routers. For example, router 30 may support the Border Gateway Protocol (BGP), for exchanging routing information with routers of other autonomous systems. Similarly, router 30 may support the Intermediate System to Intermediate System (IS—IS) protocol, which is an interior gateway routing protocol for communicating link-state information within an autonomous system. Other examples of interior routing protocols include the Open Shortest Path First (OSPF), and the Routing Information Protocol (RIP).
Routing engine 36 directs packet-forwarding engine 35 to maintain forwarding information 37 in accordance with routing information 38 stored in routing engine 36. Forwarding information 37 stored in forwarding engine 35 is based on routing information 38 stored in routing engine 36. In particular, forwarding engine 35 associates packet information, e.g., the key of each packet, with specific forwarding next hops (FNH). A FNH generally refers to a neighboring router physically coupled to a source router along a given route. For example, the FNH for a route may specify a physical interface and media access control (MAC) address for the interface associated with the next router along the FNH.
Each of packet-forwarding engine 35 and routing engine 36 may comprise one or more dedicated processors, hardware, software, firmware, and the like, and may be communicatively coupled by a data communication channel. For example, a data communication channel such as a high-speed network connection, bus, shared-memory or other data communication mechanism may be implemented to facilitate communication between packet forwarding engine 35 and routing engine 36. In another embodiment, each of packet-forwarding engine 35 and routing engine 36 may be implemented in software. In yet another embodiment, packet-forwarding engine 35 can be implemented in hardware, with routing engine 36 being software-implemented.
In any case, router 30 controls the flow of packets in order to integrate routing, and network analysis functionality. For example, packet-forwarding engine 35 may extract the keys from received packets, and forward the keys to routing engine 36. Routing engine 36 can then send the keys to traffic flow module 28 in order to facilitate traffic flow analysis and traffic flow packet generation consistent with the principles of the invention as described herein. Alternatively, packet forwarding engine 35 may send the keys directly to traffic flow module 28, or routing engine 36 may extract the keys from received packets and forward the keys to traffic flow module 28. Routing engine 36 may be implemented in software, with traffic flow module 28 also being implemented as a software module. In some cases, traffic flow module 28 may be viewed as an integrated part of routing engine 36, e.g., a software process or contained hardware unit, rather than a separate module as illustrated. Alternatively, traffic flow module 28 may comprise one or more microprocessors, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), combinations thereof, and the like.
In still other embodiments, the functionality of traffic flow module 28, outlined in greater detail below, may be incorporated into a service card that can be removably inserted into router 30 in a similar manner to the insertion of IFCs 34. In that case, the traffic flow service card could receive the keys directly from forwarding engine 35, generate flow information based on the received packets as defined by the keys, and output traffic flow packets that include the flow information to forwarding engine 35. Alternatively, traffic flow module 28 may be integrated as part of forwarding engine 35 to calculate traffic flow information. In any case, forwarding engine 35 forwards the traffic flow packets to the appropriate outbound port of the appropriate IFCs 34.
Whether implemented as software, hardware or a removable traffic flow service card, traffic flow module 28 can be configured to output traffic flow packets in a rate-controlled fashion. In this manner, the transmission of traffic flow packets from network analyzers 14 to packet flow collector 16 can be made more robust, avoiding overflow at the input of packet flow collector 16 which could otherwise result in data loss at packet flow collector 16.
In accordance with the principles of the invention, traffic flow module 28 receives keys that correspond to received packets, and updates flow information associated with the received packets. In order to improve traffic flow analysis and facilitate rate-controlled transmission of traffic flow packets, traffic flow module 28 includes a plurality of data structures 42. In particular, as illustrated, traffic flow module 28 may include at least two data structures 42A and 42B, although additional data structures could also be used in accordance with the principles described herein. Alternatively, a single data structure could be partitioned into two or more portions that are assigned duties as outlined herein. Traffic flow information 29 of
Controller 44 assigns duties to data structures 42 on a dynamic basis. If traffic flow module 28 is implemented in software, the assignment and reassignment of the duties of data structures may occur via controller 44 adjusting pointers to the respective data structures 42. In any case, controller 44 can select one data structure as an accumulation data structure, and the other as an export data structure for a first period of time. Controller 44 may then reverse the assignments, in that the one of data structures 42 previously used for accumulation is subsequently used for export, and the other one of data structures 42 previously used for export is subsequently used for accumulation. In this manner, one of data structures 42 may always be available for real-time accumulation of packet flow information. Moreover, export of data from the export data structure, e.g., output of traffic flow packets that include the information in the export data structure can be performed more slowly, avoiding output of large batches of traffic flow packets. Such rate-controlled output can help ensure that batch transmissions of traffic flow packets by one or more network analyzers 14 will not overflow input buffers of packet flow collector 16.
Aggregator 46 includes input buffers for temporarily storing keys associated with received packets. In addition, aggregator 46 may include a set of counters for generating flow statistics based on the keys. Aggregator 46 receives the keys that correspond to received packets, and parses the keys. Aggregator 46 updates traffic flow statistics associated with the keys within the data structure 42 currently assigned for aggregation. In other words, aggregator 46 examines the keys, identifies one or more packet flows associated with the received packets, and updates one or more counters to reflect accurate flow statistics of the packet flows. Consequently, generated flow statistics are stored in data structures 42. During the time when data structure 42A is used for aggregation, data structure 42B can be used for export, and vice versa. In particular, export from one of the data structures 42 can take place in a rate-controlled manner over the course of time during which the other of data structures 42 is used for aggregation.
As one example, a particular network destination may be represented within a packet key by a high level routing prefix, such as 11.0.0.1/8. Such a high level routing prefix may define a packet flow for which flow statistics are generated and accumulated. If desired, upon detecting significant traffic volumes, controller 44 may instruct aggregator 46 to further examine the key to identify more specific prefixes, such as 11.150.14.1/32, 11.0.0.1/32, and the like. Also, controller 44 may identify prefixes having relatively low levels of traffic, and may selectively remove the prefixes having relatively low levels of traffic from a set of prefixes being monitored.
Each of data structures 42 may be arranged as a tree-like data structure in which flow statistics are maintained at varying levels of granularity. The desired level of granularity may be defined by input received from packet flow collector 16 (
The granularity of the flow statistics maintained by traffic flow module 28 may directly correlate with the granularity of defined routing prefixes. In other words, a routing prefix may be specified within a range of granularity that controls the association of packet flows with that prefix. Aggregator 46 receives the keys from each packet, and compares the routing information in the keys with defined prefixes being monitored to associate the packet with one of the prefixes.
For example, a specification of a prefix as 11/8 directs aggregator 46 to associate with the prefix all packets in which the first eight (8) bits of the key equals eleven (11). In this manner, a large number of packet flows can be aggregated and accurately counted. As another example, a prefix of 11.0.0.1/32 directs aggregator 46 to associate with the prefix all packets in which the first thirty-two (32) bits of the key equals 11.0.0.1. The prefixes may be further defined to capture very specific packet flows. For example, in one embodiment, traffic flow module 28 supports specification of a routing prefix so as to include a destination address, a source address, a communication protocol, a source port, and a destination port. Consequently, traffic flow module 28 generates flow statistics for a set of routing prefixes that represent the topology of network 6. This or other information that may be included in the keys may be used to define packet flows to varying levels of granularity.
Data structures 42 are used to store aggregated flow statistics, and then the aggregated statistics are packaged by exporter 47 into traffic flow packets and transmitted to packet flow collector 16 (
When controller 44 switches a given data structure 42 from an aggregation data structure to an export data structure, it also identifies an export time period during which export of the information in the given data structure can occur. Accordingly, exporter 47 can generate and export traffic flow packets using the traffic flow information in the given data structure in a rate-controlled fashion. Consequently, the output of large batches of traffic flow packets can be avoided, which can in turn avoid overflow at packet flow collector 16 and thereby avoid data loss.
Exporter 47 uses the information in one of data structures 42 currently assigned as the export data structure to create traffic flow packets. In particular, for packet flows defined in data structures 42, exporter 47 may generate traffic flow packets that include the flow statistics for the respective packet flows. The destination address and routing information associated with the generated packets may define packet flow collector 16 as the destination. Upon generating the traffic flow packets, exporter 47 can output the packets for transmission over network 6.
In accordance with the principles of the invention, exporter 47 incorporates a rate-control technique to limit the output of traffic flow packets. In particular, controller 44 may identify an amount of time during which export can occur, and exporter 47 may process the one of data structures 42 currently assigned as the export data structure to generate and output traffic flow packets in a rate-controlled manner over the defined course of time. As one example, if controller 44 identifies a one minute time frame during which export can occur, exporter 47 may identify a number of packets (N) to be exported from the one of data structures 42 assigned as an export data structure, and may output approximately N/60 traffic flow packets each second. In other words, exporter 47 can implement a desired export rate based on a number of packets to be output and an amount of time allocated for the output. By way of example, exporter 47 may identify or estimate the number of packets (N) to be exported by identifying the number of nodes defined in the data structure, or an overall amount of data stored.
Exporter 47 may generate and output traffic flow packets continuously over the allotted export time frame, or in small bursts, e.g., if N packets are to be transmitted in one minute, then approximately N/12 packets may be output every five seconds. In any case, using a rate-controlled technique can avoid large batches of traffic flow packet transmissions, which could otherwise overload packet flow collector 16. In one embodiment, the format of traffic flow packets comply with the user datagram protocol (UDP protocol), although other protocols could be also used.
Data structures 42 may comprise tables, data-trees, databases, flat files, linked lists or the like. As one example, data structures 42 comprise tree-like data structures having a set of nodes that correspond to the packet flows being monitored.
As illustrated in
The aggregation and exportation using distinct data structures may facilitate rate-controlled output of traffic flow packets, which as outlined above, can avoid data loss at packet flow collector 16. In particular, exportation (83 and 86) may involve the generation and output of a subset of traffic flow packets corresponding to a subset of nodes in the respective data structure. Exportation can occur over a defined period of time in small bursts of subsets of the of traffic flow packets corresponding to a subset of nodes in the respective data structure so that a large number of traffic flow packets are not output at once. Alternatively traffic flow packets may be output continuously, albeit in a non-bursty fashion, approximately over the full course of time allotted for exportation. In any case, the output rate of traffic flow packets may be based on a number of traffic flow packets to be output and the amount of time allotted for exportation. Moreover, the amount of time allotted for exportation may correlate approximately to the amount of time allotted for aggregation, e.g., in the other data structure.
In some cases, if little or no traffic occurs, the reassignment of the duties of data structures 42 may be skipped for one or more reassignment cycles. In other words, if the data in data structure 42A has been exported, but little or no data was accumulated in data structure 42B, e.g., due to network inactivity, then the reassignment of duties may be purposely avoided for a more extended period of time. Additionally, the time between the reassignment of the duties of data structures 42 may be adjusted for different traffic scenarios, and may even be dynamically defined by controller 44 based on factors such as the level network traffic. In any case, the initial accumulation time may be fixed for any given interval so that a desired export rate can be defined for that export interval. In other words, the export rate can be based on the initial accumulation time and the number of packets to be output.
Various embodiments of the invention have been described. Nevertheless modifications may be made to the techniques and implementations described herein without departing from the sprit and scope of the invention. For example, traffic flow module 28 may incorporate a direct link to packet flow collector 16. In that case, traffic flow packets could be sent directly from traffic flow module 28 to packet flow collector 16 in the rate-controlled manner, without going out on network 6 via outbound communication links 21B. In addition, traffic flow module 28 may be incorporated into a service card that is removably insertable into a chassis of a network analyzer. Also, the same principles may be applied when a single data structure is used, with accumulation and exportation being assigned and reassigned to different portions of the data structure. In that case, the separate portions of the single data structure can be viewed as first and second data structures as described herein. These and other embodiments are within the scope of the following claims.
Number | Name | Date | Kind |
---|---|---|---|
3962681 | Requa et al. | Jun 1976 | A |
4032899 | Jenny et al. | Jun 1977 | A |
4600319 | Everett, Jr. | Jul 1986 | A |
5408539 | Finlay et al. | Apr 1995 | A |
6011795 | Varghese et al. | Jan 2000 | A |
6018765 | Durana et al. | Jan 2000 | A |
6499088 | Wexler et al. | Dec 2002 | B1 |
6751663 | Farrell et al. | Jun 2004 | B1 |
20020141343 | Bays | Oct 2002 | A1 |
20030120769 | McCollom et al. | Jun 2003 | A1 |
20030214913 | Kan et al. | Nov 2003 | A1 |