The OSU Flow-tools Package and CISCO NetFlow Logs
نویسندگان
چکیده
Many Cisco routers and switches support NetFlow services which provides a detailed source of data about network traffic. The Office of Information Technology Enterprise Networking Services group (OIT/ENS) at The Ohio State University (OSU) has written a suite of tools called flow-tools to record, filter, print and analyze flow logs derived from exports of NetFlow accounting records. We use the flow logs for general network planning, performance monitoring, usage based billing, and many security related tasks including incident response and intrusion detection. This paper describes what the flow logs contain, the tools we have written to store and process these logs, and discusses how we have used the logs and the tools to perform network management and security functions at OSU. We also discuss some related projects and our future plans at the end of the paper. NetFlow Accounting Records We should start with a more complete description of what the flows are. Quoting from Cisco: A network flow is defined as a unidirectional sequence of packets between given source and destination endpoints. Network flows are highly granular; flow endpoints are identified both by IP address as well as by transport layer application port numbers. NetFlow also utilizes the IP Protocol type, Type of Service (ToS) and the input interface identifier to uniquely identify flows [3]. tc4>show ip cache 131.187.253.67 255.255.255.255 flow SrcIf SrcIPaddress DstIf DstIPaddress Pr SrcP DstP Pkts AT2/0.31 128.146.222.233 AT3/0.1 131.187.253.67 06 03FA 0016 4 AT3/0.1 131.187.253.67 AT2/0.31 128.146.222.233 06 0016 03FA 8 Figure 1: Active flows as seen on a Cisco router. A NetFlow record is created when traffic is first seen by a Cisco router or switch that is configured for NetFlow services. Flows are identified uniquely by characteristics of the traffic that they represent, including the source and destination Internet Protocol (IP) address, IP type, source and destination Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) ports, type of service and a few other items. NetFlow records end and are sent to the logging host on at least the following conditions: • For flows representing TCP traffic, when the connection is done (after a RST or FIN is seen) • When no traffic for the flow has been seen in 15 seconds. • 30 minutes after the start of the flow. This causes long lasting traffic patterns to show up sooner than they might otherwise in the log. • When the flow table fills. Each NetFlow record contains data about the packets that are represented in that flow in addition to the unique identifiers listed above. These data include the start and end times for the flow, the number of packets and octets in the flow, the source and destination Autonomous System (AS) numbers, the input and output interface numbers for the device where the NetFlow record was created, the source and destination net masks and, for flows of TCP traffic, a logical ‘or’ of all of the TCP header flags seen (except for the ACK flag). In the case of Internet Control Message Protocol (ICMP) traffic, the ICMP type and subtype are recorded in the destination port field of the NetFlow records. For example, suppose that a SSH connection is established from a client on host 128.146.222.233 port 1234 to a server on host 131.187.253.67 port 22, and that the traffic passes through a Cisco device that has NetFlow processing enabled. We will simplify things and identify our flows here by a tuple containing the IP Protocol type, source IP address, source TCP/UDP port, destination IP and destination TCP/UDP port. The initial packet from the client to the server causes the router to create a flow entry for {TCP, 128.146.222.233, 1234, 131.187.253.67, 23}. The response from the server to the client causes the router to create a related flow {TCP, 131.187.253.67, 23, 128.146.222.233, 1234}. Data from subsequent traffic will be aggregated in these two flow records until one of the ending conditions listed above is seen, such as 2000 LISA XIV – December 3-8, 2000 – New Orleans, LA 291 The OSU Flow-tools Package and Cisco NetFlow Logs Fullmer & Romig when the TCP session ends, or because there has been no traffic for 15 seconds. Active flows can be viewed in the router command line interface with the command show ip cache flow. This allows you to view flows that exist on the router whose NetFlow records have not been exported yet (Figure 1). In the simplest case for a TCP session there will be a single flow representing the traffic from the client to the server, and a single flow representing traffic from the server to the client. The TCP flags field for both flows would typically have both the SYN and FIN bits set, indicating that packets with those flags had been seen traveling in both directions. This is not typical, however. Traffic for a single TCP connection is frequently represented by multiple flow records, due to timeouts from lulls in the conversation, the flow table filling up, or the 30 minute flow maximum lifetime. This means that one often has to string multiple flow records together to get all of the data corresponding to an entire TCP session. In these cases, the TCP flags field can be used to determine whether a flow represents data from the start, middle or end of the TCP session. Flows from the start of a session will have the SYN (but not FIN or RST) bit set, flows from the middle of the session will typically have no flag bits set, and flows from the end of the session will have the FIN or RST bits set (but not SYN). Flows for UDP and ICMP traffic behave similarly, although it is important to note that since neither of these are connection oriented protocols flows of UDP and ICMP traffic are just collections of similar packets.
منابع مشابه
An IDS Using NetFlow Data
IN an effort to monitor network traffic, Columbia University uses various tools. Internal core switches (which we call edges) and external uplinks are polled via SNMP to detect fluctuations in bytes and packets sent and received. NetFlow data is exported from the Cisco (and soon Juniper) routers that serve as uplinks to our commodity Internet provider and Internet2. This NetFlow data is exporte...
متن کاملSFM3: A Service-based Flow Traffic Measurement Management Model for IP Networks
It is a great challenge to analyze all the data obtained from the variety of measurement tools existing today. This task is even more complicated when we need to extract useful information for managing networks belonging to different domains due to systems and equipment heterogeneity. This is also true with traffic flow measurement data. Although much effort has been placed in its standardizati...
متن کاملNetwork Log Anonymization: Application of Crypto-PAn to Cisco Netflows
Logs are one of the most fundamental resources to any security professional. It is widely recognized by the government and private industry that it is both beneficial and desirable to share logs for the purpose of security research and network measurements. Rapid growth of the Internet and its applications, especially financial and security related services, require a secure and efficient way t...
متن کاملCANINE: A Combined Conversion and Anonymization Tool for Processing NetFlows for Security
Those creating NetFlow tools struggle with two problems: (1) NetFlows come in many different, incompatible formats, and (2) the sensitivity of NetFlow logs can hinder the sharing of these logs and thus make it difficult for developers—particularly student research assistants—to get real data to use. Our solution is a new tool we created that converts and anonymizes NetFlow logs. In this paper w...
متن کاملnProbe: an Open Source NetFlow Probe for Gigabit Networks
Cisco NetFlow is an industry standard protocol suitable for monitoring network traffic. Although most of high-end network routers support NetFlow, very often flows are computed only on a small portion of the overall traffic due to performance limitation of NetFlow probe implementations. This paper covers the design and implementation of an open source software NetFlow probe designed for handlin...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2000