Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 422
  • Last Modified:

problem with tcpdump

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
sunilvirus
Asked:
sunilvirus
  • 4
  • 3
  • 3
  • +3
1 Solution
 
jlevieCommented:
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
 
ifinchamCommented:
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
 
ahoffmannCommented:
listening ..
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
dorwardCommented:
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
 
sunilvirusAuthor Commented:
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
 
jlevieCommented:
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
 
sunilvirusAuthor Commented:
'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
 
ahoffmannCommented:
> .. 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
 
sunilvirusAuthor Commented:
yeah I used it the same way u posted it.
sorry, i will test it
0
 
sunilvirusAuthor Commented:
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
 
jlevieCommented:
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
 
ahoffmannCommented:
.. and please print the result of:
grep host /etc/nsswitch.conf
0
 
CleanupPingCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 3
  • 3
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now