LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-26-2004, 07:38 AM   #1
daveyroy
LQ Newbie
 
Registered: Sep 2004
Location: Manchester
Distribution: Linux Red Hat 9
Posts: 7

Rep: Reputation: 0
Network Analyser based on tcpdump


Can anyone help?

I'm in my final year of a Bsc Computer Systems degree. For my final year project I have to
design and implement a simple Linux network on 3 Pc's and then design and
implement a Network Analyser based on tcpdump.
I have successfully networked 3 Pcs using Linux Red Hat 9. The network is
private and I has no Internet access. The next phase of the project is (I
quote) 'to
design and implement a network analyser based on tcpdump' is the stage I'm
up too.
I don't understand how to utilise this tcpdump to get information. Is this a
facility built into Red Hat 9? Can you output tcpdump contents to a file?
then manipulate this to extract information I require?

From the information I've gathered so far from my supervisor and reading on
this subject, I think I have to somehow direct output from the tcpdump to
file then somehow using GAWK dissect and output info to screen i.e.. say
source and destination address, protocol used etc... Could you please help
me with any information to be able to do the above if this is along the
right tracks as I'm now struggling implement this final stage of my project.

Some more info if it helps at all?

I have to simulate traffic on my private network and capture what every it
is I have sent, for example using ftp to send a file from one host to
another. I need to provide means of capturing both UDP and TCP packets so I
will need to research which protocol uses what. But its understanding and
being able to work with tcpdump which is where I'm struggling. I read the
man pages but find them a bit vague.



Any information would be appreciated!!
 
Old 11-26-2004, 07:53 AM   #2
ferovac
LQ Newbie
 
Registered: Nov 2004
Location: Zagreb, Croatia
Distribution: Fedora Core 3 for 64bit processors
Posts: 7

Rep: Reputation: 0
write a program in c:
1. open a socket
2. bind the socket with the interface
3. manipulate sendto and recvfrom functions to catch all traffic
man pages: socket, bind, sendto, recvfrom, sockaddr, ...
 
Old 11-26-2004, 07:59 AM   #3
blubbfish
LQ Newbie
 
Registered: Feb 2004
Posts: 29

Rep: Reputation: 15
do you have to write something like tcpdump or can you use tcpdump to dump the traffic and just "analyze" the output ... Therefore itīs nothing but a little textfile parsing you can even build a little perl or shell script to do this (btw. i think there r several ressources in the net that just parse a tcpdump output ... Shouldnt be really hard if you can use the output from tcpdump ...
if this isnt possible you really have to do some C coding ;-)
 
Old 11-26-2004, 09:35 AM   #4
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
If you have an actual linux box up on a network somewhere, try out tcpdump and see what it actually does:
root@linuxbox ~# tcpdump eth0

That should help you decide what to do next for your project. Also, 'to design and implement a network analyser based on tcpdump' why not look at the source code for tcpdump?
 
Old 11-29-2004, 07:19 PM   #5
daveyroy
LQ Newbie
 
Registered: Sep 2004
Location: Manchester
Distribution: Linux Red Hat 9
Posts: 7

Original Poster
Rep: Reputation: 0
I just use tcpdump to dump the traffic and just "analyze" the output

This is where I'm struggling. I read the man pages (man tcpdump) but find them a bit vague.



yes I will need to output the info for end user in a friendly/easy to
understand format. I will look into this once I have understood how to use tcpdump.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Security Analyser Software gombwe Linux - Software 1 09-19-2005 08:05 AM
bandwidth analyser aquarianboy Linux - Software 0 02-07-2005 06:09 AM
ip based network from DHCP? bobbens Linux - Networking 12 11-09-2004 06:00 PM
xmms spectrum analyser question edM Slackware 0 03-25-2004 06:28 PM
OpenBSD - Log analyser mail *BSD 3 04-24-2002 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration