From: nospam@zk3.dec.com (Eric Werme - replace nospam with werme)
Subject: Re: Snooping
Date: 1999/06/25 [thread overview]
Message-ID: <7kunnj$n5q$1@nntpd.lkg.dec.com> (raw)
In-Reply-To: 376EE819.499B7C46@vsl.com.au
Simon Smith <simons@vsl.com.au> writes:
>I'm relatively new to the Digital Unix world...
>Is there any equivalent command to "snoop" (Solaris) in the Digital OS?
From the Tru64 UNIX FAQ
(http://www.unix.digital.com/demos/freekit/faqs/network.html#N7, sorry,
I don't see one in .au):
Tru64 UNIX (formerly DIGITAL UNIX) Frequently Asked
Questions (FAQ)
N7. How do I configure the Berkeley Packet Filter and capture
tcpdump traces?
1.Installing packet filter support tcpdump relies on a kernel option that
ordinarily isn't enabled. You can fix this either by adding "options
PACKETFILTER" to the system's configuration file and rebuilding (via
doconfig -c ) or by:
# doconfig
*** KERNEL CONFIGURATION AND BUILD PROCEDURE ***
Enter a name for the kernel configuration file.
[SYS]: FILTER
You want to name the configuration file 'FILTER'
Is that correct? (y/n) [y]: y
*** KERNEL OPTION SELECTION ***
Selection Kernel Option
----------------------------------------------------
1 System V Devices
2 Logical Volume Manager (LVM)
3 Kernel Breakpoint Debugger (KDEBUG)
4 Packetfilter driver (PACKETFILTER)
5 STREAMS pckt module (PCKT)
6 Data Link Bridge
(DLPI V2.0 Service Class 1)
7 X/Open Transport Interface
(XTISO, TIMOD, TIRDWR)
8 File on File File System (FFM)
9 ISO 9660 Compact Disc File System (CDFS)
10 Audit Subsystem
11 Local Area Transport Support
12 All of the above
13 None of the above
----------------------------------------------------
Enter the selection number for each kernel option
you want.
For example, 1 3 : 4
You selected the following kernel options:
Packetfilter driver (PACKETFILTER)
Is that correct? (y/n) [y]:
...
Rebuild and boot the new kernel.
2.Create the packetfilter devices:
# cd /dev
# ./MAKEDEV pfilt
MAKEDEV: special file(s) for pfilt:
pfilt0 pfilt1 pfilt2 pfilt3 pfilt4 ... pfilt63
3.Get a better tcpdump (pre V4.0 systems only) Email me for a
compressed, uuencoded file of a tcpdump that decodes NFS V3 and
several other Sun RPC protocols (MOUNT, NIS, NLM, PORTMAP,
and STATMON).
4.Enable local copy promiscuous mode
# pfconfig +p +c ln0 (or tu0 or whatever)
5.Run tcpdump. Please read the man pages before doing serious
monitoring! To look at some NFS traffic, try:
# echo "show all NFS traffic"
# tcpdump -s300 -c100 -Nt udp port 2049
# echo "show all traffic to and from foo"
# tcpdump -s300 -c100 -Nt host foo
-s300 "snaps" up the first 300 bytes of each message, generally enough
to get lower level headers, RPC, and enough NFS protocol to make sense
of the requests. -c100 says to capture 100 messages and exit. -N says to
suppress the domain name (e.g. .zk3.dec.com) in hostnames. -t says to
suppress printing timestamps. The result is usually still too long for a 80
column screen, I keep a wide xterm lying around for most of my
tcpdump monitoring. The -m option splits some messages over multiple
lines.
If you send people traces, I generally recommend that you capture data to a
binary file and send that. If the recipient needs to, he can run tcpdump with
extra filtering or -x (hex dump) to really dig into problems. Do something
like:
# tcpdump -w /usr/tmp/foo.dmp -s300 udp port 2049
tcpdump: listening on ln0
Using kernel BPF filter
^C
1040 packets
# compress foo.dmp
# uuencode foo.dmp.Z < foo.dmp.Z > foo.uu
Capturing to a file bypasses all the decoding code which can be very slow and
can generate its own IP traffic (e.g. resolving host names).
--
<> Eric (Ric) Werme <> The above is unlikely to contain <>
<> ROT-13 addresses: <> official claims or policies of <>
<> <jrezr@mx3.qrp.pbz> <> Compaq Computer Corp. <>
<> <jrezr@plorecbegny.arg> <> http://www.cyberportal.net/werme <>
prev parent reply other threads:[~1999-06-25 4:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-22 4:00 Snooping Simon Smith
1999-06-22 4:00 ` Snooping Jeff Denham
1999-06-23 4:00 ` Snooping Jeffrey Mogul
1999-06-22 4:00 ` Snooping Raghu CS
1999-06-24 4:00 ` Snooping arnaud valeix
1999-06-25 4:00 ` Eric Werme - replace nospam with werme [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox