| TechTip: Track and Analyze Network Traffic with ntop |
|
|
|
| Tips & Techniques - Networking | |
| Written by Max Hetrick | |
| Thursday, 13 September 2007 | |
|
Use ntop to display, graph, analyze, and sort all your network traffic statistics across all network protocols. There are many utilities available for Linux and Windows that perform various network traffic monitoring and sniffing, sometimes too many to choose from. Top tools picked from sectools.org— such as Wireshark (formally Ethereal) and tcpdump—offer excellent network protocol analysis. Last year, I offered a tip about BackTrack, an all-in-one bootable CD incorporating many of these tools for keeping tabs on your networks. While all of these tools are excellent, many don't offer the combination of ease of use, limited configurations, traffic usage statistics, and a simplified Web interface. Here's where the open-source project ntop comes into play.Fitting ntop into Networks
The ntop tool provides some risk analysis reporting by flagging hosts and traffic that could potentially be considered hostile. Duplicated MAC addresses, port zero traffic, network masking issues, and too much traffic on ports and hosts are a few of the problems networks face. This traffic is analyzed; flagged and categorized as no, medium, or high risk; and then associated with the offending host.
Platforms that are supported include UNIX (Linux, BSD, Solaris, and MacOSX) and all Windows versions, from Windows 95 to Vista. One of the best features of ntop is the lack of overhead required to run it. Generally, CPU and memory requirements are very nominal. Depending on the size of networks you want to monitor, CPU load can be less than 10 percent of the normal work load and should operate smoothly with 256MB of memory. Switched Networks vs. Non-switched Networks
Before you install ntop on a host machine, you must decide what host you are going to select as your monitoring station. You can only use this tool on a subnet basis, which means if you have multiple subnets within your organization, you will have to install an instance of ntop to monitor each subnet location. In a switched environment, ntop can monitor only the segment of that particular network that the host is connected to. Therefore, ntop isn't able to jump across router points. Installation
Source downloads and installation instructions can be found on ntop.org. You can find ntop packaged as an RPM for RHEL and CentOS at Dag Wieer's third-party repository. If you want a lot of the extra graphs and charts options, there are a couple of package requirements that I've found: GD graphics and Graphviz libraries. Graphviz, which can also be found in Dag's repository, has its own set of dependencies.
# yum install ntop graphviz
If many of the dependent packages are missing, yum will retrieve them from the appropriate locations and install them. ConfigurationConfiguration takes only a few minutes to complete, and then you can start using ntop. If you're not using the RPM installation on RHEL/CentOS, then substitute the appropriate commands. Turn on the service and allow ntop to run through its configuration process. You'll be prompted to enter an admin password to use with the Web interface.
# chkconfig ntop on
# /usr/bin/ntop Doing this will install all the necessary service files to their locations, and it will also start the service. You'll need to kill this session since you're going to be using it as a service. Hit Ctrl+C to end the process and then start the service using the appropriate command.
# service ntop start
# service ntop status ntop (pid 22848) is running... That completes configuration. Web Interface
By default, ntop runs on port 3000, which you can change if necessary. Also by default, ntop allows all users access to the Web interface, but it does not allow configuration changes to be made unless you authenticate with the password that you created in the setup portion of installation. You can change this behavior in the admin section within the Web interface. Bring up a Web browser and browse to your instance at http://hostname:3000.
Figure 1: You can find a local traffic report at IP -> Summary -> Distribution. (Click image to enlarge.) Add ntop to Your Network ArsenalThe options and information ntop provides are far more than I am able to demonstrate. Get an instance running and explore all of its features for yourself; I don't think you'll be disappointed. The nicest thing about ntop is the ease of implementing it into networks. It will quickly become a tool you can utilize to gain extremely detailed reporting about network usage and bandwidth. For the monitoring junkies, here's yet another tool to satisfy those watchdog addictions. |
|
|
Last Updated ( Tuesday, 27 November 2007 ) |
|
| Guest.Visitor |
TechTip: Track and Analyze Network Traffic with ntop
Dec 08 2007 12:20:00 My problem with tools that are designed to monitor a single type of technology do it in their own format and make it extremely difficult to get an integrated view of your system. Looking at what you network is doing in the absence of what you cpu, memory, etc are doing gives an incomplete picture. That's why I wrote collectl - <a href="http://collectl.sourceforge.net/">http://collectl.sourceforge.net/</a>. It lets you monitoring virtually everything both interactively and in rolling logs. <p>btw - did you know if you monitor network traffic once a system most linux systems will reporting incorrect values? That's because you need to monitor the traffic every 0.9765 seconds! Read more about it at the collectl web site if you're really interested in this very strange linux phenomenon. <p>-mark
|
#115370 |
| MC Press Web Site Staff |
TechTip: Track and Analyze Network Traffic with ntop
Dec 08 2007 12:20:00 This is a discussion about <B>TechTip: Track and Analyze Network Traffic with ntop</b>.<p align='center'><a href=http://www.mcpressonline.com/mc?1@232.1KNKfHX1eQT.17@.6b50a3c2>Click here for the article</a>.</p>
|
#115369 |





