* tcpdump in promisc mode?
@ 1996-12-06 5:00 Craig Paul
1996-12-06 5:00 ` Bob Harris
1996-12-10 5:00 ` Eric Werme
0 siblings, 2 replies; 3+ messages in thread
From: Craig Paul @ 1996-12-06 5:00 UTC (permalink / raw)
How does one get tcpdump into promisuous mode and also sniffing icmp
and other IP packets not destined for it but on the same wire?
If involves more than
MAKEDEV pfilt
pfconfig ln0 promisc
ifconfig -i ln0 promisc (or something like that)
tcpdump ....
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: tcpdump in promisc mode?
1996-12-06 5:00 tcpdump in promisc mode? Craig Paul
@ 1996-12-06 5:00 ` Bob Harris
1996-12-10 5:00 ` Eric Werme
1 sibling, 0 replies; 3+ messages in thread
From: Bob Harris @ 1996-12-06 5:00 UTC (permalink / raw)
In article <1996Dec6.091744@kuhub.cc.ukans.edu>, paul@kuhub.cc.ukans.edu
(Craig Paul) wrote:
>How does one get tcpdump into promisuous mode and also sniffing icmp
>and other IP packets not destined for it but on the same wire?
>
>If involves more than
>
>MAKEDEV pfilt
>pfconfig ln0 promisc
>ifconfig -i ln0 promisc (or something like that)
>tcpdump ....
First you need to have the PACKETFILTER configured into your kernel
/usr/sys/conf/<HOSTNAME>
...
options PACKETFILTER
...
doconfig -c <HOSTNAME>
copy new kernel to /vmunix (or some other name if you prefer)
reboot the system specifying the kernel with the PACKETFILTER code
With a kernel booted that has the PACKETFILTER, I use the following to
start up tcpdumps
pfconfig +p +c tu0
tcpdump -w /tmp/tcpdump.raw host xxx and yyy
Personally, I tend to limit my filtering to just host selection and capture
everything into a raw file. I then do my analysis later. And to date I
have only been concerned with NFS and related protocols.
--
Bob Harris
"I don't get to tell me what to do, I only get to tell me how to do it."
Comments expressed here are my own and _NOT_ those of my employer.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: tcpdump in promisc mode?
1996-12-06 5:00 tcpdump in promisc mode? Craig Paul
1996-12-06 5:00 ` Bob Harris
@ 1996-12-10 5:00 ` Eric Werme
1 sibling, 0 replies; 3+ messages in thread
From: Eric Werme @ 1996-12-10 5:00 UTC (permalink / raw)
paul@kuhub.cc.ukans.edu (Craig Paul) writes:
>How does one get tcpdump into promisuous mode and also sniffing icmp
>and other IP packets not destined for it but on the same wire?
These instructions are in the Digital UNIX FAQ:
People who deal with me about NFS issues are used to being snarled at when
they don't bring tcpdump traces showing the problem. However, I always
feel bad when I kick them out of my office since I don't have a cogent
description of how to get them. Therefore, I humbly offer this summary
so I can ease my conscience when I toss you out. :-)
[Well, maybe that paragraph isn't in the FAQ....]
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 <FILE>) or by:
# doconfig
*** KERNEL CONFIGURATION AND BUILD PROCEDURE ***
Enter a name for the kernel configuration file. [ALINGO]: 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 pfilt5 pfilt6 ... 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:
# tcpdump -s300 -c100 -Nt udp port 2049 [to look at all NFS traffic]
# tcpdump -s300 -c100 -Nt host foo [to look at all to/from 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 <> This space under reconstruction <>
<> <werme@zk3.dec.com> <> <>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1996-12-10 5:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-12-06 5:00 tcpdump in promisc mode? Craig Paul
1996-12-06 5:00 ` Bob Harris
1996-12-10 5:00 ` Eric Werme
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox