Network Monitoring with Ethereal
We all hope that our networks simply do what they are supposed to do, but often that is not the case. Two systems that should talk to each other don't; a network becomes saturated with traffic for no apparent reason; you need to know what some non-Linux device is doing. In these and other networking situations, Ethereal may be the tool that saves the day.
A few years ago I set up a a wireless link for a project. It was relatively slow--a real data throughput of around 300Kbps--but it easily should have handled the system's traffic. It should have, but in reality, the network seemed saturated much of the time. On paper, everything was fine. The link capacity was significantly more than the traffic--but that was on paper.
The switch talking to the master radio did have a lot of blinking lights, but watching blinking lights to measure traffic is about as accurate as using your tongue as a battery tester. Starting up Ethereal, however, quickly identified the problem. A whole bunch of computers running some other operating system were sending broadcast packets over the network for such exciting events as a computer being turned on or the paper supply in a printer becoming low.
Once I had the problem identified, it was easy to correct. I simply moved the radio traffic to a subnet away from the chatty operating system, and performance was fine.
Ethereal's man page offers this synopsis of what the program does: "Interactively browse network traffic". My use of Ethereal described above occurred in real time, but Ethereal uses the same file format as tcpdump. Therefore, you can use Ethereal to analyze an old dump file. Besides this libpcap format, Ethereal can read many other dump formats, including those from capture tools used on other operating systems--even the chatty ones.
As with virtually all protocol analyzers, Ethereal shows you a summary line for a packet and a hex dump. It also gives you the ability to drill down through the protocol tree. In addition, you can define filters to select and display specifically the data you are interested in. In short, Ethereal offers quite a few command-line options. Unless you want to plant Ethereal in a script, though, it is easier to set it up interactively to do what you want.
A word of warning: if you are monitoring live traffic for a system other than the one Ethereal is running on, make sure you are connecting to it at a point where you can see the traffic. Ethereal sets your local Ethernet interface to promiscuous mode, which means it sees all the traffic. If, however, your system is connected to an Ethernet switch, only the traffic for your system appears and is analyzed. You may need to "splice in" to the place you want to monitor using a hub.
Besides basic monitoring, Ethereal offers a lot of analyzing options. In my example at the start of this article, I could have used a filter to pull out the expected traffic. For example, adding tcp.port != 80 to the filter window and clicking the Apply button would have excluded any port 80 (HTTP) traffic from the display.
The Colorize Display option is handy as well. Select Colorize Display from the Display menu, and Ethereal guides you through the setup. The steps are simple:
You name your new entry and enter an expression. For example, ip.addr == 64.12.24.5 would select any packets whose "from" or "to" IP address is equal to 64.12.24.5. Don't worry, you don't have to memorize all of these choices; the Add Expression button offers a list of all the options.
Select a background color for the new rule.
Select a foreground color for the new rule.
Click Apply.
Click Save if you want Ethereal to remember your rules.
That's all there is to it. If you are displaying in real time, you will see the packets appear in color immediately. If you don't like a rule, simply go back and edit it in the same menu.
Copyright (c) 2004, Dean Wilson. Originally published in Linux Gazette issue 98. Copyright (c) 2004, Specialized Systems Consultants, Inc.
Dean Wilson is a system administrator and occasional updater of his Web pages.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
- RSS Feeds
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- Dynamic DNS—an Object Lesson in Problem Solving
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Download the Free Red Hat White Paper "Using an Open Source Framework to Catch the Bad Guy"
- Tech Tip: Really Simple HTTP Server with Python
- myip
3 min 30 sec ago - Keeping track of IP address
1 hour 54 min ago - Roll your own dynamic dns
7 hours 7 min ago - Please correct the URL for Salt Stack's web site
10 hours 19 min ago - Android is Linux -- why no better inter-operation
12 hours 34 min ago - Connecting Android device to desktop Linux via USB
13 hours 3 min ago - Find new cell phone and tablet pc
14 hours 1 min ago - Epistle
15 hours 30 min ago - Automatically updating Guest Additions
16 hours 38 min ago - I like your topic on android
17 hours 25 min ago



Comments
how to see the traffic
there are two easy possibilities
- use a HUB (not a switch)
if the hub is dual-speed, ALL must work at the same speed
- use a switch with PORT MIRRORING.
you need a MANAGEABLE switch
most MANAGEABLE switch offer port mirroring (but check)
now, if the traffic is very high, you will miss some packets !
why ?
let suppose you work at 100Mbps full duplex
this means the appliance sends for nearly 100Mbps of data and
receives as much.
but then you have to send 100+100=200Mbps to the mirroring port
and that one only handles 100Mbps unless the mirroring port is
gigabit
happy sniffing
I have used datascopes and payware sniffers.
Ethereal offers close to the same services for a great price :-)
(some commercial product offer pass-through capturing interfaces)
German tutorial
On my homepage you can find a little ethereal tutorial in german.
Mirko
Love the metaphore
A great synopsis of Ethereal. But I just can't get over that metaphore; "...watching blinking lights to measure traffic is about as accurate as using your tongue as a battery tester."
Killer way of explaining it!
The switch talking to the
The switch talking to the master radio did have a lot of blinking lights, but watching blinking lights to measure traffic is about as accurate as using your tongue as a battery tester. Starting up Ethereal, however, quickly identified the problem.
Tip - how to examine HTTP headers from a dump
Recently I needed to capture and analyze HTTP headers, but was unable to discern from the ethereal man page how to do so. You have to click one of the packets you know is part of the transaction, then right-click and choose Follow TCP Stream.