6.1

Table Of Contents
VMware, Inc. 53
Chapter 8 Troubleshooting ADM
Examples
CreateansnmpwalkdumpforIP1.2.3.4andsavetheresultsintofilesnmpdump.1.2.3.4.txt:
./snmpdump.sh 1.2.3.4 snmpdump.1.2.3.4.txt
nlcapture
Youcanusethenlcaptureutilityinplaceoftcpdumptocapturenetworkactivity.Thisutilitysupportsthe
samedefaultparametersastcpdump,butsetsthesnaplentobelargeenoughsoastonottruncatepackets.
Inaddition,thisutilityprovidesaparameternotsupportedbytcpdump:‐R,whichfilters
packetsbasedon
theirprotocol(forexample,HTTP)orbasedonprotocolspecificattributes.
Similartotcpdump,youcanusenlcapturetofilteranexistingcapturefileandtransformittoanew,filtered
file.Seeusagebelow.
Location
/home/nlayers/Seneca/tools/nlcapture.pl
Usage
Runningnlcaptureonthecommandlineyields:
nlcapture.pl
tcpdump options
[-R
ethereal display filter string
]
Forexample:
Tolistenoneth1andcaptureallHTTPandICMPpacketsintothefilebla.dump:
nlcapture.pl -i eth1 -R "http||icmp" -w myoutput.dump
Asexplainedearlier, nlcapturesupportsallcommontcpdumpparameterssuchas‐i.Additionally,it
supportsthe-Rparametertofilteronthenetworkprotocoloraccordingtothevalueofspecificprotocolfields.
Protocolnamesarewritteninlowercase.ThefollowingURLprovidesdetailsonthefiltersthatyoucanuse:
http://www.ethereal.com/docs/manpages/etherealfilter.4.html
Thefiltersofnlcaptureutilityaredifferentfromthetcpdumpfilters.Theyareeasiertouseandunderstand.