/usr/share/doc/iptraf/html/itrafmon.html is in iptraf 3.0.0-8.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML
><HEAD
><TITLE
>The IP Traffic Monitor</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.64
"><LINK
REL="HOME"
TITLE="IPTraf User's Manual"
HREF="manual.html"><LINK
REL="PREVIOUS"
TITLE="Supported Network Interfaces"
HREF="ifaces.html"><LINK
REL="NEXT"
TITLE="Lower Window"
HREF="lowerwin.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>IPTraf User's Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="ifaces.html"
><<< Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="lowerwin.html"
>Next >>></A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="ITRAFMON"
>The IP Traffic Monitor</A
></H1
><P
> Executing the first menu item or specifying <TT
CLASS="COMPUTEROUTPUT"
>-i</TT
>
to the <B
CLASS="COMMAND"
>iptraf</B
> command takes you to the IP traffic monitor. The traffic
monitor is a real-time monitoring system that intercepts all packets
on all detected network interfaces, decodes the IP information on all IP packets and
displays the appropriate information, most notably the
source and destination addresses. It also
determines the encapsulated protocol within the IP packet, and
displays some important information about that as well.</P
><P
> There are two windows in the traffic monitor, both of which can be
scrolled with the Up and Down cursor keys. Just press W to
move the <TT
CLASS="COMPUTEROUTPUT"
>Active</TT
> indicator to the window you
want to control.</P
><DIV
CLASS="FIGURE"
><A
NAME="AEN566"
></A
><P
><IMG
SRC="iptraf-iptm1.png"></P
><P
><B
>Figure 1. The IP traffic monitor</B
></P
></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="UPPERWIN"
>The Upper Window</A
></H1
><P
> The upper window of the traffic monitor displays the currently
detected TCP
connections. Information about TCP packets are displayed here. The
window contains these pieces of information:</P
><P
></P
><UL
COMPACT="COMPACT"
><LI
><P
>Source address and port</P
></LI
><LI
><P
>Packet count</P
></LI
><LI
><P
>Byte count</P
></LI
><LI
><P
>Source MAC address</P
></LI
><LI
><P
>Packet Size</P
></LI
><LI
><P
>Window Size</P
></LI
><LI
><P
>TCP flag statuses</P
></LI
><LI
><P
>Interface</P
></LI
></UL
><DIV
CLASS="NOTE"
><P
></P
><TABLE
CLASS="NOTE"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="./stylesheet-images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>Note</B
></TH
></TR
><TR
><TD
> </TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
> Previous versions of IPTraf showed
both the source and destination addresses on each line. IPTraf 2 and
higher show
only the <TT
CLASS="COMPUTEROUTPUT"
><TT
CLASS="REPLACEABLE"
><I
>source
host</I
></TT
>:<TT
CLASS="REPLACEABLE"
><I
>port</I
></TT
></TT
> combination to save
on screen real estate. TCP
connection endpoints are still indicated with the green
brackets (on color terminals) along the left edge of the screen.</P
></TD
></TR
></TABLE
></DIV
><P
> The Up and Down cursor keys move an indicator bar between entries in the
TCP monitor, scrolling the window if necessary. The PgUp and PgDn keys
display the previous and next screenfuls of entries respectively.</P
><P
> The IP traffic monitor computes the data flow rate
of the currently highlighted TCP flow and displays it on the lower-right
corner of the screen. The flow rate is in kilobits or kilobytes per
second depending on the <I
CLASS="EMPHASIS"
>Activity mode</I
> switch
in the <I
CLASS="EMPHASIS"
><A
HREF="config.html"
>Configure...</A
></I
> menu.</P
><P
> Because this monitoring system relies solely on packet information, it
does not determine which endpoint initiated the connection. In other
words, it does not know which endpoints are the client and server.
This is necessary because it can operate in promiscuous
mode, and as such cannot determine the socket statuses for other
machines on the LAN. However, a little knowledge of the well-known TCP
port numbers can give a good idea about which address is that of the server.</P
><P
> The system therefore displays two entries for each connection, one for
each direction of the TCP connection. To make it easier to determine the
direction pairs of each connection, a bracket is used to "join" both
together. This bracket appears at the leftmost part of each entry.</P
><P
> Just because a host entry appears at the upper end of a
connection bracket doesn't mean it was the initiator of the connection.</P
><P
> Each entry in the window contains these fields:</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><I
CLASS="EMPHASIS"
>Source address and port</I
></DT
><DD
><P
> The source address and port indicator is
in <TT
CLASS="REPLACEABLE"
><I
>address</I
></TT
>:<TT
CLASS="REPLACEABLE"
><I
>port</I
></TT
> format.
This indicates the source machine and TCP port on that machine
from which this data is coming.</P
><P
> The destination is the host:port at the other end of the bracket.</P
></DD
><DT
><I
CLASS="EMPHASIS"
>Packet count</I
></DT
><DD
><P
> The number of packets received for this direction of the TCP connection</P
></DD
><DT
><I
CLASS="EMPHASIS"
>Byte count</I
></DT
><DD
><P
> The number of bytes received for this direction
of the TCP connection. These bytes include total IP and TCP header
information, in addition to the actual data. Data link
header (e.g. Ethernet and FDDI) data are not included.</P
></DD
><DT
><I
CLASS="EMPHASIS"
>Source MAC address</I
></DT
><DD
><P
> The address of the host on your local LAN that delivered this packet.
This can be viewed by pressing M once if <I
CLASS="EMPHASIS"
>Source MAC
addrs</I
> in traffic
monitor is enabled in the <I
CLASS="EMPHASIS"
><A
HREF="config.html"
>Configure...</A
></I
> menu.</P
></DD
><DT
><I
CLASS="EMPHASIS"
>Packet Size</I
></DT
><DD
><P
> The size of the most recently received packet. This item
is visible if you press M for more TCP information. This is the size
of the IP datagram only, not including the data link header.</P
></DD
><DT
><I
CLASS="EMPHASIS"
>Window Size</I
></DT
><DD
><P
> The advertised window size of the most recently received packet. This
item is visible if you press M for more TCP information.</P
></DD
><DT
><I
CLASS="EMPHASIS"
>Flag statuses</I
></DT
><DD
><P
> The flags of the most recently received packet.
<P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><TT
CLASS="COMPUTEROUTPUT"
>S</TT
></DT
><DD
><P
> SYN. A synchronization is taking place in preparation for
connection establishment. If only an <TT
CLASS="COMPUTEROUTPUT"
>S</TT
>
is present (<TT
CLASS="COMPUTEROUTPUT"
>S---</TT
>) the source is trying
to initiate a connection. If an <TT
CLASS="COMPUTEROUTPUT"
>A</TT
> is
also present (<TT
CLASS="COMPUTEROUTPUT"
>S-A-</TT
>), this is an
acknowledgment of a previous connection request, and is responding.</P
></DD
><DT
><TT
CLASS="COMPUTEROUTPUT"
>A</TT
></DT
><DD
><P
> ACK. This is an acknowledgment of a previously received packet</P
></DD
><DT
><TT
CLASS="COMPUTEROUTPUT"
>P</TT
></DT
><DD
><P
> PSH. A request to push all data to the top of the receiving queue</P
></DD
><DT
><TT
CLASS="COMPUTEROUTPUT"
>U</TT
></DT
><DD
><P
> URG. This packet contains urgent data</P
></DD
><DT
><TT
CLASS="COMPUTEROUTPUT"
>RESET</TT
></DT
><DD
><P
> RST. The source machine indicated in this direction reset the entire connection. The direction entries for reset connections become available for new connections.</P
></DD
><DT
><TT
CLASS="COMPUTEROUTPUT"
>DONE</TT
></DT
><DD
><P
> The connection is done sending data in this direction, and has sent a FIN (finished) packet, but has not yet been acknowledged by the other host.</P
></DD
><DT
><TT
CLASS="COMPUTEROUTPUT"
>CLOSED</TT
></DT
><DD
><P
> The FIN has been acknowledged by the other host. When both directions of a connection are marked CLOSED, the entries they occupy become available for new connection entries.</P
></DD
><DT
><TT
CLASS="COMPUTEROUTPUT"
>-</TT
></DT
><DD
><P
> The flag is not set</P
></DD
></DL
></DIV
></P
></DD
></DL
></DIV
><P
> Some other pieces of information can be viewed as well. The M key
displays more TCP information. Pressing M once
displays the MAC addresses of the LAN hosts
that delivered the packets (if the <I
CLASS="EMPHASIS"
>Source MAC addrs in traffic
monitor</I
>
option is enabled in the <I
CLASS="EMPHASIS"
><A
HREF="config.html"
>Configure...</A
></I
>
menu). <TT
CLASS="COMPUTEROUTPUT"
>N/A</TT
> is displayed if
no packets have been received from the source yet, or if the interface
doesn't support MAC addresses (such as PPP interfaces).</P
><P
> If the <I
CLASS="EMPHASIS"
>Source MAC addrs in traffic monitor</I
> option is not enabled,
pressing M simply toggles between the counts and the packet and window
sizes.</P
><P
> By default, only IP addresses are displayed, but if you have access to a
name server or host table, you may enable reverse lookup for the
IP addresses. Just enable reverse lookup
in the <I
CLASS="EMPHASIS"
><A
HREF="config.html"
>Configure...</A
></I
> menu.</P
><TABLE
CLASS="SIDEBAR"
BORDER="1"
CELLPADDING="5"
><TR
><TD
><DIV
CLASS="SIDEBAR"
><A
NAME="AEN701"
></A
><P
><B
>The rvnamed Process</B
></P
><P
> The IP traffic monitor starts a daemon called
<B
CLASS="COMMAND"
>rvnamed</B
> to help speed
up reverse lookups without sacrificing too much keyboard control and
accuracy of the counts. While reverse lookup is being conducted in the
background, IP addresses will be used until the resolution is complete.</P
><P
> If for some reason <B
CLASS="COMMAND"
>rvnamed</B
> cannot start (probably due to
improper installation or lack of memory), and you are
on the Internet, and you enable reverse lookup, your
keyboard control can become very slow. This is because the standard
lookup functions do not return until they have completed their
tasks, and it can take several seconds for a name resolution
in the foreground to complete.</P
><P
> <B
CLASS="COMMAND"
>rvnamed</B
> will spawn up to 200 children to process reverse DNS queries.</P
></DIV
></TD
></TR
></TABLE
><DIV
CLASS="TIP"
><P
></P
><TABLE
CLASS="TIP"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="./stylesheet-images/tip.gif"
HSPACE="5"
ALT="Tip"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>Tip</B
></TH
></TR
><TR
><TD
> </TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>If you notice unusual SYN activity (too many
initial (<TT
CLASS="COMPUTEROUTPUT"
>S---</TT
>) but frozen SYN entries, or rapidly
increasing initial SYN packets for a single connection), you may
be under a SYN flooding attack or TCP port scan. Apply appropriate measures, or the
targeted machines may begin denying network services.</P
></TD
></TR
></TABLE
></DIV
><P
> Entries not updated within a user-configurable amount of
time may get replaced with new connections. The default time is 15
minutes. This is regardless of whether the connection is closed or
not. (Some unclosed connections may be due to extremely slow links
or crashes at either end of the connection.) This figure can be changed
at the <I
CLASS="EMPHASIS"
><A
HREF="config.html"
>Configure...</A
></I
> menu.</P
><P
> Some early entries may have a > symbol in front of its packet
count. This means the connection was already established
when the monitor started. In other words, the figures indicated do not
reflect the counts since the start
of the TCP connection, but rather, since the start of the traffic
monitor. Eventually, these > entries will close (or time out) and
disappear. TCP entries without the >
were initiated after the traffic monitor started, and the counts
indicate the totals of the connection itself. Just consider entries
with > partial.</P
><P
> Some > entries may go idle if the traffic monitor was started
when these connections were already half-closed (FIN sent
by one host, but data still being sent by the other). This
is because the traffic monitor cannot determine if a
connection was already half-closed when it started. These entries will
eventually time out. (To minimize these entries, an entry is not added
by the monitor until a packet with data or a SYN packet is received.)</P
><P
> Direction entries also become available for reuse if an ICMP Destination
Unreachable message is received for the connection.</P
><P
> The lower part of the screen contains a summary line showing the IP,
TCP, UDP, ICMP, and non-IP byte counts since the start of the
monitor. The IP, TCP, UDP, and ICMP counts include only the IP
datagram header and data, not the data-link headers. The
non-IP count includes the data-link headers.</P
><DIV
CLASS="NOTE"
><P
></P
><TABLE
CLASS="NOTE"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="./stylesheet-images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>Technical note: IP Forwarding and Masquerading</B
></TH
></TR
><TR
><TD
> </TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
> Previous versions of IPTraf issued a warning if the kernel had
IP masquerading enabled due to the way the
kernel masqueraded and translated the IP addresses. The new kernels no
longer do it as before and IPTraf now gives output properly on
masquerading machines. The <TT
CLASS="COMPUTEROUTPUT"
>-q</TT
> parameter is no
longer required to suppress the warning screen.</P
><P
> On forwarding (non-masquerading)
machines packets and TCP connections simply appear twice, one
each for the incoming and outgoing interfaces if all interafaces
are being monitored.</P
><P
> On masquerading machines, packets and connections from the
internal network to the external network also appear
twice, one for the internal and external interface. Packets coming
from the internal network will be indicated as coming from the internal
IP address that sourced them, and also as coming from the IP address
of the external interface on your masquerading machine. In much the same
way, packets coming in from the external network will look
like they're destined for the external interface's IP address, and again
as destined for the final host on the internal network.</P
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN726"
>Closed/Idle/Timed Out Connections</A
></H2
><P
> A TCP connection entry that closes, gets reset, or stays idle too long
normally gets replaced with new connections. However,
if there are too many of these, active connections may become
interspersed among closed, reset, or idle entries.</P
><P
> IPTraf can be set to automatically remove all closed, reset, and
idle entries with the <I
CLASS="EMPHASIS"
>TCP closed/idle
persistence...</I
> configuration option. You can also press the F key to
immediately clear them at any time.</P
><DIV
CLASS="NOTE"
><P
></P
><TABLE
CLASS="NOTE"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="./stylesheet-images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>Note</B
></TH
></TR
><TR
><TD
> </TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>The <I
CLASS="EMPHASIS"
>TCP timeout...</I
> option only tells
IPTraf how long it should take before a connection should be considered
idle and open to replacement by new connections. This
does not determine how long it remains on-screen. The <I
CLASS="EMPHASIS"
>TCP closed/idle
persistence...</I
> parameter flushes entries that have been idle for the
number of minutes defined by the <I
CLASS="EMPHASIS"
>TCP timeout...</I
> option.</P
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN737"
>Sorting TCP Entries</A
></H2
><P
> The TCP connection entries can be sorted by pressing the S key, then
by selecting a sort criterion. Pressing S will display a box showing the
available sort criteria. Press P to sort by packet count, B to sort by
byte count. Pressing any other key cancels the sort.</P
><P
> The sort operation compares the larger values in each connection entry
pair and sorts the counts in descending order.</P
><P
> Over time, the entries will go out of order as counts proceed at varying
rates. Sorting is not done automatically so as not to degrade performance
and accuracy.</P
><DIV
CLASS="FIGURE"
><A
NAME="AEN742"
></A
><P
><IMG
SRC="iptraf-iptmsort.png"></P
><P
><B
>Figure 2. The IP traffic monitor sort criteria</B
></P
></DIV
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="ifaces.html"
><<< Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="manual.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="lowerwin.html"
>Next >>></A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Supported Network Interfaces</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
> </TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Lower Window</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>
|