📄 ethereal.html
字号:
Content-type: text/html
<HTML><HEAD><TITLE>Manpage of ETHEREAL</TITLE>
</HEAD><BODY>
<H1>ETHEREAL</H1>
Section: The Ethereal Network Analyzer
(1)<BR>Updated: 0.8.16<BR><A HREF="#index">Index</A>
<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
<H2>NAME</H2>
Ethereal - Interactively browse network traffic
<A NAME="lbAC"> </A>
<H2>SYNOPSYS</H2>
<A NAME="ixAAC"></A>
<B>ethereal</B>
[ <B>-B</B> byte view height ]
[ <B>-c</B> count ]
[ <B>-f</B> capture filter expression ]
[ <B>-h</B> ]
[ <B>-i</B> interface ]
[ <B>-k</B> ]
[ <B>-m</B> font ]
[ <B>-n</B> ]
[ <B>-o</B> preference setting ] ...
[ <B>-p</B> ]
[ <B>-P</B> packet list height ]
[ <B>-Q</B> ]
[ <B>-r</B> infile ]
[ <B>-R</B> display filter expression ]
[ <B>-S</B> ]
[ <B>-s</B> snaplen ]
[ <B>-T</B> tree view height ]
[ <B>-t</B> time stamp format ]
[ <B>-v</B> ]
[ <B>-w</B> savefile]
<A NAME="lbAD"> </A>
<H2>DESCRIPTION</H2>
<A NAME="ixAAD"></A>
<B>Ethereal</B> is a <FONT SIZE="-1">GUI</FONT> network protocol analyzer. It lets you
interactively browse packet data from a live network or from a
previously saved capture file. <B>Ethereal</B> knows how to read <B>libpcap</B>
capture files, including those of <B>tcpdump</B>. In addition, <B>Ethereal</B>
can read capture files from <B>snoop</B> (including <B>Shomiti</B>) and
<B>atmsnoop</B>, <B>LanAlyzer</B>, <B>Sniffer</B> (compressed or uncompressed),
Microsoft <B>Network Monitor</B>, <FONT SIZE="-1">AIX</FONT>'s <B>iptrace</B>, <B>NetXray</B>, <B>Sniffer
Pro</B>, <B></B><FONT SIZE="-1"><B>RADCOM</B></FONT><B></B>'s <FONT SIZE="-1">WAN/LAN</FONT> analyzer, <B>Lucent/Ascend</B> router debug
output, <FONT SIZE="-1">HP-UX</FONT>'s <B>nettl</B>, the dump output from <B>Toshiba's</B> <FONT SIZE="-1">ISDN</FONT>
routers, the output from <B>i4btrace</B> from the <FONT SIZE="-1">ISDN4BSD</FONT> project, the
output in <B>IPLog</B> format from the Cisco Secure Intrusion Detection System,
and <B>pppd logs</B> (pppdump format).
There is no need to tell <B>Ethereal</B> what type of file you are reading;
it will determine the file type by itself. <B>Ethereal</B> is also capable
of reading any of these file formats if they are compressed using gzip.
<B>Ethereal</B> recognizes this directly from the file; the '.gz' extension
is not required for this purpose.
<P>
Like other protocol analyzers, <B>Ethereal</B>'s main window shows 3 views
of a packet. It shows a summary line, briefly describing what the
packet is. A protocol tree is shown, allowing you to drill down to
exact protocol or field that you interested in. Finally, a hex dump
shows you exactly what the packet looks like when it goes over the wire.
<P>
In addition, <B>Ethereal</B> has some features that make it unique. It can
assemble all the packets in a <FONT SIZE="-1">TCP</FONT> conversation and show you the <FONT SIZE="-1">ASCII</FONT>
(or <FONT SIZE="-1">EBCDIC</FONT>, or hex) data in that conversation. Display filters in
<B>Ethereal</B> are very powerful; more fields are filterable in <B>Ethereal</B>
than in other protocol analyzers, and the syntax you can use to create
your filters is richer. As <B>Ethereal</B> progresses, expect more and more
protocol fields to be allowed in display filters.
<P>
Packet capturing is performed with the pcap library. The capture filter
syntax follows the rules of the pcap library. This syntax is different
from the display filter syntax.
<P>
Compressed file support uses (and therefore requires) the zlib library.
If the zlib library is not present, <B>Ethereal</B> will compile, but will
be unable to read compressed files.
<A NAME="lbAE"> </A>
<H2>OPTIONS</H2>
<A NAME="ixAAE"></A>
<BR>
<DL COMPACT>
<DT>-B<DD>
<A NAME="ixAAF"></A>
Sets the initial height of the byte view (bottom) pane.
<BR>
<DT>-c<DD>
<A NAME="ixAAG"></A>
Sets the default number of packets to read when capturing live
data.
<BR>
<DT>-f<DD>
<A NAME="ixAAH"></A>
Sets the capture filter expression.
<BR>
<DT>-h<DD>
<A NAME="ixAAI"></A>
Prints the version and options and exits.
<BR>
<DT>-i<DD>
<A NAME="ixAAJ"></A>
Sets the name of the network interface or pipe to use for live packet capture.
Network interface names should match one of the names listed in "<B>netstat -i</B>``
or ''<B>ifconfig -a</B>".
Pipe names should be either the name of a <FONT SIZE="-1">FIFO</FONT> (named pipe) or ``-'' to read
data from the standard input. Data read from pipes must be in libpcap format.
<BR>
<DT>-k<DD>
<A NAME="ixAAK"></A>
Starts the capture session immediately. If the <B>-i</B> flag was
specified, the capture uses the specified interface. Otherwise,
<B>Ethereal</B> searches the list of interfaces, choosing the first
non-loopback interface if there are any non-loopback interfaces, and
choosing the first loopback interface if there are no non-loopback
interfaces; if there are no interfaces, <B>Ethereal</B> reports an error and
doesn't start the capture.
<BR>
<DT>-m<DD>
<A NAME="ixAAL"></A>
Sets the name of the font used by <B>Ethereal</B> for most text.
<B>Ethereal</B> will construct the name of the bold font used for the data
in the byte view pane that corresponds to the field selected in the
protocol tree pane from the name of the main text font.
<BR>
<DT>-n<DD>
<A NAME="ixAAM"></A>
Disables network object name resolution (such as hostname, <FONT SIZE="-1">TCP</FONT> and <FONT SIZE="-1">UDP</FONT> port
names).
<BR>
<DT>-o<DD>
<A NAME="ixAAN"></A>
Sets a preference value, overriding the default value and any value read
from a preference file. The argument to the flag is a string of the
form <I>prefname</I><B>:</B><I>value</I>, where <I>prefname</I> is the name of the
preference (which is the same name that would appear in the preference
file), and <I>value</I> is the value to which it should be set.
<BR>
<DT>-p<DD>
<A NAME="ixAAO"></A>
<I>Don't</I> put the interface into promiscuous mode. Note that the
interface might be in promiscuous mode for some other reason; hence,
<B>-p</B> cannot be used to ensure that the only traffic that is captured is
traffic sent to or from the machine on which <B>Ethereal</B> is running,
broadcast traffic, and multicast traffic to addresses received by that
machine.
<BR>
<DT>-P<DD>
<A NAME="ixAAP"></A>
Sets the initial height of the packet list (top) pane.
<BR>
<DT>-Q<DD>
<A NAME="ixAAQ"></A>
Causes <B>Ethereal</B> to exit after the end of capture session (useful in
batch mode with <B>-c</B> option for instance); this option requires the
<B>-i</B> and <B>-w</B> parameters.
<BR>
<DT>-r<DD>
<A NAME="ixAAR"></A>
Reads packet data from <I>file</I>.
<BR>
<DT>-R<DD>
<A NAME="ixAAS"></A>
When reading a capture file specified with the <B>-r</B> flag, causes the
specified filter (which uses the syntax of display filters, rather than
that of capture filters) to be applied to all packets read from the
capture file; packets not matching the filter are discarded.
<BR>
<DT>-S<DD>
<A NAME="ixAAT"></A>
Specifies that the live packet capture will be performed in a separate
process, and that the packet display will automatically be updated as
packets are seen.
<BR>
<DT>-s<DD>
<A NAME="ixAAU"></A>
Sets the default snapshot length to use when capturing live data.
No more than <I>snaplen</I> bytes of each network packet will be read into
memory, or saved to disk.
<BR>
<DT>-T<DD>
<A NAME="ixAAV"></A>
Sets the initial height of the tree view (middle) pane.
<BR>
<DT>-t<DD>
<A NAME="ixAAW"></A>
Sets the format of the packet timestamp displayed in the packet list
window. The format can be one of 'r' (relative), 'a' (absolute), 'ad'
(absolute with date), or 'd' (delta). The relative time is the time
elapsed between the first packet and the current packet. The absolute
time is the actual time the packet was captured, with no date displayed;
the absolute date and time is the actual time and date the packet was
captured. The delta time is the time since the previous packet was
captured. The default is relative.
<BR>
<DT>-v<DD>
<A NAME="ixAAX"></A>
Prints the version and exits.
<BR>
<DT>-w<DD>
<A NAME="ixAAY"></A>
Sets the default capture file name.
</DL>
<A NAME="lbAF"> </A>
<H2>INTERFACE</H2>
<A NAME="ixAAZ"></A>
<A NAME="lbAG"> </A>
<H2><FONT SIZE="-1">MENU</FONT> <FONT SIZE="-1">ITEMS</FONT></H2>
<A NAME="ixABA"></A>
<BR>
<DL COMPACT>
<DT>File:Open, File:Close, File:Reload<DD>
<A NAME="ixABB"></A>
Open, close, or reload a capture file. The <I>File:Open</I> dialog box
allows a filter to be specified; when the capture file is read, the
filter is applied to all packets read from the file, and packets not
matching the filter are discarded.
<BR>
<DT>File:Save, File:Save As<DD>
<A NAME="ixABC"></A>
Save the current capture, or the packets currently displayed from that
capture, to a file. Check boxes let you select whether to save all
packets, or just those that have passed the current display filter and/or
those that are currently marked, and an option menu lets you select (from
a list of file formats in which at particular capture, or the packets
currently displayed from that capture, can be saved), a file format in
which to save it.
<BR>
<DT>File:Print<DD>
<A NAME="ixABD"></A>
Prints, for all the packets in the current capture, either the summary
line for the packet or the protocol tree view of the packet; when
printing the protocol tree view, the hex dump of the packet can be
printed as well. Printing options can be set with the
<I>Edit:Preferences</I> menu item, or in the dialog box popped up by this
item.
<BR>
<DT>File:Print Packet<DD>
<A NAME="ixABE"></A>
Print a fully-expanded protocol tree view of the currently-selected
packet. Printing options can be set with the <I>Edit:Preferences</I> menu
item.
<BR>
<DT>File:Quit<DD>
<A NAME="ixABF"></A>
Exits the application.
<BR>
<DT>Edit:Find Frame<DD>
<A NAME="ixABG"></A>
Allows you to search forward or backward, starting with the currently
selected packet (or the most recently selected packet, if no packet is
selected), for a packet matching a given display filter.
<BR>
<DT>Edit:Go To Frame
<DD>
<A NAME="ixABH"></A>
Allows you to go to a particular numbered packet.
<BR>
<DT>Edit:Mark Frame<DD>
<A NAME="ixABI"></A>
Allows you to mark (or unmark if currently marked) the selected packet.
<BR>
<DT>Edit:Mark All Frames<DD>
<A NAME="ixABJ"></A>
Allows you to mark all packets that are currently displayed.
<BR>
<DT>Edit:Unmark All Frames<DD>
<A NAME="ixABK"></A>
Allows you to unmark all packets that are currently displayed.
<BR>
<DT>Edit:Preferences<DD>
<A NAME="ixABL"></A>
Sets the packet printing, column display, <FONT SIZE="-1">TCP</FONT> stream coloring, and <FONT SIZE="-1">GUI</FONT>
options (see the section on "Preferences" below).
<BR>
<DT>Edit:Capture Filters<DD>
<A NAME="ixABM"></A>
Edits the saved list of capture filters, allowing filters to be added,
changed, or deleted.
<BR>
<DT>Edit:Display Filters<DD>
<A NAME="ixABN"></A>
Edits the saved list of display filters, allowing filters to be added,
changed, or deleted.
<BR>
<DT>Edit:Protocols<DD>
<A NAME="ixABO"></A>
Edits the list of protocols, allowing protocol dissection to be
enabled or disabled.
<BR>
<DT>Capture:Start<DD>
<A NAME="ixABP"></A>
Initiates a live packet capture (see the section on "Capture Preferences" below). A
temporary file will be created to hold the capture. The location of the
file can be chosen by setting your <FONT SIZE="-1">TMPDIR</FONT> environment variable before
starting <B>Ethereal</B>. Otherwise, the default <FONT SIZE="-1">TMPDIR</FONT> location is
system-dependent, but is likely either <I>/var/tmp</I> or <I>/tmp</I>.
<BR>
<DT>Capture:Stop<DD>
<A NAME="ixABQ"></A>
In a capture that updates the packet display as packets arrive (so that
Ethereal responds to user input other than pressing the ``Stop'' button in
the capture packet statistics dialog box), stops the capture.
<BR>
<DT>Display:Options<DD>
<A NAME="ixABR"></A>
Allows you to sets the format of the packet timestamp displayed in the
packet list window to relative, absolute, absolute date and time, or
delta, to enable or disable the automatic scrolling of the packet list
while a live capture is in progress or to enable or disable translation
of addresses to names in the display.
<BR>
<DT>Display:Match Selected<DD>
<A NAME="ixABS"></A>
Creates and applies a display filter based on the data that is currently
highlighted in the protocol tree. If that data is a field that can be
tested in a display filter expression, the display filter will test that
field; otherwise, the display filter will be based on absolute offset
within the packet, and so could be unreliable if the packet contains
protocols with variable-length headers, such as a source-routed
token-ring packet.
<BR>
<DT>Display:Colorize Display<DD>
<A NAME="ixABT"></A>
Allows you to change the foreground and background colors of the packet
information in the list of packets, based upon display filters. The list
of display filters is applied to each packet sequentially. After the first
display filter matches a packet, any additional display filters in the list
are ignored. Therefore, if you are filtering on the existence of protocols,
you should list the higher-level protocols first, and the lower-level
protocols last.
<BR>
<DT>Display:Collapse All<DD>
<A NAME="ixABU"></A>
Collapses the protocol tree branches.
<BR>
<DT>Display:Expand All<DD>
<A NAME="ixABV"></A>
Expands all branches of the protocol tree.
<BR>
<DT>Display:Expand All<DD>
<A NAME="ixABW"></A>
Expands all branches of the protocol tree.
<BR>
<DT>Display:Show Packet In New Window
<DD>
<A NAME="ixABX"></A>
Creates a new window containing a protocol tree view and a hex dump
window of the currently selected packet; this window will continue to
display that packet's protocol tree and data even if another packet is
selected.
<BR>
<DT>Display:User Specified Decodes<DD>
<A NAME="ixABY"></A>
Creates a new window showing whether any protocol <FONT SIZE="-1">ID</FONT> to dissector
mappings have been changed by the user. This window also allows the
user to reset all decodes to their default values.
<BR>
<DT>Tools:Plugins<DD>
<A NAME="ixABZ"></A>
Allows you to see what dynamically loadable dissector plugin modules
have been loaded (see <I>``Plugins''</I> below).
<BR>
<DT>Tools:Follow <FONT SIZE="-1">TCP</FONT> Stream<DD>
<A NAME="ixACA"></A>
If you have a <FONT SIZE="-1">TCP</FONT> packet selected, it will display the contents of the
data stream for the <FONT SIZE="-1">TCP</FONT> connection to which that packet belongs, as
text, in a separate window, and will leave the list of packets in a
filtered state, with only those packets that are part of that <FONT SIZE="-1">TCP</FONT>
connection being displayed. You can revert to your old view by pressing
<FONT SIZE="-1">ENTER</FONT> in the display filter text box, thereby invoking your old display
filter (or resetting it back to no display filter).
<P>
The window in which the data stream is displayed lets you select whether
to display:
<DL COMPACT><DT><DD>
<BR>
<DL COMPACT>
<DT><DD>
whether to display the entire conversation, or one or the other side of
it;
<BR>
<DT><DD>
whether the data being displayed is to be treated as <FONT SIZE="-1">ASCII</FONT> or <FONT SIZE="-1">EBCDIC</FONT>
text or as raw hex data;
</DL>
</DL>
<DL COMPACT><DT><DD>
</DL>
<BR>
<DT><DD>
and lets you print what's currently being displayed, using the same
print options that are used for the <I>File:Print Packet</I> menu item, or
save it as text to a file.
<BR>
<DT>Tools:Decode As<DD>
<A NAME="ixACB"></A>
If you have a packet selected, this menu item will present a dialog
allowing you to change which dissectors are used to decode this
packet. The dialog has one panel each for the link layer, network
layer and transport layer protocol/port numbers, and will allow each
of these to be changed independently. For example, if the selected
packet is a <FONT SIZE="-1">TCP</FONT> packet to port 12345, using this dialog you can
instruct Ethereal to decode all packets to or from that <FONT SIZE="-1">TCP</FONT> port as
<FONT SIZE="-1">HTTP</FONT> packets.
</DL>
<A NAME="lbAH"> </A>
<H2><FONT SIZE="-1">WINDOWS</FONT></H2>
<A NAME="ixACC"></A>
<BR>
<DL COMPACT>
<DT>Main Window<DD>
<A NAME="ixACD"></A>
The main window is split into three panes. You can resize each pane using
a ``thumb'' at the right end of each divider line. Below the panes is a
strip that shows the current filter and informational text.
<DL COMPACT><DT><DD>
<BR>
<DL COMPACT>
<DT>Top Pane<DD>
<A NAME="ixACE"></A>
The top pane contains the list of network packets that you can scroll
through and select. By default, the packet number, packet timestamp,
source and destination addresses, protocol, and description are
displayed for each packet; the <I>Columns</I> page in the dialog box popped
up by <I>Edit:Preferences</I> lets you change this (although, unfortunately,
you currently have to save the preferences, and exit and restart
Ethereal, for those changes to take effect).
<P>
If you click on the heading for a column, the display will be sorted by
that column; clicking on the heading again will reverse the sort order
for that column.
<P>
An effort is made to display information as high up the protocol stack
as possible, e.g. <FONT SIZE="-1">IP</FONT> addresses are displayed for <FONT SIZE="-1">IP</FONT> packets, but the
<FONT SIZE="-1">MAC</FONT> layer address is displayed for unknown packet types.
<P>
The right mouse button can be used to pop up a menu of operations.
<P>
The middle mouse button can be used to mark a packet.
<BR>
<DT>Middle Pane<DD>
<A NAME="ixACF"></A>
The middle pane contains a <I>protocol tree</I> for the currently-selected
packet. The tree displays each field and its value in each protocol
header in the stack. The right mouse button can be used to pop up a
menu of operations.
<BR>
<DT>Bottom Pane<DD>
<A NAME="ixACG"></A>
The lowest pane contains a hex dump of the actual packet data.
Selecting a field in the <I>protocol tree</I> highlights the corresponding
bytes in this section.
<P>
The right mouse button can be used to pop up a menu of operations.
<BR>
<DT>Current Filter<DD>
<A NAME="ixACH"></A>
A display filter can be entered into the strip at the bottom.
A filter for <FONT SIZE="-1">HTTP</FONT>, <FONT SIZE="-1">HTTPS</FONT>, and <FONT SIZE="-1">DNS</FONT> traffic might look like this:
<P>
<PRE>
tcp.port == 80 || tcp.port == 443 || tcp.port == 53
</PRE>
Selecting the <I>Filter:</I> button lets you choose from a list of named
filters that you can optionally save. Pressing the Return or Enter
keys will cause the filter to be applied to the current list of packets.
Selecting the <I>Reset</I> button clears the display filter so that all
packets are displayed.
</DL>
</DL>
<DL COMPACT><DT><DD>
</DL>
<BR>
<DT>Preferences<DD>
<A NAME="ixACI"></A>
The <I>Preferences</I> dialog lets you control various personal preferences
for the behavior of <B>Ethereal</B>.
<DL COMPACT><DT><DD>
<BR>
<DL COMPACT>
<DT>Printing Preferences<DD>
<A NAME="ixACJ"></A>
The radio buttons at the top of the <I>Printing</I> page allow you choose
between printing packets with the <I>File:Print Packet</I> menu item as text
or PostScript, and sending the output directly to a command or saving it
to a file. The <I>Command:</I> text entry box is the command to send files
to (usually <B>lpr</B>), and the <I>File:</I> entry box lets you enter the name
of the file you wish to save to. Additionally, you can select the
<I>File:</I> button to browse the file system for a particular save file.
<BR>
<DT>Column Preferences<DD>
<A NAME="ixACK"></A>
The <I>Columns</I> page lets you specify the number, title, and format
of each column in the packet list.
<P>
The <I>Column title</I> entry is used to specify the title of the column
displayed at the top of the packet list. The type of data that the column
displays can be specified using the <I>Column format</I> option menu.
The row of buttons on the left perform the following actions:
<DL COMPACT><DT><DD>
<BR>
<DL COMPACT>
<DT>New<DD>
<A NAME="ixACL"></A>
Adds a new column to the list.
<BR>
<DT>Change<DD>
<A NAME="ixACM"></A>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -