Solved

problem with tcpdump

Posted on 2001-09-15
13
386 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
Comment Utility
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
Comment Utility
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
Comment Utility
listening ..
0
 
LVL 17

Expert Comment

by:dorward
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:sunilvirus
Comment Utility
'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
Comment Utility
> .. 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
Comment Utility
yeah I used it the same way u posted it.
sorry, i will test it
0
 

Author Comment

by:sunilvirus
Comment Utility
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
Comment Utility
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
Comment Utility
.. and please print the result of:
grep host /etc/nsswitch.conf
0
 

Expert Comment

by:CleanupPing
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now