Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-26-2004, 07:38 AM
|
#1
|
LQ Newbie
Registered: Sep 2004
Location: Manchester
Distribution: Linux Red Hat 9
Posts: 7
Rep:
|
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!!
|
|
|
11-26-2004, 07:53 AM
|
#2
|
LQ Newbie
Registered: Nov 2004
Location: Zagreb, Croatia
Distribution: Fedora Core 3 for 64bit processors
Posts: 7
Rep:
|
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, ...
|
|
|
11-26-2004, 07:59 AM
|
#3
|
LQ Newbie
Registered: Feb 2004
Posts: 29
Rep:
|
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 ;-)
|
|
|
11-26-2004, 09:35 AM
|
#4
|
Senior Member
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024
Rep:
|
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?
|
|
|
11-29-2004, 07:19 PM
|
#5
|
LQ Newbie
Registered: Sep 2004
Location: Manchester
Distribution: Linux Red Hat 9
Posts: 7
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 11:06 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|