Solved

problem with tcpdump

Posted on 2001-09-15
13
390 Views
Last Modified: 2010-03-18
when I run 'tcpdump'(a network packet capturing program) with no arguments it is running correctly.

but instead if i specify some arguments like say

#tcpdump host sunilsys

('sunilsys' is my host name)
it is terminating with a message 'Segmentation fault'

I am intermediate to linux networking.
so pls tell me any modifications in the configuration that I should make.

thanks in advance.
0
Comment
Question by:sunilvirus
  • 4
  • 3
  • 3
  • +3
13 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 50 total points
ID: 6485883
Well, that command should have worked. What version of Linux are you using?

Does 'tcpdump -n host sunilsys' and/or tcpdump -n host ip-of-sunilsys' fail the same way? What does 'hostname' return? What are the contents of /etc/hosts and what does 'ifconfig -a' return?
0
 
LVL 2

Expert Comment

by:ifincham
ID: 6486086
Hi,

tcpdump is pretty much standalone so it should just work. Maybe its simplest to just try a newer version for your distro - e.g. for redhat :

http://www.mirror.ac.uk/sites/ftp.redhat.com/pub/redhat/linux/beta/roswell/en/os/i386/RedHat/RPMS/tcpdump-3.6.2-7.i386.rpm

Otherwise --> http://www.tcpdump.org 

Rgds
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6486114
listening ..
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 17

Expert Comment

by:dorward
ID: 6489001
Head over to the tcp dump homepage http://www.tcpdump.org/

Grab the latest version in source code and compile it yourself. Generally speaking that will fix most programs with the binary segfaulting.
0
 

Author Comment

by:sunilvirus
ID: 6493752
sorry,I should be more clear

I am using mandrake linux 8.0.

'sunilsys' is name of the host on which the 'tcpdump' is running.
i.e I am running 'tcpdump' on my system(sunilsys) and givng the arguments as follows.

#tcpdump host sunilsys

(Purpose:I want all the packets to and from my system only)
will it crash in this situation.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 6494007
Mandrake 8.0 ought to have a decent copy of tcpdump and it may not be the problem. I'd really like to know what the aswers are to the questions I posed earlier as they may reveal what is happening.
0
 

Author Comment

by:sunilvirus
ID: 6501900
'tcpdump -n host sunilsys' is also crashing the same way.

but 'tcpdump -n host ip-of-sunilsys' is terminating with a message saying that "unknown host 'ip-of-sunilsys' "
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6502186
> .. terminating with a message saying that "unknown host 'ip-of-sunilsys'
Sounds that you have used the literal string ip-of-sunilsys instead of sunilsys' IP number (somthing like 10.1.1.1)
0
 

Author Comment

by:sunilvirus
ID: 6503601
yeah I used it the same way u posted it.
sorry, i will test it
0
 

Author Comment

by:sunilvirus
ID: 6509552
it is running well with the ip address of 'sunilsys'
thank you.
can you explain me the reason.
can you give me any other precautions when using it.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 6509901
Okay, so tcpdump seems to be at least partially working. Since it works when you specify the IP of the local box we need to figure out what occurs when you try to use the hostname.

What do you see if you execute the command 'hostname'? What happens if you attempt to execute 'host sunilsys'? How about 'nslookup sunilsys'? What does /etc/hosts contain?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6510741
.. and please print the result of:
grep host /etc/nsswitch.conf
0
 

Expert Comment

by:CleanupPing
ID: 9078673
sunilvirus:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question