DOC PREVIEW
GT ECE 4110 - UDP Traffic Generator

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ECE4110 Fall Semester, 2010Lab 3 - UDP Traffic GeneratorAssigned: Sept 20, 2010 Due: Sept 27, 2010Group Number:Member Names:Lab Goals1. Finish a UDP sockets programs to transmit and receive UDP datagrams.2. Analyze UDP and TCP network traffic using the ethereal Linux network utility.3. Filter out specific information from ethereal using custom filters.1 Coding udpgen and udp sinkBefore you start this lab, make sure that you can access NAS (refer to ECE4110 Lab 1). After youare sure that NAS is mounted and ready for access, perform the following steps to copy and extractthe source code that you will need to understand, comment, and modify.cd /mnt/nas/Lab3cp lab3.tar˜/stevensbook/unpv12e/lab3.tarcd /stevens book/unpv12etar -xvf lab3.tarcd lab3lsNow, you will see a list of files. You will make modifications to a traffic generator program namedudpgen.c and to a receiver program named udp sink.c. Then, your job is to understand, comment,and complete these two pieces of software. To compile and link them, you will use the commandmake.1As a starting point, look in the source code of the provided udp gen.c and udp sink.c for speci-fications of exactly how the programs should perform (on the first lines of these files, there is adescription on how to execute them from the command line).You may find that some declared variables are not needed, so make sure that you fully understandthe data flow within the programs. Also add some code to print out the number of Mega-Bits perscond that were sent as well as received. This statistic should be written to the screen after the<Ctrl-C> key sequence is used to stop the program.Note: When writing your code for udpsink.c, the fifth and sixth arguments of the Recvfromfunction call should be set to NULL:Recvfrom(<something>,<something>,<something>,<something>,NULL,NULL);2 Getting data from udpgen and udp sinkAt this point your programs should finished and ready to perform data transmission. The scenarioto execute these programs is as follows:startx unless X Windows already startedOpen 2 terminals (right click the mouse; choose New Terminal)In one terminal type:./udpsink -D -p 5000In the other terminal type:./udpgen -D -p 5000 -a 57.35.6.xSubstitute your own IP address for the x in the IP address aboveTo stop the experiment, enter <Ctrl-C>in the udpgen window. This should cause the statisticsto be printed in both windows. After noting and recording the statistics, terminate the udp sinkwith <Ctrl-C>.Note that you might need to do a ps and kill all of your traffic generator processes before youcan run this again (use man to learn more about ps and kill Linux commands). Note that you mayhave to use ps -ef to see your processes.Using a packet size of 1,000 bytes per packet and a packet size variance of zero bytes, determinewhat the inter-arrival time value you should use to approximately generate 2, 4, and 6 Mega-bits persecond of traffic. Also determine what the maximum number of Mega-bits per sec you can receivewith your traffic generator by experimenting with the inter-arrival times. Fill in the following tableand turn it in with your printout.2Input inter–arrival time in seconds Mbps received2 Mbps No Debug4 Mbps No Debug6 Mbps No DebugMasured Inter–arrival time at sender Debug ON at sink only. Entermaximum Mbps for sink andgenerator.SinkGenMasured Inter–arrival time at sender Debug OFF at both genera-tor and sink. Enter maximumMbps for sink and generator.SinkGenShow calculations to predict the expected Mbps for a packetsize of 500 bytes, zero variance, and an inter–arrival time of0.01 seconds.When you have completed this Sections 1 and 2, demonstrate to the TA the maximum number ofMbits/sec you can generate with a packet size of 1,000 bytes, and a packet size variance of zero.Make sure the TA records the maximum number of Mbits/sec that you demonstrated. Look in theTurn-in list for any deliverables at this point in the lab.Check–Off Point: UDP GeneratorTA SignatureDate3 Network Traffic Analysis using EtherealFor this part of the lab, you will need to run udpgen on gatechftp, which is a machine that willbe used as the sender side. To make sure your results dont get mixed up with those of other students,you will need to use a unique port. Your port number should be 5000 + <yourgroup number>(e.g. for group 1, thats port 5001).On your machine, open a terminal and type:telnet 57.35.6.24(this will establish a telnet session between your machine and gatechftp). Use linuxclass as theuser and linux class as the password. Once the telnet session is opened, type the following com-mands.3cd lab3./udp gen i 0 -p <your port number> -a <your ip address>Note. This executable is already there for you. DO NOT PUT YOUR OWN UDP SINK CODEONTO GATECHFTP, USE ONLY THE PROGRAM ALREADY THERE. IF YOU GET A COREDUMP MAKE SURE NO OLD UDPSINK PROCESSES ARE RUNNING, IF SO KILL THEM.Use:ps -ef | egrep ‘‘udpgen’’(udp gen between quotes) to check for running processes. (Do not run the generator in debugmode, ie. no -D argument)On your machine, you will have to run ethereal, and your udp sink program to receive and captureUDP traffic, so just follow the instructions below. In one terminal, start network analyzer (ethereal)by typing:ethereal &or clicking the Redhat icon in the lower left corner of your screen and selecting System Tools –Network Analyzer.View – Time Display Format – Seconds since previous packetUnder capture – OptionsTurn on capture packets in promiscuous modeTurn on update list of packets in real timeTurn on automatic scrolling in live captureTurn off Enable MAC Name resolutionTurn off Enable network name resolutionTurn off Enable transport name resolutionClick OK buttonIn a second terminal, type:./udp sink -p <your port number> to start your udp traffic receiver.On gatechftp, type <Ctrl-C>in traffic generator window after 10 to 20 packets have been trans-mitted. Stop ethereal from collecting any more data by clicking the [Stop] button. Also, stop yoursink from running by pressing <Ctrl-C>. Then, at gatechftp, type:ps -ef | egrep ‘‘udpgen’’ and find the process corresponding to the udp gen you wererunning by looking at the port numbers. Once you find that process, the process ID number for thatprocess is located in the second column from the left. Kill the process using that number. Makesure you dont kill some other students udpgen.Q3.1 Looking at either tcpdump or ethereal, what differences do you see between a UDP datatransfer and


View Full Document

GT ECE 4110 - UDP Traffic Generator

Documents in this Course
PUSH Flag

PUSH Flag

17 pages

Ethernet

Ethernet

33 pages

Load more
Download UDP Traffic Generator
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view UDP Traffic Generator and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view UDP Traffic Generator 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?